diff --git a/src/views/wf/ticketdetail.vue b/src/views/wf/ticketdetail.vue index 9601d724..0ed53522 100644 --- a/src/views/wf/ticketdetail.vue +++ b/src/views/wf/ticketdetail.vue @@ -26,12 +26,28 @@ ticketDetail.workflow_.name }} - + {{ ticketDetail.create_time }} - + {{ ticketDetail.title }} + + {{ ticketDetail.routepack_name }} + + + {{ ticketDetail.material_in_name }} + + + {{ ticketDetail.material_out_name }} + + + {{ ticketDetail.handle_user_name }} + + + {{ticketDetail.test_file}} + + { + }).then(() => { if (that.handleTitle === "撤回工单") { that.$API.wf.ticket.ticketRetreat .req(that.ticketId, that.handleForm) @@ -707,60 +722,62 @@ export default { showMoreVisit() { this.visitShow = true; this.$nextTick(() => { - this.$refs.visitDialog - .open("show") - .setData({ id: this.projectId }); + this.$refs.visitDialog.open("show").setData({ id: this.projectId }); }); }, //工单详情 getticketItem() { - this.mainLoading = true; - this.$API.wf.ticket.ticketItem - .req(this.ticketId) - .then((res) => { - this.mainLoading = false; - this.ticketDetail = res; - if (this.ticketDetail.state_.key == "opl_close") { - // 如果是作业关闭,展示需要提交的表单 - this.getCloseDos(); - } - // 判断是不是我的或该我处理的 - if (this.ticketDetail.create_by == this.userId) { - this.isOwn = true; - } - let participant = this.ticketDetail.participant; - if ( - participant == this.userId || - participant.indexOf(this.userId) > -1 - ) { - this.isDuty = true; - } - }) - .catch((e) => { - this.mainLoading = false; - }); + let that = this; + that.mainLoading = true; + that.$API.wf.ticket.ticketItem.req(that.ticketId).then((res) => { + that.mainLoading = false; + that.ticketDetail = res; + if(res.ticket_data.t_model&&res.ticket_data.t_model=="mlog"){ + that.$API.wpm.mlog.item.req(res.ticket_data.t_id).then((res1) => { + that.ticketDetail.routepack_name = res1.routepack_name; + 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.test_file; + }) + } + if (this.ticketDetail.state_.key == "opl_close") { + // 如果是作业关闭,展示需要提交的表单 + this.getCloseDos(); + } + // 判断是不是我的或该我处理的 + if (this.ticketDetail.create_by == this.userId) { + this.isOwn = true; + } + let participant = this.ticketDetail.participant; + if ( + participant == this.userId || + participant.indexOf(this.userId) > -1 + ) { + this.isDuty = true; + } + }).catch((e) => { + this.mainLoading = false; + }); }, //获取应有的流转 getBtns() { let that = this; that.audit_imgs_show = false; - that.$API.wf.ticket.ticketTransitions - .req(that.ticketId) - .then((res) => { - that.operationBtn = res; - console.log("operationBtn", that.operationBtn); - if(res.length>0){ - for (let i = 0; i < res.length; i++) { - if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ - that.audit_imgs_show = true; - } - if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){ - that.audit_work_show = true; - } + that.$API.wf.ticket.ticketTransitions.req(that.ticketId).then((res) => { + that.operationBtn = res; + console.log("operationBtn", that.operationBtn); + if(res.length>0){ + for (let i = 0; i < res.length; i++) { + if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ + that.audit_imgs_show = true; + } + if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){ + that.audit_work_show = true; } } - - }); + } + }); }, //访客详情 getVisit() { @@ -848,15 +865,13 @@ export default { this.userName = data.name; }, deliverNodeHandler() { - this.$API.wf.ticket.ticketDeliver - .req(this.ticketId, this.deliverForm) - .then((res) => { - if (res.err_msg) { - } else { - this.limitedDeliver = false; - this.$router.push("dutywork"); - } - }); + this.$API.wf.ticket.ticketDeliver.req(this.ticketId, this.deliverForm).then((res) => { + if (res.err_msg) { + } else { + this.limitedDeliver = false; + this.$router.push("dutywork"); + } + }); }, //转交处理-end //流转按钮触发 @@ -879,18 +894,15 @@ export default { return; } } - this.$API.wf.ticket.ticketHandle - .req(this.ticketId, params) - .then((res) => { - if (res.err_msg) { - } else { - this.$router.push("dutywork"); - this.submitLoading = false; - } - }) - .catch((e) => { + this.$API.wf.ticket.ticketHandle.req(this.ticketId, params).then((res) => { + if (res.err_msg) { + } else { + this.$router.push("dutywork"); this.submitLoading = false; - }); + } + }).catch((e) => { + this.submitLoading = false; + }); }, reStart() { this.$API.wf.ticket.retryScript.req(this.ticketId).then((res) => {