From 98f85329521b8554e6b71b4837e9a0fe6473dd75 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 21 四月 2026 16:00:05 +0800
Subject: [PATCH] 支付宝支付ddd

---
 small-program/pages/itinerary/itinerary.vue |  228 +++++++++++++++++++++++++++++++-------------------------
 1 files changed, 125 insertions(+), 103 deletions(-)

diff --git a/small-program/pages/itinerary/itinerary.vue b/small-program/pages/itinerary/itinerary.vue
index 3be32e9..2a7bdc6 100644
--- a/small-program/pages/itinerary/itinerary.vue
+++ b/small-program/pages/itinerary/itinerary.vue
@@ -25,73 +25,74 @@
 
 		<view class="content-wrap">
 			<view class="page-padding card-list">
-				<view v-for="(item, index) in visibleOrders" :key="item.id" class="order-card">
+				<view v-for="(item, index) in dataList" :key="item.id" class="order-card">
 					<view class="order-head" :class="item.mode === 'city' ? 'city-head-bg' : 'local-head-bg'">
-						<view v-if="item.mode === 'local'" class="head-local">
+						<view v-if="item.type === 0" class="head-local">
 							<view class="mode-tag local-tag">灏卞湴瀵勫瓨</view>
 							<view class="head-copy single-copy">
-								<text class="head-name text-ellipsis">{{ item.fromName }}</text>
-								<text class="head-user">{{ item.userName }}</text>
+								<text class="head-name text-ellipsis">{{ item.depositShopName||'' }}</text>
+								<text class="head-user">{{ item.takeUser ||'' }}</text>
 							</view>
 						</view>
 						<view v-else class="head-city">
 							<view class="head-copy city-left">
 								<view class="mode-tag city-tag">鍚屽煄瀵勯��</view>
-								<text class="head-name text-ellipsis">{{ item.fromName }}</text>
-								<text class="head-user">{{ item.userName }}</text>
+								<text class="head-name text-ellipsis">{{ item.depositShopName || '' }}</text>
+								<text class="head-user">{{ item.takeUser||'' }}</text>
 							</view>
 							<view class="city-arrow">
 								<view class="arrow-line"></view>
 								<view class="arrow-head"></view>
 							</view>
 							<view class="head-copy city-right align-right">
-								<text class="status-text" v-if="index === 1">{{ item.status }}</text>
-								<text class="head-name text-ellipsis">{{ item.toName }}</text>
-								<text class="head-user">{{ item.userName }}</text>
+								<text class="status-text">{{ item.statusName||'寰呭彂璐�' }}</text>
+								<text class="head-name text-ellipsis">{{ item.takeShopName||'瀵瑰瀵�' }}</text>
+								<text class="head-user">{{ item.takeUser||'' }}</text>
 							</view>
 						</view>
-						<text class="status-text" v-if="index === 0">{{ item.status }}</text>
 					</view>
 
-					<view class="goods-area">
-						<view v-for="goods in item.goods" :key="goods.name" class="goods-row">
+					<view class="goods-area" v-if="item.detailList">
+						<view v-for="goods in item.detailList " :key="goods.luggageName" class="goods-row">
 							<view class="goods-left">
-								<text class="goods-name">{{ goods.name }}</text>
-								<text class="goods-size">{{ goods.size }}</text>
+								<text class="goods-name">{{ goods.luggageName ||'' }}</text>
+								<text class="goods-size">{{ goods.luggageDetail || '' }}</text>
 							</view>
 							<view class="goods-right">
-								<text class="goods-price">{{ goods.price }}</text>
-								<text class="goods-count">x1</text>
+								<text class="goods-price">{{((goods.subtotal || 0)/100).toFixed(2) }}</text>
+								<text class="goods-count">x{{ goods.num || 1}}</text>
 							</view>
 						</view>
 					</view>
-
 					<view class="amount-area">
 						<view class="pay-row">
 							<text class="pay-label">瀹炰粯娆撅細</text>
