fix(coil): 修复入库后表单重置和钢卷号获取问题

修复入库成功后表单重置不完整的问题,添加materialType字段
修正planId重置错误,使用当前表单的planId而非todayPlanId
使用$set方法更新enterCoilNo以确保响应式更新
添加入库后自动获取最大钢卷号功能
This commit is contained in:
砂糖
2026-01-17 20:59:10 +08:00
parent 3a3169ca67
commit b157affdcf

View File

@@ -607,9 +607,11 @@ export default {
handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId) handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId)
.then(res => { .then(res => {
this.$modal.msgSuccess("入库成功"); this.$modal.msgSuccess("入库成功");
this.form = { this.form = {
itemId: null, itemId: null,
itemType: 'raw_material', itemType: 'raw_material',
materialType: '原料',
warehouseId: '1988150044862377986', // 酸连轧原料库 warehouseId: '1988150044862377986', // 酸连轧原料库
netWeight: null, netWeight: null,
grossWeight: null, grossWeight: null,
@@ -618,8 +620,9 @@ export default {
trimmingRequirement: null, trimmingRequirement: null,
packingStatus: null, packingStatus: null,
packagingRequirement: null, packagingRequirement: null,
planId: this.todayPlanId, planId: this.form.planId,
} }
this.getMaxCoilNoByPrefix()
this.getList() this.getList()
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
@@ -731,7 +734,7 @@ export default {
getMaxCoilNo(prefix).then(res => { getMaxCoilNo(prefix).then(res => {
console.log(res) console.log(res)
// 扣掉最后一位 // 扣掉最后一位
this.form.enterCoilNo = res.data.maxEnterCoilNo.slice(0, -1); this.$set(this.form, 'enterCoilNo', res.data.maxEnterCoilNo.slice(0, -1));
}) })
}, },
// 检查钢卷号是否合法(后端检查) // 检查钢卷号是否合法(后端检查)