diff --git a/src/utils/enum.js b/src/utils/enum.js
index fa8e831b..1b84415d 100644
--- a/src/utils/enum.js
+++ b/src/utils/enum.js
@@ -213,4 +213,13 @@ export const certStateEnum = new EnumFactory({
10: { text: '正常', type: 'success' },
20: { text: '临期', type: 'warning' },
30: { text: '过期', type: 'danger' }
-}, parseInt)
\ No newline at end of file
+}, 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' },
+})
\ No newline at end of file
diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index 18d1a561..d70f9b9a 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -148,6 +148,20 @@
prop="recive_user_name"
width="80"
>
+
+
+
+
+ {{actStateEnum[scope.row.ticket_.act_state]?.text}}
+
+
+
+
+
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: {
//获取工段列表
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index eb05fb93..3fb28411 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -192,7 +192,7 @@
-
+
{
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() {