diff --git a/src/api/vehicle/customer-archive.js b/src/api/vehicle/customer-archive.js
index 98e9f4c..f6266db 100644
--- a/src/api/vehicle/customer-archive.js
+++ b/src/api/vehicle/customer-archive.js
@@ -62,6 +62,17 @@ export const getPublicChangeRecordList = (customerId, current, size) => {
});
};
+export const postPublicProcessMessage = data => {
+ return request({
+ url: '/blade-transport/customer-archive/public/process-message',
+ method: 'post',
+ meta: {
+ isToken: false,
+ },
+ data,
+ });
+};
+
export const submit = row => {
return request({
url: '/blade-transport/customer-archive/submit',
diff --git a/src/views/vehicle/customer-archive-public-view.vue b/src/views/vehicle/customer-archive-public-view.vue
index 8fb5734..a1cf726 100644
--- a/src/views/vehicle/customer-archive-public-view.vue
+++ b/src/views/vehicle/customer-archive-public-view.vue
@@ -1,11 +1,12 @@
-
+
diff --git a/src/views/vehicle/customer-archive.vue b/src/views/vehicle/customer-archive.vue
index 967f2c9..fcf3d08 100644
--- a/src/views/vehicle/customer-archive.vue
+++ b/src/views/vehicle/customer-archive.vue
@@ -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: '提交成功!' });