diff --git a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js index 8ca33c7..d6e75b5 100644 --- a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js +++ b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js @@ -1,19 +1,18 @@ let layer, laydate, table, form; $(function () { - layui.use(['layer', 'laydate', 'table', 'form'], function () { + layui.use(["layer", "laydate", "table", "form"], function () { layer = layui.layer; laydate = layui.laydate; form = layui.form; table = layui.table; laydate.render({ - elem: '#startDate', - type: 'month', - format: 'yyyy-MM', - }) - businessDivisionPullDown(form,null); + elem: "#startDate", + type: "month", + format: "yyyy-MM", + }); + businessDivisionPullDown(form, null); initTable(); }); - }); function search(type) { if (type === 1) { @@ -23,12 +22,12 @@ function search(type) { $("#evStatus").val(""); $("#auditStatus").val(""); $("#startDate").val(""); - form.render('select'); + form.render("select"); } - table.reload('baseTable', { - url: ctxPath + '/outsourcer/outsourcerEvaluateList', + table.reload("baseTable", { + url: ctxPath + "/outsourcer/outsourcerEvaluateList", page: { - curr: 1 + curr: 1, }, where: { keyWord: $("#keyWord").val(), @@ -37,7 +36,7 @@ function search(type) { auditStatus: $("#auditStatus").val(), startDate: $("#startDate").val(), endDate: $("#endDate").val(), - } + }, }); } @@ -57,111 +56,168 @@ function initTable() { let user = JSON.parse(loginUser); //渲染表格 table.render({ - elem: '#baseTable' - , url: ctxPath + '/outsourcer/outsourcerEvaluateList' //数据接口 - , method: 'get' //方式默认是get - , toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 - , where: { - } //post请求必须加where ,post请求需要的参数 - , cellMinWidth: 80 - , cols: [[ //表头 - { - field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers' - } - , {field: 'evaluateDept', align: 'center', title: '评价事业部'} - , {field: 'evaluateTitle', align: 'center', title: '评价标题'} - , {field: 'evaluateMonth', align: 'center', title: '评价年月'} - , {field: 'projectNum', align: 'center', title: '项目数量'} - , {field: 'outsourcerNum', align: 'center', title: '外包商数量'} - , {field: 'evaluateStatus', align: 'center', title: '评价状态', templet: d => - Number(d.evaluateNum) > 0 && d.rejectReason ? '评价驳回' : (Number(d.evaluateNum) > 0 ? '已评价' : '未评价') - } - , { - field: 'auditStatus', align: 'center', title: '审核状态', templet: d => { - if (Number(d.isApprove) > 0 && !isEmpty(d.rejectReason)) { - return '已驳回'; - } - if (Number(d.isApprove) > 0) { - return '已通过'; - } - if (Number(d.evaluateNum) > 0 && Number(d.isApprove) === 0 && isEmpty(d.rejectReason)) { - return '待审批'; - } - return '待评价'; - } - } - , {field: 'rejectReason', align: 'center', title: '驳回原因'} - , { - fixed: 'right', width: 180, title: '操作', align: 'center', templet: d => { - let text = ""; - if (Number(d.isApprove) === 0 && Number(d.evaluateNum) ===0 ) { - text += '评价'; - }else if (Number(d.isApprove) === 1) { - text += '查看评价'; - }else if ((Number(d.isApprove) === 0 || Number(d.isApprove) === 2) && Number(d.evaluateNum) >0) { - text += '重新评价'; - } - return text; - } - }, - ]] - , id: 'baseTable' - , page: true //开启分页 - , loading: true //数据加载中。。。 - , limits: [10, 20, 100] //一页选择显示3,5或10条数据 - , limit: 10 //一页显示5条数据 - , response: { - statusCode: 200 //规定成功的状态码,默认:0 - }, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据 + elem: "#baseTable", + url: ctxPath + "/outsourcer/outsourcerEvaluateList", //数据接口 + method: "get", //方式默认是get + toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 + where: {}, //post请求必须加where ,post请求需要的参数 + cellMinWidth: 80, + cols: [ + [ + //表头 + { + field: "number", + width: 80, + title: "序号", + align: "center", + type: "numbers", + }, + { field: "evaluateDept", align: "center", title: "评价事业部" }, + { field: "evaluateTitle", align: "center", title: "评价标题" }, + { field: "evaluateMonth", align: "center", title: "评价年月" }, + { field: "projectNum", align: "center", title: "项目数量" }, + { + field: "outsourcerNum", + align: "center", + title: "外包商数量", + }, + { + field: "evaluateStatus", + align: "center", + title: "评价状态", + templet: (d) => + Number(d.evaluateNum) > 0 && d.rejectReason + ? "评价驳回" + : Number(d.evaluateNum) > 0 + ? "已评价" + : "未评价", + }, + { + field: "auditStatus", + align: "center", + title: "审核状态", + templet: (d) => { + if ( + Number(d.isApprove) > 0 && + !isEmpty(d.rejectReason) + ) { + return "已驳回"; + } + if (Number(d.isApprove) > 0) { + return "已通过"; + } + if ( + Number(d.evaluateNum) > 0 && + Number(d.isApprove) === 0 && + isEmpty(d.rejectReason) + ) { + return "待审批"; + } + return "待评价"; + }, + }, + { field: "rejectReason", align: "center", title: "驳回原因" }, + { + fixed: "right", + width: 180, + title: "操作", + align: "center", + templet: (d) => { + let text = ""; + if ( + Number(d.isApprove) === 0 && + Number(d.evaluateNum) === 0 + ) { + text += + '评价'; + } else if (Number(d.isApprove) === 1) { + text += + '查看评价'; + } else if ( + (Number(d.isApprove) === 0 || + Number(d.isApprove) === 2) && + Number(d.evaluateNum) > 0 + ) { + text += + '重新评价'; + } + return text; + }, + }, + ], + ], + id: "baseTable", + page: true, //开启分页 + loading: true, //数据加载中。。。 + limits: [10, 20, 100], //一页选择显示3,5或10条数据 + limit: 10, //一页显示5条数据 + response: { + statusCode: 200, //规定成功的状态码,默认:0 + }, + parseData: function (res) { + //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据 let result; - if (res.data !== '' && res.data != null && res.data !== "null") { + if (res.data !== "" && res.data != null && res.data !== "null") { if (this.page.curr) { - result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr); + result = res.data.slice( + this.limit * (this.page.curr - 1), + this.limit * this.page.curr + ); } else { result = res.data.slice(0, this.limit); } } return { - "code": res.code, //解析接口状态 - "msg": res.msg, //解析提示文本 - "count": res.count, //解析数据长度 - "data": result, //解析数据列表 + code: res.code, //解析接口状态 + msg: res.msg, //解析提示文本 + count: res.count, //解析数据长度 + data: result, //解析数据列表 }; }, - toolbar: "#toolbar" + toolbar: "#toolbar", }); - table.on('tool(test)', function (obj) { + table.on("tool(test)", function (obj) { var data = obj.data; //当前行数据 var rowIndex = obj.index; var layEvent = obj.event; //当前点击的事件名 - if (layEvent === 'evaluation') { - evaluatingSubpages(0,data); + if (layEvent === "evaluation") { + evaluatingSubpages(0, data); } - if (layEvent === 'reevaluate') { + if (layEvent === "reevaluate") { evaluatingSubpages(2, data); } - if (layEvent === 'viewReviews') { + if (layEvent === "viewReviews") { evaluatingSubpages(1, data); } }); //评价子页面 - function evaluatingSubpages(type,data) { + function evaluatingSubpages(type, data) { data.type = type; - let title = ''; + let title = ""; if (type === 0) { - title = '评价'; - }else if (type === 1) { - title = '查看评价'; - }else if (type === 2) { - title = '重新评价'; + title = "评价"; + } else if (type === 1) { + title = "查看评价"; + } else if (type === 2) { + title = "重新评价"; } - openPage(title, './evaluationForm.html?type=' + type + '&templateId=' + data.templateId + '&id=' + data.id + '&detailsId=' + data.detailsId); + openPage( + title, + "./evaluationForm.html?type=" + + type + + "&templateId=" + + data.templateId + + "&id=" + + data.id + + "&detailsId=" + + data.detailsId + ); } function openPage(title, url) { @@ -171,20 +227,20 @@ function initTable() { title: title, content: url, maxmin: false, - area: ['90%', '95%'], - success: function (layero, index) {} + area: ["90%", "95%"], + success: function (layero, index) {}, }; - if (title.indexOf('查看') !== -1) { + if (title.indexOf("查看") !== -1) { layer.open(layerOptions); } else { layerOptions.btn = ["确定"]; 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(); }; diff --git a/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditList.html b/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditList.html index 363e563..9118b4a 100644 --- a/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditList.html +++ b/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditList.html @@ -1,9 +1,10 @@ + 外包商评价 - + + -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
- +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+ + +
- -
- - - -
+ +
+
- -
-
-
- - - - - - - + + + + + + + + - - - - - - - + + + + + + + + function closePage() { + let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 + parent.search(1) + parent.layer.close(index); // 再执行关闭 + } + \ No newline at end of file diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/outsourcerEvaluationList.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/outsourcerEvaluationList.html index 9e1fb68..d5819fd 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/outsourcerEvaluationList.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/outsourcerEvaluationList.html @@ -1,9 +1,10 @@ + 外包商评价 - + + -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
- +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+ + + + +
- -
- - - - - -
+ +
+
- -
-
-
- - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/pages/evaluate/subEvaluate/InitiateEvaluationForm.html b/src/main/resources/static/pages/evaluate/subEvaluate/InitiateEvaluationForm.html index 614b7cf..2aa3e8f 100644 --- a/src/main/resources/static/pages/evaluate/subEvaluate/InitiateEvaluationForm.html +++ b/src/main/resources/static/pages/evaluate/subEvaluate/InitiateEvaluationForm.html @@ -1,9 +1,10 @@ + 发起评价 - + + -
-
-
-
-
- +
+
+ +
- + +
+ +
-
-
- -
- +
+ +
+ +
-
-
-
- + +
+ +
+
+
+ +
+ +
-
- -
- + -
- - -
-
-
- * 选择评价外包商: -
- +
-
-
+
+
+ * 选择评价外包商: +
+ +
+
+
+
-
+ @@ -125,14 +122,14 @@ data: data.field, success: function (res) { if (res.res === 1) { - layer.msg('提交成功', {icon: 6}); + layer.msg('提交成功', { icon: 6 }); table.reload('baseTable', { data: [] }); alreadyChooseTrees = []; closePage(); } else { - layer.msg(res.resMsg, {icon: 5}); + layer.msg(res.resMsg, { icon: 5 }); } } }); @@ -160,9 +157,9 @@ $(".layui-input").attr("disabled", true); $(".layui-select").attr("disabled", true); $(".layui-select").attr("readonly", true); - $("input[name^='layuiTreeCheck']").prop("disabled",true); + $("input[name^='layuiTreeCheck']").prop("disabled", true); $("input[name^='layuiTreeCheck']").next(".layui-form-checkbox").addClass(".layui-checkbox-disbaled layui-disabled"); - $("input[name^='layTableCheckbox']").prop("disabled",true); + $("input[name^='layTableCheckbox']").prop("disabled", true); } } form.render() @@ -180,7 +177,7 @@ let checkStatus = table.checkStatus('baseTable'); let checkData = checkStatus.data; if (checkData.length <= 0) { - layer.msg('请先选择需要评价的外包商', {icon: 5}); + layer.msg('请先选择需要评价的外包商', { icon: 5 }); return false; } else { submit(data, checkData); @@ -217,7 +214,7 @@ oncheck: function (obj) { if (getUrlParam("type") === 'view') { return false; - }else{ + } else { table.reload('baseTable', { data: [] }); @@ -234,7 +231,7 @@ }); form.render(); } else { - layer.msg(res.msg, {icon: 5}); + layer.msg(res.msg, { icon: 5 }); } } }); @@ -251,7 +248,7 @@ let list = res.obj; setSelectValue(list, 'orgId'); } else { - layer.msg(res.msg, {icon: 5}); + layer.msg(res.msg, { icon: 5 }); } } }); @@ -268,7 +265,7 @@ let list = res.obj; setSelectValue(list, 'templateId'); } else { - layer.msg(res.msg, {icon: 5}); + layer.msg(res.msg, { icon: 5 }); } } }); @@ -287,7 +284,7 @@ function submitTree() { if (alreadyChooseTrees.length <= 0) { - layer.msg('请先选择评价外包商', {icon: 5}); + layer.msg('请先选择评价外包商', { icon: 5 }); return; } $.ajax({ @@ -304,7 +301,7 @@ data: tableData }); } else { - layer.msg(res.msg, {icon: 5}); + layer.msg(res.msg, { icon: 5 }); } } }); @@ -312,10 +309,10 @@ function initTable() { var cols = [ - {type: 'checkbox', fixed: 'left'}, - {field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'}, - {field: 'subName', title: '施工业务外包商', align: 'center', minWidth: 160}, - {field: 'proName', title: '项目名称', align: 'center', minWidth: 160} + { type: 'checkbox', fixed: 'left' }, + { field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers' }, + { field: 'subName', title: '施工业务外包商', align: 'center', minWidth: 160 }, + { field: 'proName', title: '项目名称', align: 'center', minWidth: 160 } ]; if (getUrlParam("type") !== 'view') { @@ -394,7 +391,7 @@ //对tree进行赋值 form.render() } else { - layer.msg(res.msg, {icon: 5}); + layer.msg(res.msg, { icon: 5 }); } } });