|
|
|
|
@ -11,29 +11,12 @@
|
|
|
|
|
<text>{{item.data.recharge==null?0:item.data.recharge.total}}</text>
|
|
|
|
|
</boxtitle>
|
|
|
|
|
<view class="statBox" @click="toinfo(item,'recharge')">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader">
|
|
|
|
|
<view class="statItemCBar "></view>
|
|
|
|
|
<text class="statItemTitele">现金(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{item.data.recharge==null?0:item.data.recharge.cash}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar green"></view>
|
|
|
|
|
<text class="statItemTitele">扫码(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">
|
|
|
|
|
{{item.data.recharge==null?0:item.data.recharge.total_online}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;" v-for="(mod,idx) in getRechargeItems(item.data.recharge)" :key="'recharge-'+idx">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar blue"></view>
|
|
|
|
|
<text class="statItemTitele">转账(元)</text>
|
|
|
|
|
<view class="statItemCBar" :class="mod.barClass"></view>
|
|
|
|
|
<text class="statItemTitele">{{mod.label}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{item.data.recharge==null?0:item.data.recharge.pos}}</view>
|
|
|
|
|
<view class="statNum mf-26">{{mod.value}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -41,31 +24,12 @@
|
|
|
|
|
<text style="color: crimson;">{{item.data.refund}}</text>
|
|
|
|
|
</boxtitle>
|
|
|
|
|
<view class="statBox" @click="toinfo(item,'refund')">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader">
|
|
|
|
|
<view class="statItemCBar "></view>
|
|
|
|
|
<text class="statItemTitele">现金(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">
|
|
|
|
|
{{item.data.refund_by_methods==null?0:item.data.refund_by_methods.cash}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;" v-for="(mod,idx) in getRefundItems(item.data.refund_by_methods)" :key="'refund-'+idx">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar blue"></view>
|
|
|
|
|
<text class="statItemTitele">扫码(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">
|
|
|
|
|
{{item.data.refund_by_methods==null?0:(item.data.refund_by_methods.online)}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar green"></view>
|
|
|
|
|
<text class="statItemTitele"></text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">
|
|
|
|
|
<view class="statItemCBar" :class="mod.barClass"></view>
|
|
|
|
|
<text class="statItemTitele">{{mod.label}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{mod.value}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -74,29 +38,12 @@
|
|
|
|
|
<text style="color: blue;">{{item.data.budget.total}}</text>
|
|
|
|
|
</boxtitle>
|
|
|
|
|
<view class="statBox">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader">
|
|
|
|
|
<view class="statItemCBar "></view>
|
|
|
|
|
<text class="statItemTitele">现金(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{item.data.budget.cash}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItem" style="width: 33.33%;" v-for="(mod,idx) in getBudgetItems(item.data.budget)" :key="'budget-'+idx">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar blue"></view>
|
|
|
|
|
<text class="statItemTitele">扫码(元)</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{item.data.budget.online}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statItem" style="width: 33.33%;">
|
|
|
|
|
<view class="statItemHeader ">
|
|
|
|
|
<view class="statItemCBar green"></view>
|
|
|
|
|
<text class="statItemTitele"></text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">
|
|
|
|
|
|
|
|
|
|
<view class="statItemCBar" :class="mod.barClass"></view>
|
|
|
|
|
<text class="statItemTitele">{{mod.label}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="statNum mf-26">{{mod.value}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -143,10 +90,12 @@
|
|
|
|
|
for (var m of that.info) {
|
|
|
|
|
that.loadData(m.type, i,
|
|
|
|
|
function(r, i) {
|
|
|
|
|
console.log(r.recharge)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r.refund_by_methods.online =parseFloat(r.refund_by_methods.weixin) +parseFloat(r.refund_by_methods.alipay);
|
|
|
|
|
console.log(r.recharge)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r.refund_by_methods = r.refund_by_methods || {};
|
|
|
|
|
r.recharge = r.recharge || {};
|
|
|
|
|
r.refund_by_methods.online = that.num(r.refund_by_methods.weixin) + that.num(r.refund_by_methods.alipay);
|
|
|
|
|
|
|
|
|
|
that.info[i].data = r;
|
|
|
|
|
|
|
|
|
|
@ -154,15 +103,142 @@
|
|
|
|
|
|
|
|
|
|
total: r.recharge.total - r.refund,
|
|
|
|
|
|
|
|
|
|
cash: r.recharge.cash - r.refund_by_methods.cash,
|
|
|
|
|
|
|
|
|
|
online: r.recharge.total_online - r.refund_by_methods.weixin-r.refund_by_methods.alipay
|
|
|
|
|
cash: that.num(r.recharge.cash) - that.num(r.refund_by_methods.cash),
|
|
|
|
|
weixin: that.num(r.recharge.weixin) - that.num(r.refund_by_methods.weixin),
|
|
|
|
|
alipay: that.num(r.recharge.alipay) - that.num(r.refund_by_methods.alipay),
|
|
|
|
|
pos: that.num(r.recharge.pos) - that.num(r.refund_by_methods.pos),
|
|
|
|
|
offline_pos: that.num(r.recharge.offline_pos) - that.num(r.refund_by_methods.offline_pos),
|
|
|
|
|
offline_qrcode: that.num(r.recharge.offline_qrcode) - that.num(r.refund_by_methods.offline_qrcode),
|
|
|
|
|
transfer: that.num(r.recharge.transfer) - that.num(r.refund_by_methods.transfer),
|
|
|
|
|
offline_cash: that.num(r.recharge.offline_cash) - that.num(r.refund_by_methods.offline_cash)
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
num: function(v) {
|
|
|
|
|
return parseFloat(v || 0);
|
|
|
|
|
},
|
|
|
|
|
getRechargeOfflineTotal: function(recharge) {
|
|
|
|
|
recharge = recharge || {};
|
|
|
|
|
return this.num(recharge.pos) + this.num(recharge.transfer) + this.num(recharge.offline_pos) + this
|
|
|
|
|
.num(recharge.offline_qrcode) + this.num(recharge.offline_cash);
|
|
|
|
|
},
|
|
|
|
|
getRefundOfflineTotal: function(refundByMethods) {
|
|
|
|
|
refundByMethods = refundByMethods || {};
|
|
|
|
|
return this.num(refundByMethods.pos) + this.num(refundByMethods.transfer) + this.num(
|
|
|
|
|
refundByMethods.offline_pos) + this.num(refundByMethods.offline_qrcode) + this.num(
|
|
|
|
|
refundByMethods.offline_cash);
|
|
|
|
|
},
|
|
|
|
|
getRechargeItems: function(recharge) {
|
|
|
|
|
recharge = recharge || {};
|
|
|
|
|
return [{
|
|
|
|
|
label: "现金(元)",
|
|
|
|
|
value: this.num(recharge.cash),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "微信(元)",
|
|
|
|
|
value: this.num(recharge.weixin),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "支付宝(元)",
|
|
|
|
|
value: this.num(recharge.alipay),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "刷卡(元)",
|
|
|
|
|
value: this.num(recharge.pos),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下POS(元)",
|
|
|
|
|
value: this.num(recharge.offline_pos),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下二维码(元)",
|
|
|
|
|
value: this.num(recharge.offline_qrcode),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "转账(元)",
|
|
|
|
|
value: this.num(recharge.transfer),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下现金(元)",
|
|
|
|
|
value: this.num(recharge.offline_cash),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}];
|
|
|
|
|
},
|
|
|
|
|
getRefundItems: function(refundByMethods) {
|
|
|
|
|
refundByMethods = refundByMethods || {};
|
|
|
|
|
return [{
|
|
|
|
|
label: "现金(元)",
|
|
|
|
|
value: this.num(refundByMethods.cash),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "微信(元)",
|
|
|
|
|
value: this.num(refundByMethods.weixin),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "支付宝(元)",
|
|
|
|
|
value: this.num(refundByMethods.alipay),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "刷卡(元)",
|
|
|
|
|
value: this.num(refundByMethods.pos),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下POS(元)",
|
|
|
|
|
value: this.num(refundByMethods.offline_pos),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下二维码(元)",
|
|
|
|
|
value: this.num(refundByMethods.offline_qrcode),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "转账(元)",
|
|
|
|
|
value: this.num(refundByMethods.transfer),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下现金(元)",
|
|
|
|
|
value: this.num(refundByMethods.offline_cash),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}];
|
|
|
|
|
},
|
|
|
|
|
getBudgetItems: function(budget) {
|
|
|
|
|
budget = budget || {};
|
|
|
|
|
return [{
|
|
|
|
|
label: "现金(元)",
|
|
|
|
|
value: this.num(budget.cash),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "微信(元)",
|
|
|
|
|
value: this.num(budget.weixin),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "支付宝(元)",
|
|
|
|
|
value: this.num(budget.alipay),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "刷卡(元)",
|
|
|
|
|
value: this.num(budget.pos),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下POS(元)",
|
|
|
|
|
value: this.num(budget.offline_pos),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下二维码(元)",
|
|
|
|
|
value: this.num(budget.offline_qrcode),
|
|
|
|
|
barClass: "blue"
|
|
|
|
|
}, {
|
|
|
|
|
label: "转账(元)",
|
|
|
|
|
value: this.num(budget.transfer),
|
|
|
|
|
barClass: ""
|
|
|
|
|
}, {
|
|
|
|
|
label: "线下现金(元)",
|
|
|
|
|
value: this.num(budget.offline_cash),
|
|
|
|
|
barClass: "green"
|
|
|
|
|
}];
|
|
|
|
|
},
|
|
|
|
|
toinfo: function(item, type) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../statinfo/statinfo?type=" + type + "&from=" + item.type
|
|
|
|
|
@ -219,6 +295,7 @@
|
|
|
|
|
.statBox {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.statItem {
|
|
|
|
|
|