Commit a43fe07b authored by renjintao's avatar renjintao

technology

parent 0dedb03b
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
</Menu> </Menu>
</div> </div>
<div class="bottom_box"> <div class="bottom_box">
{{headerId}}
<nuxt-child keep-alive :headerid="headerId"></nuxt-child> <nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div> </div>
</div> </div>
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${technologyUrl}routingdetail/paged`, index: `${technologyUrl}routingdetail/paged`,
paged(params){ paged(params) {
return Api.post(`${technologyUrl}routingdetail/paged`,params); return Api.post(`${technologyUrl}routingdetail/paged`, params);
}, },
get(params){ get(params) {
return Api.get(`${technologyUrl}routingdetail/get`,params); return Api.get(`${technologyUrl}routingdetail/get`, params);
}, },
create(params){ create(params) {
return Api.post(`${technologyUrl}routingdetail/create`,params); return Api.post(`${technologyUrl}routingdetail/create`, params);
}, },
update(params){ update(params) {
return Api.post(`${technologyUrl}routingdetail/update`,params); return Api.post(`${technologyUrl}routingdetail/update`, params);
}, },
delete(id) { delete(id) {
return Api.delete(`${technologyUrl}routingdetail/delete`,{params:{id:id}}); return Api.delete(`${technologyUrl}routingdetail/delete`, {
}, params: {
deletes(params) { id: id
return Api.post(`${technologyUrl}routingdetail/batchdelete`,params); }
} });
} },
\ No newline at end of file deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`, params);
},
pagedDetails(params) { //获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
}
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -174,7 +175,7 @@ export default { ...@@ -174,7 +175,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
checkContent: "", checkContent: "",
checkType: null, checkType: null,
checkParams: "", checkParams: "",
...@@ -209,15 +210,13 @@ export default { ...@@ -209,15 +210,13 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid:Number,
}, },
mounted() { mounted() {
this.loadDetails(); this.loadDetails();
this.parms.eid = this.$u.guid() this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles() this.$refs.refFile.intFiles()
if (this.eid > 0) {
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
...@@ -238,6 +237,7 @@ export default { ...@@ -238,6 +237,7 @@ export default {
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称 this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'') this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
} }
this.entity.routingHeaderId=this.headid
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
...@@ -271,9 +271,9 @@ export default { ...@@ -271,9 +271,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
}, },
eid(v) { eid(v) {
if (v > 0) { if (v > 0) {
this.load(v); // this.load(v);
} }
} }
} }
......
...@@ -23,7 +23,4 @@ export default { ...@@ -23,7 +23,4 @@ export default {
deletes(params) { deletes(params) {
return Api.post(`${technologyUrl}routingqccard/batchdelete`, params); return Api.post(`${technologyUrl}routingqccard/batchdelete`, params);
}, },
pagedDetails(params) {//获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed> <Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<Filed :span="12" :name="l('checkType')"> <Filed :span="12" :name="l('checkType')">
<state code="QC.checktype" v-modev="entity.checkType+''"></state> <state code="QC.checktype" :value="entity.checkType+''" type="text"></state>
</Filed> </Filed>
<Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed> <Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed>
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -175,6 +176,7 @@ export default { ...@@ -175,6 +176,7 @@ export default {
}; };
}, },
props: { props: {
headid: Number,
eid: Number eid: Number
}, },
mounted() { mounted() {
...@@ -218,9 +220,9 @@ export default { ...@@ -218,9 +220,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
......
<template> <template>
<div> <div>
{{info}} <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<DataGrid :columns="columns" ref="grid" :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">
...@@ -16,14 +15,14 @@ ...@@ -16,14 +15,14 @@
</Form> </Form>
</template> </template>
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search :headid="hid"/>
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<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>
...@@ -40,9 +39,7 @@ export default { ...@@ -40,9 +39,7 @@ export default {
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: { props: ["headerid"],
info: { type: String }
},
data() { data() {
return { return {
action: Api.index, action: Api.index,
...@@ -51,12 +48,14 @@ export default { ...@@ -51,12 +48,14 @@ export default {
op: op:
"checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch", "checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch",
value: null value: null
} },
routingHeaderId: { op: "Equal", value: -1 }
}, },
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
hid:0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
...@@ -256,9 +255,18 @@ export default { ...@@ -256,9 +255,18 @@ export default {
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: "" fileUrlPath: ""
}; };
},
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)
}, },
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"); // 加载数据字典
...@@ -274,6 +282,7 @@ export default { ...@@ -274,6 +282,7 @@ export default {
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
...@@ -129,8 +135,12 @@ ...@@ -129,8 +135,12 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
...@@ -139,7 +149,7 @@ export default { ...@@ -139,7 +149,7 @@ export default {
lastModificationTime: { op: "Range", value: null, show: true }, lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true }, lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: false }, deletionTime: { op: "Range", value: null, show: false },
routingHeaderId: { op: "Equal", value: null, show: false }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true }, checkType: { op: "Equal", value: null, show: true },
...@@ -159,8 +169,12 @@ export default { ...@@ -159,8 +169,12 @@ export default {
inspectionTime: { op: "Equal", value: null, show: true }, inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true }, sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true } samplingBatch: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -169,6 +183,30 @@ export default { ...@@ -169,6 +183,30 @@ export default {
l(key) { l(key) {
key = "routing_qc_card" + "." + key; key = "routing_qc_card" + "." + key;
return this.$t(key); return this.$t(key);
},
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
},
watch: {
headid(v) {
if (v > 0) {
// this.load(v);
}
} }
} }
}; };
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
--> <Col :span="8">
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -93,7 +100,7 @@ ...@@ -93,7 +100,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input> <Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -113,7 +121,7 @@ export default { ...@@ -113,7 +121,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
quantity: null, quantity: null,
materialId: null, materialId: null,
materialType: "", materialType: "",
...@@ -132,23 +140,24 @@ export default { ...@@ -132,23 +140,24 @@ export default {
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: [],
}; };
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.loadDetails();
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.routingHeaderId = this.headid;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -170,10 +179,21 @@ export default { ...@@ -170,10 +179,21 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
load(v) { loadDetails() {
Api.get({ id: v }).then(r => { //获取工序列表
this.entity = r.result; let parms = {
this.entity.id = 0; headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
}); });
}, },
l(key) { l(key) {
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
--> <Col :span="8">
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailName')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -93,7 +100,7 @@ ...@@ -93,7 +100,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input> <Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -113,13 +121,16 @@ export default { ...@@ -113,13 +121,16 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: []
}; };
}, },
props: { props: {
headid: Number,
eid: Number eid: Number
}, },
mounted() { mounted() {
this.loadDetails();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
...@@ -152,6 +163,23 @@ export default { ...@@ -152,6 +163,23 @@ export default {
} }
}); });
}, },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" v-if="condition.routingStepId.show"> <Col :span="12" v-if="condition.routingStepId.show">
...@@ -94,12 +100,16 @@ ...@@ -94,12 +100,16 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
routingHeaderId: { op: "Equal", value: null, show: true }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
quantity: { op: "Equal", value: null, show: true }, quantity: { op: "Equal", value: null, show: true },
...@@ -116,8 +126,12 @@ export default { ...@@ -116,8 +126,12 @@ export default {
state: { op: "Equal", value: null, show: true }, state: { op: "Equal", value: null, show: true },
remark: { op: "Equal", value: null, show: false }, remark: { op: "Equal", value: null, show: false },
drawNum: { op: "Equal", value: null, show: true } drawNum: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -126,7 +140,24 @@ export default { ...@@ -126,7 +140,24 @@ export default {
l(key) { l(key) {
key = "routingsupporting" + "." + key; key = "routingsupporting" + "." + key;
return this.$t(key); return this.$t(key);
} },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
} }
}; };
</script> </script>
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