fix:主要输入展示原料和半成品,主要输出展示半成品和成品
This commit is contained in:
parent
14ec636422
commit
8d45bc1ced
|
@ -2,6 +2,15 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="table_add"
|
||||||
|
v-auth="'material.create'"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
<el-input
|
<el-input
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
|
@ -14,14 +23,6 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="table_add"
|
|
||||||
v-auth="'material.create'"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
|
|
|
@ -80,9 +80,9 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增产品",
|
add: "新增工序",
|
||||||
edit: "编辑产品",
|
edit: "编辑工序",
|
||||||
show: "查看产品",
|
show: "查看工序",
|
||||||
},
|
},
|
||||||
//表单数据
|
//表单数据
|
||||||
form: defaultForm,
|
form: defaultForm,
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materials"
|
v-for="item in materialsIn"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.full_name"
|
:label="item.full_name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materials"
|
v-for="item in materialsOut"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.full_name"
|
:label="item.full_name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
|
@ -202,7 +202,8 @@ export default {
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
materials: [],
|
materialsIn: [],
|
||||||
|
materialsOut: [],
|
||||||
mgroups: [],
|
mgroups: [],
|
||||||
options: [],
|
options: [],
|
||||||
titleMap: { add: "新增", edit: "编辑" },
|
titleMap: { add: "新增", edit: "编辑" },
|
||||||
|
@ -212,7 +213,8 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMgroup();
|
this.getMgroup();
|
||||||
this.getProcess();
|
this.getProcess();
|
||||||
this.getMaterials();
|
this.getMaterialIn();
|
||||||
|
this.getMaterialOut();
|
||||||
this.form.routepack = this.routepack;
|
this.form.routepack = this.routepack;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -222,12 +224,20 @@ export default {
|
||||||
this.mgroups = res;
|
this.mgroups = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMaterials() {
|
getMaterialIn() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.mtm.material.list
|
||||||
|
.req({ page: 0, type__in: "20,30" })
|
||||||
|
.then((res) => {
|
||||||
|
this.materialsIn = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMaterialOut() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.mtm.material.list
|
this.$API.mtm.material.list
|
||||||
.req({ page: 0, type__in: "10,20" })
|
.req({ page: 0, type__in: "10,20" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.materials = res;
|
this.materialsOut = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getProcess() {
|
getProcess() {
|
||||||
|
|
Loading…
Reference in New Issue