Commit 62a8ef21 authored by Damon's avatar Damon

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

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