Commit 21e280b8 authored by 仇晓婷's avatar 仇晓婷

工艺设置ok

parent 3aae4873
......@@ -8,31 +8,10 @@ export default {
paged1(params) {
return Api.post(`${technologyUrl}routingheader/paged`, params);
},
routingset(params) {
return Api.post(`${technologyUrl}orderrouting/routingset`, params);
},
// create(params) {
// return Api.post(`${technologyUrl}routingheader/create`, params);
// },
// update(params) {
// return Api.put(`${technologyUrl}routingheader/update`, params);
// },
// getCloneHeader(params){
// return Api.post(`${technologyUrl}routingheader/cloneheader`,params);
// },
// getCodeNumber(params){
// return Api.post(`${systemUrl}/cache/generate_serialcode`,params);
// },
// delete(id) {
// return Api.delete(`${technologyUrl}routingheader/delete`, {
// params: {
// id: id
// }
// });
// },
// deletes(params) {
// return Api.post(`${technologyUrl}routingheader/batchdelete`, params);
// }
ordersetroutingids(params) {
return Api.post(`${technologyUrl}orderrouting/ordersetroutingids`, params);
},
}
<template>
<div class="datails">
<Table border ref="selection" :columns="columns" :data="data1"></Table>
</div>
</template>
<script>
import Api from "./api";
export default {
props: {
eid: {
ids: Array,
},
},
data() {
return {
data1: [],
// easySearch: {
// keys: { op: "unicode,name,code", value: null },
// },
columns: [
// { type: "selection", width: 70, align: "center" },
{
title: "#",
type: "index",
width: 50,
align: "center",
},
{
key: "code",
title: this.l("code"),
align: "left",
},
{
key: "name",
title: this.l("name"),
align: "left",
tooltip: true,
},
{
key: "phase",
title: this.l("phase"),
align: "center",
width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.phase,
code: "Process.Routing.phase",
},
});
},
},
{
key: "versionid",
title: this.l("version"),
align: "center",
width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.versionid,
code: "Process.Routing.version",
},
});
},
},
{
title: this.l("approvalStatus"),
key: "approvalStatus",
align: "center",
width: "120",
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.approvalStatus,
code: "process.RoutingStatus",
},
});
},
},
{
key: "routingType",
title: this.l("routingType"),
align: "center",
width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.routingType,
code: "Process.Routing.routingType",
},
});
},
},
{
key: "drawingNo",
title: this.l("drawingNo"),
align: "left",
width: 100,
},
{
key: "productName",
title: this.l("productName"),
align: "left",
tooltip: true,
},
{
key: "departmentName",
title: this.l("departmentName"),
align: "left",
tooltip: true,
},
{
key: "isEffect",
title: this.l("isEffect"),
align: "center",
width: 80,
code: "Process.Status",
},
],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.getData();
},
methods: {
getData() {
// console.log(this.eid.ids);
let ids = this.eid.ids;
let conditions = [
{
conditionalType: "In",
fieldName: "id",
fieldValue: ids.join(","),
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
},
l(key) {
let vkey = "routingHeader" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
......@@ -60,6 +60,7 @@ export default {
curId: 0,
productingPreparationPeople: 0,
orderIds: 0,
ids:[],
},
detail: null,
......@@ -102,7 +103,12 @@ export default {
title: "工艺规程",
key: "mainRoutingStatus",
render: (h, params) => {
return h("a", [
return h(
params.row.mainRoutingStatus == 1 ||
params.row.mainRoutingStatus == -1
? "a"
: "div",
[
h("state", {
props: {
code: "process.RoutingStatus",
......@@ -115,18 +121,8 @@ export default {
},
},
}),
// h(
// "a",
// {
// on: {
// click: () => {
// this.record(params.row);
// },
// },
// },
// params.row.mainRoutingStatus == 4 ? "未设置" : ""
// ),
]);
]
);
},
},
// {
......@@ -143,16 +139,24 @@ export default {
methods: {
record(row) {
if (row.mainRoutingStatus == -1) {
//未设置
//未设置-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.modal = true;
} else if (row.mainRoutingStatus == 1) {
//受控中,查看
this.title = "查看工艺";
this.detail = () => import("./details");
this.modal = true;
Api.ordersetroutingids({ id: row.id }).then((r) => {
if (r.result) {
this.child.ids = r.result;
}
});
}
},
onHide() {
......
......@@ -2,24 +2,18 @@
<div class="set">
<!-- {{eid.curId}} -->
<Layout>
<Sider v-if="showMenu" width="300">
<Sider v-show="showMenu" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
<div v-if="!showMenu" class="show_menu">
<div v-show="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<div class="row-form">
<Input
search
enter-button
placeholder="请输入产品名称/工艺名称/工艺编号"
v-model="value"
v-width="300"
@on-search="search"
/>
<Input placeholder="请输入产品名称/工艺名称/工艺编号" v-model="value" v-width="300" clearable />
<Button type="primary" @click="search">查询</Button>
</div>
<Table
border
......@@ -75,7 +69,7 @@ export default {
{
title: "#",
type: "index",
width: 50,
width: 70,
align: "center",
},
{
......@@ -178,14 +172,21 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
// let where = { productId: { op: "In", value: this.eid.curId } };
// this.$refs.grid.reload(where);
this.getData();
},
methods: {
getData() {
let conditions = [];
Api.paged1({ conditions: conditions }).then((r) => {
let conditions = [
{
conditionalType: "In",
fieldName: "productId",
fieldValue: this.eid.curId,
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
},
......@@ -196,8 +197,21 @@ export default {
this.showMenu = true;
},
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
// let where = { productId: { op: "In", value: ids } };
// this.$refs.grid.reload(where);
let conditions = [
{
conditionalType: "In",
fieldName: "productId",
fieldValue: ids,
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
},
search() {
let conditions = [
......
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