feat(wms): 新增钢卷合同号自动填充功能

1. 在钢卷合并、分卷、打钢印、计划拆分、退火计划页面添加合同号自动拉取逻辑
2. 优化合同选择组件,补全不存在于列表的已选合同
3. 移除split.vue中冗余的注释代码
This commit is contained in:
2026-06-21 11:32:02 +08:00
parent b4fba79838
commit 274671f309
6 changed files with 88 additions and 15 deletions

View File

@@ -238,6 +238,7 @@
import { listAnnealPlan, updateAnnealPlanCoil, getAnnealPlan, addAnnealPlan, updateAnnealPlan, delAnnealPlan, changeAnnealPlanStatus, inFurnace, completeAnnealPlan, listAnnealPlanCoils, bindAnnealPlanCoils, unbindAnnealPlanCoil } from "@/api/wms/annealPlan";
import { listAnnealFurnace } from "@/api/wms/annealFurnace";
import { listMaterialCoil } from "@/api/wms/coil";
import { listCoilContractRel } from '@/api/wms/coilContractRel';
import { listWarehouse } from '@/api/wms/warehouse'
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import { addAnnealOperateEvent } from "@/api/wms/annealOperateEvent";
@@ -398,6 +399,15 @@ export default {
enterCoilNo: item.enterCoilNo,
warehouseId: item.logicWarehouseId || null
}));
// 查询每个钢卷绑定的合同号作为默认值
for (const coil of this.completeCoils) {
listCoilContractRel({ coilId: coil.coilId }).then(res => {
const rows = res.rows || []
if (rows.length > 0 && rows[0].contractId) {
this.$set(coil, 'contractId', rows[0].contractId)
}
})
}
this.completeLoading = false;
}).catch(() => {
this.completeLoading = false;