|
|
@@ -7,24 +7,24 @@
|
|
|
</view>
|
|
|
<view class="sssb-box ddflex">
|
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">{{totalTurnover?totalTurnover:0}}</view>
|
|
|
+ <view class="sssb-data sssb-color">{{topData.totalTurnover?topData.totalTurnover:0}}</view>
|
|
|
<view class="sssb-label">营业总额</view>
|
|
|
</view>
|
|
|
<view class="sssb-line"></view>
|
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">{{totalRefund?totalRefund:0}}</view>
|
|
|
+ <view class="sssb-data sssb-color">{{topData.totalRefund?topData.totalRefund:0}}</view>
|
|
|
<view class="sssb-label">累计退款</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="sssb-box ddflex">
|
|
|
<view class="sssb-item fflex">
|
|
|
<view class="sssb-label">收益总额</view>
|
|
|
- <view class="sssb-data sssb-color">{{totalProfit?totalProfit:0}}</view>
|
|
|
+ <view class="sssb-data sssb-color">{{topData.totalProfit?topData.totalProfit:0}}</view>
|
|
|
</view>
|
|
|
<view class="sssb-line"></view>
|
|
|
<view class="sssb-item fflex">
|
|
|
<view class="sssb-label">可分账金额</view>
|
|
|
- <view class="sssb-data sssb-color">{{useProfit?useProfit:0}}</view>
|
|
|
+ <view class="sssb-data sssb-color">{{topData.useProfit?topData.useProfit:0}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="margin-top: 30rpx;height:500rpx" v-if="showEchart">
|
|
|
@@ -57,6 +57,8 @@
|
|
|
pxToRpxScale: 0,
|
|
|
rpxTopxScale: 0,
|
|
|
|
|
|
+ topData:{},
|
|
|
+
|
|
|
showEchart:false,
|
|
|
merchantId:null,
|
|
|
storeId:null,
|
|
|
@@ -218,6 +220,7 @@
|
|
|
if(options.storeId){
|
|
|
this.storeId = options.storeId
|
|
|
}
|
|
|
+ this.getTopData()
|
|
|
this.totalTurnover = options.totalTurnover&&options.totalTurnover!='null'?options.totalTurnover:0
|
|
|
this.totalRefund = options.totalRefund&&options.totalRefund!='null'?options.totalRefund:0
|
|
|
this.totalProfit = options.totalProfit&&options.totalProfit!='null'?options.totalProfit:0
|
|
|
@@ -243,7 +246,7 @@
|
|
|
this.option2.xAxis[0].data = this.echartData.turnoverList.map(item=>{return item.showTime})
|
|
|
this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
- this.option2.series[0].data = this.echartData.turnoverList.map(item=>{return item.orderCount?item.orderCount:0})
|
|
|
+ this.option2.series[0].data = this.echartData.turnoverList.map(item=>{return item.turnover?item.turnover:0})
|
|
|
this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
|
|
|
chart.setOption(this.option2);
|
|
|
});
|
|
|
@@ -280,6 +283,17 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ getTopData(){
|
|
|
+ let pData = {
|
|
|
+
|
|
|
+ }
|
|
|
+ if(this.merchantId) pData.merchantId = this.merchantId
|
|
|
+ if(this.storeId) pData.storeId = this.storeId
|
|
|
+ req.getRequest('/admin/v2/merchant/count',pData,res=>{
|
|
|
+ this.topData = res
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
const systemInfo = uni.getSystemInfoSync();
|