material&route中material展示加规格型号
This commit is contained in:
parent
90403e3577
commit
cb2418fcf1
|
|
@ -39,7 +39,7 @@
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="关联物料">
|
<el-form-item label="关联物料">
|
||||||
<el-select v-model="brothers" placeholder="关联物料" clearable multiple style="width:100%">
|
<el-select v-model="brothers" placeholder="关联物料" clearable multiple style="width:100%">
|
||||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in materialOptions" :key="item.id" :label="item.label" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -160,6 +160,10 @@ export default {
|
||||||
query.page = 0;
|
query.page = 0;
|
||||||
query.is_hidden = false;
|
query.is_hidden = false;
|
||||||
this.$API.mtm.material.list.req(query).then(res => {
|
this.$API.mtm.material.list.req(query).then(res => {
|
||||||
|
that.materialOptions = [];
|
||||||
|
res.forEach(item=>{
|
||||||
|
item.label = item.name+'—'+item.specification+'/'+item.model;
|
||||||
|
})
|
||||||
that.materialOptions = res;
|
that.materialOptions = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ export default {
|
||||||
getProducts() {
|
getProducts() {
|
||||||
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
||||||
res.forEach(m => {
|
res.forEach(m => {
|
||||||
m.label = m.name
|
m.label = m.name+'—'+m.specification+'/'+m.model;
|
||||||
})
|
})
|
||||||
this.productOptions = res
|
this.productOptions = res
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue