diff --git a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js index d6e75b5..5508069 100644 --- a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js +++ b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js @@ -238,11 +238,12 @@ function initTable() { layerOptions.yes = function (index, layero) { //提交子页面时执行 // 获取弹出层中的form表单元素 - const formSubmit = layer.getChildFrame("form", index); + // const formSubmit = layer.getChildFrame("form", index); // 查找class样式为submitBtn的按钮 - const submited = formSubmit.find("button.subBtn"); + // const submited = formSubmit.find("button.subBtn"); // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息 - submited.click(); + // submited.click(); + initTable(); }; layer.open(layerOptions); } diff --git a/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js b/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js index 2d76da8..0a73281 100644 --- a/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js +++ b/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js @@ -33,7 +33,7 @@ function search(type) { curr: 1 }, where: { - type:'audit', + type: 'audit', keyWord: $("#keyWord").val(), evaluateDeptId: $("#evaluateDeptId").val(), evStatus: $("#evStatus").val(), @@ -52,7 +52,7 @@ function initTable() { , method: 'get' //方式默认是get , toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 , where: { - type:'audit', + type: 'audit', } //post请求必须加where ,post请求需要的参数 , cellMinWidth: 80 , cols: [[ //表头 @@ -64,16 +64,24 @@ function initTable() { , {field: 'evaluateMonth', align: 'center', title: '评价年月'} , {field: 'projectNum', align: 'center', title: '项目数量'} , {field: 'outsourcerNum', align: 'center', title: '外包商数量'} - , {field: 'isApprove', align: 'center', title: '评价状态', templet: d =>{ - if (d.rejectReason){ - return '评价驳回' - }else { - return Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') - } + , { + field: 'isApprove', align: 'center', title: '评价状态', templet: d => { + if (d.rejectReason) { + return '评价驳回' + } else { + return Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') + } // Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') - }} - , {field: 'status', align: 'center', title: '审核状态', templet: d => - Number(d.status) === 0 ? '待审核' : (Number(d.status) === 1 ? '已审核' : '审核中') + } + } + , { + field: 'status', align: 'center', title: '审核状态', templet: d => { + if (d.rejectReason) { + return '审核驳回' + } else { + return Number(d.status) === 0 ? '待审核' : (Number(d.status) === 1 ? '已审核' : '审核中') + } + } } , {field: 'rejectReason', align: 'center', title: '驳回原因'} , { diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 1bff001..371c0f4 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -20,6 +20,10 @@ display: flex; align-items: center; } + + .layui-layer-iframe .layui-layer-btn0 { + display: none; + } @@ -189,26 +193,38 @@ loading: true, done: function (res) { var tableView = this.elem.next(); - layui.each(res.data, function (i, item) { - if (item.isApprove == '1') { // Condition to make the row non-editable - var cols = tableView.find('tr[data-index=' + i + ']').find('td'); - cols.each(function (index, item) { - //对field为subName,proName 的列不进行设置 - if (index > 2) { - $(this).data('edit', 'false'); - $(this).removeAttr('data-edit'); - $(this).addClass('layui-disabled'); - //将td元素的contentEditable属性设置为false,禁止编辑 - $(this).attr('contentEditable', 'false'); - //将td元素的style属性设置为pointer-events: none,禁止点击 - $(this).css('pointer-events', 'none'); - delete item.dataset.edit - } + layui.each(res.data, function (i, item1) { + if (item1.isApprove == '1') { // Condition to make the row non-editable - - - }); } + var cols = tableView.find('tr[data-index=' + i + ']').find('td'); + cols.each(function (index, item) { + //对field为subName,proName 的列不进行设置 + if (index > 2 && index != cols.length - 1) { + $(this).data('edit', 'false'); + $(this).removeAttr('data-edit'); + $(this).addClass('layui-disabled'); + //将td元素的contentEditable属性设置为false,禁止编辑 + $(this).attr('contentEditable', 'false'); + //将td元素的style属性设置为pointer-events: none,禁止点击 + $(this).css('pointer-events', 'none'); + delete item.dataset.edit + let fileDom = ''; + + // 只要有文件列表,并且文件列表数量大于0,添加文件信息 + // if (item1.fileList && item1.fileList.length > 0) { + // // 根据文件列表的索引判断将哪个文件添加到相应的列 + // fileDom = `${item1.fileList[index - 3]}`; + // } + + // console.log('fileDomfileDomfileDomfileDom', fileDom) + + // // 将fileDom添加到当前单元格 + // $(this).append(fileDom); + } + + }); + }); var columsName = ['subName'];//需要合并的列名称 ['business_tenant_name','land','contract_begin','contract_end','history_arrears','period']; var columsIndex = [1];//需要合并的列索引值 [2,3,5,6,14,15]; @@ -225,31 +241,31 @@ text: '评价', type: 'button' }); + let fileList = [] + let uploadDom = [] // 将自定义元素插入到最后一个单元格 div.append(customElement); customElement.on('click', function (event) { - event.stopPropagation(); // 阻止事件冒泡 + event.stopPropagation() event.preventDefault() - console.log('按钮被点击了'); let rowIndex = $(this).closest('tr').data('index') const tableList = JSON.parse(msg) - console.log('rowIndex当前行的索引', rowIndex) - // 在这里添加按钮点击后的逻辑 - // 组装dom let formHtml = `