mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-09-20 20:02:05 +08:00
Merge branch 'fix/distribution-statistics-v2-empty-date'
This commit is contained in:
@@ -243,8 +243,6 @@ export default {
|
|||||||
year: item.year || "",
|
year: item.year || "",
|
||||||
month: item.month || "",
|
month: item.month || "",
|
||||||
storeId: item.storeId || "",
|
storeId: item.storeId || "",
|
||||||
startTime: item.startTime || "",
|
|
||||||
endTime: item.endTime || "",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onTabChange(name) {
|
onTabChange(name) {
|
||||||
@@ -254,12 +252,6 @@ export default {
|
|||||||
this.loadGoods();
|
this.loadGoods();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildQueryParams() {
|
|
||||||
return {
|
|
||||||
startTime: this.params.startTime || "",
|
|
||||||
endTime: this.params.endTime || "",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
formatNumber(val) {
|
formatNumber(val) {
|
||||||
if (val == null || val === "") return 0;
|
if (val == null || val === "") return 0;
|
||||||
const num = Number(val);
|
const num = Number(val);
|
||||||
@@ -271,12 +263,11 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadOverviewData() {
|
async loadOverviewData() {
|
||||||
const query = { ...this.params };
|
const query = { ...this.params };
|
||||||
const v2Query = this.buildQueryParams();
|
|
||||||
const [overviewRes, distributorRes, goodsRes, overviewV2Res] = await Promise.all([
|
const [overviewRes, distributorRes, goodsRes, overviewV2Res] = await Promise.all([
|
||||||
API_Statistics.getDistributionOverview(query),
|
API_Statistics.getDistributionOverview(query),
|
||||||
API_Statistics.getDistributionRankDistributor(query),
|
API_Statistics.getDistributionRankDistributor(query),
|
||||||
API_Statistics.getDistributionRankGoods(query),
|
API_Statistics.getDistributionRankGoods(query),
|
||||||
getDistributionOverviewV2(v2Query),
|
getDistributionOverviewV2(),
|
||||||
]);
|
]);
|
||||||
if (overviewRes && overviewRes.success) {
|
if (overviewRes && overviewRes.success) {
|
||||||
this.overview = overviewRes.result || {};
|
this.overview = overviewRes.result || {};
|
||||||
@@ -294,7 +285,6 @@ export default {
|
|||||||
loadBehavior() {
|
loadBehavior() {
|
||||||
this.behaviorLoading = true;
|
this.behaviorLoading = true;
|
||||||
getDistributionBehaviorV2({
|
getDistributionBehaviorV2({
|
||||||
...this.buildQueryParams(),
|
|
||||||
pageNumber: this.behaviorPage.pageNumber,
|
pageNumber: this.behaviorPage.pageNumber,
|
||||||
pageSize: this.behaviorPage.pageSize,
|
pageSize: this.behaviorPage.pageSize,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -312,7 +302,6 @@ export default {
|
|||||||
loadGoods() {
|
loadGoods() {
|
||||||
this.goodsLoading = true;
|
this.goodsLoading = true;
|
||||||
getDistributionGoodsV2({
|
getDistributionGoodsV2({
|
||||||
...this.buildQueryParams(),
|
|
||||||
pageNumber: this.goodsPage.pageNumber,
|
pageNumber: this.goodsPage.pageNumber,
|
||||||
pageSize: this.goodsPage.pageSize,
|
pageSize: this.goodsPage.pageSize,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user