From 256334926aa6e31dba99f577fdd86754d3210a49 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Thu, 19 Dec 2024 16:47:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=85=A5=E5=BA=93=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inPlan/wmsInPlanDetailEntityTableCmps.vue | 72 +++++++------------ .../wm/inPlan/wmsInPlanKnifeBackFormCmps.vue | 41 ++++------- 2 files changed, 40 insertions(+), 73 deletions(-) diff --git a/src/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue b/src/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue index 6245dbc..749119b 100644 --- a/src/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue +++ b/src/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue @@ -14,6 +14,10 @@ export default { planTypeId: { type: String, require: true + }, + planTypeCode: { + type: String, + require: true } }, data() { @@ -61,6 +65,7 @@ export default { selectBaseKnifeChange(e) { if (this.selectIndex !== -1) { this.localEntityList[this.selectIndex].knifeId = e.baseKnifeId + this.localEntityList[this.selectIndex].rfid = e.rfid this.localEntityList[this.selectIndex].baseKnifeInfo = e // 获取物料信息 listMdItem({itemCode: e.knifeCode}).then(res => { @@ -97,8 +102,8 @@ export default { - - + + - - - - - + + + - - + + diff --git a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue index 1206e42..e6e4a66 100644 --- a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue +++ b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue @@ -29,7 +29,6 @@ export default { wmsInPlanDetailEntityList: [], // 表单校验 rules: { - planCode: [{required: true}], relBillCode: [{required: true}], }, localVisible: this.visible, @@ -40,7 +39,7 @@ export default { }, computed: { title() { - return this.localDataForm.planId ? "修改入库计划" : "新增入库计划" + return (this.localDataForm.planId ? "修改" : "新增") + this.dataForm.planTypeName }, }, methods: { @@ -63,18 +62,19 @@ export default { this.$emit("update:visible", false) }, async validateRfid() { - const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid); - if (rfidList.length === 0) return + const rfidList = this.wmsInPlanDetailEntityList.filter(entity => entity.rfid && entity.rfid.trim().length > 0).map(entity => entity.rfid); + console.log(rfidList) + if (!Array.isArray(rfidList) || rfidList.length === 0) return const res = await isDuplicateRfid(rfidList.join(",")); return res.data }, /** 提交按钮 */ async submitForm() { - const validateRfidResult = await this.validateRfid(); - if (validateRfidResult.length > 0) { - this.$modal.msgError(`RFID重复:${validateRfidResult}`); - return; - } + // const validateRfidResult = await this.validateRfid(); + // if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) { + // this.$modal.msgError(`RFID重复:${validateRfidResult}`); + // return; + // } await this.$refs["form"].validate(valid => { if (valid) { this.localDataForm.wmsInPlanDetailsList = [] @@ -199,24 +199,12 @@ export default { - - - - - - - - - - - + + + - - - @@ -227,7 +215,7 @@ export default { - + - 整刀实例 + 台账实例