Commit 62a8ef21 authored by Damon's avatar Damon

fix: 【ID1001651】【扳手会小程序-我的-物料选择页面】:点击更多按钮,跳转到的全部合作商页面无数据

parent 6f1d1467
......@@ -21,6 +21,7 @@
return {
labels: [], // 标签列表
selectedId: '', // 已选中标签的id
classifyId: '',
type: '1', // '1': '合作商', '2': '品牌', '9': '物料品牌'
};
},
......@@ -28,6 +29,9 @@
if (e && e.selectedId) { // 有已选中标签的id
this.selectedId = e.selectedId
}
if (e && e.classifyId) { // 有已选中标签的id
this.classifyId = e.classifyId
}
if (e && e.categoryId) { // 有品类
this.type = '9'
this.getBrandList(e.categoryId)
......@@ -51,14 +55,14 @@
return {
'1': 'id', // 合作商
'2': 'id', // 品牌
'9': 'brandId' // 物料品牌
'9': 'id' // 物料品牌
}
},
nameKeys() {
return {
'1': 'name', // 合作商
'2': 'name', // 品牌
'9': 'brandName' // 物料品牌
'9': 'name' // 物料品牌
}
}
},
......@@ -97,10 +101,17 @@
},
// 获取物料品牌
getBrandList(categoryId) {
this.$u.api.getBrandList({categoryId: categoryId}).then(res => {
if (res.code === 200) {
this.labels = res.data || []
}
this.$u.api.getBrandList({categoryId: categoryId, classifyId: this.classifyId}).then(res => {
if (res.code === 200) {
const data = res.data
let lists
if (this.classifyId == 1) {
lists = data.partnerCompany
} else {
lists = data.classify
}
this.labels = lists || []
}
})
},
}
......
......@@ -402,6 +402,8 @@ export default {
'pages/order/document-tag' +
'?categoryId=' +
this.categoryId +
'&classifyId=' +
this.classifyId +
'&selectedId=' +
this.brandId,
})
......
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