Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
aeaec755d3
|
|
@ -213,4 +213,13 @@ export const certStateEnum = new EnumFactory({
|
||||||
10: { text: '正常', type: 'success' },
|
10: { text: '正常', type: 'success' },
|
||||||
20: { text: '临期', type: 'warning' },
|
20: { text: '临期', type: 'warning' },
|
||||||
30: { text: '过期', type: 'danger' }
|
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' },
|
||||||
|
})
|
||||||
|
|
@ -148,6 +148,20 @@
|
||||||
prop="recive_user_name"
|
prop="recive_user_name"
|
||||||
width="80"
|
width="80"
|
||||||
></el-table-column>
|
></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
|
<el-table-column
|
||||||
label="备注"
|
label="备注"
|
||||||
prop="note"
|
prop="note"
|
||||||
|
|
@ -290,6 +304,7 @@
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import saveDialog from "./handover_form.vue";
|
||||||
import print from "./../setting/print/A4.vue";
|
import print from "./../setting/print/A4.vue";
|
||||||
|
import { actStateEnum } from "@/utils/enum.js";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
deptId: {
|
deptId: {
|
||||||
|
|
@ -323,6 +338,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
actStateEnum,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|
@ -361,6 +377,7 @@ export default {
|
||||||
{ required: true, message: "请选择接收工段", trigger: "blur" },
|
{ required: true, message: "请选择接收工段", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
route_code: "",
|
||||||
// setNameVisible: false,
|
// setNameVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -372,6 +389,7 @@ export default {
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
|
that.route_code = that.$route.path.split("/")[2];
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取工段列表
|
//获取工段列表
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@
|
||||||
</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&&mode=='add'">
|
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="item in transitions"
|
v-for="item in transitions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
@ -556,6 +556,7 @@ export default {
|
||||||
that.isSaveing = true;
|
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;
|
||||||
|
if(that.mode == "add") {
|
||||||
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
||||||
let ticket = {};
|
let ticket = {};
|
||||||
ticket.title = '退火交接审批单';
|
ticket.title = '退火交接审批单';
|
||||||
|
|
@ -573,6 +574,38 @@ export default {
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
that.isSaveing = false;
|
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() {
|
submit() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue