Commit 9a63c3ad authored by 仇晓婷's avatar 仇晓婷

工艺设置

parent 160e7667
...@@ -490,7 +490,6 @@ export default { ...@@ -490,7 +490,6 @@ export default {
organizType: 0, organizType: 0,
organizName: "" organizName: ""
}, },
newColumn: [], newColumn: [],
value: "", value: "",
column: [], column: [],
......
...@@ -8,9 +8,10 @@ export default { ...@@ -8,9 +8,10 @@ export default {
paged1(params) { paged1(params) {
return Api.post(`${technologyUrl}routingheader/paged`, params); return Api.post(`${technologyUrl}routingheader/paged`, params);
}, },
// get(params) {
// return Api.get(`${technologyUrl}routingheader/get`, params); routingset(params) {
// }, return Api.post(`${technologyUrl}orderrouting/routingset`, params);
},
// create(params) { // create(params) {
// return Api.post(`${technologyUrl}routingheader/create`, params); // return Api.post(`${technologyUrl}routingheader/create`, params);
// }, // },
......
...@@ -17,16 +17,11 @@ ...@@ -17,16 +17,11 @@
<departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect> <departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect>
</FormItem> </FormItem>
<FormItem prop="keys"> <FormItem prop="keys">
<Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" clearable/> <Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" clearable />
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
</FormItem> </FormItem>
<!-- <FormItem>
<Button @click="search2" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>-->
</Form> </Form>
</template> </template>
<template slot="searchForm"> <template slot="searchForm">
...@@ -43,7 +38,7 @@ ...@@ -43,7 +38,7 @@
fullscreen fullscreen
:mask-closable="false" :mask-closable="false"
> >
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="child" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -60,9 +55,13 @@ export default { ...@@ -60,9 +55,13 @@ export default {
return { return {
action: Api.index, action: Api.index,
showMenu: true, showMenu: true,
showMenu: true,
title: "", title: "",
child: {
curId: 0, curId: 0,
productingPreparationPeople: 0,
orderIds: 0,
},
detail: null, detail: null,
modal: false, modal: false,
...@@ -74,7 +73,8 @@ export default { ...@@ -74,7 +73,8 @@ export default {
// { type: "selection", width: 70, align: "center" }, // { type: "selection", width: 70, align: "center" },
{ {
title: "序号", title: "序号",
type: "index", key: "id",
// type: "index",
width: 80, width: 80,
align: "center", align: "center",
}, },
...@@ -102,40 +102,38 @@ export default { ...@@ -102,40 +102,38 @@ export default {
title: "工艺规程", title: "工艺规程",
key: "mainRoutingStatus", key: "mainRoutingStatus",
render: (h, params) => { render: (h, params) => {
return h( return h("a", [
"div",
[
h("state", { h("state", {
props: { props: {
code: "process.RoutingStatus", code: "process.RoutingStatus",
type: "text", type: "text",
value: value: params.row.mainRoutingStatus,
params.row.mainRoutingStatus != 4
? params.row.mainRoutingStatus
: "",
}, },
}), nativeOn: {
h(
"a",
{
on: {
click: () => { click: () => {
this.record(params.row); this.record(params.row);
}, },
}, },
}, }),
params.row.mainRoutingStatus == 4 ? "未设置" : "" // h(
), // "a",
], // {
{} // on: {
); // click: () => {
}, // this.record(params.row);
}, // },
{ // },
title: "料单", // },
key: "materialbillStatus", // params.row.mainRoutingStatus == 4 ? "未设置" : ""
code: "process.RoutingStatus", // ),
}, ]);
},
},
// {
// title: "料单",
// key: "materialbillStatus",
// code: "process.RoutingStatus",
// },
], ],
}; };
}, },
...@@ -144,10 +142,18 @@ export default { ...@@ -144,10 +142,18 @@ export default {
}, },
methods: { methods: {
record(row) { record(row) {
this.curId = 0; if (row.mainRoutingStatus == -1) {
//未设置
this.child.curId = row.productId;
this.child.productingPreparationPeople =
row.productingPreparationPeople;
this.child.orderIds = row.id;
this.title = "设置"; this.title = "设置";
this.detail = () => import("./set"); this.detail = () => import("./set");
this.modal = true; this.modal = true;
} else if (row.mainRoutingStatus == 1) {
//受控中,查看
}
}, },
onHide() { onHide() {
this.showMenu = false; this.showMenu = false;
...@@ -168,10 +174,10 @@ export default { ...@@ -168,10 +174,10 @@ export default {
ok() { ok() {
this.$refs.grid.load(); this.$refs.grid.load();
this.modal = false; this.modal = false;
this.curId = 0; this.child.curId = 0;
}, },
cancel() { cancel() {
this.curId = 0; this.child.curId = 0;
this.modal = false; this.modal = false;
}, },
}, },
......
<template> <template>
<div class="set"> <div class="set">
<!-- {{eid.curId}} -->
<Layout> <Layout>
<Sider hide-trigger v-if="showMenu" width="300"> <Sider v-if="showMenu" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" /> <ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider> </Sider>
<div v-if="!showMenu" class="show_menu"> <div v-if="!showMenu" class="show_menu">
...@@ -10,31 +11,34 @@ ...@@ -10,31 +11,34 @@
</a> </a>
</div> </div>
<Content :class="!showMenu?'con_bord':''"> <Content :class="!showMenu?'con_bord':''">
<DataGrid <div class="row-form">
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:set="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input <Input
placeholder="请输入工艺名称/工艺编号" search
v-width="200" enter-button
v-model="easySearch.keys.value" placeholder="请输入产品名称/工艺名称/工艺编号"
clearable v-model="value"
v-width="300"
@on-search="search"
/> />
</FormItem> </div>
<FormItem> <Table
<Button type="primary" @click="search">查询</Button> border
</FormItem> ref="selection"
</Form> :columns="columns"
</template> :data="data1"
</DataGrid> @on-selection-change="selectInfo"
></Table>
</Content> </Content>
</Layout> </Layout>
<FooterToolbar extra v-if="footerBar">
<Row class="footer">
<Checkbox @on-change="handleSelectAll(single)" v-model="single">全选</Checkbox>
<span class="footerSpan">已选 {{selectCount}}</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="modalDispatch">设置工艺</Button>
<Button @click="canselFooter">取消</Button>
</Row>
</FooterToolbar>
</div> </div>
</template> </template>
<script> <script>
...@@ -44,83 +48,120 @@ export default { ...@@ -44,83 +48,120 @@ export default {
components: { components: {
ProductTree, ProductTree,
}, },
props: {
eid: {
curId: Number,
productingPreparationPeople: Number,
orderIds: Number,
},
},
data() { data() {
return { return {
action: Api.index1, value: "",
showMenu: true, footerBar: false,
showMenu: true, single: false,
selectCount: 0,
selectList: [],
showMenu: false,
title: "", title: "",
easySearch: { name: "",
keys: { op: "unicode,name,code", value: null }, data1: [],
}, routingList: [],
// easySearch: {
// keys: { op: "unicode,name,code", value: null },
// },
columns: [ columns: [
{ type: "selection", width: 70, align: "center" }, { type: "selection", width: 70, align: "center" },
{
title: "#",
type: "index",
width: 50,
align: "center",
},
{ {
key: "code", key: "code",
title: this.l("code"), title: this.l("code"),
align: "left", align: "left",
width: 200,
easy: true,
high: true,
}, },
{ {
key: "name", key: "name",
title: this.l("name"), title: this.l("name"),
align: "left", align: "left",
easy: true,
high: true,
tooltip: true, tooltip: true,
}, },
{ {
key: "phase", key: "phase",
title: this.l("phase"), title: this.l("phase"),
align: "center", align: "center",
high: true,
width: 100, width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.phase,
code: "Process.Routing.phase", code: "Process.Routing.phase",
}, },
});
},
},
{ {
key: "versionid", key: "versionid",
title: this.l("version"), title: this.l("version"),
align: "center", align: "center",
high: true,
width: 100, width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.versionid,
code: "Process.Routing.version", code: "Process.Routing.version",
}, },
});
},
},
{ {
title: this.l("approvalStatus"), title: this.l("approvalStatus"),
key: "approvalStatus", key: "approvalStatus",
align: "center", align: "center",
width: "120", width: "120",
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.approvalStatus,
code: "process.RoutingStatus", code: "process.RoutingStatus",
}, },
});
},
},
{ {
key: "routingType", key: "routingType",
title: this.l("routingType"), title: this.l("routingType"),
align: "center", align: "center",
width: 100, width: 100,
high: true, render: (h, params) => {
return h("state", {
attrs: {
value: params.row.routingType,
code: "Process.Routing.routingType", code: "Process.Routing.routingType",
}, },
});
},
},
{ {
key: "drawingNo", key: "drawingNo",
title: this.l("drawingNo"), title: this.l("drawingNo"),
align: "left", align: "left",
high: true, width: 100,
}, },
{ {
key: "productName", key: "productName",
title: this.l("productName"), title: this.l("productName"),
align: "left", align: "left",
high: true,
tooltip: true, tooltip: true,
}, },
{ {
key: "departmentName", key: "departmentName",
title: this.l("departmentName"), title: this.l("departmentName"),
width: 100,
align: "left", align: "left",
high: true,
tooltip: true, tooltip: true,
}, },
{ {
...@@ -128,44 +169,25 @@ export default { ...@@ -128,44 +169,25 @@ export default {
title: this.l("isEffect"), title: this.l("isEffect"),
align: "center", align: "center",
width: 80, width: 80,
high: true,
code: "Process.Status", code: "Process.Status",
}, },
{
key: "creationTime",
title: this.$t("creationTime"),
align: "left",
hide: true,
},
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
hide: true,
type: "user",
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
align: "left",
hide: true,
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
align: "left",
hide: true,
type: "user",
},
], ],
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {
// let where = { productId: { op: "In", value: this.eid.curId } };
// this.$refs.grid.reload(where);
this.getData();
},
methods: { methods: {
record(row) { getData() {
alert(1); let conditions = [];
Api.paged1({ conditions: conditions }).then((r) => {
this.data1 = r.result.items;
});
}, },
onHide() { onHide() {
this.showMenu = false; this.showMenu = false;
...@@ -178,7 +200,68 @@ export default { ...@@ -178,7 +200,68 @@ export default {
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch); let conditions = [
{
conditionalType: "code,name,productName",
fieldName: "keys",
fieldValue: this.value,
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
},
selectInfo(value) {
console.log(value);
if (value.length > 0) {
this.footerBar = true;
} else {
this.footerBar = false;
}
this.selectList = [];
this.routingList = [];
this.selectList = value;
let name = [];
this.selectList.map((e, index) => {
name.push(e.code);
this.routingList.push({
routingHeaderId: e.id,
priority: index,
});
});
this.name = name;
this.selectCount = this.selectList.length;
// console.log(this.routingList);
},
handleSelectAll(status) {
this.$refs.selection.selectAll(status);
},
canselFooter() {
this.footerBar = false;
this.handleSelectAll(false);
},
modalDispatch() {
this.$Modal.confirm({
title: "设置工艺",
content: this.name.join(" , "),
onOk: () => {
let data = {
routingType: 1,
productingPreparationPeople: this.eid.productingPreparationPeople,
orderIds: this.eid.orderIds,
routingList: this.routingList,
};
Api.routingset(data).then((r) => {
this.$Message.success("工艺设置成功");
});
},
onCancel: () => {
this.$Message.error("取消工艺设置");
},
});
}, },
l(key) { l(key) {
let vkey = "routingHeader" + "." + key; let vkey = "routingHeader" + "." + key;
...@@ -191,11 +274,16 @@ export default { ...@@ -191,11 +274,16 @@ export default {
.set { .set {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
padding-top: 3px; padding-top: 3px;
width: 100%;
.ivu-layout {
width: 100%;
// display: flex;
// display: -webkit-flex;
.ivu-layout-sider { .ivu-layout-sider {
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
margin-right: 10px; margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 91vh; height: 89vh;
overflow: auto; overflow: auto;
} }
.ivu-layout-content { .ivu-layout-content {
...@@ -204,7 +292,20 @@ export default { ...@@ -204,7 +292,20 @@ export default {
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto; overflow: auto;
padding: 10px; padding: 10px;
height: 91vh; height: 89vh;
}
.row-form {
margin-bottom: 10px;
}
}
.ivu-footer-toolbar-right {
margin-right: 72% !important;
}
.ivu-footer-toolbar {
background: rgba(0, 0, 0, 0.7) !important;
.footer {
color: #fff !important;
}
} }
} }
</style> </style>
\ No newline at end of file
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