From 93ba82301d3cc43180db9a1c84e946aa54b3787a Mon Sep 17 00:00:00 2001 From: tx <2622874537@qq.com> Date: Thu, 31 Oct 2024 17:47:30 +0800 Subject: [PATCH] 11 --- page_Delivery/OrderDetail.vue | 8 +- page_Merchant/order_Detail.vue | 4 +- page_Operator/order_Detail.vue | 214 +++++++++++++++++++++++++++++++-- pages/login/login.vue | 7 +- pages/my.vue | 13 +- 5 files changed, 226 insertions(+), 20 deletions(-) diff --git a/page_Delivery/OrderDetail.vue b/page_Delivery/OrderDetail.vue index 76ca0fb..c0bfd31 100644 --- a/page_Delivery/OrderDetail.vue +++ b/page_Delivery/OrderDetail.vue @@ -121,7 +121,7 @@ - + 车辆编号: @@ -142,8 +142,8 @@ 送达时间: - - -- + + {{timeBack(orderInfo.deliveryTime)}} @@ -299,7 +299,7 @@ if (num == 0) { result.text = '待接单'; result.color = '#F14C4C'; // 待支付颜色 - } else if (num == 1) {w + } else if (num == 1) { result.text = '待配送'; result.color = '#F38C42'; // 超时取消颜色 } else if (num == 2) { diff --git a/page_Merchant/order_Detail.vue b/page_Merchant/order_Detail.vue index d107ba7..7563bb3 100644 --- a/page_Merchant/order_Detail.vue +++ b/page_Merchant/order_Detail.vue @@ -167,7 +167,7 @@ 服务费退款 - + 押金退还 @@ -197,7 +197,7 @@ - {{item.partnerName}}( {{userRrturn(item.partnerType)}} ){{item.dividendProportion}}% + {{item.partnerName}}( {{userRrturn(item.partnerType)}} ){{item.dividendProportion*100}}% ¥{{item.dividendAmount}} diff --git a/page_Operator/order_Detail.vue b/page_Operator/order_Detail.vue index f2abbaf..d107ba7 100644 --- a/page_Operator/order_Detail.vue +++ b/page_Operator/order_Detail.vue @@ -8,7 +8,7 @@ - + {{typeReturn(orderInfo.status) }} @@ -181,7 +181,6 @@ - {{item.details}} @@ -245,11 +244,29 @@ - + + + 配送状态: {{typeReturns(orderInfo.deliveryOrder.status).text}} + + + + + + 配送人员: {{orderInfo.deliveryOrder.deliveryman?orderInfo.deliveryOrder.deliveryman:'--'}} + + + + + + + 联系电话: {{orderInfo.deliveryOrder.deliverymanPhone?orderInfo.deliveryOrder.deliverymanPhone:'--'}} + + + @@ -365,8 +382,26 @@ - - + + + + 立即接单 + + + 立即配送 + + + 配送完成 + + + + + + + + 确认还车 + + @@ -385,7 +420,8 @@ dispatchFee:0, leaseFee:0, showcs:false, - csmoney:0 + csmoney:0., + AccountInfo:{} } }, onShow() { @@ -395,10 +431,132 @@ if(e.orderNo){ this.orderNo=e.orderNo this.getOrderInfo() + this.getAccountInfo() } }, methods: { + backcar(){ + this.$u.post(`appVerify/merchantReturn?orderNo=` + this.orderInfo.orderNo).then((res) => { + if (res.code === 200) { + this.getOrderInfo() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, + typeReturns(num) { + console.log(num,'aaaaaaaaaaaa'); + let result = { + text: '', + color: '#4297F3' // 默认颜色 + }; + + if (num == 0) { + result.text = '待接单'; + result.color = '#F14C4C'; // 待支付颜色 + } else if (num == 1) { + result.text = '待配送'; + result.color = '#F38C42'; // 超时取消颜色 + } else if (num == 2) { + result.text = '配送中'; + result.color = '#4297F3'; // 超时取消颜色 + } else if (num == 3) { + result.text = '已完成'; + result.color = '#000000'; // 超时取消颜色 + } else if (num == 8) { + result.text = '已取消'; + result.color = '#ccc'; // 超时取消颜色 + } + + return result; + }, + getAccountInfo(){ + this.$u.get(`appAdmin/myAccountInfo`).then((res) => { + if (res.code === 200) { + this.AccountInfo=res.data + + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, + goDeli(item) { + this.$u.post(`appAdmin/inDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => { + if (res.code == 200) { + + this.getOrderInfo() + uni.showToast({ + title: '开始配送', + icon: 'none', + duration: 2000 + }); + } else { + + + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, + overDeli(item) { + this.$u.post(`appAdmin/endDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => { + if (res.code == 200) { + + this.getOrderInfo() + uni.showToast({ + title: '配送完成', + icon: 'none', + duration: 2000 + }); + } else { + + + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, + getOrder(item) { + this.$u.post(`appAdmin/orderTaking?orderNo=` + this.orderInfo.orderNo).then((res) => { + if (res.code == 200) { + + this.getOrderInfo() + uni.showToast({ + title: '接单成功', + icon: 'none', + duration: 2000 + }); + } else { + + + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, backyj(){ this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => { if (res.code == 200) { @@ -536,7 +694,7 @@ } }, timetype(time) { - if (time == 'hour') { + if (time == 'hours') { return '小时' } else if (time == 'day') { return '天' @@ -586,6 +744,8 @@ return '超时取消' } else if (num == 6) { return '已取消' + }else if (num == 7) { + return '待审核' } else if (num == 8) { return '订单已结束' } @@ -643,6 +803,40 @@ .page { width: 750rpx; padding-bottom: 220rpx; + .order_code { + width: 696rpx; + margin: 0 auto; + margin-top: 16rpx; + padding: 20rpx 28rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .tits { + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + + .code_li { + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + + .code { + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + + .btn { + font-weight: 400; + font-size: 28rpx; + color: #4297F3; + } + } + } + + .tip_box { position: fixed; left: 72rpx; diff --git a/pages/login/login.vue b/pages/login/login.vue index 2edc85c..3eb2fee 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -641,10 +641,11 @@ async ceshi() { this.$u.get("/getInfo").then((res) => { console.log('进入跳转',res); + uni.navigateTo({ + url: '/pages/index/index' + }) if(res.data.deptId){ - uni.navigateTo({ - url: '/pages/index/index' - }) + }else{ this.showpart=true diff --git a/pages/my.vue b/pages/my.vue index 8e41d88..35ff908 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -59,7 +59,7 @@ - 7月14日 15:22 + {{ formatDate(item.createTime) }} 余额: {{item.afterBalance}} @@ -116,6 +116,17 @@ methods: { + formatDate(dateString) { + const date = new Date(dateString); + const month = date.getMonth() + 1; // 月份从0开始,需要加1 + const day = date.getDate(); + const hours = date.getHours(); + const minutes = date.getMinutes(); + + // 格式化月、日、小时和分钟,确保是两位数 + const formattedDate = `${month}月${day}日 ${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`; + return formattedDate; + }, toWd(){ uni.navigateTo({ url:'/pages_withdraw/withdraw'