From ced71a8aaf21e53dfd8ff8a86811ab3f0c9335dd Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 18 Apr 2025 01:43:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:4.14-4.18=E6=97=A5=E5=85=89=E5=AD=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/route_form.vue | 2 +- src/views/wpm_gx/f_mlogs_form.vue | 39 ++- src/views/wpm_gx/fmlog_detail.vue | 15 +- src/views/wpm_gx/fmlog_form.vue | 19 +- src/views/wpm_gx/fmlogs.vue | 4 +- src/views/wpm_gx/handover.vue | 2 +- src/views/wpm_gx/handover_form.vue | 8 +- src/views/wpm_gx/handover_form2.vue | 3 +- src/views/wpm_gx/inm.vue | 12 +- src/views/wpm_gx/inmOut.vue | 12 +- src/views/wpm_gx/inm_record_form.vue | 29 ++- src/views/wpm_gx/inmrecord.vue | 4 +- src/views/wpm_gx/mlog_detail.vue | 46 ++-- src/views/wpm_gx/mlog_form.vue | 35 ++- src/views/wpm_gx/mlogb_check.vue | 287 ++++++++++++++++++---- src/views/wpm_gx/mlogb_form.vue | 349 ++++++++++++++++----------- src/views/wpm_gx/mlogs.vue | 18 ++ 17 files changed, 596 insertions(+), 288 deletions(-) diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue index f307d97a..3b633f51 100644 --- a/src/views/mtm/route_form.vue +++ b/src/views/mtm/route_form.vue @@ -128,7 +128,7 @@ --> - + @@ -314,7 +314,7 @@ export default { type: String, default: "", }, - mtask: { + route: { type: String, default: "", }, @@ -372,7 +372,7 @@ export default { mounted() { this.getShift(); this.getMgroup(); - this.getMtask(); + this.getRoute(); this.gettestitem(); this.form.fmlog = this.fmlog; this.form.handle_date = this.$TOOL.dateFormat2(new Date());; @@ -435,9 +435,9 @@ export default { }); }); }, - getMtask() { + getRoute() { let that = this; - that.$API.pm.mtask.item.req(that.mtask).then(res=>{ + that.$API.mtm.route.item.req(that.route).then(res=>{ that.material_in = res.material_in; that.material_out = that.form.material_out = res.material_out; that.getdefects(); @@ -464,12 +464,6 @@ export default { } }); }, - // getMtaskb() { - // let that = this; - // that.$API.pm.mtaskb.list.req({ page: 0, mtask:that.mtask }).then((res) => { - // that.mtaskbOtions = res; - // }); - // }, //获取车间物料 getMaterial() { let that = this; @@ -499,7 +493,8 @@ export default { that.materialOptions.forEach(item=>{ if(item.id == val){ that.qct_defects.forEach((item) => { - that.form[item.defect_name] = 0; + that.defectform[item.defect_name] = 0; + that.defectinform[item.defect_name] = 0; }) that.materialCount = that.form.count_use = that.form.count_real = that.form.count_ok = item.count; @@ -563,14 +558,18 @@ export default { that.form.mgroup = that.mgroup; let mlogdefect = [],mlogindefect =[]; that.qct_defects.forEach(item => { - let objin = {}; - objin.defect = item.defect; - objin.count = that.defectinform[item.defect_name]; - mlogindefect.push(objin); - let obj = {}; - obj.defect = item.defect; - obj.count = that.defectform[item.defect_name]; - mlogdefect.push(obj) + if(that.defectinform[item.defect_name]>0){ + let objin = {}; + objin.defect = item.defect; + objin.count = that.defectinform[item.defect_name]; + mlogindefect.push(objin); + } + if(that.defectform[item.defect_name]>0){ + let obj = {}; + obj.defect = item.defect; + obj.count = that.defectform[item.defect_name]; + mlogdefect.push(obj) + } }) that.form.qct = that.qct; that.form.mlogdefect = mlogdefect; diff --git a/src/views/wpm_gx/fmlog_detail.vue b/src/views/wpm_gx/fmlog_detail.vue index 0847c493..f60d94e6 100644 --- a/src/views/wpm_gx/fmlog_detail.vue +++ b/src/views/wpm_gx/fmlog_detail.vue @@ -12,7 +12,7 @@ 打印 {{ - fmlogItem.routepack_name + fmlogItem.route_name }} {{ fmlogItem.mtask_number @@ -51,7 +51,7 @@ @row-click="table_detail" > - + + @@ -114,8 +115,8 @@ - - + { this.codeTextChange(codeText); }) - } this.visible = true; }, @@ -304,6 +304,7 @@ export default { let that = this; that.$API.wpm.fmlog.item.req(that.fmlogId).then((res) => { that.fmlogItem = res; + that.route = res.route; that.paramsWm.mgroup = res.mgroup; that.$API.wpm.mlog.list.req(that.params).then((res) => { that.tableData = res; diff --git a/src/views/wpm_gx/fmlog_form.vue b/src/views/wpm_gx/fmlog_form.vue index 9fd9af1b..49423b8c 100644 --- a/src/views/wpm_gx/fmlog_form.vue +++ b/src/views/wpm_gx/fmlog_form.vue @@ -18,7 +18,7 @@ > - + @@ -52,11 +51,7 @@ :label="item.routepack_name" :value="item.id" > - {{ item.routepack_name }}-{{ - item.process_name - }} + {{ item.routepack_name }}-{{item.process_name}} @@ -88,6 +83,7 @@ const defaultForm = { mtask:"", mgroup:"", note:'', + is_fix:false, }; export default { @@ -137,7 +133,7 @@ export default { }, ], }, - + is_fix:false, visible: false, isSaveing: false, options: [], @@ -173,8 +169,11 @@ export default { }); }, //显示 - open(mode = "add") { + open(mode = "add",text) { this.mode = mode; + if(text){ + this.is_fix = true; + } this.visible = true; return this; }, @@ -195,10 +194,12 @@ export default { //表单提交方法 submit() { let that = this; + console.log(this.form) that.$refs.dialogForm.validate(async (valid) => { if (valid) { that.isSaveing = true; if (that.mode === "add") { + that.form.is_fix = that.is_fix; that.form.mgroup = that.mgroup; that.$API.wpm.fmlog.create.req(that.form).then((res) => { that.isSaveing = false; diff --git a/src/views/wpm_gx/fmlogs.vue b/src/views/wpm_gx/fmlogs.vue index d504aac3..8fc7ad18 100644 --- a/src/views/wpm_gx/fmlogs.vue +++ b/src/views/wpm_gx/fmlogs.vue @@ -49,7 +49,7 @@ :query="params" > - + @@ -59,7 +59,7 @@ - + diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue index 11fb15f9..72d2a0f6 100644 --- a/src/views/wpm_gx/handover.vue +++ b/src/views/wpm_gx/handover.vue @@ -167,7 +167,7 @@ size="small" @click="table_receive(scope.row)" type="success" - v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null" + v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null" >接收 手动添加 - + { if (valid) { + if(that.mtype==20||that.mtype==30){ + that.form.recive_mgroup = that.form.send_mgroup; + that.form.mtype = that.mtype; + } if(that.mtype==20||that.mtype==30||that.type==40){ that.$API.wpm.handover.createsubmit.req(that.form).then((res) => { that.isSaveing = false; @@ -598,7 +602,7 @@ export default { return; } let that = this; - data = data.replace(' ',''); + // data = data.replace(' ',''); let id = data.split('#')[1]; this.$API.cm.labelmat.item.req(id).then((res) => { let arr = that.form.handoverb.filter((item) => { diff --git a/src/views/wpm_gx/handover_form2.vue b/src/views/wpm_gx/handover_form2.vue index 4f1db140..9455924f 100644 --- a/src/views/wpm_gx/handover_form2.vue +++ b/src/views/wpm_gx/handover_form2.vue @@ -27,7 +27,7 @@ - + @@ -224,6 +224,7 @@ export default { if(total>that.totalCount){ that.$message.error("分配数量不能大于总数量"); }else{ + that.form.wm = that.batchOrign.id; if (that.mode == "add") { that.$API.wpm.handover.create.req(that.form).then((res) => { that.$API.wpm.handover.submit.req(res.id).then((res1) => { diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue index 608a7f79..70ddd1d7 100644 --- a/src/views/wpm_gx/inm.vue +++ b/src/views/wpm_gx/inm.vue @@ -2,11 +2,11 @@
- 领料 - 返修 + + 返工 报废 合批 - +
@@ -148,7 +148,7 @@ @closed="dialog.save = false" > --> - +
- 入库 - 返修 + + 返工 报废 合批 - +
@@ -180,7 +180,7 @@ :cate = "cate_type" :process = "processId" :mgroupId = "mgroupId" - :deptId = "params.belong_dept" + :deptId = "deptId" @success="handleinmSuccess" > @@ -261,7 +261,7 @@ export default { stateOptions:[ { value: 10, name: "合格"}, { value: 20, name: "不合格"}, - { value: 30, name: "返修"}, + { value: 30, name: "返工"}, ], queryWm: { search: "", @@ -345,7 +345,7 @@ export default { }) } }, - //添加返修/报废 + //添加返工/报废 table_add(type) { this.dialog.scrap = true; this.type = type; diff --git a/src/views/wpm_gx/inm_record_form.vue b/src/views/wpm_gx/inm_record_form.vue index 68efd522..7a5eabe7 100644 --- a/src/views/wpm_gx/inm_record_form.vue +++ b/src/views/wpm_gx/inm_record_form.vue @@ -277,7 +277,7 @@ export default { if(data==''||data==undefined||data==null){ return; } - data = data.replace(' ',''); + // data = data.replace(' ',''); let id = data.split('#')[1]; this.$API.cm.labelmat.item.req(id).then((res) => { console.log('res',res); @@ -336,16 +336,29 @@ export default { } } }, - selectBatchChange(item) { - this.form.batch = item.batch; - this.form.warehouse = item.warehouse; - this.form.mb = item.id; + selectBatchChange(id) { + let that = this; + that.batchOptions.forEach((item) => { + if(item.id == id){ + console.log('item',item); + this.form.batch = item.batch; + this.form.warehouse = item.warehouse; + this.form.mb = item.id; + that.form.count = Number(item.count); + } + }) }, //选择车间库存物料后的处理 - selectwmChange(item){ + selectwmChange(id){ let that = this; - that.form.batch = item.batch; - that.form.wm = item.id; + that.wbatchOptions.forEach((item) => { + if(item.id == id){ + console.log('item',item); + that.form.batch = item.batch; + that.form.wm = item.id; + that.form.count = Number(item.count); + } + }) }, selectBatchClear() { this.form.batch = ""; diff --git a/src/views/wpm_gx/inmrecord.vue b/src/views/wpm_gx/inmrecord.vue index 5e5543c1..863a865b 100644 --- a/src/views/wpm_gx/inmrecord.vue +++ b/src/views/wpm_gx/inmrecord.vue @@ -160,6 +160,7 @@ :process = "processId" :mgroupId = "mgroupId" :deptId = " deptId" + @closed = "handleinmSuccess" @success="handleinmSuccess" > @@ -318,8 +319,7 @@ export default { resetQuery() { this.query = {}; }, - handleinmSuccess(){}, - handleSaveSuccess() { + handleinmSuccess(){ this.$refs.table.refresh(); }, }, diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue index f2030895..34fa421c 100644 --- a/src/views/wpm_gx/mlog_detail.vue +++ b/src/views/wpm_gx/mlog_detail.vue @@ -183,7 +183,7 @@ @@ -462,6 +465,10 @@ export default { type: String, default: "", }, + mgroupMtype:{ + type: String, + default: "", + } }, components: { editDialog, @@ -522,7 +529,7 @@ export default { 4: "已完成", 5: "已关闭", }, - defectform:{}, + defectinform:{}, fileList:[], cellsList:[], qct_defects:[], @@ -548,6 +555,7 @@ export default { }, ], }, + is_fix:false, wmId:'', wmtype:'', batchContains:'', @@ -578,6 +586,7 @@ export default { that.fileList = [{name:res.test_file,url:res.test_file}]; that.form.test_file = res.test_file; } + that.is_fix = res.is_fix; that.mgroup = res.mgroup; that.paramsWm.mgroup = res.mgroup; that.materialIn = res.material_in; @@ -601,13 +610,13 @@ export default { if(res.length>0){ that.$API.qm.qct.item.req(res[0].id).then((res) => { res.qct_defects.forEach((item) => { - that.defectform[item.defect_name] = 0; + that.defectinform[item.defect_name] = 0; }) that.qct_defects=res.qct_defects; console.log('that.saveInForm.mlogbdefect',that.saveInForm.mlogbdefect); if(that.saveInForm.mlogbdefect&&that.saveInForm.mlogbdefect.length>0){ that.saveInForm.mlogbdefect.forEach((item) => { - that.defectform[item.defect_name] = Number(item.count); + that.defectinform[item.defect_name] = Number(item.count); }) } }) @@ -620,7 +629,7 @@ export default { that.saveInForm.count_pn_jgqbl = 0; that.qct_defects.forEach(item => { if(item.defect_okcate==30){ - that.saveInForm.count_pn_jgqbl += that.defectform[item.defect_name]; + that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name]; } }) // that.countCellChanges(); @@ -643,15 +652,24 @@ export default { table_add() { this.dialog.save = true; this.$nextTick(() => { - this.$refs.saveDialog.open(); + this.$refs.saveDialog.open('add'); }); }, //自检 table_in_edit(row) { - this.saveInForm = row; - this.getdefects(); - this.saveInDialog = true; + let that = this; + if(that.mlogItem.mgroup_name=='黑化'||that.mlogItem.mgroup_name=='退火'){ + that.dialog.save = true; + that.$nextTick(() => { + that.$refs.saveDialog.open('edit',row); + }); + }else{ + that.saveInForm = row; + that.getdefects(); + that.saveInDialog = true; + } }, + //提交自检 saveInSubmit() { let that = this; @@ -659,17 +677,17 @@ export default { if (valid) { that.isSaveing = true; let obj = {}; - let count_pn_jgqbl = 0,mlogbdefect=[]; + let count_pn_jgqbl = 0,mlogbindefect=[]; that.qct_defects.forEach(item => { - count_pn_jgqbl += that.defectform[item.defect_name] ; + count_pn_jgqbl += that.defectinform[item.defect_name] ; let obj = {}; obj.defect = item.defect; - obj.count = that.defectform[item.defect_name]; + obj.count = that.defectinform[item.defect_name]; obj.mlogb = that.saveInForm.id; - mlogbdefect.push(obj); + mlogbindefect.push(obj); }) obj.count_use = that.saveInForm.count_use; - obj.mlogbdefect = mlogbdefect; + obj.mlogbindefect = mlogbindefect; obj.count_pn_jgqbl = count_pn_jgqbl; that.$API.wpm.mlogb.updateIn.req(that.saveInForm.id, obj).then((res) => { that.isSaveing = false; diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 87bbee85..37f187c9 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -56,7 +56,7 @@ - + + @@ -196,24 +196,6 @@ - - + - + + + + + {{ form.count_real }} + + + + + + + + {{ count_json_wx.ok_num }} + + + + + + {{ count_json_wx.notok_num }} + + + + 合格数抽检 + + + + + + + + + + + + + + + + + + + + + + 不合格全检 + + + + + + + + + + + + - + - + 不良统计(最大不合格数:{{max_defect_rate}},超过0.5则整层不合格) @@ -84,36 +187,40 @@ - + + - @@ -150,6 +259,12 @@