Commit f22906e5 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 1e1d6a26 bdef2da3
...@@ -249,46 +249,29 @@ export default { ...@@ -249,46 +249,29 @@ export default {
} else { } else {
this.entity.fileId = ""; this.entity.fileId = "";
} }
ApiWorkflow.getbyid({ Api.create(this.entity)
id: "2085025d-9c38-4834-846a-8f9d2f4c8553", .then((r) => {
}) if (r.success) {
.then((res) => { this.$Message.success("保存成功");
if (res.success) { this.$emit("on-ok");
let wfStatus = res.result.status; //保存成功后直接打开主页面查看功能
if (wfStatus == 0) { let rowInfo = {
this.entity.approvalStatus = 4; id: null, //????保存成功后需要返回id
} else { code: this.entity.code,
this.entity.approvalStatus = 1; name: this.entity.name,
routingType: this.entity.routingType,
version: this.entity.versionid,
departmentName: this.entity.departmentName,
approvalStatus: this.entity.approvalStatus,
productBomId: this.entity.productBomId
} }
Api.create(this.entity) // this.$emit("on-goPage", rowInfo)
.then((r) => { } else {
if (r.success) { this.$Message.error("保存失败");
this.$Message.success("保存成功");
this.$emit("on-ok");
//保存成功后直接打开主页面查看功能
let rowInfo = {
id: null, //????保存成功后需要返回id
code: this.entity.code,
name: this.entity.name,
routingType: this.entity.routingType,
version: this.entity.versionid,
departmentName: this.entity.departmentName,
approvalStatus: this.entity.approvalStatus,
productBomId: this.entity.productBomId
}
// this.$emit("on-goPage", rowInfo)
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.$Message.error("保存失败");
console.warn(err);
});
} }
}) })
.catch((err) => { .catch((err) => {
this.$Message.error("操作失败"); this.$Message.error("保存失败");
console.warn(err); 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 {
flex-grow: 1; .details_body {
// width: 561px; flex-grow: 1;
text-align: center; // width: 561px;
text-align: center;
background: white;
.ivu-menu-horizontal {
height: 50px;
line-height: 50px;
border-left: 1px solid #ccc;
background: #f5f7f9;
z-index: 888;
.ivu-menu-item {
width: 140px;
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
background: rgba(243, 243, 243, 1);
}
.ivu-menu-item-active.ivu-menu-item-selected {
background: #fff;
border-top: 2px solid #2d8cf0;
border-bottom: 1px solid #fff;
}
}
}
background: white; .bottom_box {
.ivu-menu-horizontal { padding: 5px 20px;
height: 50px; background: white;
line-height: 50px; border: 1px solid #ccc;
border-left: 1px solid #ccc; border-top: 0;
background: #f5f7f9;
z-index: 888;
.ivu-menu-item {
width: 140px;
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
background: rgba(243, 243, 243, 1);
}
.ivu-menu-item-active.ivu-menu-item-selected {
background: #fff;
border-top: 2px solid #2d8cf0;
border-bottom: 1px solid #fff;
}
} }
}
.bottom_box {
padding: 5px 20px;
background: white;
border: 1px solid #ccc;
border-top: 0;
}
} }
</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 name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
>质控卡</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="3" <MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem>
:to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId" </Menu>
>工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="4" :to="'/technology/details/setup?id='+headerId">生产准备</MenuItem>
<MenuItem
name="5"
:to="'/technology/details/routinghcorder?id='+headerId"
v-show="headerStatus==1"
>工艺更改单</MenuItem>
<MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem>
</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>
import Api from "./api"; import Api from "./api";
export default { export default {
layout: "empty", layout: "empty",
components: {}, components: {},
data() { data() {
return { return {
showMenu: true, showMenu: true,
treeHeight: "", treeHeight: "",
actNum: "1", actNum: "1",
headerId: -1, headerId: -1,
headerStatus: -1, headerStatus: -1,
productBomId: -1, productBomId: -1,
}; };
}, },
created() { created() {
this.headerId = this.$route.query.id; this.headerId = this.$route.query.id;
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({
await store.dispatch("loadDictionary"); // 加载数据字典 store,
}, params
mounted() {}, }) {
computed: {}, await store.dispatch("loadDictionary"); // 加载数据字典
methods: {}, },
watch: {}, mounted() {},
computed: {},
methods: {},
watch: {},
}; };
</script> </script>
<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";
import expandRow from "./expand.vue"; import expandRow from "./expand.vue";
export default { export default {
name: "list", name: "list",
components: { components: {
Search Search
}, },
head: { head: {
title: "工序", title: "工序",
author: "henq", author: "henq",
description: "routing_detail 4/28/2020 4:10:02 PM" description: "routing_detail 4/28/2020 4:10:02 PM"
}, },
props: ["headerid"], props: ["headerid"],
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: "name", op: "name",
value: null value: null
}, },
routingHeaderId: { op: "Equal", value: -1 } routingHeaderId: {
}, op: "Equal",
// conditions: { routingHeaderId: { op: "Equal", value: -1 } }, value: -1
modal: false,
title: "新增",
detail: null,
curId: 0,
curName: "",
hid: 0,
columns: [
{
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row.steps,
headerStatus:this.headerStatus,
},
on: {
//监听子组件showDetail事件
showDetail: value => {
//确保dom更新完成
this.$nextTick(() => {
this.toRefresh();
});
} }
} },
}); // conditions: { routingHeaderId: { op: "Equal", value: -1 } },
} modal: false,
}, title: "新增",
{ detail: null,
key: "taskSeq", curId: 0,
title: this.l("taskSeq"), curName: "",
align: "left", hid: 0,
width: 100, columns: [{
sortable: true type: "expand",
}, width: 50,
{ render: (h, params) => {
key: "name", return h(expandRow, {
title: this.l("name"), props: {
align: "left" row: params.row.steps,
}, headerStatus: this.headerStatus,
{ },
key: "equipType", on: {
title: this.l("equipType"), //监听子组件showDetail事件
align: "left", showDetail: value => {
easy: true, //确保dom更新完成
hide: true this.$nextTick(() => {
}, this.toRefresh();
{ });
key: "resourceCode", }
title: this.l("resourceCode"), }
align: "left", });
easy: true }
}, },
// { {
// key: "isImportantResources", key: "taskSeq",
// title: this.l("isImportantResources"), title: this.l("taskSeq"),
// align: "center", align: "left",
// code: "Process.state" width: 100,
// }, sortable: true
},
{ {
key: "setupTime", key: "name",
title: this.l("setupTime"), title: this.l("name"),
align: "right", align: "left"
type: "outputTime", },
}, {
key: "equipType",
title: this.l("equipType"),
align: "left",
easy: true,
hide: true
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true
},
// {
// key: "isImportantResources",
// title: this.l("isImportantResources"),
// align: "center",
// code: "Process.state"
// },
{ {
key: "runtime", key: "setupTime",
title: this.l("runtime"), title: this.l("setupTime"),
align: "right", align: "right",
type: "outputTime", type: "outputTime",
}, },
// {
// key: "realRuntime",
// title: this.l("realRuntime"),
// align: "right",
// type: "outputTime",
// },
{
key: "outsideTime",
title: this.l("outsideTime"),
align: "right",
type: "outputTime",
},
{ {
key: "isParticipateIntime", key: "runtime",
title: this.l("isParticipateIntime"), title: this.l("runtime"),
align: "center", align: "right",
code: "Process.state", type: "outputTime",
hide: true },
}, // {
{ // key: "realRuntime",
key: "isImportant", // title: this.l("realRuntime"),
title: this.l("isImportant"), // align: "right",
align: "center", // type: "outputTime",
code: "Process.state", // },
width: 100, {
hide: true key: "outsideTime",
}, title: this.l("outsideTime"),
{ align: "right",
key: "isOutside", type: "outputTime",
title: this.l("isOutside"), },
align: "center",
hide: true,
code: "Process.state",
width: 100
},
{
key: "efficiencyValue",
title: this.l("efficiencyValue"),
align: "right",
hide: true
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "right",
hide: true
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left"
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left"
},
{
title: "操作",
key: "action",
width: 180,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{ {
attrs: { oprate: "detail" }, key: "isParticipateIntime",
on: { title: this.l("isParticipateIntime"),
click: () => align: "center",
this.addStep( code: "Process.state",
params.row.id, hide: true
params.row.name,
params.row.maxNumStep
)
}
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "新增" : ""
),
h(
"op",
{ {
attrs: { oprate: "detail" }, key: "isImportant",
on: { click: () => this.view(params.row.id) } title: this.l("isImportant"),
align: "center",
code: "Process.state",
width: 100,
hide: true
}, },
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{ {
attrs: { oprate: "edit" }, key: "isOutside",
on: { click: () => this.edit(params.row.id) } title: this.l("isOutside"),
align: "center",
hide: true,
code: "Process.state",
width: 100
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
),
h(
"op",
{ {
attrs: { oprate: "delete" }, key: "efficiencyValue",
on: { click: () => this.remove(params.row.id) } title: this.l("efficiencyValue"),
align: "right",
hide: true
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "right",
hide: true
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : ""
)
]);
}
}
],
list: [],
maxNum: 0,
maxNumTemp: 0,
headerStatus:-1,
};
},
created() {
if (this.headerid != -1) {
this.easySearch.routingHeaderId.value = this.headerid;
} else {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus=this.$route.query.headerStatus
},
mounted() {
this.load();
// console.log(this);
// alert(this.headerid);
// if(this.headerid){
// this.easySearch.routingHeaderId.view = this.headerid;
// }
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: { {
load() { key: "creationTime",
this.list = []; title: this.l("creationTime"),
let params = { hide: true,
id: this.hid align: "left"
}; },
Api.getdetailsteps(params) {
.then(r => { key: "creatorUserId",
if (r.success) { title: this.l("creatorUserId"),
this.list = []; hide: true,
let tempNum = []; align: "left"
let listTemp = r.result; },
if (listTemp.length > 0) { {
listTemp.forEach(data => { key: "lastModificationTime",
tempNum.push(data.taskSeq); title: this.l("lastModificationTime"),
let listStepTemp = []; hide: true,
if (data.steps.length > 0) { align: "left"
listStepTemp = data.steps; },
let tempNum1 = []; {
listStepTemp.forEach(dataStep => { key: "lastModifierUserId",
tempNum1.push(dataStep.stepSeq); title: this.l("lastModifierUserId"),
}); hide: true,
let maxNumStep = Math.max(...tempNum1) + 1; align: "left"
data.maxNumStep = maxNumStep; },
} else { {
data.maxNumStep = 1; title: "操作",
key: "action",
width: 180,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () =>
this.addStep(
params.row.id,
params.row.name,
params.row.maxNumStep
)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "新增" : ""
),
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
}
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "编辑" : ""
),
h(
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
)
]);
}
} }
}); ],
this.maxNumTemp = Math.max(...tempNum) + 1; list: [],
} else { maxNum: 0,
this.maxNumTemp = 1; maxNumTemp: 0,
} headerStatus: -1,
this.list = listTemp; };
}
})
.catch(err => {
this.$Message.error("连接错误");
});
},
ok() {
this.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.maxNum = this.maxNumTemp;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
}, },
edit(id) { created() {
this.curId = id; if (this.headerid != -1) {
this.title = "编辑"; this.easySearch.routingHeaderId.value = this.headerid;
this.detail = () => import("./edit"); } else {
this.modal = true; this.easySearch.routingHeaderId.value = this.$route.query.id;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.load();
this.$Message.success("删除成功");
} }
}); this.hid = Number(this.easySearch.routingHeaderId.value);
}, this.headerStatus = this.$route.query.headerStatus
cancel() {
this.curId = 0;
this.modal = false;
}, },
addStep(detailId, detailName, detailMaxNumStep) { mounted() {
this.curId = detailId; this.load();
this.curName = detailName; // console.log(this);
this.maxNum = detailMaxNumStep; // alert(this.headerid);
this.title = "新增工步"; // if(this.headerid){
this.detail = () => import("./routingStep/add"); // this.easySearch.routingHeaderId.view = this.headerid;
this.modal = true; // }
}, },
toRefresh() { async fetch({
this.load(); store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
}, },
l(key) {
let vkey = "routing_detail" + "." + key; methods: {
return this.$t(vkey) || key; load() {
this.list = [];
let params = {
id: this.hid
};
Api.getdetailsteps(params)
.then(r => {
if (r.success) {
this.list = [];
let tempNum = [];
let listTemp = r.result;
if (listTemp.length > 0) {
listTemp.forEach(data => {
tempNum.push(data.taskSeq);
let listStepTemp = [];
if (data.steps.length > 0) {
listStepTemp = data.steps;
let tempNum1 = [];
listStepTemp.forEach(dataStep => {
tempNum1.push(dataStep.stepSeq);
});
let maxNumStep = Math.max(...tempNum1) + 1;
data.maxNumStep = maxNumStep;
} else {
data.maxNumStep = 1;
}
});
this.maxNumTemp = Math.max(...tempNum) + 1;
} else {
this.maxNumTemp = 1;
}
this.list = listTemp;
}
})
.catch(err => {
this.$Message.error("连接错误");
});
},
ok() {
this.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.maxNum = this.maxNumTemp;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
addStep(detailId, detailName, detailMaxNumStep) {
this.curId = detailId;
this.curName = detailName;
this.maxNum = detailMaxNumStep;
this.title = "新增工步";
this.detail = () => import("./routingStep/add");
this.modal = true;
},
toRefresh() {
this.load();
},
l(key) {
let vkey = "routing_detail" + "." + key;
return this.$t(vkey) || key;
}
} }
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
<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="请输入检测要求/标准指标" </FormItem>
v-model="easySearch.keys.value" <FormItem>
v-width="260" <Button type="primary" @click="search">查询</Button>
/> </FormItem>
</FormItem> </Form>
<FormItem> </template>
<Button type="primary" @click="search">查询</Button> <template slot="searchForm">
</FormItem> <Search :headid="hid" />
</Form> </template>
</template> <template slot="buttons">
<template slot="searchForm"> <Button type="primary" @click="add" v-show="headerStatus==0||headerStatus==4">新增</Button>
<Search :headid="hid" /> </template>
</template>
<template slot="buttons">
<Button type="primary" @click="add" v-show="headerStatus==0||headerStatus==4">新增</Button>
</template>
</DataGrid> </DataGrid>
<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";
export default { export default {
name: "list", name: "list",
components: { components: {
Search Search
}, },
head: { head: {
title: "质检卡", title: "质检卡",
author: "henq", author: "henq",
description: "routing_qc_card 4/27/2020 10:31:00 AM" description: "routing_qc_card 4/27/2020 10:31:00 AM"
}, },
props: ["headerid"], props: ["headerid"],
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: op: "checkParams,standard",
"checkParams,standard", value: null
value: null },
}, routingHeaderId: {
routingHeaderId: { op: "Equal", value: -1 }, op: "Equal",
}, value: -1
sortType: 'normal', },
modal: false, },
title: "新增", sortType: 'normal',
detail: null, modal: false,
curId: 0, title: "新增",
hid: 0, detail: null,
columns: [ curId: 0,
{ hid: 0,
key: "routingDetailNo", columns: [{
title: this.l("routingDetailNo"), key: "routingDetailNo",
align: "left", title: this.l("routingDetailNo"),
high: true, align: "left",
width: 100, high: true,
sortable:true width: 100,
}, sortable: true
{ },
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
high: true,
tooltip:true,
},
{
key: "checkParams",
title: this.l("checkParams"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
{
key: "fillintype",
title: this.l("fillintype"),
align: "center",
high: true,
code: "QC.fillintype",
width:140,
},
{
key: "checkType",
title: this.l("checkType"),
align: "center",
high: true,
code: "QC.checktype",
width:100,
},
{
key: "isphotograph",
title: this.l("isphotograph"),
align: "center",
high: true,
code: "Process.state",
width:100,
},
{
key: "standard",
title: this.l("standard"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
{
key: "productionRequirement",
title: this.l("productionRequirement"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
{
key: "checkContent",
title: this.l("checkContent"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
{
key: "qualityTemplateName",
title: this.l("qualityTemplateName"),
align: "left",
easy: true,
hide: true,
high: true,
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{ {
attrs: { oprate: "detail" }, key: "routingDetailName",
on: { click: () => this.view(params.row.id) } title: this.l("routingDetailName"),
align: "left",
high: true,
tooltip: true,
}, },
params.row.qualityTemplateName
)
]);
}
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
hide: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
hide: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true,
hide: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true,
hide: true
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{ {
attrs: { oprate: "detail" }, key: "checkParams",
on: { click: () => this.view(params.row.id) } title: this.l("checkParams"),
align: "left",
easy: true,
high: true,
tooltip: true,
}, },
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{ {
attrs: { oprate: "edit" }, key: "fillintype",
on: { click: () => this.edit(params.row.id) } title: this.l("fillintype"),
align: "center",
high: true,
code: "QC.fillintype",
width: 140,
}, },
'编辑'
// this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
),
h(
"op",
{ {
attrs: { oprate: "delete" }, key: "checkType",
on: { click: () => this.remove(params.row.id) } title: this.l("checkType"),
align: "center",
high: true,
code: "QC.checktype",
width: 100,
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : "" {
) key: "isphotograph",
]); title: this.l("isphotograph"),
} align: "center",
} high: true,
], code: "Process.state",
downUrl: fileUrlDown, width: 100,
fileUrlPath: "", },
headerStatus:-1, {
}; key: "standard",
}, title: this.l("standard"),
created() { align: "left",
if (this.headerid != -1) { easy: true,
this.easySearch.routingHeaderId.value = this.headerid; high: true,
} else { tooltip: true,
this.easySearch.routingHeaderId.value = this.$route.query.id; },
} {
this.hid = Number(this.easySearch.routingHeaderId.value); key: "productionRequirement",
this.headerStatus=this.$route.query.headerStatus title: this.l("productionRequirement"),
align: "left",
}, easy: true,
mounted() { high: true,
console.log(this); tooltip: true,
this.search(); },
}, {
async fetch({ store, params }) { key: "checkContent",
await store.dispatch("loadDictionary"); // 加载数据字典 title: this.l("checkContent"),
}, align: "left",
methods: { easy: true,
ok() { high: true,
this.$refs.grid.load(); tooltip: true,
this.modal = false; },
this.curId = 0; {
}, key: "qualityTemplateName",
search() { title: this.l("qualityTemplateName"),
this.$refs.grid.reload(this.easySearch); align: "left",
}, easy: true,
add() { hide: true,
this.curId = 0; high: true,
this.title = "新增"; render: (h, params) => {
this.detail = () => import("./add"); return h("div", {
this.modal = true; class: "action"
}, }, [
copy(id) { h(
this.curId = id; "op", {
this.title = "克隆"; attrs: {
this.detail = () => import("./add"); oprate: "detail"
this.modal = true; },
}, on: {
view(id) { click: () => this.view(params.row.id)
this.curId = id; }
this.title = "详情"; },
this.detail = () => import("./detail"); params.row.qualityTemplateName
this.modal = true; )
}, ]);
edit(id) { }
this.curId = id; },
this.title = "编辑"; {
this.detail = () => import("./edit"); key: "creationTime",
this.modal = true; title: this.l("creationTime"),
align: "left",
high: true,
hide: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
hide: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true,
hide: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true,
hide: true
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
}
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
}
},
'编辑'
// this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
),
h(
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
)
]);
}
}
],
downUrl: fileUrlDown,
fileUrlPath: "",
headerStatus: -1,
};
}, },
remove(id) { created() {
Api.delete(id).then(r => { if (this.headerid != -1) {
if (r.success) { this.easySearch.routingHeaderId.value = this.headerid;
this.$refs.grid.load(); } else {
this.$Message.success("删除成功"); this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
}); this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus = this.$route.query.headerStatus
}, },
cancel() { mounted() {
this.curId = 0; console.log(this);
this.modal = false; this.search();
}, },
openTemplate(url) { async fetch({
this.fileUrlPath = this.downUrl + path; store,
alert(this.fileUrlPath); params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
}, },
l(key) { methods: {
let vkey = "routing_qc_card" + "." + key; ok() {
return this.$t(vkey) || key; this.$refs.grid.load();
}, this.modal = false;
} this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
openTemplate(url) {
this.fileUrlPath = this.downUrl + path;
alert(this.fileUrlPath);
},
l(key) {
let vkey = "routing_qc_card" + "." + key;
return this.$t(vkey) || key;
},
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -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