-							<text class="pay-value">{{ item.payAmount }}</text>
+							<text class="pay-value">{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
 						</view>
 						<view class="insurance-row">
 							<text class="insurance-label">鍚鏉庝繚璐癸細</text>
-							<text class="insurance-value">{{ item.insurance }}</text>
+							<text class="insurance-value">{{((item.declaredFee || 0)/100).toFixed(2) }}</text>
 						</view>
 					</view>
 
 					<view class="card-footer">
-						<view class="pickup-wrap" v-if="item.pickupTime">
+						<view class="pickup-wrap" v-if="item.expectedTakeTime">
 							<text class="pickup-label">棰勮鍙栦欢鏃堕棿锛�</text>
-							<text class="pickup-value">{{ item.pickupTime }}</text>
+							<text class="pickup-value">{{ item.expectedTakeTime ||'' }}</text>
 						</view>
 						<view class="pickup-wrap" v-else></view>
 						<view class="footer-actions">
-							<view class="footer-btn contact-btn">鑱旂郴闂ㄥ簵</view>
-							<view class="footer-btn primary-btn">{{ item.actionText }}</view>
+<!-- 							<view class="footer-btn contact-btn">鑱旂郴闂ㄥ簵</view>
+ -->						<view class="footer-btn contact-btn" v-if="item.status ===0">鍙栨秷璁㈠崟</view>
+							<view class="footer-btn primary-btn" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+							<view class="footer-btn contact-btn" v-if="item.status ===1">鑱旂郴闂ㄥ簵</view>
+							<view class="footer-btn primary-btn" v-if="item.status ===1">鐢宠閫�娆�</view>
 						</view>
 					</view>
 				</view>
 
 				<view v-if="isLoadingMore" class="loading-text">鍔犺浇涓�...</view>
-				<view v-else-if="!hasMore && visibleOrders.length" class="loading-text">娌℃湁鏇村浜�</view>
+				<view v-else-if="!hasNext && dataList.length" class="loading-text">娌℃湁鏇村浜�</view>
 			</view>
 		</view>
 	</view>
@@ -99,100 +100,121 @@
 
 <script>
 	import { mapState } from 'vuex'
-
-	const baseOrders = [
-		{
-			id: 1,
-			mode: 'local',
-			status: '寰呮牳楠�',
-			statusKey: 'verify',
-			fromName: '涓搧蹇繍鍗楃珯鏃楄埌搴�',
-			userName: '钄″瓙鐟�',
-			goods: [
-				{ name: '澶т欢琛屾潕绠�', size: '24-28瀵�', price: '锟�35' },
-				{ name: '涓欢琛屾潕绠�', size: '24-28瀵�', price: '锟�35' },
-				{ name: '灏忎欢琛屾潕绠�', size: '24-28瀵�', price: '锟�35' }
-			],
-			payAmount: '楼125.00',
-			insurance: '楼20',
-			pickupTime: '2026-04-12 10:10',
-			actionText: '鐢宠閫�娆�'
-		},
-		{
-			id: 2,
-			mode: 'city',
-			status: '寰呮牳楠�',
-			statusKey: 'verify',
-			fromName: '涓搧蹇繍鍗楃珯鏃楄埌搴�',
-			toName: '涓芥灚閰掑簵34...',
-			userName: '钄″瓙鐟�',
-			goods: [
-				{ name: '澶т欢琛屾潕绠�', size: '24-28瀵�', price: '锟�35' },
-				{ name: '涓欢琛屾潕绠�', size: '24-28瀵�', price: '锟�35' }
-			],
-			payAmount: '楼90.00',
-			insurance: '楼20',
-			pickupTime: '',
-			actionText: '鐢宠閫�娆�'
-		}
-	]
-
 	export default {
-		onReachBottom() {
-			this.loadMore()
-		},
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight']),
-			filteredOrders() {
-				if (this.activeTab === 'all') {
-					return this.orders
-				}
-				return this.orders.filter(item => item.statusKey === this.activeTab)
-			},
-			visibleOrders() {
-				return this.filteredOrders.slice(0, this.pageSize)
-			},
-			hasMore() {
-				return this.pageSize < this.filteredOrders.length
-			}
+			...mapState(['navHeight', 'statusbarHeight'])
 		},
 		data() {
 			return {
-				activeTab: 'all',
-				pageSize: 4,
+				activeTab: -1,
+				pageSize: 10,
+				currentPage: 1,
+				total:0,
+				hasNext:true,
+				userType: 0,
 				isLoadingMore: false,
 				filterTabs: [
-					{ label: '鍏ㄩ儴', value: 'all' },
-					{ label: '寰呮敮浠�', value: 'pending' },
-					{ label: '寰呮牳楠�', value: 'verify' },
-					{ label: '寰呴厤閫�', value: 'delivery' },
-					{ label: '寰呮敹璐�', value: 'receive' },
-					{ label: '寰呮牳楠�', value: 'verify' },
-					{ label: '寰呴厤閫�', value: 'delivery' },
-					{ label: '寰呮敹璐�', value: 'receive' }
+					{ label: '鍏ㄩ儴'  ,value: -1},
+					{ label: '寰呮敮浠�',value: 0 },
+					{ label: '寰呮牳楠�', value: 1},
+					{ label: '寰呴厤閫�', value: 2 },
+					{ label: '寰呮敹璐�', value: 3},
+					{ label: '宸插畬鎴�', value: 4},
+					{ label: '宸查��娆�', value: 5}
 				],
-				orders: [
-					...baseOrders,
-					...baseOrders.map((item, index) => ({ ...item, id: item.id + (index + 1) * 10 })),
-					...baseOrders.map((item, index) => ({ ...item, id: item.id + (index + 1) * 20 }))
-				]
+				dataList: []
 			}
 		},
 		watch: {
 			activeTab() {
-				this.pageSize = 4
+			  this.getFirstPageData()
 			}
 		},
-		methods: {
-			loadMore() {
-				if (!this.hasMore || this.isLoadingMore) {
-					return
+		onLoad(options) {
+			console.log(options )
+			this.activeTab = -1
+			if (options.status) {
+				this.activeTab =  Number(options.status)
+			}
+			this.getFirstPageData()
+			var that =this
+			uni.$on('updateOrder',function(data){
+				console.log('鐩戝惉鍒颁簨浠舵潵鑷� update 锛屾惡甯﹀弬鏁� msg 涓猴細' ,data);
+				if(data.delete == 1){
+					//鍒犻櫎璁㈠崟锛屽己鍒跺埛鏂版暟鎹�
+					that.getFirstPageData()
+				}else if(data.info!=null && data.info.orderId!=null){
+					  console.log('鐩戝惉鍒颁簨浠舵潵鑷� update 01锛�' ,data);
+					that.dataList.forEach((item,index)=>{
+						if(item.id==data.info.orderId){
+							 console.log('鐩戝惉鍒颁簨浠舵潵鑷� update 02锛�' ,data);
+							item.status = data.info.orderStatus
+						}
+					}) 
 				}
-				this.isLoadingMore = true
-				setTimeout(() => {
-					this.pageSize += 2
-					this.isLoadingMore = false
-				}, 300)
+				
+			 })
+		},
+		onShow() {
+			// this.showDone=false
+			// this.showCancel=false
+			// this.showDelete=false
+			// this.showQrcode=false
+			// this.showPay=false
+			// this.showPhone=false
+			this.loading=false,
+			this.currentOrder=null
+		},
+		onReachBottom(){
+			this.getDataList();
+		},
+		methods: {
+			getFirstPageData(){
+				this.currentPage = 0
+				this.hasNext=true
+				this.total=0
+				this.dataList=[]
+				this.getDataList()
+			},
+			async getDataList(){
+					if(this.loading || !this.hasNext){
+						return
+					}
+					this.loading=true
+					this.currentPage =   this.currentPage+1
+					if(this.currentPage == 1){
+						this.hasNext =true
+						this.dataList=[]
+					}
+					var that =this 
+					let res ={};
+					res = await that.$u.api.myOrderPage({
+							capacity:10,
+							model: {
+								combinedStatus: this.activeTab == -1?'':this.activeTab
+							},
+							page:this.currentPage
+						});
+					 
+					console.log(res)
+					if (res.code === 200 ) { 
+						if ( res.data && res.data.page ===this.currentPage) { 
+							res.data.records = res.data.records||[]
+							 that.dataList.push(...res.data.records)
+							 that.total=res.data.total
+							 if( this.currentPage >= res.data.pageCount||0){
+								 that.hasNext=false
+							 }else{
+								 that.hasNext=true
+							 }
+						}
+					} 
+					this.loading=false
+			},
+			jumpOrderDetail(id){
+				uni.navigateTo({
+					url:'/pages/details-entry/details-entry?userType='+this.userType+'&id='+id
+				})
 			}
 		}
 	}

--
Gitblit v1.9.3