feat: 新增合同配置页面,优化多页面合同关联逻辑
1. 新增crm/contract/selectConfig页面,支持本地配置可选合同列表,区分手动/接口同步来源 2. 优化ContractSelect组件,新增上次选中合同置顶、本地存储选中记录功能 3. 为合卷、分条、退火计划、钢卷编辑页面添加合同必填校验与自动关联逻辑 4. 移除各业务页面冗余的合同关系手动调用代码,统一关联逻辑
This commit is contained in:
@@ -375,7 +375,6 @@ import AbnormalForm from './components/AbnormalForm';
|
||||
import PlanSheetViewer from './components/PlanSheetViewer.vue';
|
||||
import { generateCoilNoPrefix } from "@/utils/coil/coilNo";
|
||||
import ContractSelect from "@/components/KLPService/ContractSelect";
|
||||
import { addCoilContractRel } from "@/api/wms/coilContractRel";
|
||||
|
||||
export default {
|
||||
name: 'MergeCoil',
|
||||
@@ -827,6 +826,12 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// 验证合同
|
||||
if (!this.targetCoil.contractId) {
|
||||
this.$message.error('请选择合同');
|
||||
return;
|
||||
}
|
||||
|
||||
let loadingInstance = null;
|
||||
try {
|
||||
this.loading = true;
|
||||
@@ -840,6 +845,7 @@ export default {
|
||||
|
||||
const mergeData = {
|
||||
...this.targetCoil,
|
||||
contractId: this.targetCoil.contractId || '',
|
||||
enterCoilNo: enterCoilNos, // 拼接的入场钢卷号
|
||||
hasMergeSplit: 2, // 2表示合卷
|
||||
abnormals: this.abnormals,
|
||||
@@ -859,16 +865,8 @@ export default {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
const response = await mergeMaterialCoil(mergeData);
|
||||
await mergeMaterialCoil(mergeData);
|
||||
|
||||
const coilId = response.data;
|
||||
|
||||
if (this.targetCoil.contractId) {
|
||||
addCoilContractRel({
|
||||
coilId: coilId,
|
||||
contractId: this.targetCoil.contractId,
|
||||
})
|
||||
}
|
||||
this.$message.success('合卷保存成功');
|
||||
|
||||
// 延迟返回,让用户看到成功提示
|
||||
|
||||
Reference in New Issue
Block a user