This commit is contained in:
tx 2024-10-31 17:47:30 +08:00
parent 788fdb8360
commit 93ba82301d
5 changed files with 226 additions and 20 deletions

View File

@ -121,7 +121,7 @@
</view>
<view class="card">
<view class="cont">
<view class="cont_li2">
<view class="cont_li2" v-if="orderInfo.sn">
<span class="txt5">
车辆编号:
</span>
@ -142,8 +142,8 @@
<span class="txt5">
送达时间:
</span>
<span class="txt6" v-if>
--
<span class="txt6" >
{{timeBack(orderInfo.deliveryTime)}}
</span>
</view>
@ -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) {

View File

@ -167,7 +167,7 @@
<view class="btn1" @click="showtk=true">
服务费退款
</view>
<view class="btn2" @click="backyj()">
<view class="btn2" @click="backyj()" v-i='false'>
押金退还
</view>
</view>
@ -197,7 +197,7 @@
</view>
<view class="price_li" v-for="(item,index) in orderInfo.rlDividendDetails" :key="index">
<view class="txt6">
{{item.partnerName}} {{userRrturn(item.partnerType)}} {{item.dividendProportion}}%
{{item.partnerName}} {{userRrturn(item.partnerType)}} {{item.dividendProportion*100}}%
</view>
<view class="txt7">
{{item.dividendAmount}}

View File

@ -8,7 +8,7 @@
</view>
<!-- <image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/usCZzuQpGCBUpvzCfqyE" mode=""></image> -->
<view class="car_info" >
<view class="car_info" >
<view class="info_tit">
{{typeReturn(orderInfo.status) }}
</view>
@ -181,7 +181,6 @@
</view>
<view class="info">
<view class="info_top">
{{item.details}}
</view>
<view class="info_bot">
@ -245,11 +244,29 @@
</view>
</view>
</view>
<!-- <view class="bot_btn">
<view class="btn">
立即接单
<view class="order_code" >
<view class="tits">
配送信息
</view>
</view> -->
<view class="code_li" v-if='orderInfo.deliveryOrder'>
<view class="code">
配送状态 {{typeReturns(orderInfo.deliveryOrder.status).text}}
</view>
</view>
<view class="code_li">
<view class="code">
配送人员 {{orderInfo.deliveryOrder.deliveryman?orderInfo.deliveryOrder.deliveryman:'--'}}
</view>
</view>
<view class="code_li">
<view class="code">
联系电话 {{orderInfo.deliveryOrder.deliverymanPhone?orderInfo.deliveryOrder.deliverymanPhone:'--'}}
</view>
</view>
</view>
<u-mask :show="showcs" @click="showcs = false" :z-index='100' />
<view class="tip_box" v-if="showcs">
<view class="top" v-if="showcs">
@ -365,8 +382,26 @@
</view>
</view>
</view>
<view class="" v-if="orderInfo.status==1||orderInfo.status==2||orderInfo.status==3">
<view class="bot_btn" v-if="orderInfo.deliveryOrder.status!=3&&orderInfo.deliveryOrder">
<view class="btn" @click="getOrder()" v-if="orderInfo.deliveryOrder.status==0">
立即接单
</view>
<view class="btn" @click.stop="goDeli(orderInfo)" v-if="orderInfo.deliveryOrder.status==1&&orderInfo.deliveryOrder.deliverymanPhone==AccountInfo.phonenumber">
立即配送
</view>
<view class="btn" v-if="orderInfo.deliveryOrder.status==2&&orderInfo.deliveryOrder.deliverymanPhone==AccountInfo.phonenumber" @click.stop="overDeli(orderInfo)">
配送完成
</view>
</view>
</view>
<view class="bot_btn" v-if="orderInfo.status==7||orderInfo.status==4">
<view class="btn" @click="backcar()">
确认还车
</view>
</view>
</view>
</template>
@ -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;

View File

@ -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

View File

@ -59,7 +59,7 @@
</view>
<view class="lis">
<view class="txt3">
7月14日 15:22
{{ formatDate(item.createTime) }}
</view>
<view class="txt3">
余额: {{item.afterBalance}}
@ -116,6 +116,17 @@
methods: {
formatDate(dateString) {
const date = new Date(dateString);
const month = date.getMonth() + 1; // 01
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'