Commit c6758962 authored by Marcus's avatar Marcus

入仓添加新品名,选择品牌默认显示填单货物的品牌了

https://zentao.test.jdshangmen.com/bug-view-2751.html
parent a6476f69
...@@ -202,10 +202,10 @@ ...@@ -202,10 +202,10 @@
filterable filterable
remote remote
@change="handleBrandChange" @change="handleBrandChange"
:remote-method="getProductBrandPage" :remote-method="getProductBrandPage1"
clearable> clearable>
<el-option <el-option
v-for="item in brandList" v-for="item in brandList1"
:key="item.id" :key="item.id"
:label="item.titleZh" :label="item.titleZh"
:value="item.id"> :value="item.id">
...@@ -504,6 +504,7 @@ export default { ...@@ -504,6 +504,7 @@ export default {
visible(val){ visible(val){
if (val) { if (val) {
this.getProductBrandPage(this.warehousing.brandName) this.getProductBrandPage(this.warehousing.brandName)
this.getProductBrandPage1()
this.handleBrandChange(parseInt(this.form.brand)) this.handleBrandChange(parseInt(this.form.brand))
this.init() this.init()
} else { } else {
...@@ -556,6 +557,7 @@ export default { ...@@ -556,6 +557,7 @@ export default {
recordMode: undefined recordMode: undefined
}, },
brandList: [], brandList: [],
brandList1: [],
formRules: { formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}], prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}], brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
...@@ -761,12 +763,12 @@ export default { ...@@ -761,12 +763,12 @@ export default {
}, },
getProductBrandPage(titleZh = undefined) { getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => { getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list.map(e => { this.brandList = r.data.list
// if(e.id){
// e.id = e.id.toString()
// }
return e
}) })
},
getProductBrandPage1(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList1 = r.data.list
}) })
}, },
handleBrandChange(v){ handleBrandChange(v){
......
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