✨ 多业务接入MK审核流,提交改传bizId并由后端生成表单实例
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2348,7 +2348,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="detailPageLocked && !isPublicWaybillView" class="waybill-manage-page__detail-footer">
|
||||
<div v-if="detailPageLocked" class="waybill-manage-page__detail-footer">
|
||||
<el-button type="primary" @click="closeDetail">关闭</el-button>
|
||||
</div>
|
||||
<template v-if="!detailPageLocked" #footer>
|
||||
@@ -3088,7 +3088,6 @@ import {
|
||||
} from '@/api/business/process-config';
|
||||
import { getPunchRecords as getWaybillPunchRecords, locateVehicle, trackVehicle } from '@/api/business/waybill-manage';
|
||||
import VoucherExecutionDetail from './voucher-execution-detail.vue';
|
||||
import { getMkPublicDetail } from '@/api/mk-process';
|
||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||
import {
|
||||
fetchDriversByCarrierOrganizations,
|
||||
@@ -3098,7 +3097,6 @@ import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { addressTypeOptions } from '@/option/base/common-address';
|
||||
import { packageOptions } from '@/option/business/common';
|
||||
import { formatUpdateUserName } from '@/utils/audit';
|
||||
import { submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { openImportDialog } from '@/utils/import-excel';
|
||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||
@@ -3607,7 +3605,6 @@ export default {
|
||||
this.formPageLocked = this.isStandaloneWaybillFormPage;
|
||||
this.detailPageLocked = this.isStandaloneWaybillDetailPage;
|
||||
this.formModeLocked = this.$route.query.mode || '';
|
||||
if (this.isPublicWaybillView) return;
|
||||
this.setupSearchAutocompletes();
|
||||
if (this.config.enableAllDept && this.isAdmin) {
|
||||
this.allDept = 1;
|
||||
@@ -3680,14 +3677,8 @@ export default {
|
||||
isStandaloneWaybillFormPage() {
|
||||
return this.isStandaloneWaybillPage && ['add', 'edit'].includes(this.$route.query.mode);
|
||||
},
|
||||
isPublicWaybillView() {
|
||||
return this.$route.path === '/business/waybill-manage/public-view';
|
||||
},
|
||||
isStandaloneWaybillDetailPage() {
|
||||
return (
|
||||
(this.standaloneDetailPage && this.$route.path === standaloneWaybillDetailRoute) ||
|
||||
this.isPublicWaybillView
|
||||
);
|
||||
return this.standaloneDetailPage && this.$route.path === standaloneWaybillDetailRoute;
|
||||
},
|
||||
// 容器形态读实例创建时锁定的标志,不随 $route 翻转(详见 data 中 formPageLocked 的说明)
|
||||
// 当前路由是否仍属于本实例(tab.js 按 fullPath 建实例,一个实例只对应一个 path)。
|
||||
@@ -4640,19 +4631,14 @@ export default {
|
||||
this.waybillVoucherFolder = null;
|
||||
this.waybillVoucherFolderView = false;
|
||||
this.waybillVoucherImagesLoaded = false;
|
||||
const request = this.isPublicWaybillView
|
||||
? getMkPublicDetail('waybill-manage', row.id)
|
||||
: typeof this.api.getDetail === 'function'
|
||||
const request =
|
||||
typeof this.api.getDetail === 'function'
|
||||
? this.api.getDetail(row.id)
|
||||
: Promise.resolve({ data: { data: row } });
|
||||
request
|
||||
.then(res => {
|
||||
const detail = res?.data?.data || res?.data || row;
|
||||
this.detailRow = detail;
|
||||
if (this.isPublicWaybillView) {
|
||||
this.applyFormDetail(detail);
|
||||
return;
|
||||
}
|
||||
this.loadWaybillPunchRecords();
|
||||
this.loadWaybillVoucherImages();
|
||||
if (detail.contractId) {
|
||||
@@ -4728,7 +4714,6 @@ export default {
|
||||
return row.id || row.customerId || '';
|
||||
},
|
||||
canOpenWaybillDetailSummaryLink(prop) {
|
||||
if (this.isPublicWaybillView) return false;
|
||||
const row = this.detailRow || {};
|
||||
const value = this.formatDetailValue(row, prop);
|
||||
if (!value || value === '-') return false;
|
||||
@@ -5655,23 +5640,11 @@ export default {
|
||||
}
|
||||
this.getSaveRequest()(submitRow).then(
|
||||
res => {
|
||||
const data = res.data?.data || {};
|
||||
const id = data.id || submitRow.id;
|
||||
const after = id
|
||||
? submitMkApprovalFlow({
|
||||
bizType: 'waybill-manage',
|
||||
formInstanceId: id,
|
||||
subjectName: data.waybillNo || submitRow.waybillNo || '',
|
||||
approvalStatus: data.approvalStatus || submitRow.approvalStatus || '',
|
||||
})
|
||||
: Promise.resolve();
|
||||
return after.then(() => {
|
||||
this.markWaybillListNeedRefresh();
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: '提交成功!' });
|
||||
done();
|
||||
if (this.isStandaloneWaybillPage) this.closeCrudDialog();
|
||||
});
|
||||
this.markWaybillListNeedRefresh();
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: '提交成功!' });
|
||||
done();
|
||||
if (this.isStandaloneWaybillPage) this.closeCrudDialog();
|
||||
},
|
||||
error => {
|
||||
window.console.log(error);
|
||||
@@ -5690,27 +5663,14 @@ export default {
|
||||
? this.api.updateAttachments
|
||||
: this.getSaveRequest();
|
||||
request(submitRow).then(
|
||||
res => {
|
||||
() => {
|
||||
const skipMk = this.attachmentUploadMode;
|
||||
const data = res.data?.data || {};
|
||||
const id = data.id || submitRow.id;
|
||||
const after =
|
||||
skipMk || !id
|
||||
? Promise.resolve()
|
||||
: submitMkApprovalFlow({
|
||||
bizType: 'waybill-manage',
|
||||
formInstanceId: id,
|
||||
subjectName: data.waybillNo || submitRow.waybillNo || '',
|
||||
approvalStatus: data.approvalStatus || submitRow.approvalStatus || '',
|
||||
});
|
||||
return after.then(() => {
|
||||
this.attachmentUploadMode = false;
|
||||
this.markWaybillListNeedRefresh();
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: skipMk ? '操作成功!' : '提交成功!' });
|
||||
done();
|
||||
if (this.isStandaloneWaybillPage) this.closeCrudDialog();
|
||||
});
|
||||
this.attachmentUploadMode = false;
|
||||
this.markWaybillListNeedRefresh();
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: skipMk ? '操作成功!' : '提交成功!' });
|
||||
done();
|
||||
if (this.isStandaloneWaybillPage) this.closeCrudDialog();
|
||||
},
|
||||
error => {
|
||||
this.attachmentUploadMode = false;
|
||||
|
||||
Reference in New Issue
Block a user