From cb0c6cfadbdd983bcdcff6224b30e30ded998fb8 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Jul 2025 13:40:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=80=80=E7=81=AB=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=AE=A1=E6=89=B9=EF=BC=8C=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E6=B7=BB=E5=8A=A0=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wf/ticketdetail.vue | 46 +++++- src/views/wpm_gx/handover_form.vue | 67 ++++++++- src/views/wpm_gx/mlog_detail.vue | 217 +++++------------------------ 3 files changed, 143 insertions(+), 187 deletions(-) diff --git a/src/views/wf/ticketdetail.vue b/src/views/wf/ticketdetail.vue index eaf9256f..740bb269 100644 --- a/src/views/wf/ticketdetail.vue +++ b/src/views/wf/ticketdetail.vue @@ -103,7 +103,7 @@ @@ -209,6 +209,36 @@ + + + + {{handoverItem.send_dept_name}} + + + {{ handoverItem.send_mgroup_name }} + + + {{handoverItem.recive_dept_name}} + + + {{ handoverItem.recive_mgroup_name }} + + + + + {{item.batch}} + + + {{ item.count }} + + + 交接文件: + {{ticketDetail.test_file}} + { + that.handoverItem = res1; + that.ticketDetail.routepack_name = res1.routepack_name; + that.ticketDetail.handoverb = res1.handoverb; + that.ticketDetail.material_in_name = res1.material_in_name; + that.ticketDetail.material_out_name = res1.material_out_name; + that.ticketDetail.handle_user_name = res1.handle_user_name; + that.ticketDetail.test_file = res1.oinfo_json.test_file; + }) + } if (this.ticketDetail.state_.key == "opl_close") { // 如果是作业关闭,展示需要提交的表单 this.getCloseDos(); diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 188e20a1..b443d227 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -176,10 +176,34 @@ + + + + + + + - - 确定 + + + 确定 取消 @@ -237,6 +261,7 @@ export default { recive_mgroup: null, handoverb:[], }, + initForm:{}, selectObjIds:[], apiObjM:null, paramsM:{}, @@ -294,7 +319,9 @@ export default { listParams:{}, totalCount: 0, deptID:'', + route_code:'', codeText: "", + fileList:[], userList: [], userList2: [], mgroupOptions: [], @@ -314,6 +341,7 @@ export default { that.materialObj = materialObj; that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date()); that.form.send_mgroup = that.mgroupId; + that.route_code = that.$route.path.split("/")[2]; //type 10:正常交接 ;20:返工交接 ;40:报废交接 //mtype 10:正常交接 ;20:分批操作 ;30:合批操作 //获取交接人员 @@ -347,8 +375,19 @@ export default { }else{ that.getMgroupOptions(); } + if(that.route_code=='tuihuo'){ + that.getInit(); + } }, methods: { + //渲染工单提交按钮 + getInit() { + let that = this; + that.$API.wf.workflow.initkey.req(" backfire").then((res) => { + that.initForm = res; + let transitions = res.transitions; + }); + }, //获取工段列表 getMgroupOptions() { let that = this; @@ -499,6 +538,30 @@ export default { that.totalCount = totalCount; } }, + fileUPSuccess(res) { + this.test_file = res.path; + }, + //提交退火交接单信息,创建工单 + submitTicketCreate(id) { + let that = this; + that.form.oinfo_json = {}; + that.form.oinfo_json.test_file = that.test_file; + that.$API.wpm.handover.create.req(that.form).then((res) => { + let ticket = {}; + that.isSaveing = true; + ticket.title = '退火交接审批单'; + ticket.workflow = that.initForm.workflow; + ticket.ticket_data = {t_id: res.id}; + ticket.transition = id; + that.$API.wf.ticket.create.req(ticket).then((res) => { + that.isSaveing = false; + that.visible = false; + that.$message.success("提交成功"); + }).catch((e) => { + that.isSaveing = false; + }); + }); + }, //提交 submit() { let that = this; diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue index 408fb848..bb432d11 100644 --- a/src/views/wpm_gx/mlog_detail.vue +++ b/src/views/wpm_gx/mlog_detail.vue @@ -48,17 +48,14 @@ {{ mlogItem.work_end_time }} - - {{act_states[mlogItem.ticket_.act_state]}} - - + {{mlogItem.test_file}}
提交 - - 放行审批
@@ -311,30 +301,6 @@ - - - - - - - - - - - - - - min - - - - - - °C - - - - - - - - - - - - - - - - - - - - :退火后直径23.5±0.2;黑圈内径:5.9±0.1;外径7.6-7.77 - - - - - - - - - @@ -535,14 +417,6 @@ export default { count_use: 0, count_pn_jgqbl: 0, }, - oinfo_json:{ - 退火炉号:'', - 退火时间:'', - 退火温度:'', - 抽检结果:'', - 抽检数:'', - 强度落球:'', - }, act_states: { 0: "草稿中", 1: "进行中", @@ -568,7 +442,7 @@ export default { mlogbdefect:[], mlogboutdefect:[], saveInDialog: false, - ticketDialog:false, + // ticketDialog:false, printVisible:false, setFiltersVisible: false, rules: { @@ -593,7 +467,7 @@ export default { this.paramsIn.mlog = this.mlogId; this.paramsOut.mlog = this.mlogId; this.apiObj = this.$API.wpm.mlogb.list; - this.getInit(); + // this.getInit(); that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => { that.tableData = res; }) @@ -632,7 +506,6 @@ export default { }) }); }, - getdefects(){ let that = this; that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => { @@ -651,7 +524,6 @@ export default { }) } }) - }, countChange() { let that = this; @@ -661,7 +533,6 @@ export default { that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name]; } }) - // that.countCellChanges(); }, //表单注入数据 setData(data) { @@ -675,9 +546,6 @@ export default { this.$refs.editDialog.open("edit").setData(this.mlogItem); }); }, - // mlogUpdate(data) { - // this.$refs.editDialog.open().setData(data); - // }, table_add() { this.dialog.save = true; this.$nextTick(() => { @@ -698,7 +566,6 @@ export default { that.saveInDialog = true; } }, - //提交自检 saveInSubmit() { let that = this; @@ -752,7 +619,6 @@ export default { that.$refs.checkDialog.open(obj); }); }, - //表单提交方法 mlogSubmit() { let that = this; @@ -762,50 +628,35 @@ export default { that.$message.success("操作成功"); }); }, - //渲染工单提交按钮 - getInit() { - let that = this; - that.$API.wf.workflow.initkey.req(" backfire").then((res) => { - that.initForm = res; - }); - }, - //填写退火放行单信息 - createTicket(){ - if(this.mlogItem.work_end_time==null){ - this.$message.error("请先编辑日志并选择结束时间"); - }else{ - let sum = 0; - this.mlogItem.reminder_interval_list.forEach(item => { - sum+=item; - }); - this.oinfo_json.退火时间 = sum; - this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:''; - this.ticketDialog = true; - } - }, - //提交退火放行单信息,创建工单 - submitTicketCreate(id) { - let that = this; - let obj = {}; - obj.oinfo_json = that.oinfo_json; - obj.test_file = that.test_file; - that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => { - let ticket = {}; - that.isSaveing = true; - ticket.title = '退火放行审批单'; - ticket.workflow = that.initForm.workflow; - ticket.ticket_data = {t_id: that.mlogItem.id}; - ticket.transition = id; - that.$API.wf.ticket.create.req(ticket).then((res) => { - that.isSaveing = false; - that.ticketDialog = false; - that.visible = false; - that.$message.success("提交成功"); - }).catch((e) => { - that.isSaveing = false; - }); - }); - }, + // //渲染工单提交按钮 + // getInit() { + // let that = this; + // that.$API.wf.workflow.initkey.req(" backfire").then((res) => { + // that.initForm = res; + // }); + // }, + // //提交退火放行单信息,创建工单 + // submitTicketCreate(id) { + // let that = this; + // let obj = {}; + // obj.test_file = that.test_file; + // that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => { + // let ticket = {}; + // that.isSaveing = true; + // ticket.title = '退火放行审批单'; + // ticket.workflow = that.initForm.workflow; + // ticket.ticket_data = {t_id: that.mlogItem.id}; + // ticket.transition = id; + // that.$API.wf.ticket.create.req(ticket).then((res) => { + // that.isSaveing = false; + // that.ticketDialog = false; + // that.visible = false; + // that.$message.success("提交成功"); + // }).catch((e) => { + // that.isSaveing = false; + // }); + // }); + // }, codeTextChange(codeText){ this.codeText = codeText; this.dialog.save = true;