This commit is contained in:
2026-09-20 18:12:51 +08:00
parent 4af9afda61
commit 7078de6385
3 changed files with 106 additions and 45 deletions
+14 -44
View File
@@ -2001,7 +2001,6 @@ export default {
return;
}
this.openArchive({ id }, true);
this.bindMkParentHeight();
return;
}
this.initDeptTree();
@@ -2012,10 +2011,6 @@ export default {
const readonly = this.$route.query.view === '1' || this.$route.query.view === 'true';
this.openArchive(this.$route.query.id ? { id: this.$route.query.id } : null, readonly);
}
this.bindMkParentHeight();
},
mounted() {
this.notifyMkParentHeight();
},
computed: {
...mapGetters(['permission', 'userInfo']),
@@ -2036,12 +2031,6 @@ export default {
isPublicViewPage() {
return this.$route.path === '/vehicle/customer-archive/public-view';
},
isMkEmbed() {
const isMk = this.$route.query.isMk;
return (
this.isPublicViewPage || isMk === '1' || isMk === 1 || isMk === 'true'
);
},
archiveContainer() {
return 'div';
},
@@ -2220,28 +2209,6 @@ export default {
hasPermission(code) {
return this.isAdmin || this.validData(this.permission[code], false);
},
bindMkParentHeight() {
if (!this.isMkEmbed) return;
document.addEventListener(
'DOMContentLoaded',
function () {
var tbody = document.body;
var height = tbody.clientHeight;
// 如需动态改变表单高度,可以直接发送此postMessage
window.parent.postMessage({ height: height }, '*');
},
false
);
},
notifyMkParentHeight() {
if (!this.isMkEmbed) return;
this.$nextTick(() => {
var tbody = document.body;
var height = tbody.clientHeight;
// 如需动态改变表单高度,可以直接发送此postMessage
window.parent.postMessage({ height: height }, '*');
});
},
mergeSelectOptions(target, values) {
const list = Array.isArray(values) ? values : values ? [values] : [];
list.forEach(value => {
@@ -3983,6 +3950,8 @@ export default {
},
closeArchive() {
if (this.isPublicViewPage) return;
this.archiveBox = false;
this.$router.$avueRouter?.closeTag?.();
this.$router.push('/vehicle/customer-archive');
},
openArchive(row, readonly = false) {
@@ -4009,7 +3978,6 @@ export default {
this.selectedQualificationFiles = [];
if (this.isPublicViewPage) this.ensurePublicViewOptions(this.archiveForm);
this.archiveBox = true;
this.notifyMkParentHeight();
this.loadChangeRecords();
})
.catch(() => {
@@ -4025,7 +3993,6 @@ export default {
this.ocrQualificationUploadFiles = [];
this.selectedQualificationFiles = [];
this.archiveBox = true;
this.notifyMkParentHeight();
},
resetArchive() {
this.readonly = false;
@@ -4185,16 +4152,20 @@ export default {
archive.fullName ||
this.archiveForm.fullName ||
'';
this.submitMkApprovalFlow(id, fullName)
.then(() => submitApproval(id))
.then(() => {
this.closeArchive();
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });
});
this.submitCustomerApproval(id, fullName).then(() => {
this.closeArchive();
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });
});
});
});
},
/**
* 列表 / 新增 / 编辑提交共用:提交 MK 审核流并更新客商审批状态
*/
submitCustomerApproval(id, fullName = '') {
return this.submitMkApprovalFlow(id, fullName).then(() => submitApproval(id));
},
/**
* 提交 MK 审核流:templateCode 取业务字典 mk_template 中「提交审核流」的键值
* 提交人手机号由后端从用户表读取真实值(前端接口会脱敏)
@@ -4811,8 +4782,7 @@ export default {
cancelButtonText: '取消',
type: 'warning',
})
.then(() => this.submitMkApprovalFlow(row.id, archive.fullName || row.fullName))
.then(() => submitApproval(row.id))
.then(() => this.submitCustomerApproval(row.id, archive.fullName || row.fullName))
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });