From d3db926789023e09bdad556829a50615fd19bab8 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:08:31 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=E5=8E=9F=E6=96=99=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=89=A9=E6=96=99=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mainso.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/inm/mainso.vue b/src/views/inm/mainso.vue index b9b004b3..98ab05fd 100644 --- a/src/views/inm/mainso.vue +++ b/src/views/inm/mainso.vue @@ -44,11 +44,11 @@ - + @@ -92,12 +92,26 @@ export default { materialsVisible:false, apiObjPrint:this.$API.cm.labelmat.fromMb, wmId:'', + state_:{ + 10:'合格品', + 20:'不合格品', + 30:'返修品', + }, }; }, mounted() { this.getWarehouse(); }, methods: { + getType(type){ + if(type==10){ + return 'success' + }else if(type==20){ + return 'danger' + }else if(type==30){ + return 'warning' + } + }, getWarehouse() { this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => { this.warehouseOptions = res; From c99e2c8d1b0427c9e7f89dfff1f618f0ba1b6d4c Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:12:23 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix:=E4=BA=A4=E6=8E=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=9B=B4=E6=94=B9=E6=89=B9=E6=AC=A1=E5=8F=B7?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E5=8F=8A=E8=A7=A3=E5=86=B3=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form.vue | 38 ++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index fbd2b890..f631311a 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -113,6 +113,16 @@ + + + + + + + + + + @@ -182,7 +192,7 @@ v-model="listItem.count" controls-position="right" :min="0" - step="1" + :step="1" :max="listItem.count_cando" :disabled="mode==='show'" :step-strictly="true" @@ -258,6 +268,7 @@ export default { recive_user: null, recive_mgroup: null, handoverb:[], + new_batch:'' }, rules: { batch: [ @@ -321,6 +332,7 @@ export default { bwVisible:false, scanVisible:false, isSaveing: false, + change_batch:false, setFiltersVisible: false, }; }, @@ -364,7 +376,6 @@ export default { }, showbw(index){ this.bwIndex = index; - console.log('this.form.handoverb[index].handoverbw',this.form.handoverb[index].handoverbw); this.bwVisible = true; }, bwVisibleClose(){ @@ -390,6 +401,10 @@ export default { } }) that.getCkUserList();//废品库接收人 + }else if(that.type==30){ + this.getUserList3(); + }else{ + this.getUserList2(); } }); }, @@ -563,6 +578,9 @@ export default { }else{ this.getUserList2(); } + if(data.new_batch!==''&&data.new_batch!==undefined&&data.new_batch!==null){ + this.change_batch = true; + } }, //设置过滤项 setFilters(filters) { @@ -592,20 +610,21 @@ export default { //handoverb里有这个物料批次 if(arr.length>0){ //判断是否有wpr,若无将wpr放进去 - if(arr[0].handoverbw&&arr[0].handoverbw.length>0){ + if(that.form.handoverb[0].handoverbw&&that.form.handoverb[0].handoverbw.length>0){ let arr1 = []; - arr1 = arr[0].handoverbw.filter((item1) => { - item1.wpr = item1.id; + arr1 = that.form.handoverb[0].handoverbw.filter((item1) => { + return item1.wpr == res.id; }) if(arr1.length>0){ that.$message.error("该物料已存在"); + // console.log('0',that.form); }else{ let obj1 = {}; obj1.wpr = res.id; obj1.number = res.number; that.form.handoverb[indexs].count+=1; that.form.handoverb[indexs].handoverbw.push(obj1); - console.log('1',that.form); + // console.log('1',that.form); } }else{ that.form.handoverb[indexs].handoverbw = []; @@ -614,11 +633,10 @@ export default { obj1.number = res.number; that.form.handoverb[indexs].count=1; that.form.handoverb[indexs].handoverbw.push(obj1); - console.log('2',that.form); + // console.log('2',that.form); } }else{//handoverb里没有有这个物料批次 that.materialOptions.forEach((item) => { - console.log('item.id',item.id); if(item.id == res.wm){ let obj2 = {}; obj2.wm = item.id; @@ -631,7 +649,7 @@ export default { obj3.number = res.number; obj2.handoverbw.push(obj3); that.form.handoverb.push(obj2); - console.log('3',that.form); + // console.log('3',that.form); } }) } @@ -653,7 +671,7 @@ export default { obj.count_cando = item.count; obj.count = item.count; that.form.handoverb.push(obj); - console.log('4',that.form); + // console.log('4',that.form); } }) } From 29c5eeb514a3cc94e28ae9e81dd2ac1ad668ac7e Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:13:30 +0800 Subject: [PATCH 03/10] =?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=B6mioitem=E5=8F=AF=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/inm_record.vue | 49 ++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/views/wpm_bx/inm_record.vue b/src/views/wpm_bx/inm_record.vue index a3496365..1be2d05c 100644 --- a/src/views/wpm_bx/inm_record.vue +++ b/src/views/wpm_bx/inm_record.vue @@ -152,22 +152,32 @@ hideDo stripe > - - - - - - - - - - + + + + + + + + + + + + + @@ -482,6 +492,13 @@ export default { that.visible = false; }); }, + itemdelete(row){ + let that = this; + that.$API.inm.mioitem.delete.req(row.id).then((res) => { + that.$message.success("删除成功"); + that.$refs.tables.refresh(); + }); + }, submitOut() {}, //打印 handlePrint(){ From 3de4874cf4640513679b472198e6f90b0fb33148 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:20:19 +0800 Subject: [PATCH 04/10] =?UTF-8?q?fix:mlog=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlog_form.vue | 89 +++++++++++++++++++++++++++++++++- src/views/wpm_bx/mlogs.vue | 12 ++--- 2 files changed, 92 insertions(+), 9 deletions(-) diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue index b42732a7..4dd0672b 100644 --- a/src/views/wpm_bx/mlog_form.vue +++ b/src/views/wpm_bx/mlog_form.vue @@ -119,6 +119,61 @@ + + + + + + + + + + + + + + + + + + new Date().getTime(); }, + gettestitem(){ + let that = this; + that.$API.qm.testitem.list.req({ process: that.process,type:20 }).then((res) => { + res.results.forEach((item) => { + let obj = {}; + Object.assign(obj, item); + obj.value = ''; + that.testitems.push(obj); + }) + }); + }, //获取 getUser() { this.$API.system.user.list.req({ depts: this.dept }).then((res) => { @@ -337,12 +405,26 @@ export default { }, //表单注入数据 setData(data) { + let that = this; console.log("data", data); Object.assign(this.form, data); if(data.test_file!==null){ this.form.test_file = data.test_file; this.fileList = [{name:data.test_file,url:data.test_file}]; } + if(data.oinfo_json!==null){ + if(that.testitems.length>0){ + that.testitems.forEach((item) => { + item.value = data.oinfo_json[item.id]; + }); + }else{ + setTimeout(() => { + that.testitems.forEach((item) => { + item.value = data.oinfo_json[item.id]; + }); + },500) + } + } this.getRoute(data.id); }, changeMtask(){ @@ -365,6 +447,11 @@ export default { if (valid) { that.isSaveing = true; that.form.mgroup = that.mgroup; + let oinfo_json = {}; + that.testitems.forEach((item) => { + oinfo_json[item.id] = item.value; + }) + that.form.oinfo_json = oinfo_json; if (that.mode === "add") { that.$API.wpm.mlog.init.req(that.form).then((res) => { that.isSaveing = false; diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue index b0395724..d8dca1ab 100644 --- a/src/views/wpm_bx/mlogs.vue +++ b/src/views/wpm_bx/mlogs.vue @@ -146,7 +146,7 @@ :process="processId" :mgroup="mgroupId" :dept="deptId" - :mgroup_name = "mgroup_name" + :mgroupName = "mgroupName" @success="handleSaveSuccess" @closed="dialog.save = false" > @@ -155,6 +155,7 @@ v-if="dialog.detail" ref="detailDialog" :mlogId="mlogId" + :process="processId" :mtask="mtask" @closed="detailClose" > @@ -197,7 +198,6 @@ export default { deptId: null, processId: "", processCate: "", - mgroup_name:'' }; }, watch: { @@ -206,8 +206,7 @@ export default { let that = this; that.params.mgroup = ""; that.apiObj = null; - that.mgroup_name = newval; - // that.getMgroupInfo(); + that.getMgroupInfo(); }, }, }, @@ -215,9 +214,7 @@ export default { let that = this; that.params.mgroup =that.mgroupId; that.apiObj = that.$API.wpm.mlog.list; - // this.mgroup_name = this.mgroupName; - // this.getMgroupInfo(); - // console.log("mgroupName",this.mgroupName); + this.getMgroupInfo(); }, methods: { getMgroupInfo(){ @@ -227,7 +224,6 @@ export default { that.$message.error("获取工段错误"); return; } - that.mgroupId = res.id; that.deptId = res.belong_dept; that.processId = res.process; that.processCate = res.process_cate; From 5d58d0c8fccc984040e8eb652cb9b800cd707023 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:21:41 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix:=E6=97=A5=E5=BF=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=87=8C=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlog_detail.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index ee5da236..0cc6166d 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -367,6 +367,7 @@ v-if="dialog.edit" ref="editDialog" :dept="deptId" + :process="process" :mgroupName= "mlogItem.mgroup_name" @success="handleEditSuccess" @closed="dialog.edit = false" @@ -390,6 +391,10 @@ export default { type: String, default: "", }, + process:{ + type: String, + default: "", + } }, components: { editDialog, From ab987c0b8b2d51739a945c983c02288bb028ce27 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:23:58 +0800 Subject: [PATCH 06/10] =?UTF-8?q?fix:wpr=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/inm.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue index b7b7a4ec..92ea7bd4 100644 --- a/src/views/wpm_bx/inm.vue +++ b/src/views/wpm_bx/inm.vue @@ -173,14 +173,12 @@