|
|
|
@ -7,7 +7,21 @@ export default {
|
|
|
|
|
let obj = Object.assign({},this.form)
|
|
|
|
|
getUserBrand(obj).then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.brandList = data;
|
|
|
|
|
let brandList = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]];
|
|
|
|
|
let letters = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
|
|
|
|
|
for(let i = 0; i<data.length;i++) {
|
|
|
|
|
let index = letters.indexOf(data[i].firstword)
|
|
|
|
|
if(index >= 0) {
|
|
|
|
|
let obj = {
|
|
|
|
|
brandname: data[i].brandname,
|
|
|
|
|
brandid: data[i].brandid,
|
|
|
|
|
firstword: data[i].firstword,
|
|
|
|
|
}
|
|
|
|
|
brandList[index].push(obj)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.brandList = brandList;
|
|
|
|
|
this.letters = letters;
|
|
|
|
|
})
|
|
|
|
|
getSpec(obj).then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
@ -38,7 +52,31 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//查询销量
|
|
|
|
|
onSearch() {
|
|
|
|
|
|
|
|
|
|
if(this.chosenBrand != undefined && this.chosenSeries == undefined) {
|
|
|
|
|
this.$router.push(
|
|
|
|
|
{
|
|
|
|
|
path: '/saleRank/brandInfo',
|
|
|
|
|
query: {
|
|
|
|
|
sBrand: this.chosenBrand,
|
|
|
|
|
sStartTime: this.form.sStartTime,
|
|
|
|
|
sEndTime: this.form.sEndTime
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
} else if (this.chosenBrand != undefined && this.chosenSeries != undefined) {
|
|
|
|
|
this.$router.push(
|
|
|
|
|
{
|
|
|
|
|
path: '/saleRank/seriesInfo',
|
|
|
|
|
query: {
|
|
|
|
|
sBrand: this.chosenBrand,
|
|
|
|
|
sSeriesName: this.chosenSeries,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning('请选择品牌');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//左侧菜单栏
|
|
|
|
|
handlerMenu(val) {
|
|
|
|
|