From ce06ca62a0dd65d4a8fb57126948449c804ad77e Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 19 五月 2026 19:40:08 +0800
Subject: [PATCH] 提交
---
small-program/pages/itinerary/itinerary.vue | 240 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 196 insertions(+), 44 deletions(-)
diff --git a/small-program/pages/itinerary/itinerary.vue b/small-program/pages/itinerary/itinerary.vue
index 45bf1f8..eff6432 100644
--- a/small-program/pages/itinerary/itinerary.vue
+++ b/small-program/pages/itinerary/itinerary.vue
@@ -7,6 +7,12 @@
<view class="header-bar" :style="{ height: navHeight + 'px' }">
<text class="header-title">鎴戠殑琛岀▼</text>
</view>
+ <view class="top-search">
+ <view class="searchbox">
+ <u-icon name="search" color="#999999" size="28"></u-icon>
+ <input class="search-input" v-model="keyword" @confirm="getFirstPageData" type="text" placeholder="杈撳叆濮撳悕銆佺數璇濄�佽鍗曠紪鍙锋悳绱�">
+ </view>
+ </view>
<scroll-view scroll-x class="tabs-row page-padding" style="padding: 0 0 0 30rpx !important;" show-scrollbar="false">
<view class="tabs-inner">
<view
@@ -14,7 +20,7 @@
:key="item.value"
class="filter-tab"
:class="{ active: activeTab === item.value }"
- @tap="activeTab = item.value"
+ @click="changeTab(item) "
>
{{ item.label }}
</view>
@@ -33,9 +39,15 @@
<text class="head-name text-ellipsis">{{ item.depositShopName||'' }}</text>
<text class="head-user">{{ item.takeUser ||'' }}</text>
</view>
- <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <view style="display: flex;flex-direction: column;">
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">瓒呮椂鏈彇浠�</text>
+ <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
+ <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
+ <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ </view>
</view>
<view v-else class="head-city">
<view class="head-copy city-left">
@@ -48,9 +60,15 @@
<view class="arrow-head"></view>
</view>
<view class="head-copy city-right align-right">
- <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status ===7" class="status-text status-grey" >{{ item.statusName||'' }}</text>
- <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <view style="display: flex;flex-direction: column;">
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">瓒呮椂鏈彇浠�</text>
+ <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
+ <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
+ <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ </view>
<text class="head-name text-ellipsis">{{ item.takeShopName || item.takeLocation||'' }}</text>
<text class="head-user">{{ item.takeUser||'' }}</text>
</view>
@@ -77,7 +95,7 @@
<view class="amount-area">
<view class="pay-row">
<text class="pay-label">瀹炰粯娆撅細</text>
- <text class="pay-value">{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
+ <text class="pay-value">{{(((item.estimatedAmount || 0) - (item.deductionAmount || 0)) / 100).toFixed(2) }}</text>
</view>
<view class="insurance-row">
<text class="insurance-label">鍚鏉庝繚璐癸細</text>
@@ -88,19 +106,21 @@
<view class="card-footer">
<view class="footer-actions" v-if="item.type===0">
- <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 || item.status==2 || item.status===98">鑱旂郴闂ㄥ簵</view>
+ <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 ||item.status ===5 || item.status==2 || item.status===98">鑱旂郴闂ㄥ簵</view>
<view class="footer-btn contact-btn" v-if="item.status ===0 || item.status ===1" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
<view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">鍒犻櫎璁㈠崟</view>
<view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">绔嬪嵆鏀粯</view>
<view class="footer-btn primary-btn" v-if="item.status >=1 &&item.status <7 " @click="openQrcode(item)" >鏍搁攢鐮�</view>
<view class="footer-btn primary-btn" @click="evaluateOrder(item)" v-if="item.status ===7 && !item.commentStatus ">璇勪环璁㈠崟</view>
</view>
<view class="footer-actions" v-else>
- <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 || item.status ==2">鑱旂郴闂ㄥ簵</view>
- <view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="item.status ===3 || item.status ===4 ">鑱旂郴楠戞墜</view>
- <view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5">鑱旂郴闂ㄥ簵</view>
- <view class="footer-btn contact-btn" v-if="item.status ===0" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
- <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="(item.status ===1 || item.status ==2) && item.takeShopId">鑱旂郴闂ㄥ簵</view>
+ <view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="[3,4,5].includes(item.status) && !item.takeShopId">鑱旂郴楠戞墜</view>
+ <view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5 && item.takeShopId">鑱旂郴闂ㄥ簵</view>
+ <view class="footer-btn contact-btn" v-if="[0,1,2].includes(item.status)" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
+ <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">绔嬪嵆鏀粯</view>
<view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">鍒犻櫎璁㈠崟</view>
<view class="footer-btn primary-btn" @click="cancelOrder(item)" v-if="item.status ===1">鐢宠閫�娆�</view>
<view class="footer-btn primary-btn" v-if="item.status ===1 || (item.takeShopId && item.status ===5)" @click="openQrcode(item)" >鏍搁攢鐮�</view>
@@ -119,7 +139,7 @@
<view class="phone">
<view class="phone-head">
<view></view>
- <text>鑱旂郴瀹㈡埛</text>
+ <text>{{linkItem.title}}</text>
</view>
<!-- <view class="phone-item">
<view>
@@ -129,10 +149,10 @@
<view class="line" v-if="serverPhone && serverPhone.length"></view>
</view> -->
<view class="phone-item" >
- <view>
- <image src="/static/icon/ic_call@2x.png" mode="widthFix" @click="contactPhoneDo()" ></image>
- <text>{{linkItem.linkname||''}} </text>
- <text style="margin-left: 10px;"> {{linkItem.linkphone||''}}</text>
+ <view @click="contactPhoneDo()">
+ <image src="/static/icon/ic_call@2x.png" mode="widthFix" ></image>
+ <text >{{linkItem.linkname||''}} </text>
+ <text style="margin-left: 10px;"> {{linkItem.linkphone||''}}</text>
</view>
</view>
<view style="width: 100%; height: 30rpx;"></view>
@@ -184,16 +204,26 @@
</view>
</u-popup>
<u-popup :show="showQrcode" round="15" @close="openQrcode()" :safeAreaInsetBottom="false" mode="bottom" :closeable="true" :closeOnClickOverlay="false">
- <view class="tc" style="height: 700rpx;width: 100%; ">
+ <view class="tc" style="height: auto;width: 100%; ">
<view class="tc-contemt" style="text-align: center;">
- <view class="tc-contemt-title" style="text-align: center;">鏍搁攢鐮�</view>
+ <view style="margin-bottom: 30rpx;">
+ <text class="pickup-code" style="font-size: 48rpx;">琛屾潕缂栧彿锛歿{ currentOrder.sortnum||'' }}</text>
+ <view class="pickup-code" style="margin-left: 60rpx;font-size: 28rpx;text-align: left;font-weight: normal;">鐢ㄦ埛锛歿{currentOrder.takeUser||''}}({{currentOrder.takePhone||''}})</view>
+ <view class="pickup-code" style="margin-left: 60rpx;font-size: 28rpx;text-align: left;font-weight: normal;">闂ㄥ簵锛歿{currentOrder.depositShopName||''}}</view>
+ <view class="item-form-list" style="align-items:baseline;" v-if="currentOrder && currentOrder.orderImages && currentOrder.orderImages.length">
+ <view class="item-form-list-row" v-for="(item,index) in currentOrder.orderImages" key="item">
+ <image :src="item" mode="widthFix" @click="previewImage(currentOrder.orderImages,index)" ></image>
+ </view>
+ </view>
+ </view>
<view class="qrcode-box">
<canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas" style="width: 100px; height: 100px;"></canvas>
<image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
</view>
- <text class="pickup-code">{{ currentOrder.memberVerifyCode||'' }}</text>
- <text class="pickup-tip" @tap="copyCode">鐐瑰嚮澶嶅埗鑷彁鐮�</text>
+ <text class="pickup-code">鏍搁攢鐮�:{{ currentOrder.memberVerifyCode||'' }}</text>
+ <text class="pickup-tip" @tap="copyCode">鐐瑰嚮澶嶅埗鏍搁攢鐮�</text>
</view>
+
</view>
</u-popup>
<custom-tabbar></custom-tabbar>
@@ -222,10 +252,13 @@
showPhone:false,
total:0,
hasNext:true,
+ keyword:'',
userType: 0,
qrcodeImage:null,
isLoadingMore: false,
currentOrder:null,
+ contanctType:0,
+ linkItem:{title:'',linkname:'',linkphone:''},
filterTabs: [
{ label: '鍏ㄩ儴' ,value: -1},
{ label: '寰呮敮浠�',value: 0 },
@@ -233,23 +266,22 @@
{ label: '寰呴厤閫�', value: 2 },
{ label: '寰呮敹璐�', value: 3},
{ label: '宸插畬鎴�', value: 4},
- { label: '宸查��娆�', value: 5}
+ { label: '宸插彇娑�', value: 5}
],
dataList: []
}
},
- watch: {
- activeTab() {
- this.getFirstPageData()
- }
- },
+ // watch: {
+ // activeTab() {
+ // this.getFirstPageData()
+ // }
+ // },
onLoad(options) {
console.log(options )
this.activeTab = -1
- if (options.status) {
+ /* if (options.status != null && options.status != undefined) {
this.activeTab = Number(options.status)
- }
- this.getFirstPageData()
+ } */
var that =this
uni.$on('updateOrder',function(data){
console.log('鐩戝惉鍒颁簨浠舵潵鑷� update 锛屾惡甯﹀弬鏁� msg 涓猴細' ,data);
@@ -270,19 +302,79 @@
})
},
onShow() {
+
+ this.activeTab = -1
this.showDone=false
this.showCancel=false
this.showDelete=false
this.showQrcode=false
this.showPay=false
+ this.contanctType =0
this.showPhone=false
this.loading=false
this.currentOrder=null
+ this.linkItem={title:'',linkname:'',linkphone:''}
+ var orderStatus = uni.getStorageSync("orderStatus");
+ console.log(orderStatus,"==================")
+ if (orderStatus != null &&orderStatus != undefined ) {
+ if( Number(orderStatus) === -2){
+ this.activeTab = 0
+ } else if( Number(orderStatus) !== 0 ){
+ this.activeTab = Number(orderStatus)
+ }
+ }
+ uni.clearStorageSync("orderStatus")
+ this.getFirstPageData()
},
onReachBottom(){
this.getDataList();
},
methods: {
+ previewImage(images,index = 0) {
+ uni.previewImage({
+ current: index,
+ urls: images
+ });
+ },
+ changeTab(item){
+ this.activeTab = item.value
+ this.getFirstPageData()
+ },
+ payOrderFee(info){
+ var that = this;
+ uni.showLoading({ title: '鍙戣捣鏀粯涓�...', mask: true })
+ this.$u.api.payOverdueFee({
+ orderId: info.id
+ }).then(res => {
+ uni.hideLoading()
+ if (res.code === 200 && res.data) {
+ let paymentData = res.data.response
+ uni.requestPayment({
+ provider: 'wxpay',
+ timeStamp: paymentData.timeStamp || '',
+ nonceStr: paymentData.nonceStr || '',
+ package: paymentData.package || '',
+ signType: paymentData.signType || 'MD5',
+ paySign: paymentData.paySign || '',
+ success: (res) => {
+ that.getFirstPageData()
+ },
+ fail: (err) => {
+ if (err.errMsg.includes('cancel')) {
+ uni.showToast({ title: '宸插彇娑堟敮浠�', icon: 'none' })
+ } else {
+ uni.showToast({ title: '鏀粯澶辫触', icon: 'none' })
+ }
+ }
+ })
+ } else {
+ uni.showToast({ title: res.msg || '鏀粯澶辫触', icon: 'none' })
+ }
+ }).catch(err => {
+ uni.hideLoading()
+ uni.showToast({ title: '鏀粯澶辫触', icon: 'none' })
+ })
+ },
payOrder(item){
var that = this;
uni.showLoading({ title: '鍙戣捣鏀粯涓�...', mask: true })
@@ -337,10 +429,20 @@
that.showDone()
}
},
- contactPhone(item){
+ contactPhone(item,type){
this.showPhone = !this.showPhone
- this.linkItem = item ||{}
+ this.linkItem = {title:'',linkname:'',linkphone:''}
console.log("==================================",this.showPhone)
+ if(!item){
+ return
+ }
+ if(type == 0){
+ this.linkItem = {title:'鑱旂郴闂ㄥ簵',linkname:item.depositShopName,linkphone:item.depositShopPhone}
+ }else if(type ==2){
+ this.linkItem = {title:'鑱旂郴楠戞墜',linkname:item.driverName,linkphone:item.driverPhone}
+ }else if(type ==1){
+ this.linkItem = {title:'鑱旂郴闂ㄥ簵',linkname:item.takeShopName,linkphone:item.takeShopPhone}
+ }
},
contactPhoneDo(){
if(this.linkItem.linkphone !=null && this.linkItem.linkphone!=''){
@@ -399,7 +501,7 @@
data: this.currentOrder.memberVerifyCode,
success: () => {
uni.showToast({
- title: '宸插鍒惰嚜鎻愮爜',
+ title: '宸插鍒舵牳閿�鐮�',
icon: 'none'
})
}
@@ -451,12 +553,13 @@
var that =this
let res ={};
res = await that.$u.api.myOrderPage({
- capacity:10,
- model: {
- combinedStatus: this.activeTab == -1?'':this.activeTab
- },
- page:this.currentPage
- });
+ capacity:10,
+ model: {
+ combinedStatus: this.activeTab == -1?'':this.activeTab,
+ keyword: this.keyword
+ },
+ page:this.currentPage
+ });
console.log(res)
if (res.code === 200 ) {
@@ -532,6 +635,38 @@
align-items: center;
justify-content: space-between;
box-sizing: border-box;
+ }
+
+ .top-search {
+ width: 100%;
+ height: 88rpx;
+ padding: 8rpx 30rpx;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ }
+
+ .searchbox {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ background: rgba(255,255,255,0.9);
+ border-radius: 16rpx;
+ overflow: hidden;
+ }
+
+ .search-input {
+ flex: 1;
+ height: 72rpx;
+ background: #F9F9FB;
+ border-radius: 16rpx;
+ border: 1rpx solid #EEEEEE;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #333333;
+ margin-left: 16rpx;
}
.header-title {
@@ -685,6 +820,7 @@
display: block;
white-space: nowrap;
overflow: hidden;
+ text-align: center;
text-overflow: ellipsis;
max-width: 100%;
}
@@ -799,14 +935,15 @@
color: #8C939F;
}
.price-line{
+ padding: 0 30rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
}
.amount-area {
width: 50%;
- padding: 0 30rpx;
- box-sizing: border-box;
+ // padding: 0 30rpx;
+ // box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: flex-end;
@@ -923,7 +1060,22 @@
opacity: 0;
}
}
-
+ .item-form-list {
+ max-width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ gap: 20rpx;
+ .item-form-list-row {
+ border-radius: 8rpx;
+ overflow: hidden;
+ image {
+ width: 130rpx;
+ max-height: 150rpx;
+ }
+ }
+ }
.qrcode-image {
width: 100%;
height: 100%;
--
Gitblit v1.9.3