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>
<view class="card"> <view class="card">
<view class="cont"> <view class="cont">
<view class="cont_li2"> <view class="cont_li2" v-if="orderInfo.sn">
<span class="txt5"> <span class="txt5">
车辆编号: 车辆编号:
</span> </span>
@ -142,8 +142,8 @@
<span class="txt5"> <span class="txt5">
送达时间: 送达时间:
</span> </span>
<span class="txt6" v-if> <span class="txt6" >
--
{{timeBack(orderInfo.deliveryTime)}} {{timeBack(orderInfo.deliveryTime)}}
</span> </span>
</view> </view>
@ -299,7 +299,7 @@
if (num == 0) { if (num == 0) {
result.text = '待接单'; result.text = '待接单';
result.color = '#F14C4C'; // result.color = '#F14C4C'; //
} else if (num == 1) {w } else if (num == 1) {
result.text = '待配送'; result.text = '待配送';
result.color = '#F38C42'; // result.color = '#F38C42'; //
} else if (num == 2) { } else if (num == 2) {

View File

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

View File

@ -181,7 +181,6 @@
</view> </view>
<view class="info"> <view class="info">
<view class="info_top"> <view class="info_top">
{{item.details}} {{item.details}}
</view> </view>
<view class="info_bot"> <view class="info_bot">
@ -245,11 +244,29 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="bot_btn"> <view class="order_code" >
<view class="btn"> <view class="tits">
立即接单 配送信息
</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> </view>
</view> -->
<u-mask :show="showcs" @click="showcs = false" :z-index='100' /> <u-mask :show="showcs" @click="showcs = false" :z-index='100' />
<view class="tip_box" v-if="showcs"> <view class="tip_box" v-if="showcs">
<view class="top" v-if="showcs"> <view class="top" v-if="showcs">
@ -365,8 +382,26 @@
</view> </view>
</view> </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> </view>
</template> </template>
@ -385,7 +420,8 @@
dispatchFee:0, dispatchFee:0,
leaseFee:0, leaseFee:0,
showcs:false, showcs:false,
csmoney:0 csmoney:0.,
AccountInfo:{}
} }
}, },
onShow() { onShow() {
@ -395,10 +431,132 @@
if(e.orderNo){ if(e.orderNo){
this.orderNo=e.orderNo this.orderNo=e.orderNo
this.getOrderInfo() this.getOrderInfo()
this.getAccountInfo()
} }
}, },
methods: { 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(){ backyj(){
this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => { this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -536,7 +694,7 @@
} }
}, },
timetype(time) { timetype(time) {
if (time == 'hour') { if (time == 'hours') {
return '小时' return '小时'
} else if (time == 'day') { } else if (time == 'day') {
return '天' return '天'
@ -586,6 +744,8 @@
return '超时取消' return '超时取消'
} else if (num == 6) { } else if (num == 6) {
return '已取消' return '已取消'
}else if (num == 7) {
return '待审核'
} else if (num == 8) { } else if (num == 8) {
return '订单已结束' return '订单已结束'
} }
@ -643,6 +803,40 @@
.page { .page {
width: 750rpx; width: 750rpx;
padding-bottom: 220rpx; 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 { .tip_box {
position: fixed; position: fixed;
left: 72rpx; left: 72rpx;

View File

@ -641,10 +641,11 @@
async ceshi() { async ceshi() {
this.$u.get("/getInfo").then((res) => { this.$u.get("/getInfo").then((res) => {
console.log('进入跳转',res); console.log('进入跳转',res);
if(res.data.deptId){
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/index' url: '/pages/index/index'
}) })
if(res.data.deptId){
}else{ }else{
this.showpart=true this.showpart=true

View File

@ -59,7 +59,7 @@
</view> </view>
<view class="lis"> <view class="lis">
<view class="txt3"> <view class="txt3">
7月14日 15:22 {{ formatDate(item.createTime) }}
</view> </view>
<view class="txt3"> <view class="txt3">
余额: {{item.afterBalance}} 余额: {{item.afterBalance}}
@ -116,6 +116,17 @@
methods: { 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(){ toWd(){
uni.navigateTo({ uni.navigateTo({
url:'/pages_withdraw/withdraw' url:'/pages_withdraw/withdraw'