From 5ce3889f3dd2d19e1b0ca87f9d92fb1a28efd535 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 22 Sep 2025 14:40:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=84=B1=E6=A8=A1=E6=B5=8B=E9=87=8F?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AF=A6=E6=83=85=E8=8E=B7=E5=8F=96=E6=9D=BF?= =?UTF-8?q?=E6=AE=B5=E6=BB=9A=E5=9C=86=E7=9A=84=E5=88=87=E7=89=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlog_detail.vue | 17 +++++++----- src/views/wpm_bx/mlog_form.vue | 44 ++++++++------------------------ src/views/wpm_bx/mlog_form2.vue | 37 +++------------------------ 3 files changed, 25 insertions(+), 73 deletions(-) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index e13e1379..19f753f3 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -576,6 +576,7 @@ export default { let that = this; that.$API.wpm.mlog.item.req(that.mlogId).then((res) => { that.mlogItem = res; + that.getcutCount(res.material_in); that.isSubmit = res.submit_time==null?false:true; if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){ that.getMlogbw(); @@ -587,12 +588,7 @@ export default { if(res.oinfo_json_&&res.oinfo_json_!==null){ for(let key in res.oinfo_json_){ let obj = {}; - if(key=='cutCount'){ - that.cutCount = res.oinfo_json_[key]; - obj.key = '切分数量'; - }else{ - obj.key = key; - } + obj.key = key; obj.value = res.oinfo_json_[key]; that.oinfo_json.push(obj); } @@ -615,6 +611,15 @@ export default { }) }); }, + //获取指定工序的切分数量 + getcutCount(material_id){ + let that = this; + that.$API.mtm.route.list.req({ nprocess_name: "板段滚圆", material_in_has:material_id, page: 0,query:'{div_number}' }).then((res) => { + if(res.length>0){ + that.cutCount = res[0].div_number; + } + }); + }, getPreocess(){ let that = this; that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => { diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue index 9ed23110..86da8997 100644 --- a/src/views/wpm_bx/mlog_form.vue +++ b/src/views/wpm_bx/mlog_form.vue @@ -48,7 +48,6 @@ clearable filterable style="width: 100%" - @change="routeChange" > - + { - this.userOptions = res.results; - }); - }, //获取班组设备 getEquipment() { let that = this; @@ -370,11 +363,9 @@ export default { //获取任务 getMtask() { let that = this; - this.$API.pm.mtask.list - .req({ page: 0, mgroup: that.mgroup, state: 20 }) - .then((res) => { - that.mtaskOptions = res; - }); + this.$API.pm.mtask.list.req({ page: 0, mgroup: that.mgroup, state: 20 }).then((res) => { + that.mtaskOptions = res; + }); }, getSupplier() { let that = this; @@ -387,11 +378,9 @@ export default { }, getRoute(id) { let that = this; - that.$API.mtm.route.list - .req({ process: that.process, page: 0, routepack__state: 30 }) - .then((res) => { - that.routeOptions = res; - }); + that.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => { + that.routeOptions = res; + }); }, //显示 open(mode = "add",type) { @@ -413,7 +402,6 @@ 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; @@ -434,14 +422,6 @@ export default { } this.getRoute(data.id); }, - routeChange(){ - let that = this; - that.routeOptions.forEach((item) => { - if(item.id == that.form.route&&that.route_code=='tuomoceliang'){ - that.form.cutCount = item.div_number; - } - }) - }, changeMtask(){ let that = this; that.mtaskOptions.forEach((item) => { @@ -452,7 +432,6 @@ export default { }, fileUPSuccess(res) { let that = this; - console.log('res',res); this.test_file = res.path; }, //表单提交方法 @@ -466,9 +445,6 @@ export default { that.testitems.forEach((item) => { oinfo_json[item.id] = item.value; }) - if(that.route_code=="tuomoceliang"){ - oinfo_json.cutCount = that.form.cutCount; - } that.form.oinfo_json = oinfo_json; if (that.mode === "add") { that.$API.wpm.mlog.init.req(that.form).then((res) => { diff --git a/src/views/wpm_bx/mlog_form2.vue b/src/views/wpm_bx/mlog_form2.vue index 78c9d296..44ad608e 100644 --- a/src/views/wpm_bx/mlog_form2.vue +++ b/src/views/wpm_bx/mlog_form2.vue @@ -81,17 +81,6 @@ - - - - - - { let inputDom = document.querySelectorAll('.inputWrap .el-input__wrapper .el-input__inner'); - console.log(inputDom); inputDom.forEach(function(input) { input.addEventListener("compositionstart", function() { - // that.$confirm(`您的输入法为中文,请切换到英文输入法`, "提示", { - // type: "warning", - // }).then(() => {}); that.$message.warning("您的输入法为中文,请切换到英文输入法"); }); }); @@ -349,7 +335,6 @@ export default { //扫描后处理方法 // 扫描后会有两种情况,一种是扫描物料,一种是扫描用户;物料扫描后需要判断 formWminChange(code){ - console.log('code',code); let that = this,codeId='',arr=[]; code = code.replace(/(^\s*)|(\s*$)/g, ""); if(code.indexOf("#")>-1){ @@ -378,7 +363,7 @@ export default { that.form.wm_in = arr[0].id; that.form.count_use = arr[0].count_cando; that.wm_in = arr[0].batch; - that.batchCountCando = Number(arr[0].count_cando);; + that.batchCountCando = Number(arr[0].count_cando); that.materialTracking = arr[0].material_.tracking; if(that.routeOptions.length==0){ that.routeOriginOptions.forEach((item)=>{ @@ -388,9 +373,6 @@ export default { }) if(that.routeOptions.length==1){ that.form.route = that.routeOptions[0].id; - if(that.route_code=='tuomoceliang'){ - that.form.cutCount = that.routeOptions[0].div_number; - } } } }else{ @@ -423,9 +405,6 @@ export default { }) if(that.routeOptions.length==1){ that.form.route = that.routeOptions[0].id; - if(that.route_code=='tuomoceliang'){ - that.form.cutCount = that.routeOptions[0].div_number; - } } } let arr = that.materialOptions.filter((item) => { @@ -463,14 +442,6 @@ export default { }) } }, - routeChange(){ - let that = this; - that.routeOptions.forEach((item) => { - if(item.id == that.form.route&&that.route_code=='tuomoceliang'){ - that.form.cutCount = item.div_number; - } - }) - }, //表单提交方法 submit() { let that = this;