From eb9396f2f8e763b82e1025938840f2eb995b0acf Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 20 Jun 2025 15:01:12 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix:=E4=BA=A4=E6=8E=A5=E6=92=A4=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/wpm.js | 9 ++ src/views/wpm_bx/handover.vue | 16 ++- src/views/wpm_bx/handover_form.vue | 39 ++++--- src/views/wpm_gx/handover.vue | 14 +++ src/views/wpm_gx/handover_form.vue | 157 ++++++----------------------- 5 files changed, 92 insertions(+), 143 deletions(-) diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 58ed4600..ad6b4099 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -450,6 +450,15 @@ export default { ); }, }, + revert: { + name: "撤回", + req: async function (id, data) { + return await http.post( + `${config.API_URL}/wpm/handover/${id}/revert/`, + data + ); + }, + }, mgroups:{ name: "获取可交接的工段", req: async function (data) { diff --git a/src/views/wpm_bx/handover.vue b/src/views/wpm_bx/handover.vue index a7e49003..3c95af00 100644 --- a/src/views/wpm_bx/handover.vue +++ b/src/views/wpm_bx/handover.vue @@ -144,12 +144,12 @@ width="300" > - + - @@ -379,33 +358,6 @@ export default { } }); }, - //获取车间物料 - // getMaterial() { - // let that = this; - // var req = { - // page: 0, - // state:10, - // tag:'done' - // }; - // that.materialOptions = []; - // req.mgroup = that.mgroupId; - // that.listParams = req; - // this.$API.wpm.wmaterial.list.req(req).then((res) => { - // that.materialOptions = res; - // res.forEach(item=>{ - // if(that.codeText!==''&&item.batch === that.codeText){ - // let obj = {}; - // obj.wm = item.id; - // obj.batch = item.batch; - // obj.count = item.count_cando; - // obj.count_cando = item.count_cando; - // that.totalCount = item.count_cando; - // that.form.handoverb.push(obj) - // that.getResaveMgroups(item.material); - // } - // }) - // }); - // }, getResaveMgroups(material){ let that = this; let params = { @@ -419,46 +371,6 @@ export default { } }) }, - //获取车间不合格物料 - // getMaterialNotok() { - // let that = this; - // that.materialOptions = []; - // var req = { - // mgroupx: that.mgroupId, - // page: 0, - // state:20 - // }; - // that.listParams = req; - // this.$API.wpm.wmaterial.list.req(req).then((res) => { - // that.materialOptions = res; - // }); - // }, - // getMaterialRework(){ - // let that = this; - // that.materialOptions = []; - // var req = { - // mgroup: that.mgroupId, - // page: 0, - // tag : 'done' - // }; - // that.listParams = req; - // this.$API.wpm.wmaterial.list.req(req).then((res) => { - // that.materialOptions = res; - // }); - // }, - //获取废品库物料 - // getMaterialFP() { - // let that = this; - // that.materialOptions = []; - // var obj = { - // page: 0, - // state : 50, - // state_all: 1 - // }; - // that.$API.wpm.wmaterial.list.req(obj).then((res) => { - // that.materialOptions = res; - // }); - // }, //获取交送工段人员 getUserList() { let that = this; @@ -538,7 +450,7 @@ export default { }else{ this.form.handoverb = data; data.forEach(item=>{ - this.totalCount += Number(item.count_cando); + this.totalCount += Number(item.count); }) } } @@ -550,45 +462,36 @@ export default { }, materialChange0(){ let that = this; - let obj = {}; - obj.wm = that.selectObj.id; - obj.batch = that.selectObj.batch; - obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')'; - obj.count = that.selectObj.count_cando; - obj.defect_name = that.selectObj.defect_name; - obj.count_cando = that.selectObj.count_cando; - obj.material = that.selectObj.material; - if(that.form.handoverb.length>0){ - let datas = that.form.handoverb.filter((item) => { - return item.wm==that.selectObj.id; - }); - if(datas.length>0){ - that.$message.warning('该物料已存在'); + if(that.selectObj.count_canhandover>0){ + let obj = {}; + obj.wm = that.selectObj.id; + obj.state = that.selectObj.state; + obj.batch = that.selectObj.batch; + obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')'; + obj.count = that.selectObj.count_canhandover; + obj.defect = that.selectObj.defect; + obj.defect_name = that.selectObj.defect_name; + obj.count_cando = that.selectObj.count_canhandover; + obj.material = that.selectObj.material; + if(that.form.handoverb.length>0){ + let datas = that.form.handoverb.filter((item) => { + return item.wm==that.selectObj.id; + }); + if(datas.length>0){ + that.$message.warning('该物料已存在'); + }else{ + that.totalCount += Number(obj.count_canhandover); + that.form.handoverb.push(obj); + } }else{ - that.totalCount += Number(obj.count_cando); + that.totalCount += Number(obj.count_canhandover); that.form.handoverb.push(obj); } + that.getResaveMgroups(obj.material); }else{ - that.totalCount += Number(obj.count_cando); - that.form.handoverb.push(obj); + that.$message.warning('该物料暂无可交接数量'); } - that.getResaveMgroups(obj.material); }, - // materialChange() { - // let that = this; - // let totalCount = 0; - // let data = that.materialOptions.filter((item) => { - // return that.selectItems.indexOf(item.id)>-1; - // }); - // data.forEach(item=>{ - // item.wm = item.id; - // item.count = item.count_cando; - // totalCount += Number(item.count_cando); - // }) - // that.totalCount = totalCount; - // that.form.handoverb = data; - // that.getResaveMgroups(data[0].material); - // }, countChange(){ let that = this; let totalCount = 0; @@ -676,7 +579,7 @@ export default { let id = data.split('#')[1]; this.$API.cm.labelmat.item.req(id).then((res) => { let arr = that.form.handoverb.filter((item) => { - return item.batch == res.batch; + return item.batch == res.batch&&item.state==res.state&&item.defect==res.defect; }) if(arr.length>0){ that.$message.error("该批次已存在") @@ -696,9 +599,11 @@ export default { obj.wm = item.id; obj.batch = item.batch; obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')'; - obj.count = item.count_cando; + obj.count = cando; + obj.state = item.state; + obj.defect = item.defect; obj.defect_name = item.defect_name; - obj.count_cando = item.count_cando; + obj.count_cando = cando; obj.material = item.material; that.form.handoverb.push(obj) that.getResaveMgroups(obj.material); From ea9395bf1424a18e2797462dab83f6df0af60f39 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 20 Jun 2025 17:25:15 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=E8=BE=85=E6=96=99=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=EF=BC=8C=E5=8D=8A=E6=88=90=E5=93=81=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E5=85=A5=E5=BA=93=EF=BC=8C=E4=BB=A5=E5=8F=8A=E8=BE=85?= =?UTF-8?q?=E6=96=99=E5=87=BA=E5=85=A5=E5=BA=93=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mioitem_form.vue | 24 +++++++++++++++++------- src/views/inm/mioitemlist.vue | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index c38b120a..5f938f52 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -143,9 +143,9 @@ - + - + @@ -421,7 +421,7 @@ export default { var that = this; var type = this.form.type; that.form.material = that.selectObj.id; - that.form.batch = that.selectObj.bin_number_main; + that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:that.selectObj.batch; that.mTracking = that.selectObj.tracking; if (type == "do_in") { if (that.selectObj.is_assemb) { @@ -446,7 +446,7 @@ export default { selectBatchChange(item) { this.form.batch = item.batch; this.form.mb = item.id; - this.form.count = 0; + this.form.count = Number(item.count); this.form.warehouse = item.warehouse; this.warehouseDisable = true; this.inputBatchDisable = true; @@ -477,7 +477,7 @@ export default { for(let i=0;i1&&(that.form.type == 'pur_in'||that.form.type == 'other_in')){ + let mioitemw = []; + that.mioitems.forEach((item,index) => { + mioitemw[index]={ number: item }; + }) + if(mioitemw.length==that.mioitems.length){ + that.form.mioitemw = mioitemw; + }else{ + that.$message.error("请输入正确数量的编号") + return; + } + } try { let res; if (that.mode == "add") { diff --git a/src/views/inm/mioitemlist.vue b/src/views/inm/mioitemlist.vue index f0d3587c..aeec6df4 100644 --- a/src/views/inm/mioitemlist.vue +++ b/src/views/inm/mioitemlist.vue @@ -108,7 +108,7 @@ export default { data() { return { apiObj: null, - params: {with_mio:'yes'}, + params: {with_mio:'yes',material__type:30,mio__state:20}, selection: [], tableData:[], query: { From f68a2e1b7fad689bcc5991cf2e95910390804a00 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 23 Jun 2025 08:56:31 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=E6=92=A4=E9=94=80=E5=89=8D=E6=9C=89?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover.vue | 14 +++++++++----- src/views/wpm_gx/handover.vue | 16 +++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/views/wpm_bx/handover.vue b/src/views/wpm_bx/handover.vue index 3c95af00..52d59d86 100644 --- a/src/views/wpm_bx/handover.vue +++ b/src/views/wpm_bx/handover.vue @@ -160,15 +160,19 @@ type="danger" v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10" >退回 - 撤消 查看 + + + 退回 - 撤消 查看 + + + Date: Mon, 23 Jun 2025 09:13:35 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix:=E5=85=89=E8=8A=AFmlog=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/mlog_form.vue | 4 ++++ src/views/wpm_gx/mlogb_form.vue | 24 +++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 511551df..7bd1c45a 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -214,6 +214,8 @@ + + + + @@ -385,15 +386,20 @@ export default { }, materialBatchChange(){ let that = this; - that.materialOptions.forEach(item => { - if(item.id==that.form.wm_in){ - that.form.batch = item.batch; - that.form.count_use = item.count; - that.batch_count = item.count; - that.materialFix = item.material; - that.getdefects(); - } - }); + that.form.batch = that.selectObj.batch; + that.form.count_use = that.selectObj.count; + that.batch_count = that.selectObj.count; + that.materialFix = that.selectObj.material; + that.getdefects(); + // that.materialOptions.forEach(item => { + // if(item.id==that.form.wm_in){ + // that.form.batch = item.batch; + // that.form.count_use = item.count; + // that.batch_count = item.count; + // that.materialFix = item.material; + // that.getdefects(); + // } + // }); }, //添加层组 cellsAdd(){ From 5a3ffca2883bcb7133ff016ca87ea732bdac7c6e Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 23 Jun 2025 11:24:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=E5=85=89=E8=8A=AF=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/handover_form.vue | 73 +++++++++++++++--------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 32aa3f39..82f2f53b 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -37,11 +37,12 @@ @@ -52,7 +53,7 @@ {{ scope.row.defect_name }} - + @@ -233,9 +234,11 @@ export default { recive_mgroup: null, handoverb:[], }, + selectObjIds:[], apiObjM:null, paramsM:{}, selectObj:{}, + selectObjs:[], rules: { batch: [ { @@ -441,9 +444,11 @@ export default { }, //显示 open(mode = "add",data,mtype) { + console.log(data) this.mode = mode; this.mtype = mtype; if(data!==''&&data!==null&&data!==undefined){ + console.log(typeof(data)=='string') if(typeof(data)=='string'){ this.codeText = data.replace(" ",""); this.codeTextChange(this.codeText) @@ -462,35 +467,23 @@ export default { }, materialChange0(){ let that = this; - if(that.selectObj.count_canhandover>0){ - let obj = {}; - obj.wm = that.selectObj.id; - obj.state = that.selectObj.state; - obj.batch = that.selectObj.batch; - obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')'; - obj.count = that.selectObj.count_canhandover; - obj.defect = that.selectObj.defect; - obj.defect_name = that.selectObj.defect_name; - obj.count_cando = that.selectObj.count_canhandover; - obj.material = that.selectObj.material; - if(that.form.handoverb.length>0){ - let datas = that.form.handoverb.filter((item) => { - return item.wm==that.selectObj.id; - }); - if(datas.length>0){ - that.$message.warning('该物料已存在'); - }else{ - that.totalCount += Number(obj.count_canhandover); - that.form.handoverb.push(obj); - } - }else{ - that.totalCount += Number(obj.count_canhandover); - that.form.handoverb.push(obj); - } + that.form.handoverb = []; + that.totalCount = 0; + that.selectObjs.forEach(item=>{ + let obj = {}; + obj.wm = item.id; + obj.state = item.state; + obj.batch = item.batch; + obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')'; + obj.count = item.count_canhandover; + obj.defect = item.defect; + obj.defect_name = item.defect_name; + obj.count_cando = item.count_canhandover; + obj.material = item.material; + that.totalCount += Number(obj.count); + that.form.handoverb.push(obj); that.getResaveMgroups(obj.material); - }else{ - that.$message.warning('该物料暂无可交接数量'); - } + }) }, countChange(){ let that = this; @@ -553,11 +546,19 @@ export default { }, //表单注入数据 setData(data) { + console.log(data) + let that = this; Object.assign(this.form, data); + that.totalCount = 0; + that.form.handoverb = data.handoverb; + data.handoverb.forEach(item=>{ + item.label = item.batch; + that.totalCount += Number(item.count); + }) if(data.type==30){ - this.getUserList3(); + that.getUserList3(); }else{ - this.getUserList2(); + that.getUserList2(); } }, //设置过滤项 @@ -594,7 +595,7 @@ export default { if(res1.length>0){ res1.forEach(item=>{ let cando = Number(item.count_canhandover); - if(cando>0&&item.defect_name==res.defect_name){ + if(cando>0&&(item.defect==null||item.defect_name==res.defect_name)){ let obj = {}; obj.wm = item.id; obj.batch = item.batch; @@ -606,11 +607,9 @@ export default { obj.count_cando = cando; obj.material = item.material; that.form.handoverb.push(obj) + that.totalCount += Number(obj.count); that.getResaveMgroups(obj.material); } - // else{ - // that.$message.error("该批次物料没有可交接的数量") - // } }) } that.codeText = ''; From dcde52c633082efb57cf534ddc640c6fabe5dd8b Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 23 Jun 2025 13:46:06 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=E8=BE=93=E5=87=BA=E7=89=A9=E6=96=99?= =?UTF-8?q?=E6=98=AF=E5=8D=95=E4=BB=B6=E6=97=B6=E8=BE=93=E5=87=BA=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlog_detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index be8bb86f..536355e4 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -355,7 +355,7 @@