付款单申请审核

This commit is contained in:
lSun 2026-01-30 15:35:47 +08:00
parent c8028b979f
commit c5dcce3fe3
3 changed files with 39 additions and 34 deletions

View File

@ -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] || '未知部门'; // 默认值容错

View File

@ -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});
}

View File

@ -125,6 +125,10 @@ function initTable() {
unresize: true,
align: "center",
sort:true,
templet: function (d) {
return '<span style="color: #2F82FB;cursor: pointer;" title="' + d.planNum + '" onclick=\'planAuditDetail(' + JSON.stringify(d) + ')\'>'
+ d.planNum + '</span>';
}
},
{
field: "money",
@ -189,21 +193,18 @@ function initTable() {
templet: function (d) {
let html = "";
let status = d.status;
html += "<a onclick='checkAuditDetail(" + JSON.stringify(d) + ")'>详情</a> ";
if(status == -1){
html += "<a onclick='checkSubmit(" + JSON.stringify(d) + ")'>提交</a>"
html += "<div class='splitLine'>|</div><a onclick='checkSubmit(" + JSON.stringify(d) + ")'>提交</a>"
}
if(status == -1 || status == 2){
html += "<div class='splitLine'>|</div><a onclick='checkUpdate(" + JSON.stringify(d) + ")'>修改</a>"
html += "<div class='splitLine'>|</div><a onclick='checkDelete(" + JSON.stringify(d) + ")'>删除</a>";
}
html += "<div class='splitLine'>|</div><a onclick='planAuditDetail(" + JSON.stringify(d) + ")'>详情</a>";
// html += "<div class='splitLine'>|</div><a onclick='planAuditDetail(" + JSON.stringify(d) + ")'>详情</a>";
if ( status == 1 ) {
html += "<div class='splitLine'>|</div><a onclick='checkDetail(" + JSON.stringify(d) + ")'>审核</a>";
}
if(status == 0){
html += "<div class='splitLine'>|</div><a onclick='checkAuditDetail(" + JSON.stringify(d) + ")'>审核记录</a>";
}
return html;
},
},
@ -237,15 +238,15 @@ function getCheckStatus(auditType,status) {
}
let name = '分包商';
if(auditType == 1){
name = "现场项目部"
name = "项目部"
}else if(auditType == 2){
name = "智联装备云控公司放线队"
name = "放线队"
}else if(auditType == 3){
name = "项目部所属分公司"
name = "分公司"
}else if(auditType == 4){
name = "智联装备云控经营部"
name = "经营部"
}else if(auditType == 5){
name = "智联装备云控公司总经理"
name = "总经理"
}
if (status == 1) {
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待"+ name+"审核";