Commit 3679cf11 authored by renjintao's avatar renjintao

工艺更改单

parent 80da2cd7
...@@ -165,7 +165,8 @@ export default { ...@@ -165,7 +165,8 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid: Number,
}, },
mounted() { mounted() {
// if (this.eid > 0) { // if (this.eid > 0) {
...@@ -191,7 +192,7 @@ export default { ...@@ -191,7 +192,7 @@ export default {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.handlingOpinions=this.entity.handlingOpinionsId this.entity.handlingOpinions=this.entity.handlingOpinionsId
this.entity.routingHeaderId=this.headid;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<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 placeholder="请输入关键字更改单编号" v-model="easySearch.keys.value" v-width="260"/> <Input 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>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide scrollable> <Modal v-model="modal" :title="title" width="1200" footer-hide scrollable>
<component :is="detail" :eid="curId" @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>
...@@ -43,8 +43,13 @@ export default { ...@@ -43,8 +43,13 @@ export default {
keys: { keys: {
op: "changeorderCode,", op: "changeorderCode,",
value: null value: null
},
routingHeaderId: {
op: "Equal",
value: this.$http.common.getquerystring("id")
} }
}, },
hid: 0,
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
...@@ -75,7 +80,7 @@ export default { ...@@ -75,7 +80,7 @@ export default {
align: "left", align: "left",
high: true, high: true,
type: "user", type: "user",
width: 140, width: 140
}, },
{ {
key: "technicalName", key: "technicalName",
...@@ -103,7 +108,7 @@ export default { ...@@ -103,7 +108,7 @@ export default {
title: this.l("quantity"), title: this.l("quantity"),
align: "right", align: "right",
high: true, high: true,
width: 100, width: 100
}, },
{ {
key: "status", key: "status",
...@@ -165,7 +170,7 @@ export default { ...@@ -165,7 +170,7 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}, },
params.row.status==1?"编辑":'' params.row.status == 1 ? "编辑" : ""
), ),
h( h(
"op", "op",
...@@ -173,7 +178,7 @@ export default { ...@@ -173,7 +178,7 @@ export default {
attrs: { oprate: "delete" }, attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}, },
params.row.status==1?"删除":"" params.row.status == 1 ? "删除" : ""
) )
]); ]);
} }
...@@ -183,6 +188,7 @@ export default { ...@@ -183,6 +188,7 @@ export default {
}, },
mounted() { mounted() {
console.log(this); console.log(this);
this.search()
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
...@@ -198,6 +204,7 @@ export default { ...@@ -198,6 +204,7 @@ export default {
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.hid = this.$http.common.getquerystring("id");
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
:eid="curId" :eid="curId"
:uid="uId" :uid="uId"
:title="title" :title="title"
:headid="hid"
@on-close="cancel" @on-close="cancel"
@on-ok="ok" @on-ok="ok"
/> />
...@@ -143,6 +144,7 @@ export default { ...@@ -143,6 +144,7 @@ export default {
easySearch: { easySearch: {
keys: { op: "unicode,name,code", value: null } keys: { op: "unicode,name,code", value: null }
}, },
hid: 0,
modal: false, modal: false,
title: "新增", title: "新增",
info: null, info: null,
...@@ -320,8 +322,8 @@ export default { ...@@ -320,8 +322,8 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail" } attrs: { oprate: "detail" },
// on: { click: () => this.TechnologyChange(params.row) } on: { click: () => this.TechnologyChange(params.row) }
}, },
params.row.approvalStatus == 1 ? "新增更改单" : "" params.row.approvalStatus == 1 ? "新增更改单" : ""
), ),
...@@ -484,28 +486,10 @@ export default { ...@@ -484,28 +486,10 @@ export default {
}, },
//工艺更改 //工艺更改
TechnologyChange(row) { TechnologyChange(row) {
this.$refs.routingchangeorder.flag = 0; this.hid = row.id;
this.$refs.routingchangeorder.routing_header_Id = row.id; this.title = "新增";
var userId = this.$store.state.userInfo.userId; this.detail = () => import("./details/routinghcorder/add");
let parma = { this.modal = true;
Id: userId
};
this.$refs.routingchangeorder.changeorder_code = "";
this.$http.sysUser.getuserinfo(parma).then(res => {
if (res.result) {
this.$refs.routingchangeorder.formValidate = {
technical_name: row.name,
technical_code: row.code,
department_name: res.result.departmentTitle,
propose_user_name: res.result.userName
};
}
});
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`;
service.get(`${url1}`).then(response => {
this.$refs.routingchangeorder.changeorder_code = response.result;
});
this.$refs.routingchangeorder.modelChange = true;
}, },
Main(data) { Main(data) {
......
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