From c5dcce3fe318e0f8aafa15fd2564d42d697e5a01 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Fri, 30 Jan 2026 15:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=95=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/car_application_audit/car_audit_detail.js | 10 ++--- js/car_application_audit/car_audit_form.js | 40 +++++++++++--------- js/car_application_audit/car_audit_list.js | 23 +++++------ 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/js/car_application_audit/car_audit_detail.js b/js/car_application_audit/car_audit_detail.js index 44c000b..88d165c 100644 --- a/js/car_application_audit/car_audit_detail.js +++ b/js/car_application_audit/car_audit_detail.js @@ -520,11 +520,11 @@ function setOperRecordInfo(list, obj) { // 2. 部门映射表(替代多 if-else,清晰直观) const deptMap = { '0': '分包商', - '1': '现场项目部', - '2': '智联装备云控公司放线队', - '3': '项目部所属分公司', - '4': '智联装备云控经营部', - '5': '智联装备云控公司总经理' + '1': '项目部', + '2': '放线队', + '3': '分公司', + '4': '经营部', + '5': '总经理' }; const dept = deptMap[auditType] || '未知部门'; // 默认值容错 diff --git a/js/car_application_audit/car_audit_form.js b/js/car_application_audit/car_audit_form.js index 3780faf..18f497b 100644 --- a/js/car_application_audit/car_audit_form.js +++ b/js/car_application_audit/car_audit_form.js @@ -52,26 +52,30 @@ function submitApply(data) { $('.save').removeClass("layui-btn-disabled").attr("disabled", false); $('.cancel').removeClass("layui-btn-disabled").attr("disabled", false); if (result.code === 200) { - // top.layer.msg(result.data, {icon: 1}); - // if (objParam.token) { - // // 如果没有 token,直接关闭整个窗口 - // window.parent.open('', '_self'); - // window.parent.close(); - // return; - // } else { - // closePage(1); - // } + layer.msg(result.data, {icon: 1, time: 1500}, function () { - const topParent = window.top; - // 2. 调用最外层父页面的刷新表格函数 - if (topParent.queryTable) { - topParent.queryTable(1); // 执行最外层的刷新 - } - // 3. 关闭所有layui弹窗(包括所有iframe层) - topParent.layer.closeAll(); - // 4. 提示成功 - topParent.layer.msg(result.data, {icon: 1}); + const currIframe = window; // 当前三级 iframe + const parentIframe = window.parent; // 二级 iframe 的 window + const topPage = parentIframe.parent; // 一级页面 window(最顶层页面) + // 3. 调用一级页面刷新方法 + if (topPage.queryTable && typeof topPage.queryTable === 'function') { + topPage.queryTable(1); // 刷新一级页面 + } else { + console.warn('一级页面没有 queryTable 方法'); + } + + // 4. 关闭三级页面(自己所在的iframe) + const currIndex = parentIframe.layer.getFrameIndex(currIframe.name); + if (currIndex !== undefined) parentIframe.layer.close(currIndex); + + // 5. 关闭二级页面(父iframe) + if (parentIframe !== topPage) { + const parentIndex = topPage.layer.getFrameIndex(parentIframe.frameElement.name); + if (parentIndex !== undefined) topPage.layer.close(parentIndex); + } + + }); } else { layer.msg(result.data, {icon: 2}); } diff --git a/js/car_application_audit/car_audit_list.js b/js/car_application_audit/car_audit_list.js index d95599f..6ced0de 100644 --- a/js/car_application_audit/car_audit_list.js +++ b/js/car_application_audit/car_audit_list.js @@ -125,6 +125,10 @@ function initTable() { unresize: true, align: "center", sort:true, + templet: function (d) { + return '' + + d.planNum + ''; + } }, { field: "money", @@ -189,21 +193,18 @@ function initTable() { templet: function (d) { let html = ""; let status = d.status; + html += "详情 "; if(status == -1){ - html += "提交" + html += "