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%',