v2.36.6 优化统计数值
This commit is contained in:
parent
f87d09ee68
commit
95faa0a0a3
|
|
@ -1,9 +1,9 @@
|
||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
uni.setStorageSync('deptId', 100);
|
uni.setStorageSync('deptId', 100);
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'http://192.168.1.6:4101', //键辉本地
|
// baseUrl: 'http://192.168.1.6:4101', //键辉本地
|
||||||
// baseUrl: 'http://192.168.2.221:4101', //景森本地
|
// baseUrl: 'http://192.168.2.221:4101', //景森本地
|
||||||
// baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid: wx8a05cf95418a6859 小兔骑骑appid:wx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe
|
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid: wx8a05cf95418a6859 小兔骑骑appid:wx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe
|
||||||
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上
|
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上
|
||||||
// baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214
|
// baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
// "baseurl": "http://test.com"
|
// "baseurl": "http://test.com"
|
||||||
// },
|
// },
|
||||||
"libVersion" : "latest",
|
"libVersion" : "latest",
|
||||||
"appid" : "wx8a05cf95418a6859",
|
"appid" : "wxc7e95836981d11fc",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"es6" : true,
|
"es6" : true,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<view class="toptit" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnqh"><!-- @click="topage(4)" -->
|
<view class="toptit" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnqh"><!-- @click="topage(4)" -->
|
||||||
<image hover-class="app-tap-hover" class="toptit-avatar" @click.stop="topage(4)" src="https://api.ccttiot.com/smartmeter/img/static/uEQLkI1vDF4PTy44DTXH" mode=""></image> {{areaname}} <u-icon style="margin-left: 10rpx;" name="arrow-down" color="#fff" size="28"></u-icon>
|
<image hover-class="app-tap-hover" class="toptit-avatar" @click.stop="topage(4)" src="https://api.ccttiot.com/smartmeter/img/static/uEQLkI1vDF4PTy44DTXH" mode=""></image> {{areaname}} <u-icon style="margin-left: 10rpx;" name="arrow-down" color="#fff" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="op-card">
|
<view class="op-card" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnchakan">
|
||||||
<view class="op-head">
|
<view class="op-head">
|
||||||
<view class="op-head-left">
|
<view class="op-head-left">
|
||||||
<view class="op-head-title">运营状况</view>
|
<view class="op-head-title">运营状况</view>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<text class="op-head-sub">今日数据 · 核心指标</text>
|
<text class="op-head-sub">今日数据 · 核心指标</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="op-more" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnchakan">
|
<view class="op-more">
|
||||||
查看更多 <u-icon style="margin-left: 6rpx;" name="arrow-right" color="#4297F3" size="28"></u-icon>
|
查看更多 <u-icon style="margin-left: 6rpx;" name="arrow-right" color="#4297F3" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -41,6 +41,12 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">进行中</view>
|
<view class="bot">进行中</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="li li--revenue li--wait-pay">
|
||||||
|
<view class="top">
|
||||||
|
{{ statRideWaitPay }} <text class="top-unit">笔</text>
|
||||||
|
</view>
|
||||||
|
<view class="bot">待付车费</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -65,7 +71,7 @@
|
||||||
<view class="menu-item" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnreturnbike">
|
<view class="menu-item" hover-class="is-hover app-tap-hover" hover-stay-time="100" @click="btnreturnbike">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJ4x8uTOMd7pmTeBiX8p" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uJ4x8uTOMd7pmTeBiX8p" mode=""></image>
|
||||||
<text>订单审核</text>
|
<text>订单审核</text>
|
||||||
<view v-if="waitVerifyCount > 0" class="badge">{{waitVerifyCount > 99 ? '99+' : waitVerifyCount}}</view>
|
<view v-if="statWaitVerify > 0" class="badge">{{ statWaitVerify > 99 ? '99+' : statWaitVerify }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -173,7 +179,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TabBar from '@/page_shanghu/components/tab-bar/tab-bar.vue'
|
import TabBar from '@/page_shanghu/components/tab-bar/tab-bar.vue';
|
||||||
var xBlufi = require("@/components/blufi/xBlufi.js")
|
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||||
export default {
|
export default {
|
||||||
components: { TabBar },
|
components: { TabBar },
|
||||||
|
|
@ -200,9 +206,9 @@ export default {
|
||||||
userId:'',
|
userId:'',
|
||||||
fuwuewm:false,
|
fuwuewm:false,
|
||||||
weinum:0,
|
weinum:0,
|
||||||
waitVerifyCount: 0,
|
|
||||||
areaname:'',
|
areaname:'',
|
||||||
yunyingobj:{},
|
dateStat: {},
|
||||||
|
pendingStat: {},
|
||||||
kstime:'',
|
kstime:'',
|
||||||
jstime:'',
|
jstime:'',
|
||||||
statsLoading: false,
|
statsLoading: false,
|
||||||
|
|
@ -239,7 +245,6 @@ export default {
|
||||||
// this.getArea()
|
// this.getArea()
|
||||||
this.getinfo()
|
this.getinfo()
|
||||||
this.getweicl()
|
this.getweicl()
|
||||||
this.getWaitVerifyCount()
|
|
||||||
}
|
}
|
||||||
if (uni.getStorageSync('adminname')) {
|
if (uni.getStorageSync('adminname')) {
|
||||||
this.areaname = uni.getStorageSync('adminname')
|
this.areaname = uni.getStorageSync('adminname')
|
||||||
|
|
@ -253,19 +258,27 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
statOrderCount() {
|
statOrderCount() {
|
||||||
const v = this.yunyingobj.orderCount
|
const v = this.dateStat.orderCount
|
||||||
return v == null ? 0 : v
|
return v == null ? 0 : v
|
||||||
},
|
},
|
||||||
statRevenue() {
|
statRevenue() {
|
||||||
const v = this.yunyingobj.orderActualAmount
|
const v = this.dateStat.orderActualAmount
|
||||||
return v == null ? 0 : v
|
return v == null ? 0 : v
|
||||||
},
|
},
|
||||||
statFinished() {
|
statFinished() {
|
||||||
const v = this.yunyingobj.finishedOrderCount
|
const v = this.dateStat.finishedOrderCount
|
||||||
return v == null ? 0 : v
|
return v == null ? 0 : v
|
||||||
},
|
},
|
||||||
statProcessing() {
|
statProcessing() {
|
||||||
const v = this.yunyingobj.orderProcessingCount
|
const v = this.pendingStat.orderProcessingCount
|
||||||
|
return v == null ? 0 : v
|
||||||
|
},
|
||||||
|
statRideWaitPay() {
|
||||||
|
const v = this.pendingStat.orderRideWaitPayCount
|
||||||
|
return v == null ? 0 : v
|
||||||
|
},
|
||||||
|
statWaitVerify() {
|
||||||
|
const v = this.pendingStat.orderWaitVerifyCount
|
||||||
return v == null ? 0 : v
|
return v == null ? 0 : v
|
||||||
},
|
},
|
||||||
complaintBadge() {
|
complaintBadge() {
|
||||||
|
|
@ -319,8 +332,7 @@ export default {
|
||||||
if (uni.getStorageSync('adminname')) this.areaname = uni.getStorageSync('adminname')
|
if (uni.getStorageSync('adminname')) this.areaname = uni.getStorageSync('adminname')
|
||||||
tasks.push(
|
tasks.push(
|
||||||
this.getinfo({ silent: true }),
|
this.getinfo({ silent: true }),
|
||||||
this.fetchComplaintBadge(),
|
this.fetchComplaintBadge()
|
||||||
this.fetchWaitVerifyCount()
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Promise.all(tasks.map((p) => Promise.resolve(p).catch(() => null))).finally(() => {
|
Promise.all(tasks.map((p) => Promise.resolve(p).catch(() => null))).finally(() => {
|
||||||
|
|
@ -349,18 +361,6 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
fetchWaitVerifyCount() {
|
|
||||||
if (!this.areaId) return Promise.resolve()
|
|
||||||
return this.$u.get('/bst/order/list?', {
|
|
||||||
status: 'WAIT_VERIFY',
|
|
||||||
areaId: this.areaId,
|
|
||||||
pageSize: 1,
|
|
||||||
pageNum: 1
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 200) this.waitVerifyCount = res.total || 0
|
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
},
|
|
||||||
// 点击配置语音
|
// 点击配置语音
|
||||||
btnyy(){
|
btnyy(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -373,24 +373,32 @@ export default {
|
||||||
url:'/page_shanghu/guanli/yunying'
|
url:'/page_shanghu/guanli/yunying'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 请求全部运营统计数据
|
// 请求运营统计数据
|
||||||
gettongji(options = {}) {
|
gettongji(options = {}) {
|
||||||
const silent = options.silent === true
|
const silent = options.silent === true
|
||||||
if (!this.areaId || !this.userinfo.userId) {
|
if (!this.areaId || !this.userinfo.userId) {
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
let StatKeys = 'order_actual_amount,order_count,order_finished_count,order_processing_count,bonus_actual_amount,order_ridding_fee,order_deduction_fee,order_dispatch_fee,order_manage_fee,order_refund_amount'
|
const dateStatKeys = 'order_actual_amount,order_count,order_finished_count'
|
||||||
const url = `/dashboard/revenueStat?keys=${StatKeys}&dateRange=${this.kstime + ',' + this.jstime}&userId=${this.userinfo.userId}&areaId=${this.areaId}`
|
const pendingStatKeys = 'order_processing_count,order_wait_verify_count,order_ride_wait_pay_count'
|
||||||
|
const dateRangeStr = `${this.kstime},${this.jstime}`
|
||||||
|
const commonParams = `userId=${this.userinfo.userId}&areaId=${this.areaId}`
|
||||||
this._beginStatsLoading()
|
this._beginStatsLoading()
|
||||||
return this.$u
|
return Promise.all([
|
||||||
.get(url)
|
this.$u.get(`/dashboard/revenueStat?keys=${dateStatKeys}&dateRange=${dateRangeStr}&${commonParams}`),
|
||||||
.then((res) => {
|
this.$u.get(`/dashboard/revenueStat?keys=${pendingStatKeys}&${commonParams}`)
|
||||||
if (res && res.code === 200) {
|
]).then(([dateRes, pendingRes]) => {
|
||||||
this.yunyingobj = res.data || {}
|
if (dateRes && dateRes.code === 200) {
|
||||||
|
this.dateStat = dateRes.data || {}
|
||||||
|
}
|
||||||
|
if (pendingRes && pendingRes.code === 200) {
|
||||||
|
this.pendingStat = pendingRes.data || {}
|
||||||
|
}
|
||||||
|
if ((dateRes && dateRes.code === 200) || (pendingRes && pendingRes.code === 200)) {
|
||||||
this.statsLoadError = false
|
this.statsLoadError = false
|
||||||
} else {
|
} else {
|
||||||
this.statsLoadError = true
|
this.statsLoadError = true
|
||||||
const msg = (res && res.msg) || '统计数据加载失败'
|
const msg = (dateRes && dateRes.msg) || (pendingRes && pendingRes.msg) || '统计数据加载失败'
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
const tip = msg.indexOf('超时') !== -1 || msg.indexOf('时间') !== -1
|
const tip = msg.indexOf('超时') !== -1 || msg.indexOf('时间') !== -1
|
||||||
? '网络较慢,请稍后重试'
|
? '网络较慢,请稍后重试'
|
||||||
|
|
@ -398,8 +406,7 @@ export default {
|
||||||
uni.showToast({ title: tip, icon: 'none', duration: 2600 })
|
uni.showToast({ title: tip, icon: 'none', duration: 2600 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}).catch(() => {
|
||||||
.catch(() => {
|
|
||||||
this.statsLoadError = true
|
this.statsLoadError = true
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -408,8 +415,7 @@ export default {
|
||||||
duration: 2600
|
duration: 2600
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}).finally(() => {
|
||||||
.finally(() => {
|
|
||||||
this._endStatsLoading()
|
this._endStatsLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -483,24 +489,11 @@ export default {
|
||||||
url:'/page_shanghu/guanli/Qrcode?areaId=' + this.areaId + '&type=1'
|
url:'/page_shanghu/guanli/Qrcode?areaId=' + this.areaId + '&type=1'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 查询商户未处理订单
|
// 查询商户未处理投诉
|
||||||
getweicl() {
|
getweicl() {
|
||||||
if (!this.areaId) return
|
if (!this.areaId) return
|
||||||
this.fetchComplaintBadge()
|
this.fetchComplaintBadge()
|
||||||
},
|
},
|
||||||
// 查询待审核订单数量
|
|
||||||
getWaitVerifyCount() {
|
|
||||||
this.$u.get('/bst/order/list?', {
|
|
||||||
status: 'WAIT_VERIFY',
|
|
||||||
areaId: this.areaId,
|
|
||||||
pageSize: 1,
|
|
||||||
pageNum: 1
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.waitVerifyCount = res.total || 0;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 点击绑定服务号
|
// 点击绑定服务号
|
||||||
btnfuwuewm(){
|
btnfuwuewm(){
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -687,11 +680,11 @@ export default {
|
||||||
this.searchKey = ''
|
this.searchKey = ''
|
||||||
this.displayList = this.list
|
this.displayList = this.list
|
||||||
},
|
},
|
||||||
getinfo() {
|
getinfo(options = {}) {
|
||||||
this.$u.get("/getInfo").then((res) => {
|
return this.$u.get("/getInfo").then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.userinfo = res.user
|
this.userinfo = res.user
|
||||||
this.gettongji()
|
return this.gettongji(options)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -709,7 +702,6 @@ export default {
|
||||||
this.areaname = e[0].label
|
this.areaname = e[0].label
|
||||||
this.areaId = e[0].value
|
this.areaId = e[0].value
|
||||||
this.getArea()
|
this.getArea()
|
||||||
this.getWaitVerifyCount()
|
|
||||||
this.getweicl()
|
this.getweicl()
|
||||||
if (this.userinfo && this.userinfo.userId) {
|
if (this.userinfo && this.userinfo.userId) {
|
||||||
this.gettongji()
|
this.gettongji()
|
||||||
|
|
@ -954,6 +946,13 @@ export default {
|
||||||
color: #d48806;
|
color: #d48806;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.li--wait-pay .top {
|
||||||
|
color: #fa8c16;
|
||||||
|
}
|
||||||
|
.li--wait-pay .bot {
|
||||||
|
color: #d48806;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.fuwuewm{
|
.fuwuewm{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,12 @@
|
||||||
<u-picker mode="time" v-model="oneshow" :params="oneparams" @confirm="confirmone"></u-picker>
|
<u-picker mode="time" v-model="oneshow" :params="oneparams" @confirm="confirmone"></u-picker>
|
||||||
<u-picker mode="time" v-model="twoshow" :params="twoparams" @confirm="confirmtwo"></u-picker>
|
<u-picker mode="time" v-model="twoshow" :params="twoparams" @confirm="confirmtwo"></u-picker>
|
||||||
|
|
||||||
|
<view class="stats-body">
|
||||||
|
<view class="stats-loading-mask" v-if="loading">
|
||||||
|
<u-loading mode="circle" color="#3B82F6" size="48"></u-loading>
|
||||||
|
<text class="stats-loading-tip">加载中...</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 期间营收统计 -->
|
<!-- 期间营收统计 -->
|
||||||
<view class="section-container">
|
<view class="section-container">
|
||||||
|
|
||||||
|
|
@ -47,12 +53,12 @@
|
||||||
<view class="item-sub-pill">
|
<view class="item-sub-pill">
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">骑行</text>
|
<text class="sub-lbl">骑行</text>
|
||||||
<text class="sub-val color-primary">{{yunyingobj.finishedOrderCount | fmtInt}}</text>
|
<text class="sub-val color-primary">{{dateStat.finishedOrderCount | fmtInt}}</text>
|
||||||
<text class="sub-lbl">笔</text>
|
<text class="sub-lbl">笔</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">卡券</text>
|
<text class="sub-lbl">卡券</text>
|
||||||
<text class="sub-val color-primary">{{yunyingobj.vipOrderCount | fmtInt}}</text>
|
<text class="sub-val color-primary">{{dateStat.vipOrderCount | fmtInt}}</text>
|
||||||
<text class="sub-lbl">笔</text>
|
<text class="sub-lbl">笔</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -64,15 +70,15 @@
|
||||||
<view class="icon-box bg-light-warning"><u-icon name="car" color="#F59E0B" size="28"></u-icon></view>
|
<view class="icon-box bg-light-warning"><u-icon name="car" color="#F59E0B" size="28"></u-icon></view>
|
||||||
<text class="lbl">订单实收 (元)</text>
|
<text class="lbl">订单实收 (元)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-val color-warning">{{ yunyingobj.orderActualReceivedAmount | fix2 }}</view>
|
<view class="item-val color-warning">{{ dateStat.orderActualReceivedAmount | fix2 }}</view>
|
||||||
<view class="item-sub-pill">
|
<view class="item-sub-pill">
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">总额</text>
|
<text class="sub-lbl">总额</text>
|
||||||
<text class="sub-val color-warning">{{yunyingobj.orderActualAmount | fix2}}</text>
|
<text class="sub-val color-warning">{{dateStat.orderActualAmount | fix2}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">退款</text>
|
<text class="sub-lbl">退款</text>
|
||||||
<text class="sub-val color-warning">{{yunyingobj.orderAdminRefundAmount | fix2}}</text>
|
<text class="sub-val color-warning">{{dateStat.orderAdminRefundAmount | fix2}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -83,11 +89,11 @@
|
||||||
<view class="icon-box bg-light-success"><u-icon name="coupon" color="#10B981" size="28"></u-icon></view>
|
<view class="icon-box bg-light-success"><u-icon name="coupon" color="#10B981" size="28"></u-icon></view>
|
||||||
<text class="lbl">卡券实收 (元)</text>
|
<text class="lbl">卡券实收 (元)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-val color-success">{{ yunyingobj.vipOrderAmount | fix2 }}</view>
|
<view class="item-val color-success">{{ dateStat.vipOrderAmount | fix2 }}</view>
|
||||||
<view class="item-sub-pill">
|
<view class="item-sub-pill">
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">售出</text>
|
<text class="sub-lbl">售出</text>
|
||||||
<text class="sub-val color-success">{{ yunyingobj.vipOrderCount | fmtInt }}</text>
|
<text class="sub-val color-success">{{ dateStat.vipOrderCount | fmtInt }}</text>
|
||||||
<text class="sub-lbl">笔</text>
|
<text class="sub-lbl">笔</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -103,11 +109,11 @@
|
||||||
<view class="item-sub-pill">
|
<view class="item-sub-pill">
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">骑行</text>
|
<text class="sub-lbl">骑行</text>
|
||||||
<text class="sub-val color-purple">{{yunyingobj.bonusActualAmount | fix2}}</text>
|
<text class="sub-val color-purple">{{dateStat.bonusActualAmount | fix2}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-seg">
|
<view class="sub-seg">
|
||||||
<text class="sub-lbl">卡券</text>
|
<text class="sub-lbl">卡券</text>
|
||||||
<text class="sub-val color-purple">{{yunyingobj.vipOrderBonusActualAmount | fix2}}</text>
|
<text class="sub-val color-purple">{{dateStat.vipOrderBonusActualAmount | fix2}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -122,41 +128,41 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-header-extra">
|
<view class="fee-header-extra">
|
||||||
<text class="ft-lbl">订单总额:</text>
|
<text class="ft-lbl">订单总额:</text>
|
||||||
<text class="ft-val color-primary">¥{{ yunyingobj.orderActualAmount | fix2 }}</text>
|
<text class="ft-val color-primary">¥{{ dateStat.orderActualAmount | fix2 }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-wrapper">
|
<view class="fee-wrapper">
|
||||||
<view class="fee-list">
|
<view class="fee-list">
|
||||||
<view class="fee-item">
|
<view class="fee-item">
|
||||||
<text class="f-val color-primary">¥{{ yunyingobj.orderRiddingFee | fix2 }}</text>
|
<text class="f-val color-primary">¥{{ dateStat.orderRiddingFee | fix2 }}</text>
|
||||||
<view class="f-name-row">
|
<view class="f-name-row">
|
||||||
<view class="dot" style="background: #3B82F6;"></view>
|
<view class="dot" style="background: #3B82F6;"></view>
|
||||||
<text class="f-name">骑行费</text>
|
<text class="f-name">骑行费</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-item">
|
<view class="fee-item">
|
||||||
<text class="f-val color-success">¥{{ yunyingobj.orderDispatchFee | fix2 }}</text>
|
<text class="f-val color-success">¥{{ dateStat.orderDispatchFee | fix2 }}</text>
|
||||||
<view class="f-name-row">
|
<view class="f-name-row">
|
||||||
<view class="dot" style="background: #10B981;"></view>
|
<view class="dot" style="background: #10B981;"></view>
|
||||||
<text class="f-name">调度费</text>
|
<text class="f-name">调度费</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-item">
|
<view class="fee-item">
|
||||||
<text class="f-val color-warning">¥{{ yunyingobj.orderManageFee | fix2 }}</text>
|
<text class="f-val color-warning">¥{{ dateStat.orderManageFee | fix2 }}</text>
|
||||||
<view class="f-name-row">
|
<view class="f-name-row">
|
||||||
<view class="dot" style="background: #F59E0B;"></view>
|
<view class="dot" style="background: #F59E0B;"></view>
|
||||||
<text class="f-name">管理费</text>
|
<text class="f-name">管理费</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-item">
|
<view class="fee-item">
|
||||||
<text class="f-val color-success">¥{{ yunyingobj.orderInsureFee | fix2 }}</text>
|
<text class="f-val color-success">¥{{ dateStat.orderInsureFee | fix2 }}</text>
|
||||||
<view class="f-name-row">
|
<view class="f-name-row">
|
||||||
<view class="dot" style="background: #10B981;"></view>
|
<view class="dot" style="background: #10B981;"></view>
|
||||||
<text class="f-name">保险费</text>
|
<text class="f-name">保险费</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fee-item">
|
<view class="fee-item">
|
||||||
<text class="f-val color-purple">¥{{ yunyingobj.orderDeductionFee | fix2 }}</text>
|
<text class="f-val color-purple">¥{{ dateStat.orderDeductionFee | fix2 }}</text>
|
||||||
<view class="f-name-row">
|
<view class="f-name-row">
|
||||||
<view class="dot" style="background: #8B5CF6;"></view>
|
<view class="dot" style="background: #8B5CF6;"></view>
|
||||||
<text class="f-name">车损费</text>
|
<text class="f-name">车损费</text>
|
||||||
|
|
@ -182,7 +188,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="p-info">
|
<view class="p-info">
|
||||||
<view class="p-label">进行中订单</view>
|
<view class="p-label">进行中订单</view>
|
||||||
<view class="p-val">{{ yunyingobj.orderProcessingCount | dv }}<text class="unit">笔</text></view>
|
<view class="p-val">{{ pendingStat.orderProcessingCount | dv }}<text class="unit">笔</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pending-item">
|
<view class="pending-item">
|
||||||
|
|
@ -191,7 +197,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="p-info">
|
<view class="p-info">
|
||||||
<view class="p-label">待支付骑行费</view>
|
<view class="p-label">待支付骑行费</view>
|
||||||
<view class="p-val">{{ yunyingobj.orderRideWaitPayCount | dv }}<text class="unit">笔</text></view>
|
<view class="p-val">{{ pendingStat.orderRideWaitPayCount | dv }}<text class="unit">笔</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pending-item">
|
<view class="pending-item">
|
||||||
|
|
@ -200,13 +206,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="p-info">
|
<view class="p-info">
|
||||||
<view class="p-label">待审核订单</view>
|
<view class="p-label">待审核订单</view>
|
||||||
<view class="p-val">{{ yunyingobj.orderWaitVerifyCount | dv }}<text class="unit">笔</text></view>
|
<view class="p-val">{{ pendingStat.orderWaitVerifyCount | dv }}<text class="unit">笔</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -235,13 +243,13 @@
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
totalOrderCount() {
|
totalOrderCount() {
|
||||||
const ride = parseInt(this.yunyingobj.finishedOrderCount) || 0
|
const ride = parseInt(this.dateStat.finishedOrderCount) || 0
|
||||||
const vip = parseInt(this.yunyingobj.vipOrderCount) || 0
|
const vip = parseInt(this.dateStat.vipOrderCount) || 0
|
||||||
return ride + vip
|
return ride + vip
|
||||||
},
|
},
|
||||||
totalBonusAmount() {
|
totalBonusAmount() {
|
||||||
const ride = parseFloat(this.yunyingobj.bonusActualAmount) || 0
|
const ride = parseFloat(this.dateStat.bonusActualAmount) || 0
|
||||||
const vip = parseFloat(this.yunyingobj.vipOrderBonusActualAmount) || 0
|
const vip = parseFloat(this.dateStat.vipOrderBonusActualAmount) || 0
|
||||||
return (ride + vip).toFixed(2)
|
return (ride + vip).toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -271,9 +279,11 @@
|
||||||
twoshow: false,
|
twoshow: false,
|
||||||
kstime: '',
|
kstime: '',
|
||||||
jstime: '',
|
jstime: '',
|
||||||
yunyingobj: {},
|
dateStat: {},
|
||||||
|
pendingStat: {},
|
||||||
infoobj: {},
|
infoobj: {},
|
||||||
areaId: '',
|
areaId: '',
|
||||||
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
|
@ -300,13 +310,24 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gettongji() {
|
gettongji() {
|
||||||
// 包含了期间营收和收益在路上的所有所需字段
|
if (!this.infoobj.userId) return Promise.resolve()
|
||||||
let StatKeys = 'order_actual_amount,order_refund_amount,order_finished_count,bonus_actual_amount,order_ridding_fee,order_deduction_fee,order_dispatch_fee,order_manage_fee,order_insure_fee,vip_order_count,vip_order_amount,vip_order_bonus_actual_amount,order_processing_count,order_wait_verify_count,order_ride_wait_pay_count,order_admin_refund_amount'
|
const dateStatKeys = 'order_actual_amount,order_refund_amount,order_finished_count,bonus_actual_amount,order_ridding_fee,order_deduction_fee,order_dispatch_fee,order_manage_fee,order_insure_fee,vip_order_count,vip_order_amount,vip_order_bonus_actual_amount,order_admin_refund_amount'
|
||||||
let dateRangeStr = (this.kstime && this.jstime) ? `${this.kstime},${this.jstime}` : ''
|
const pendingStatKeys = 'order_processing_count,order_wait_verify_count,order_ride_wait_pay_count'
|
||||||
this.$u.get(`/dashboard/revenueStat?keys=${StatKeys}&dateRange=${dateRangeStr}&userId=${this.infoobj.userId}&areaId=${this.areaId}`).then(res => {
|
const dateRangeStr = (this.kstime && this.jstime) ? `${this.kstime},${this.jstime}` : ''
|
||||||
if (res.code == 200) {
|
const commonParams = `userId=${this.infoobj.userId}&areaId=${this.areaId}`
|
||||||
this.yunyingobj = res.data
|
this.loading = true
|
||||||
|
return Promise.all([
|
||||||
|
this.$u.get(`/dashboard/revenueStat?keys=${dateStatKeys}&dateRange=${dateRangeStr}&${commonParams}`),
|
||||||
|
this.$u.get(`/dashboard/revenueStat?keys=${pendingStatKeys}&${commonParams}`)
|
||||||
|
]).then(([dateRes, pendingRes]) => {
|
||||||
|
if (dateRes.code == 200) {
|
||||||
|
this.dateStat = dateRes.data
|
||||||
}
|
}
|
||||||
|
if (pendingRes.code == 200) {
|
||||||
|
this.pendingStat = pendingRes.data
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurrentDate(num) {
|
getCurrentDate(num) {
|
||||||
|
|
@ -397,6 +418,28 @@
|
||||||
padding-bottom: 60rpx;
|
padding-bottom: 60rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
.stats-body {
|
||||||
|
position: relative;
|
||||||
|
min-height: 520rpx;
|
||||||
|
}
|
||||||
|
.stats-loading-mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: rgba(255, 255, 255, 0.78);
|
||||||
|
}
|
||||||
|
.stats-loading-tip {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #6B7280;
|
||||||
|
}
|
||||||
.is-hover {
|
.is-hover {
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const store = new Vuex.Store({
|
||||||
isLogin: false,
|
isLogin: false,
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
token:"",
|
token:"",
|
||||||
appid:'1',//1小鹿 6创享 2嵛山岛 7小兔 1福兴 10易达
|
appid:'10',//1小鹿 6创享 2嵛山岛 7小兔 1福兴 10易达
|
||||||
// 电动车图标
|
// 电动车图标
|
||||||
iconobj:{
|
iconobj:{
|
||||||
tabcion:'https://api.ccttiot.com/smartmeter/img/static/uIiSizdNVb65ATEXvxfT', //底部导航栏图标
|
tabcion:'https://api.ccttiot.com/smartmeter/img/static/uIiSizdNVb65ATEXvxfT', //底部导航栏图标
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user