|
@@ -692,65 +692,54 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getstatisticsOrder() {
|
|
|
- statisticsOrderNum()
|
|
|
- .then((res) => {
|
|
|
- if (res) {
|
|
|
- this.orderStatistics = res;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.$modal.msgError(err);
|
|
|
- });
|
|
|
+ statisticsOrderNum().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.orderStatistics = res;
|
|
|
+ } else {
|
|
|
+ this.$modal.msgError(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
/** 查询参数列表 */
|
|
|
getList() {
|
|
|
this.selectList = [];
|
|
|
this.loading = true;
|
|
|
- queryUserOrderByShopId(this.addDateRange(this.queryParams, this.dateRange))
|
|
|
- .then((response) => {
|
|
|
- let list = response.data.records;
|
|
|
- let totalList = [];
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- if (list[i].goodsInfo) {
|
|
|
- var goods = JSON.parse(list[i].goodsInfo);
|
|
|
- for (let a = 0; a < goods.length; a++) {
|
|
|
- let bb = {};
|
|
|
- if (goods[a].specsValue.length > 0) {
|
|
|
- for (let s = 0; s < goods[a].specsValue.length; s++) {
|
|
|
+ queryUserOrderByShopId(this.addDateRange(this.queryParams, this.dateRange)).then(
|
|
|
+ (response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ let list = response.data.records;
|
|
|
+ let totalList = [];
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ if (list[i].goodsInfo) {
|
|
|
+ var goods = JSON.parse(list[i].goodsInfo);
|
|
|
+ for (let a = 0; a < goods.length; a++) {
|
|
|
+ let bb = {};
|
|
|
+ if (goods[a].specsValue.length > 0) {
|
|
|
+ for (let s = 0; s < goods[a].specsValue.length; s++) {
|
|
|
+ bb = {
|
|
|
+ ...list[i],
|
|
|
+ ...goods[a],
|
|
|
+ ...goods[a].specsValue[s],
|
|
|
+ };
|
|
|
+ totalList.push(bb);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
bb = {
|
|
|
...list[i],
|
|
|
...goods[a],
|
|
|
- ...goods[a].specsValue[s],
|
|
|
};
|
|
|
totalList.push(bb);
|
|
|
}
|
|
|
- } else {
|
|
|
- bb = {
|
|
|
- ...list[i],
|
|
|
- ...goods[a],
|
|
|
- };
|
|
|
- totalList.push(bb);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.spuList = totalList;
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.loading = false;
|
|
|
}
|
|
|
-
|
|
|
- this.spuList = totalList;
|
|
|
- // for (let index = 0; index < this.spuList.length; index++) {
|
|
|
- // for (let a = 0; a < this.selectList.length; a++) {
|
|
|
- // if (this.spuList[index].id == this.selectList[a]) {
|
|
|
- // console.log("cxzczxczxczx", this.spuList[index]);
|
|
|
- // this.$refs.multipleTable.toggleRowSelection(this.spuList[index], true);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- this.total = response.data.total;
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
+ }
|
|
|
+ );
|
|
|
},
|
|
|
|
|
|
// 取消按钮
|