Commit a43fe07b authored by renjintao's avatar renjintao

technology

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