Commit 47a22507 authored by renjintao's avatar renjintao

工艺规程流程禁用后处理

parent 532eb6bc
...@@ -249,17 +249,6 @@ export default { ...@@ -249,17 +249,6 @@ export default {
} else { } else {
this.entity.fileId = ""; this.entity.fileId = "";
} }
ApiWorkflow.getbyid({
id: "2085025d-9c38-4834-846a-8f9d2f4c8553",
})
.then((res) => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.entity.approvalStatus = 4;
} else {
this.entity.approvalStatus = 1;
}
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
...@@ -286,12 +275,6 @@ export default { ...@@ -286,12 +275,6 @@ export default {
console.warn(err); console.warn(err);
}); });
} }
})
.catch((err) => {
this.$Message.error("操作失败");
console.warn(err);
});
}
} }
}); });
}, },
......
<style lang="less"> <style lang="less">
@import "./technolog.less"; @import "./technolog.less";
.details_box { .details_box {
background: #f5f7f9; background: #f5f7f9;
display: flex; display: flex;
margin: 0 20px; margin: 0 20px;
flex-direction: column; flex-direction: column;
.details_body { .details_body {
flex-grow: 1; flex-grow: 1;
// width: 561px; // width: 561px;
text-align: center; text-align: center;
background: white; background: white;
.ivu-menu-horizontal { .ivu-menu-horizontal {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
background: #f5f7f9; background: #f5f7f9;
z-index: 888; z-index: 888;
.ivu-menu-item { .ivu-menu-item {
width: 140px; width: 140px;
border-right: 1px solid #e0e0e0; border-right: 1px solid #e0e0e0;
...@@ -24,6 +28,7 @@ ...@@ -24,6 +28,7 @@
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
background: rgba(243, 243, 243, 1); background: rgba(243, 243, 243, 1);
} }
.ivu-menu-item-active.ivu-menu-item-selected { .ivu-menu-item-active.ivu-menu-item-selected {
background: #fff; background: #fff;
border-top: 2px solid #2d8cf0; border-top: 2px solid #2d8cf0;
...@@ -31,6 +36,7 @@ ...@@ -31,6 +36,7 @@
} }
} }
} }
.bottom_box { .bottom_box {
padding: 5px 20px; padding: 5px 20px;
background: white; background: white;
...@@ -40,33 +46,23 @@ ...@@ -40,33 +46,23 @@
} }
</style> </style>
<template> <template>
<div class="details_box"> <div class="details_box">
<div class="details_body"> <div class="details_body">
<Menu mode="horizontal" theme="light" active-name="0"> <Menu mode="horizontal" theme="light" active-name="0">
<MenuItem name="0" :to="'/technology/details?id='+headerId+'&headerStatus='+headerStatus">工序</MenuItem> <MenuItem name="0" :to="'/technology/details?id='+headerId+'&headerStatus='+headerStatus">工序</MenuItem>
<!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> --> <!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> -->
<MenuItem <MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus">质控卡</MenuItem>
name="2" <MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId">工艺BOM</MenuItem>
:to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus"
>质控卡</MenuItem>
<MenuItem
name="3"
:to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId"
>工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> --> <!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="4" :to="'/technology/details/setup?id='+headerId">生产准备</MenuItem> <MenuItem name="4" :to="'/technology/details/setup?id='+headerId">生产准备</MenuItem>
<MenuItem <MenuItem name="5" :to="'/technology/details/routinghcorder?id='+headerId" v-show="headerStatus==1">工艺更改单</MenuItem>
name="5"
:to="'/technology/details/routinghcorder?id='+headerId"
v-show="headerStatus==1"
>工艺更改单</MenuItem>
<MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem> <MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem>
</Menu> </Menu>
</div> </div>
<div class="bottom_box"> <div class="bottom_box">
<nuxt-child keep-alive :headerid="headerId"></nuxt-child> <nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -89,7 +85,10 @@ export default { ...@@ -89,7 +85,10 @@ export default {
this.headerStatus = this.$route.query.headerStatus; this.headerStatus = this.$route.query.headerStatus;
this.productBomId = this.$route.query.productBomId; this.productBomId = this.$route.query.productBomId;
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {}, mounted() {},
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false" :page="false"> <DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false" :page="false">
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add" v-show="headerStatus==0||headerStatus==4">新增</Button> <Button type="primary" @click="add" v-show="headerStatus==0||headerStatus==4">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1300" footer-hide> <Modal v-model="modal" :title="title" width="1300" footer-hide>
<component <component :is="detail" :eid="curId" :headid="hid" :eName="curName" :maxNum="maxNum" @on-close="cancel" @on-ok="ok" />
:is="detail"
:eid="curId"
:headid="hid"
:eName="curName"
:maxNum="maxNum"
@on-close="cancel"
@on-ok="ok"
/>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
...@@ -41,7 +34,10 @@ export default { ...@@ -41,7 +34,10 @@ export default {
op: "name", op: "name",
value: null value: null
}, },
routingHeaderId: { op: "Equal", value: -1 } routingHeaderId: {
op: "Equal",
value: -1
}
}, },
// conditions: { routingHeaderId: { op: "Equal", value: -1 } }, // conditions: { routingHeaderId: { op: "Equal", value: -1 } },
modal: false, modal: false,
...@@ -50,15 +46,14 @@ export default { ...@@ -50,15 +46,14 @@ export default {
curId: 0, curId: 0,
curName: "", curName: "",
hid: 0, hid: 0,
columns: [ columns: [{
{
type: "expand", type: "expand",
width: 50, width: 50,
render: (h, params) => { render: (h, params) => {
return h(expandRow, { return h(expandRow, {
props: { props: {
row: params.row.steps, row: params.row.steps,
headerStatus:this.headerStatus, headerStatus: this.headerStatus,
}, },
on: { on: {
//监听子组件showDetail事件 //监听子组件showDetail事件
...@@ -197,11 +192,14 @@ export default { ...@@ -197,11 +192,14 @@ export default {
width: 180, width: 180,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "detail" }, oprate: "detail"
},
on: { on: {
click: () => click: () =>
this.addStep( this.addStep(
...@@ -211,32 +209,41 @@ export default { ...@@ -211,32 +209,41 @@ export default {
) )
} }
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "新增" : "" this.headerStatus == 4 || this.headerStatus == 0 ? "新增" : ""
), ),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "detail" }, oprate: "detail"
on: { click: () => this.view(params.row.id) } },
on: {
click: () => this.view(params.row.id)
}
}, },
"查看" "查看"
), ),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "edit" }, oprate: "edit"
on: { click: () => this.edit(params.row.id) }
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : "" on: {
click: () => this.edit(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "编辑" : ""
), ),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "delete" }, oprate: "delete"
on: { click: () => this.remove(params.row.id) }
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : "" on: {
click: () => this.remove(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
) )
]); ]);
} }
...@@ -245,7 +252,7 @@ export default { ...@@ -245,7 +252,7 @@ export default {
list: [], list: [],
maxNum: 0, maxNum: 0,
maxNumTemp: 0, maxNumTemp: 0,
headerStatus:-1, headerStatus: -1,
}; };
}, },
created() { created() {
...@@ -255,7 +262,7 @@ export default { ...@@ -255,7 +262,7 @@ export default {
this.easySearch.routingHeaderId.value = this.$route.query.id; this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
this.hid = Number(this.easySearch.routingHeaderId.value); this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus=this.$route.query.headerStatus this.headerStatus = this.$route.query.headerStatus
}, },
mounted() { mounted() {
this.load(); this.load();
...@@ -265,7 +272,10 @@ export default { ...@@ -265,7 +272,10 @@ export default {
// this.easySearch.routingHeaderId.view = this.headerid; // this.easySearch.routingHeaderId.view = this.headerid;
// } // }
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
...@@ -371,5 +381,6 @@ export default { ...@@ -371,5 +381,6 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action"> <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input placeholder="请输入检测要求/标准指标" v-model="easySearch.keys.value" v-width="260" />
placeholder="请输入检测要求/标准指标"
v-model="easySearch.keys.value"
v-width="260"
/>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
...@@ -25,8 +21,9 @@ ...@@ -25,8 +21,9 @@
<Modal v-model="modal" :title="title" width="1000" footer-hide> <Modal v-model="modal" :title="title" width="1000" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
...@@ -46,11 +43,13 @@ export default { ...@@ -46,11 +43,13 @@ export default {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: op: "checkParams,standard",
"checkParams,standard",
value: null value: null
}, },
routingHeaderId: { op: "Equal", value: -1 }, routingHeaderId: {
op: "Equal",
value: -1
},
}, },
sortType: 'normal', sortType: 'normal',
modal: false, modal: false,
...@@ -58,21 +57,20 @@ export default { ...@@ -58,21 +57,20 @@ export default {
detail: null, detail: null,
curId: 0, curId: 0,
hid: 0, hid: 0,
columns: [ columns: [{
{
key: "routingDetailNo", key: "routingDetailNo",
title: this.l("routingDetailNo"), title: this.l("routingDetailNo"),
align: "left", align: "left",
high: true, high: true,
width: 100, width: 100,
sortable:true sortable: true
}, },
{ {
key: "routingDetailName", key: "routingDetailName",
title: this.l("routingDetailName"), title: this.l("routingDetailName"),
align: "left", align: "left",
high: true, high: true,
tooltip:true, tooltip: true,
}, },
{ {
key: "checkParams", key: "checkParams",
...@@ -80,7 +78,7 @@ export default { ...@@ -80,7 +78,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
tooltip:true, tooltip: true,
}, },
{ {
key: "fillintype", key: "fillintype",
...@@ -88,7 +86,7 @@ export default { ...@@ -88,7 +86,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
code: "QC.fillintype", code: "QC.fillintype",
width:140, width: 140,
}, },
{ {
key: "checkType", key: "checkType",
...@@ -96,7 +94,7 @@ export default { ...@@ -96,7 +94,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
code: "QC.checktype", code: "QC.checktype",
width:100, width: 100,
}, },
{ {
key: "isphotograph", key: "isphotograph",
...@@ -104,7 +102,7 @@ export default { ...@@ -104,7 +102,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
code: "Process.state", code: "Process.state",
width:100, width: 100,
}, },
{ {
key: "standard", key: "standard",
...@@ -112,7 +110,7 @@ export default { ...@@ -112,7 +110,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
tooltip:true, tooltip: true,
}, },
{ {
key: "productionRequirement", key: "productionRequirement",
...@@ -120,7 +118,7 @@ export default { ...@@ -120,7 +118,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
tooltip:true, tooltip: true,
}, },
{ {
key: "checkContent", key: "checkContent",
...@@ -128,7 +126,7 @@ export default { ...@@ -128,7 +126,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
tooltip:true, tooltip: true,
}, },
{ {
key: "qualityTemplateName", key: "qualityTemplateName",
...@@ -138,12 +136,17 @@ export default { ...@@ -138,12 +136,17 @@ export default {
hide: true, hide: true,
high: true, high: true,
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "detail" }, oprate: "detail"
on: { click: () => this.view(params.row.id) } },
on: {
click: () => this.view(params.row.id)
}
}, },
params.row.qualityTemplateName params.row.qualityTemplateName
) )
...@@ -184,32 +187,43 @@ export default { ...@@ -184,32 +187,43 @@ export default {
width: 140, width: 140,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "detail" }, oprate: "detail"
on: { click: () => this.view(params.row.id) } },
on: {
click: () => this.view(params.row.id)
}
}, },
"查看" "查看"
), ),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "edit" }, oprate: "edit"
on: { click: () => this.edit(params.row.id) } },
on: {
click: () => this.edit(params.row.id)
}
}, },
'编辑' '编辑'
// this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : "" // this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
), ),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "delete" }, oprate: "delete"
on: { click: () => this.remove(params.row.id) } },
on: {
click: () => this.remove(params.row.id)
}
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : "" this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
) )
]); ]);
} }
...@@ -217,7 +231,7 @@ export default { ...@@ -217,7 +231,7 @@ export default {
], ],
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: "", fileUrlPath: "",
headerStatus:-1, headerStatus: -1,
}; };
}, },
created() { created() {
...@@ -227,14 +241,17 @@ export default { ...@@ -227,14 +241,17 @@ export default {
this.easySearch.routingHeaderId.value = this.$route.query.id; this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
this.hid = Number(this.easySearch.routingHeaderId.value); this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus=this.$route.query.headerStatus this.headerStatus = this.$route.query.headerStatus
}, },
mounted() { mounted() {
console.log(this); console.log(this);
this.search(); this.search();
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -293,5 +310,6 @@ export default { ...@@ -293,5 +310,6 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
...@@ -105,6 +105,7 @@ import ProductTree from "@/components/page/productTree.vue"; ...@@ -105,6 +105,7 @@ import ProductTree from "@/components/page/productTree.vue";
import sendAudit from "./sendAudit.vue"; import sendAudit from "./sendAudit.vue";
import routingchangeorder from "../processDesign/Process/routingchangeorder.vue"; import routingchangeorder from "../processDesign/Process/routingchangeorder.vue";
import changelist from "../processDesign/Process/changelist.vue"; import changelist from "../processDesign/Process/changelist.vue";
import ApiWorkflow from "../workflow/process/api";
export default { export default {
components: { components: {
ProductTree, ProductTree,
...@@ -236,21 +237,6 @@ export default { ...@@ -236,21 +237,6 @@ export default {
high: true, high: true,
code: "Process.Status" code: "Process.Status"
}, },
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
// { key: "isMain", title: this.l("isMain"),align: "center",width: 80,high: true,code: "Process.state"},
//{key: "creatorUserId",title: this.l("author"),align: "left", high: true,type: "user",hide: true},
//{key: "versionnotes",title: this.l("versionnotes"),align: "left", high: true,hide: true},
//{key: "versionid", title: this.l("versionid"), align: "left", hide: true, code: "Process.Routing.version"},
{ {
key: "creationTime", key: "creationTime",
title: this.$t("creationTime"), title: this.$t("creationTime"),
...@@ -351,7 +337,7 @@ export default { ...@@ -351,7 +337,7 @@ export default {
click: () => this.TechnologyChange(params.row) click: () => this.TechnologyChange(params.row)
} }
}, },
params.row.approvalStatus == 1 ? "新增更改单" : "" this.processStatus == 0 && params.row.approvalStatus == 1 ? "新增更改单" : ""
), ),
h( h(
"op", { "op", {
...@@ -362,7 +348,18 @@ export default { ...@@ -362,7 +348,18 @@ export default {
click: () => this.sendAuditFun(params.row) click: () => this.sendAuditFun(params.row)
} }
}, },
params.row.approvalStatus == 4 ? "送审" : "" this.processStatus == 0 && params.row.approvalStatus == 4 ? "送审" : ""
),
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.changeStatus(params.row)
}
},
this.processStatus == 1 && params.row.approvalStatus == 4 ? "启用" : ""
) )
]); ]);
} }
...@@ -378,6 +375,7 @@ export default { ...@@ -378,6 +375,7 @@ export default {
processviewModal: false, processviewModal: false,
ModalIm: false, ModalIm: false,
temTitle: "工艺规程", temTitle: "工艺规程",
processStatus: 0, //工艺规程审核流程停启用状态 0:启用 1:禁用
}; };
}, },
created() { created() {
...@@ -396,6 +394,14 @@ export default { ...@@ -396,6 +394,14 @@ export default {
this.treeHeight = window.innerHeight - 120; this.treeHeight = window.innerHeight - 120;
})(); })();
}; };
ApiWorkflow.getbyid({
id: "2085025d-9c38-4834-846a-8f9d2f4c8553",
})
.then((res) => {
if (res.success) {
this.processStatus = res.result.status;
}
})
}, },
computed: {}, computed: {},
methods: { methods: {
...@@ -549,6 +555,24 @@ export default { ...@@ -549,6 +555,24 @@ export default {
this.$refs.changelist.show3 = true; this.$refs.changelist.show3 = true;
}); });
}, },
//修改工艺规程状态
changeStatus(row) {
let params = row
params.approvalStatus = 1
Api.update(params)
.then((r) => {
if (r.success) {
this.$Message.success("操作成功");
this.$refs.grid.load();
} else {
this.$Message.error("操作失败");
}
})
.catch((err) => {
this.$Message.error("操作失败");
console.warn(err);
});
},
//批量导入start //批量导入start
//导入功能 //导入功能
openModalIm() { openModalIm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment