diff --git a/common/http.interceptor.js b/common/http.interceptor.js index bf26fda..e7b6a40 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,9 +1,9 @@ const install = (Vue, vm) => { uni.setStorageSync('deptId', 100); - Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.1.14:4101', //键辉本地 + Vue.prototype.$u.http.setConfig({ + baseUrl: 'http://192.168.1.6: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://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214 loadingText: '努力加载中~', diff --git a/page_shanghu/admin_index.vue b/page_shanghu/admin_index.vue index d6c4561..c98ade2 100644 --- a/page_shanghu/admin_index.vue +++ b/page_shanghu/admin_index.vue @@ -41,88 +41,88 @@ - - - 仓库中 - - - {{qbobj.device.statusCount[0] == null ? '0' : qbobj.device.statusCount[0]}} - + + + 仓库中 - - - 待租 - - - {{qbobj.device.statusCount[1] == null ? '0' : qbobj.device.statusCount[1]}} - + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[0]) || '0'}} - - - 骑行中 - - - {{qbobj.device.statusCount[3] == null ? '0' : qbobj.device.statusCount[3]}} - + + + + 待租 - - - 临时锁车 - - - {{qbobj.device.statusCount[4] == null ? '0' : qbobj.device.statusCount[4]}} - + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[1]) || '0'}} - - - 禁用中 - - - {{qbobj.device.statusCount[8] == null ? '0' : qbobj.device.statusCount[8]}} - + + + + 骑行中 - - - 调度中 - - - {{qbobj.device.statusCount[6] == null ? '0' : qbobj.device.statusCount[6]}} - + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[3]) || '0'}} - - - - 离线 - - - {{qbobj.device.onlineStatusCount[0] == null ? '0' : qbobj.device.onlineStatusCount[0]}} - + + + + 临时锁车 - - - 在线 - - - {{qbobj.device.onlineStatusCount[1] == null ? '0' : qbobj.device.onlineStatusCount[1]}} - + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[4]) || '0'}} - - - 强制锁车 - - - {{qbobj.device.statusCount[9] == null ? '0' : qbobj.device.statusCount[9]}} - + + + + 禁用中 - - - 全部设备 - - - {{qbobj.device.count == null ? '--' : qbobj.device.count}} - + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[8]) || '0'}} + + + 调度中 + + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[6]) || '0'}} + + + + + + 离线 + + + {{(qbobj.deviceOnlineStatusMap && qbobj.deviceOnlineStatusMap[0]) || '0'}} + + + + + 在线 + + + {{(qbobj.deviceOnlineStatusMap && qbobj.deviceOnlineStatusMap[1]) || '0'}} + + + + + 强制锁车 + + + {{(qbobj.deviceStatusMap && qbobj.deviceStatusMap[9]) || '0'}} + + + + + 全部设备 + + + {{qbobj.deviceCount == null ? '--' : qbobj.deviceCount}} + + + @@ -276,15 +276,15 @@ let rangeDebounceId = null; // 滑动筛选debounce this.getqb() this.getmarks() }, - // 请求全部运营统计数据 - getqb() { - let StatKeys = 'device_status_count,device_online_status_count,device_count' - this.$u.get(`/dashboard/stat?keys=${StatKeys}&areaId=${this.areaId}`).then(res => { - if (res.code== 200) { - this.qbobj = res.data - } - }) - }, + // 请求全部运营统计数据 + getqb() { + const keys = 'device_status_count,device_online_status_count,device_count' + this.$u.get(`/dashboard/revenueStat?keys=${keys}&areaId=${this.areaId}`).then(res => { + if (res.code== 200) { + this.qbobj = res.data + } + }) + }, status(item) { if (item.status == 0) { return '仓库中' diff --git a/page_shanghu/gongzuotai/AccountDetails.vue b/page_shanghu/gongzuotai/AccountDetails.vue index 3399dea..69879fa 100644 --- a/page_shanghu/gongzuotai/AccountDetails.vue +++ b/page_shanghu/gongzuotai/AccountDetails.vue @@ -268,14 +268,18 @@ // 请求个人信息 getUserInfo(){ - this.$u.get(`/getInfo`).then((res) => { - if (res.code == 200) { - this.userInfo = res.user - this.gettxfs() - this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount - this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount - } - }) + this.$u.get(`/getInfo`).then((res) => { + if (res.code == 200) { + this.userInfo = res.user + this.gettxfs() + } + }) + this.$u.get('/app/dashboard/userStat').then((res) => { + if (res.code == 200) { + this.successAmount = res.data.withdrawSuccessAmount == null ? 0 : res.data.withdrawSuccessAmount + this.waitDivideAmount = res.data.bonusWaitDivideAmount == null ? 0 : res.data.bonusWaitDivideAmount + } + }) }, // 输入提现金额计算 ckinpt() { diff --git a/page_shanghu/guanli/admin_worke.vue b/page_shanghu/guanli/admin_worke.vue index 882c85b..71adf19 100644 --- a/page_shanghu/guanli/admin_worke.vue +++ b/page_shanghu/guanli/admin_worke.vue @@ -265,9 +265,8 @@ export default { return v == null ? 0 : v }, statProcessing() { - const m = this.yunyingobj.orderStatusMap - if (!m || m.PROCESSING == null) return 0 - return m.PROCESSING + const v = this.yunyingobj.orderProcessingCount + return v == null ? 0 : v }, complaintBadge() { const n = Number(this.weinum) @@ -380,7 +379,7 @@ export default { if (!this.areaId || !this.userinfo.userId) { return Promise.resolve() } - let StatKeys = 'order_actual_amount,order_count,order_end_status_count,order_status_count,bonus_actual_amount,order_ridding_fee,order_deduction_fee,order_dispatch_fee,order_manage_fee,order_refund_amount' + 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 url = `/dashboard/revenueStat?keys=${StatKeys}&dateRange=${this.kstime + ',' + this.jstime}&userId=${this.userinfo.userId}&areaId=${this.areaId}` this._beginStatsLoading() return this.$u diff --git a/page_shanghu/guanli/yunying.vue b/page_shanghu/guanli/yunying.vue index 724dc18..9bae92e 100644 --- a/page_shanghu/guanli/yunying.vue +++ b/page_shanghu/guanli/yunying.vue @@ -2,325 +2,255 @@ - - - - - {{qbobj.orderUserCount == null ? '0人' : qbobj.orderUserCount + '人'}} - - - 累计用户 - + + + + + + 今日 + 昨日 + 本月 + 上月 + 全部 - - - ¥{{qbobj.bonusActualAmount == null ? 0 : qbobj.bonusActualAmount}} + + + + {{kstime || '开始日期'}} - - 累计收益 + + + + {{jstime || '结束日期'}} - - - ¥{{qbobj.orderActualTotalAmount == null ? 0 : qbobj.orderActualTotalAmount}} - - - 订单金额 - - - - - {{qbobj.orderCount == null ? '0' : qbobj.orderCount}}笔 - - - 订单数量 - - - - - - 时间范围 - - - - {{kstime}} - - -- - - {{jstime}} - - - - - - 今日 + + + + + + + + 数据总览 - - 昨日 - - - 本月 - - - 上月 - - - - - - - - - ¥{{yunyingobj.orderActualAmount == null ? 0 : yunyingobj.orderActualAmount}} + + + + + + 订单总数 (笔) - - 订单总金额 + {{ totalOrderCount | fmtInt }} + + + 骑行 + {{yunyingobj.finishedOrderCount | fmtInt}} + + + + 卡券 + {{yunyingobj.vipOrderCount | fmtInt}} + + - - - {{yunyingobj.orderCount == null ? 0 : yunyingobj.orderCount}}笔 + + + + + + 订单实收 (元) - - 订单总数 + {{ yunyingobj.orderActualReceivedAmount | fix2 }} + + + 总额 + {{yunyingobj.orderActualAmount | fix2}} + + + 退款 + {{yunyingobj.orderAdminRefundAmount | fix2}} + - - - {{yunyingobj.finishedOrderCount == null ? 0 : yunyingobj.finishedOrderCount}}笔 + + + + + + 卡券实收 (元) - - 已完成订单 + {{ yunyingobj.vipOrderAmount | fix2 }} + + + 售出 + {{ yunyingobj.vipOrderCount | fmtInt }} + + - - - {{yunyingobj.orderStatusMap.PROCESSING == null ? 0 : yunyingobj.orderStatusMap.PROCESSING}}笔 + + + + + + 我的收益 (元) - - 进行中订单 + {{ totalBonusAmount | fix2 }} + + + 骑行 + {{yunyingobj.bonusActualAmount | fix2}} + + + 卡券 + {{yunyingobj.vipOrderBonusActualAmount | fix2}} + - - - ? - 我的收入{{yunyingobj.bonusActualAmount == null ? 0 : yunyingobj.bonusActualAmount}}元 - - - ? - 订单收入{{yunyingobj.orderActualReceivedAmount == null ? 0 : yunyingobj.orderActualReceivedAmount}}元 - - - - - - 骑行费 - - - ¥{{yunyingobj.orderRiddingFee == null ? 0 : yunyingobj.orderRiddingFee}} - - - - - 调度费 - - - ¥{{yunyingobj.orderDispatchFee == null ? 0 : yunyingobj.orderDispatchFee}} - - - - - 管理费 - - - ¥{{yunyingobj.orderManageFee == null ? 0 : yunyingobj.orderManageFee}} - - + + + + + + + 订单费用细分 - - - - 车损费 - - - ¥{{yunyingobj.orderDeductionFee == null ? 0 : yunyingobj.orderDeductionFee}} + + 订单总额: + ¥{{ yunyingobj.orderActualAmount | fix2 }} + + + + + + ¥{{ yunyingobj.orderRiddingFee | fix2 }} + + + 骑行费 - - - 自动退款 - - - ¥{{yunyingobj.orderAutoRefundAmount == null ? 0 : yunyingobj.orderAutoRefundAmount}} + + ¥{{ yunyingobj.orderDispatchFee | fix2 }} + + + 调度费 - - - 人工退款 + + ¥{{ yunyingobj.orderManageFee | fix2 }} + + + 管理费 - - ¥{{yunyingobj.orderAdminRefundAmount == null ? 0 : yunyingobj.orderAdminRefundAmount}} + + + ¥{{ yunyingobj.orderInsureFee | fix2 }} + + + 保险费 + + + + ¥{{ yunyingobj.orderDeductionFee | fix2 }} + + + 车损费 - - - - - - 工单管理 - - - - - 236 - - - 调度工单 - - - - - 365 - - - 维修工单 - - - - - 3256 - - - 投诉工单 - - - + + + + + + 收益在路上 + - - - 车辆指标 + + + + + + + + 进行中订单 + {{ yunyingobj.orderProcessingCount | dv }} + - - - - 100 - - - 总投放 - + + + - - - 100 - - - 待使用 - + + 待支付骑行费 + {{ yunyingobj.orderRideWaitPayCount | dv }} - - - 100 - - - 使用中 - + + + + - - - 100 - - - 临时锁车 - + + 待审核订单 + {{ yunyingobj.orderWaitVerifyCount | dv }} - - - 100 - - - 仓库中 - - - - - 100 - - - 禁用中 - - - - - 100 - - - 投放中 - - - - - 100 - - - 运营中P点外 - - - - - 100 - - - 运营中超区 - - - - - 100 - - - 零收益车辆 - - - - - 100 - - - 调度设备 - - - - - - + + \ No newline at end of file + + .fee-wrapper { + background: #FFFFFF; + border-radius: 16rpx; + padding: 28rpx 16rpx 12rpx; + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.03); + border: 1rpx solid #F3F4F6; + + .fee-list { + display: flex; + flex-wrap: wrap; + + .fee-item { + width: 33.33%; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + margin-bottom: 24rpx; + padding: 0 8rpx; + box-sizing: border-box; + + .f-val { + font-size: 28rpx; + font-weight: bold; + font-family: 'DIN Alternate', -apple-system, BlinkMacSystemFont, sans-serif; + margin-bottom: 10rpx; + line-height: 1.2; + } + .f-name-row { + display: flex; + align-items: center; + justify-content: center; + + .dot { + width: 10rpx; + height: 10rpx; + border-radius: 50%; + margin-right: 8rpx; + flex-shrink: 0; + } + .f-name { + font-size: 24rpx; + color: #6B7280; + font-weight: 500; + } + } + } + } + } + + /* 收益在路上 */ + .pending-container { + margin-top: 32rpx; + + .pending-list { + display: flex; + flex-direction: row; + justify-content: space-between; + gap: 16rpx; + margin-bottom: 24rpx; + + .pending-item { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + background: #FFFFFF; + padding: 24rpx 10rpx; + border-radius: 16rpx; + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.03); + border: 1rpx solid #F3F4F6; + text-align: center; + + .p-icon { + width: 56rpx; + height: 56rpx; + border-radius: 12rpx; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 12rpx; + .u-icon { + font-size: 32rpx !important; + } + } + + .p-info { + display: flex; + flex-direction: column; + align-items: center; + + .p-label { + font-size: 24rpx; + color: #6B7280; + font-weight: 500; + margin-bottom: 8rpx; + } + .p-val { + font-size: 32rpx; + font-weight: bold; + color: #1F2937; + font-family: 'DIN Alternate', -apple-system, BlinkMacSystemFont, sans-serif; + .unit { + font-size: 22rpx; + font-weight: normal; + color: #9CA3AF; + margin-left: 4rpx; + } + } + } + } + } + } + + /* 颜色辅助类 */ + .color-primary { color: #3B82F6; } + .color-warning { color: #F59E0B; } + .color-success { color: #10B981; } + .color-danger { color: #EF4444; } + .color-purple { color: #8B5CF6; } + + .bg-light-primary { background: #EFF6FF; } + .bg-light-warning { background: #FFFBEB; } + .bg-light-success { background: #ECFDF5; } + .bg-light-danger { background: #FEF2F2; } + .bg-light-purple { background: #F5F3FF; } + diff --git a/page_shanghu/shmy.vue b/page_shanghu/shmy.vue index 8b18085..85ec9ff 100644 --- a/page_shanghu/shmy.vue +++ b/page_shanghu/shmy.vue @@ -25,18 +25,18 @@ 账户余额(元) - - ¥{{user.balance == null ? '0.00' : (Number(user.balance) + Number(waitDivideAmount)).toFixed(2)}} - - - - + + ¥{{(currentBalance + waitDivideAmount).toFixed(2)}} - - - 可提现 ¥{{user.balance == null ? '0.00' : user.balance.toFixed(2)}} - + + + + + + + 可提现 ¥{{currentBalance.toFixed(2)}} + 累计提现 ¥{{successAmount == null ? '0.00' : Number(successAmount).toFixed(2)}} @@ -116,8 +116,9 @@ fuwuewm:false, appimg: this.$store.state.app.imgConfig, user:{}, - waitDivideAmount:'', - successAmount:'', + currentBalance: 0, + waitDivideAmount: 0, + successAmount: 0, licenseInfo: null, // 营业执照信息 authTypes: [] // 认证类型数组 } @@ -187,14 +188,19 @@ }, // 获取个人信息 getinfo(){ - this.$u.get("/getInfo").then((res) => { - if(res.code == 200){ - this.user = res.user - this.authTypes = res.user.authTypes || [] - this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount - this.successAmount = res.stat.withdraw.successAmount == null ? 0 : Number(res.stat.withdraw.successAmount) - } - }) + this.$u.get("/getInfo").then((res) => { + if(res.code == 200){ + this.user = res.user + this.authTypes = res.user.authTypes || [] + } + }) + this.$u.get("/app/dashboard/userStat").then((res) => { + if(res.code == 200){ + this.currentBalance = res.data.currentBalance == null ? 0 : Number(res.data.currentBalance) + this.waitDivideAmount = res.data.bonusWaitDivideAmount == null ? 0 : Number(res.data.bonusWaitDivideAmount) + this.successAmount = res.data.withdrawSuccessAmount == null ? 0 : Number(res.data.withdrawSuccessAmount) + } + }) }, // 名称:将名称的第二位替换为 * 展示 maskName(name) { diff --git a/pages.json b/pages.json index 7bf53d3..ecfc8a7 100644 --- a/pages.json +++ b/pages.json @@ -665,7 +665,7 @@ "path": "guanli/yunying", "style": { "navigationBarTitleText": "", - "enablePullDownRefresh": false, + "enablePullDownRefresh": true, "navigationStyle": "custom" } },{