From 807ac8a7925922759ef289892fbc3521e6b7dcde Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Sat, 9 Jan 2021 22:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=BB=E5=8A=A1=E4=B8=8B?= =?UTF-8?q?=E6=B4=BE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taskcheck/v2/list-task-checkitem.html | 111 +++++++++++ .../taskcheck/v2/list-task-enterprise.html | 186 +++++++++++------- .../route/taskcheck/v2/list-taskcheck.html | 2 +- 3 files changed, 222 insertions(+), 77 deletions(-) create mode 100644 src/main/resources/static/route/taskcheck/v2/list-task-checkitem.html diff --git a/src/main/resources/static/route/taskcheck/v2/list-task-checkitem.html b/src/main/resources/static/route/taskcheck/v2/list-task-checkitem.html new file mode 100644 index 0000000..24adac6 --- /dev/null +++ b/src/main/resources/static/route/taskcheck/v2/list-task-checkitem.html @@ -0,0 +1,111 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/taskcheck/v2/list-task-enterprise.html b/src/main/resources/static/route/taskcheck/v2/list-task-enterprise.html index 44cf041..889adb9 100644 --- a/src/main/resources/static/route/taskcheck/v2/list-task-enterprise.html +++ b/src/main/resources/static/route/taskcheck/v2/list-task-enterprise.html @@ -39,10 +39,102 @@ var laytpl = layui.laytpl; var resizeTimeout = null; var taskId = top.restAjax.params(window.location.href).taskId; + var checkItemListType = top.restAjax.params(window.location.href).checkItemListType; var tableUrl = 'api/taskcheck/v2/listpagetaskenterprise/{taskId}'; // 初始化表格 function initTable() { + function addContactOption(col) { + col.push({field: 'contactOption', width: 120, title: '行业检查项', align:'center', fixed: 'right', + templet: function(row) { + return ''; + } + }) + } + function addCustomOption(col) { + col.push({field: 'customOption', width: 120, title: '企业检查项', align:'center', fixed: 'right', + templet: function(row) { + return ''; + } + }) + } + var cols = [[ + {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, + {field: 'enterpriseName', width: 240, title: '企业名称', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'enterpriseAddress', width: 400, title: '详细地址', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'enterpriseLegalPerson', width: 120, title: '企业法人', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'isChecked', width: 90, title: '是否检查', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null) { + return '-'; + } + if(rowData == 0) { + return '否'; + } + if(rowData == 1) { + return '是'; + } + return '错误'; + } + }, + {field: 'isCompleted', width: 90, title: '是否完成', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null) { + return '-'; + } + if(rowData == 0) { + return '否'; + } + if(rowData == 1) { + return '是'; + } + return '错误'; + } + }, + {field: 'checkUserName', width: 120, title: '企业检查人', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + ]]; + if(checkItemListType && checkItemListType == '2') { + addContactOption(cols[0]); + } else if(checkItemListType && checkItemListType == '3') { + addCustomOption(cols[0]); + } else { + addContactOption(cols[0]); + addCustomOption(cols[0]); + } table.render({ elem: '#dataTable', id: 'dataTable', @@ -55,80 +147,7 @@ pageName: 'page', limitName: 'rows' }, - cols: [[ - {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field: 'enterpriseName', width: 240, title: '企业名称', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'enterpriseAddress', width: 400, title: '详细地址', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'enterpriseLegalPerson', width: 120, title: '企业法人', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'isChecked', width: 90, title: '是否检查', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null) { - return '-'; - } - if(rowData == 0) { - return '否'; - } - if(rowData == 1) { - return '是'; - } - return '错误'; - } - }, - {field: 'isCompleted', width: 90, title: '是否完成', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null) { - return '-'; - } - if(rowData == 0) { - return '否'; - } - if(rowData == 1) { - return '是'; - } - return '错误'; - } - }, - {field: 'checkUserName', width: 120, title: '企业检查人', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'operation', width: 90, title: '操作', fixed: 'right', align:'center', - templet: function(row) { - return ''; - } - }, - ]], + cols: cols, page: true, parseData: function(data) { return { @@ -148,14 +167,29 @@ page: { curr: currentPage }, - height: $win.height() - 90, + height: $win.height() - 22, }); } initTable(); table.on('tool(dataTable)', function(obj) { var data = obj.data; var event = obj.event; - if(event === 'pollutionEvent') { + if(event === 'contactOptionEvent') { + top.dialog.open({ + url: top.restAjax.path('route/taskcheck/v2/list-task-checkitem.html?taskEnterpriseId={taskEnterpriseId}&checkItemListType={checkItemListType}', [data.taskEnterpriseId, 1]), + title: '行业检查项', + width: '840px', + height: '80%', + onClose: function () {} + }); + } else if(event === 'customOptionEvent') { + top.dialog.open({ + url: top.restAjax.path('route/taskcheck/v2/list-task-checkitem.html?taskEnterpriseId={taskEnterpriseId}&checkItemListType={checkItemListType}', [data.taskEnterpriseId, 2]), + title: '企业检查项', + width: '840px', + height: '80%', + onClose: function () {} + }); } }); }); diff --git a/src/main/resources/static/route/taskcheck/v2/list-taskcheck.html b/src/main/resources/static/route/taskcheck/v2/list-taskcheck.html index 2f2a50c..a9c24d2 100644 --- a/src/main/resources/static/route/taskcheck/v2/list-taskcheck.html +++ b/src/main/resources/static/route/taskcheck/v2/list-taskcheck.html @@ -368,7 +368,7 @@ }); } else if(event === 'taskEnterpriseEvent') { top.dialog.open({ - url: top.restAjax.path('route/taskcheck/v2/list-task-enterprise.html?taskId={taskId}', [data.taskId]), + url: top.restAjax.path('route/taskcheck/v2/list-task-enterprise.html?taskId={taskId}&checkItemListType={checkItemListType}', [data.taskId, data.checkItemListType]), title: '检查企业列表', width: '70%', height: '80%',