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