|
@@ -58,7 +58,7 @@
|
|
<div class="layui-col-md12">
|
|
<div class="layui-col-md12">
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
<div style="float: left">
|
|
<div style="float: left">
|
|
- <button class="layui-btn" id="customer_add"><i
|
|
|
|
|
|
+ <button class="layui-btn" id="customer_add" data-permission="customer.add_report_customer"><i
|
|
class="layui-icon layui-icon-add-circle"></i>添加
|
|
class="layui-icon layui-icon-add-circle"></i>添加
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -85,10 +85,12 @@
|
|
<script type="text/html" id="customer-operate-bar">
|
|
<script type="text/html" id="customer-operate-bar">
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
<a class="layui-btn layui-btn-xs" lay-event="customer_edit"
|
|
<a class="layui-btn layui-btn-xs" lay-event="customer_edit"
|
|
|
|
+ data-permission="customer.add_report_customer"
|
|
>修改</a>
|
|
>修改</a>
|
|
</div>
|
|
</div>
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="customer_del"
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="customer_del"
|
|
|
|
+ data-permission="customer.delete_report_customer"
|
|
>删除</a>
|
|
>删除</a>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
</script>
|
|
@@ -103,29 +105,28 @@
|
|
base: '../../../layuiadmin/' //静态资源所在路径
|
|
base: '../../../layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
index: 'lib/index' //主入口模块
|
|
- }).use(['index', 'table', 'form', 'upload'], function () {
|
|
|
|
|
|
+ }).use(['index', 'table', 'form',], function () {
|
|
var $ = layui.$;
|
|
var $ = layui.$;
|
|
var table = layui.table
|
|
var table = layui.table
|
|
, form = layui.form
|
|
, form = layui.form
|
|
- , upload = layui.upload
|
|
|
|
, admin = layui.admin;
|
|
, admin = layui.admin;
|
|
|
|
|
|
table.render({
|
|
table.render({
|
|
elem: '#customer_datagrid'
|
|
elem: '#customer_datagrid'
|
|
, url: '/customer/report_customer/'
|
|
, url: '/customer/report_customer/'
|
|
, cols: [[
|
|
, cols: [[
|
|
- {field: 'name', title: '姓名', width: 200}
|
|
|
|
|
|
+ {field: 'name', title: '姓名', width: 120}
|
|
, {field: 'gender_text', title: "性别", width: 70}
|
|
, {field: 'gender_text', title: "性别", width: 70}
|
|
- , {field: 'tel', title: '电话', width: 150}
|
|
|
|
- , {field: 'village', title: '小区', width: 200}
|
|
|
|
|
|
+ , {field: 'tel', title: '电话', width: 120}
|
|
|
|
+ , {field: 'village', title: '小区', width: 150}
|
|
, {field: 'address', title: '地址', width: 200}
|
|
, {field: 'address', title: '地址', width: 200}
|
|
, {field: 'source_text', title: '来源', width: 100}
|
|
, {field: 'source_text', title: '来源', width: 100}
|
|
, {field: 'project_text', title: '项目', width: 200}
|
|
, {field: 'project_text', title: '项目', width: 200}
|
|
, {field: 'notes', title: '备注', width: 200}
|
|
, {field: 'notes', title: '备注', width: 200}
|
|
- , {field: 'report_status_text', title: '报备状态', width: 200}
|
|
|
|
- , {field: 'check_user', title: '审核人', width: 100}
|
|
|
|
- , {field: 'check_time', title: '审核时间', width: 150}
|
|
|
|
- , {width: 150, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
|
|
|
|
+ , {field: 'report_status_text', title: '报备状态', width: 100}
|
|
|
|
+ , {field: 'check_user_text', title: '审核人', width: 100}
|
|
|
|
+ , {field: 'check_time', title: '审核时间', width: 160}
|
|
|
|
+ , {width: 130, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
]]
|
|
]]
|
|
, page: true
|
|
, page: true
|
|
, height: 'full-108'
|
|
, height: 'full-108'
|
|
@@ -145,13 +146,14 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- // $('#btn_download').on('click', function () {
|
|
|
|
- // layui.view.download("/static/xls/设备信息导入模板.xlsx");
|
|
|
|
- // });
|
|
|
|
//监听工具条
|
|
//监听工具条
|
|
table.on('tool(customer-operate)', function (obj) {
|
|
table.on('tool(customer-operate)', function (obj) {
|
|
var data = obj.data;
|
|
var data = obj.data;
|
|
if (obj.event === 'customer_del') {
|
|
if (obj.event === 'customer_del') {
|
|
|
|
+ if(data.report_status !== 0){
|
|
|
|
+ layer.msg("只有待审核才允许删除");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
layer.confirm('确定要删除吗?', function (index) {
|
|
layer.confirm('确定要删除吗?', function (index) {
|
|
layer.close(index);
|
|
layer.close(index);
|
|
admin.req({
|
|
admin.req({
|