This commit is contained in:
shijing 2025-07-28 09:33:47 +08:00
commit aeaec755d3
3 changed files with 62 additions and 2 deletions

View File

@ -213,4 +213,13 @@ export const certStateEnum = new EnumFactory({
10: { text: '正常', type: 'success' },
20: { text: '临期', type: 'warning' },
30: { text: '过期', type: 'danger' }
}, parseInt)
}, parseInt)
export const actStateEnum = new EnumFactory({
0: { text: '草稿中', type: 'primary' },
1: { text: '进行中', type: 'primary' },
2: { text: '被退回', type: 'danger' },
3: { text: '被撤回', type: 'warning' },
4: { text: '已完成', type: 'success' },
5: { text: '已关闭', type: 'info' },
})

View File

@ -148,6 +148,20 @@
prop="recive_user_name"
width="80"
></el-table-column>
<el-table-column
label="审批状态"
v-if="route_code=='jianbo'"
width="84"
>
<template #default="scope">
<span v-if="scope.row.ticket">
<el-tag :type="actStateEnum[scope.row.ticket_.act_state]?.type">
{{actStateEnum[scope.row.ticket_.act_state]?.text}}
</el-tag>
</span>
</template>
</el-table-column>
<el-table-column
label="备注"
prop="note"
@ -290,6 +304,7 @@
<script>
import saveDialog from "./handover_form.vue";
import print from "./../setting/print/A4.vue";
import { actStateEnum } from "@/utils/enum.js";
export default {
props: {
deptId: {
@ -323,6 +338,7 @@ export default {
},
data() {
return {
actStateEnum,
apiObj: null,
dialog: {
@ -361,6 +377,7 @@ export default {
{ required: true, message: "请选择接收工段", trigger: "blur" },
],
},
route_code: "",
// setNameVisible: false,
};
},
@ -372,6 +389,7 @@ export default {
that.apiObj = that.$API.wpm.handover.list;
that.$refs.table.refresh();
that.getMgroupOptions();
that.route_code = that.$route.path.split("/")[2];
},
methods: {
//

View File

@ -192,7 +192,7 @@
</el-row>
</el-form>
<el-footer v-show="mode!=='show'">
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10&&mode=='add'">
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10">
<el-button
v-for="item in transitions"
:key="item.id"
@ -556,6 +556,7 @@ export default {
that.isSaveing = true;
that.form.oinfo_json = {};
that.form.oinfo_json.test_file = that.test_file;
if(that.mode == "add") {
that.$API.wpm.handover.create.req(that.form).then((res) => {
let ticket = {};
ticket.title = '退火交接审批单';
@ -573,6 +574,38 @@ export default {
}).catch((e) => {
that.isSaveing = false;
});
} else if (that.mode == "edit") {
that.$API.wpm.handover.update.req(that.form.id, that.form).then((res) => {
if (that.form.ticket == null) {
let ticket = {};
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.$emit("success");
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
});
} else {
let data = {transition: id, ticket_data: {}}
that.$API.wf.ticket.ticketHandle.req(that.form.ticket, data).then(res=>{
that.isSaveing = false;
that.visible = false;
that.$emit("success");
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
})
}
}).catch((err) => {
that.isSaveing = false;
return err;
});
}
},
//
submit() {