fix:退火交接审批

This commit is contained in:
shijing 2025-07-25 17:02:09 +08:00
parent cb77e8fc97
commit ee8c066835
2 changed files with 21 additions and 10 deletions

View File

@ -178,7 +178,7 @@
size="small" size="small"
@click="table_receive(scope.row)" @click="table_receive(scope.row)"
type="primary" type="primary"
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null" v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type== 2))"
>接收</el-button> >接收</el-button>
<el-button <el-button
link link
@ -210,7 +210,7 @@
type="primary" type="primary"
v-if=" v-if="
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&& (scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
scope.row.submit_time == null&&scope.row.mtype == 10 scope.row.submit_time == null&&scope.row.mtype == 10&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type== 1))
" "
>编辑</el-button >编辑</el-button
> >
@ -218,7 +218,7 @@
title="确定删除吗?" title="确定删除吗?"
v-if=" v-if="
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&& (scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
scope.row.submit_time == null scope.row.submit_time == null&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type!== 0))
" "
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >

View File

@ -192,9 +192,9 @@
</el-row> </el-row>
</el-form> </el-form>
<el-footer v-show="mode!=='show'"> <el-footer v-show="mode!=='show'">
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10"> <template v-if="route_code=='tuihuo'&&type==10&&mtype==10&&mode=='add'">
<el-button <el-button
v-for="item in initForm.transitions" v-for="item in transitions"
:key="item.id" :key="item.id"
type="primary" type="primary"
:loading="isSaveing" :loading="isSaveing"
@ -260,6 +260,7 @@ export default {
recive_user: null, recive_user: null,
recive_mgroup: null, recive_mgroup: null,
handoverb:[], handoverb:[],
ticket:null
}, },
initForm:{}, initForm:{},
selectObjIds:[], selectObjIds:[],
@ -267,6 +268,7 @@ export default {
paramsM:{}, paramsM:{},
selectObj:{}, selectObj:{},
selectObjs:[], selectObjs:[],
transitions:[],
rules: { rules: {
batch: [ batch: [
{ {
@ -383,10 +385,17 @@ export default {
// //
getInit() { getInit() {
let that = this; let that = this;
that.$API.wf.workflow.initkey.req(" backfire").then((res) => { if(this.form.ticket!==null){
that.initForm = res; this.$API.wf.ticket.ticketTransitions.req(this.form.ticket).then((res) => {
let transitions = res.transitions; that.transitions = res;
}); })
}else{
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
}, },
// //
getMgroupOptions() { getMgroupOptions() {
@ -544,11 +553,11 @@ export default {
//退, //退,
submitTicketCreate(id) { submitTicketCreate(id) {
let that = this; let that = this;
that.isSaveing = true;
that.form.oinfo_json = {}; that.form.oinfo_json = {};
that.form.oinfo_json.test_file = that.test_file; that.form.oinfo_json.test_file = that.test_file;
that.$API.wpm.handover.create.req(that.form).then((res) => { that.$API.wpm.handover.create.req(that.form).then((res) => {
let ticket = {}; let ticket = {};
that.isSaveing = true;
ticket.title = '退火交接审批单'; ticket.title = '退火交接审批单';
ticket.workflow = that.initForm.workflow; ticket.workflow = that.initForm.workflow;
ticket.ticket_data = {t_id: res.id}; ticket.ticket_data = {t_id: res.id};
@ -560,6 +569,8 @@ export default {
}).catch((e) => { }).catch((e) => {
that.isSaveing = false; that.isSaveing = false;
}); });
}).catch((e) => {
that.isSaveing = false;
}); });
}, },
// //