From f4ecb03144e3830538f0c4e1e14629979166e4eb Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 7 Feb 2025 16:59:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=A6=E9=97=B4=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E9=A2=86=E6=96=99=E6=97=B6=E6=89=AB=E7=A0=81=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/inm_record_form.vue | 35 ++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/views/wpm_bx/inm_record_form.vue b/src/views/wpm_bx/inm_record_form.vue index 33dde6c8..feb81873 100644 --- a/src/views/wpm_bx/inm_record_form.vue +++ b/src/views/wpm_bx/inm_record_form.vue @@ -62,7 +62,7 @@ > - + { - this.batchOptions = res.filter((item) => { + that.$API.inm.warehouse.batch.req(obj).then((res) => { + that.batchOptions = res.filter((item) => { return item.state == 10; }); }); @@ -244,7 +245,33 @@ export default { let that = this; let id = data.split('#')[1]; console.log('id',id); - that.form.batch = id; + // that.form.batch = id; + that.$API.cm.labelmat.item.req(id).then((res) => { + that.form.mb = res.id; + that.form.batch = res.batch; + that.form.warehouse = res.warehouse; + + let arr = that.mioitemlist.filter((mioitem) => { + return mioitem.batch == res.batch; + }); + if(arr.length > 0){ + that.$message.error('该批次已存在'); + that.selectBatchClear(); + }else{ + let arr2 = that.batchOptions.filter((batchitem) => { + return batchitem.batch == res.batch; + }) + if(arr2.length > 0){ + that.selectBatch = arr2[0].batch; + that.form.batch = arr2[0].batch; + that.form.mb = arr2[0].id; + that.form.warehouse = arr2[0].warehouse; + that.$refs.scanDialog.visible = false; + }else{ + that.$message.error('该批次不存在'); + } + } + }) }, selectMaterialChange() { this.getBatchOptions();