|
@@ -236,6 +236,26 @@ import businessTripComponent from '@/BIZComponents/processSubmitDialog/component
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 库存批次拆合审批使用专用详情组件,兼容历史流程路由数据。
|
|
|
|
|
+ isStockBatchChange() {
|
|
|
|
|
+ return (
|
|
|
|
|
+ String(this.form.businessCode || '').startsWith('PCBG') ||
|
|
|
|
|
+ String(this.form.pcViewRouter || '').includes('stockBatchChange') ||
|
|
|
|
|
+ String(this.form.pcViewRouter || '').includes(
|
|
|
|
|
+ 'warehouseManagement/stockLedger'
|
|
|
|
|
+ )
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ getBusinessComponentRouter() {
|
|
|
|
|
+ const router = this.form.pcViewRouter;
|
|
|
|
|
+ const invalidViewRouter = String(router || '').includes(
|
|
|
|
|
+ 'warehouseManagement/stockLedger'
|
|
|
|
|
+ );
|
|
|
|
|
+ if (this.isStockBatchChange() && (!router || invalidViewRouter)) {
|
|
|
|
|
+ return '/bpm/handleTask/components/stockBatchChange/detailDialog.vue';
|
|
|
|
|
+ }
|
|
|
|
|
+ return router;
|
|
|
|
|
+ },
|
|
|
async open(row) {
|
|
async open(row) {
|
|
|
this.form = _.cloneDeep(row);
|
|
this.form = _.cloneDeep(row);
|
|
|
// 兼容后端附件字段名为 file 或 files(详情只读,统一到 file 字段)
|
|
// 兼容后端附件字段名为 file 或 files(详情只读,统一到 file 字段)
|
|
@@ -260,8 +280,9 @@ import businessTripComponent from '@/BIZComponents/processSubmitDialog/component
|
|
|
this.activeComp = 'main';
|
|
this.activeComp = 'main';
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
console.log('this.form.pcViewRouter', this.form.pcViewRouter);
|
|
console.log('this.form.pcViewRouter', this.form.pcViewRouter);
|
|
|
|
|
+ const router = this.getBusinessComponentRouter();
|
|
|
Vue.component('async-biz-form-component', (resolve) => {
|
|
Vue.component('async-biz-form-component', (resolve) => {
|
|
|
- require([`@/views${this.form.pcViewRouter}`], resolve);
|
|
|
|
|
|
|
+ require([`@/views${router}`], resolve);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|