From 908b9876dde97acbb09c53dc6debe3eecbb9d1b4 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 28 四月 2026 22:10:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/luggage-storage/luggage-storage.vue |  483 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 395 insertions(+), 88 deletions(-)

diff --git a/small-program/pages/luggage-storage/luggage-storage.vue b/small-program/pages/luggage-storage/luggage-storage.vue
index 101c289..26fb854 100644
--- a/small-program/pages/luggage-storage/luggage-storage.vue
+++ b/small-program/pages/luggage-storage/luggage-storage.vue
@@ -16,12 +16,12 @@
 
 		<scroll-view scroll-y class="page-scroll">
 			<view class="page-content">
-				<view v-if="activeMode === 'local'" class="service-point-card cell-card" @click="openStorePopup">
+				<view v-if="activeMode === 'local'" class="service-point-card cell-card" @click="openStorePopup0">
 					<view class="cell-left with-icon">
 							<image class="cell-icon" src="/static/icon/ic_store@2x.png" mode="widthFix"></image>
 							<view class="store-cell-copy">
 								<text class="cell-title">{{ selectedStore ? selectedStore.name : servicePointPlaceholder }}</text>
-								<view class="store-cell-copy-addr" v-if="selectedStore">
+								<view class="store-cell-copy-addr1" v-if="selectedStore">
 									<image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
 									<text class="store-cell-subtitle">{{ selectedStore.address }}</text>
 								</view>
@@ -33,22 +33,43 @@
 				</view>
 
 				<view v-else class="address-card section-card">
-					<view class="address-row" @tap="openStorePopup">
+					<view class="address-row" @click="openStorePopup">
 						<view class="address-left">
 							<view class="address-badge send">瀵�</view>
 							<view class="address-copy">
-								<text class="address-title">瀵勪欢鍦板潃</text>
-								<text class="address-desc">璇烽�夋嫨瀵勪欢鏈嶅姟鐐�</text>
+								<text class="address-title" v-if="!sendStore">瀵勪欢鍦板潃</text>
+								<text class="address-desc" v-if="!sendStore">璇烽�夋嫨瀵勪欢鏈嶅姟鐐�</text>
+								<view v-if="sendStore" class="store-cell-copy-addr">
+									<text class="store-cell-title">{{ sendStore.name }}</text>
+									<view class="store-cell-subtitle-container">
+										<image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
+										<text class="store-cell-subtitle">{{ sendStore.address }}</text>
+									</view>
+								</view>
 							</view>
 						</view>
 						<u-icon name="arrow-right" size="20" color="#222222"></u-icon>
 					</view>
-					<view class="address-row no-border" @tap="openReceiveAddress">
+					<view class="address-row no-border" @click="openReceiveAddress">
 						<view class="address-left">
 							<view class="address-badge receive">鏀�</view>
 							<view class="address-copy">
-								<text class="address-title">鍙栦欢鍦板潃</text>
-								<text class="address-desc">璇烽�夋嫨鍙栦欢鏈嶅姟鐐规垨鑰呭叾浠栧湴鍧�</text>
+								<text class="address-title" v-if="!receiveStore && !receiveAddr">鍙栦欢鍦板潃</text>
+								<text class="address-desc" v-if="!receiveStore && !receiveAddr">璇烽�夋嫨鍙栦欢鏈嶅姟鐐规垨鑰呭叾浠栧湴鍧�</text>
+								<view v-if="receiveStore" class="store-cell-copy-addr">
+									<text class="store-cell-title">{{ receiveStore.name }}</text>
+									<view class="store-cell-subtitle-container">
+										<image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
+										<text class="store-cell-subtitle">{{ receiveStore.address }}</text>
+									</view>
+								</view>
+								<view v-if="receiveAddr" class="store-cell-copy-addr">
+									<text class="store-cell-title">{{ receiveAddr.name }}</text>
+									<view class="store-cell-subtitle-container">
+										<image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
+										<text class="store-cell-subtitle">{{ receiveAddr.addr }}</text>
+									</view>
+								</view>
 							</view>
 						</view>
 						<u-icon name="arrow-right" size="20" color="#222222"></u-icon>
@@ -112,7 +133,7 @@
 							<text class="section-title">瀵勫瓨琛屾潕绫诲瀷</text>
 							<text class="section-desc">锛堝閫夛紝蹇呭~锛�</text>
 						</view>
-						<view class="price-note">
+						<view class="price-note"  @click="goRichText(9)">
 							<image class="price-note-icon" src="/static/icon/ic_tips@2x.png" mode="widthFix"></image>
 							<text>浠锋牸璇存槑</text>
 						</view>
@@ -124,15 +145,17 @@
 						:class="{ active: item.count > 0 }"
 					>
 						<view class="luggage-info">
-							<image class="luggage-image" :src="item.iconFull" mode="widthFix"></image>
+							<view class="luggage-image">
+								<image style="height: 100%;"  :src="item.iconFull" mode="heightFix"></image>
+							</view>
 							<view class="luggage-copy">
 								<text class="luggage-name">{{ item.name }}</text>
-								<text class="luggage-size">{{ item.otherField || '' }}</text>
+								<text class="luggage-size">{{ item.remark || '' }}</text>
 							</view>
 						</view>
 						<view class="luggage-stepper">
 							<image class="step-btn" src="/static/icon/ic_jian@2x.png" mode="widthFix" @click="decreaseCount(index)"></image>
-							<text class="step-count">{{ item.count }}</text>
+							<text class="step-count">{{ item.count || 0}}</text>
 							<image class="step-btn" src="/static/icon/ic_jia@2x.png" mode="widthFix" @click="increaseCount(index)"></image>
 						</view>
 					</view>
@@ -159,7 +182,7 @@
 					</view>
 				</view>
 
-				<view v-if="activeMode === 'city'" class="section-card service-time-card">
+				<view v-if="activeMode === 'city' && amountData" class="section-card service-time-card">
 					<view class="section-head">
 						<text class="section-title">鏈嶅姟鏃舵晥</text>
 						<text class="section-desc">锛堝繀閫夛級</text>
@@ -168,14 +191,14 @@
 						v-for="item in serviceTimes"
 						:key="item.id"
 						class="service-time-item"
-						:class="{ active: selectedServiceTime === item.id }"
-						@tap="selectedServiceTime = item.id"
+						:class="{ active: isUrgent === item.id }"
+						@tap="isUrgent = item.id"
 					>
 						<text class="service-time-name">
-							<text>鏍囬�熻揪</text>
-							<text>(棰勮6灏忔椂鍐呴�佽揪)</text>
+							<text>{{ item.name }}</text>
+							<text>(棰勮{{ item.serviceTime }}灏忔椂鍐呴�佽揪)</text>
 						</text>
-						<text class="service-time-price">{{ item.price }}</text>
+						<text class="service-time-price">锟{ item.price }}</text>
 					</view>
 				</view>
 
@@ -187,9 +210,13 @@
 							<text class="unit-text">鍏�</text>
 						</view>
 					</view>
-					<view v-if="insuranceFeeText" class="insurance-tip-row">
-						<text class="insurance-tip-label">鐗╁搧淇濊垂:</text>
-						<text class="insurance-tip-value">{{ insuranceFeeText }}</text>
+					<view v-if="amountData || showInsuranceTip" class="insurance-tip-row">
+						<text v-if="showInsuranceTip" class="insurance-tip-warning">{{ showInsuranceTipText }}</text>
+						<text v-else></text>
+						<view style="display: flex; align-items: center;">
+							<text v-if="amountData" class="insurance-tip-label">鐗╁搧淇濊垂:</text>
+							<text v-if="amountData" class="insurance-tip-value">锟{ amountData.insuranceFee }}</text>
+						</view>
 					</view>
 				</view>
 
@@ -206,7 +233,7 @@
 		<u-popup :show="showStorePopup" mode="bottom" round="24" :closeOnClickOverlay="true" @close="showStorePopup = false">
 			<view class="store-popup-wrap">
 				<view class="store-popup-head">
-					<text class="store-popup-title">閫夋嫨鏈嶅姟鐐�</text>
+					<text class="store-popup-title">{{ storePopupType === 'receive' ? '閫夋嫨鍙栦欢鏈嶅姟鐐�' : (activeMode === 'city' ? '閫夋嫨瀵勪欢鏈嶅姟鐐�' : '閫夋嫨鏈嶅姟鐐�') }}</text>
 					<view class="store-popup-close" @tap="showStorePopup = false">
 						<u-icon name="close" size="28" color="#999999"></u-icon>
 					</view>
@@ -224,7 +251,7 @@
 							@click="storeList.forEach((row,i) => row.active = index === i)"
 						>
 						<view class="store-option-main">
-							<image class="store-thumb" src="" mode="aspectFill"></image>
+							<image class="store-thumb" :src="item.coverImg || '/static/icon/default2.png'" mode="aspectFill"></image>
 							<view class="store-option-copy">
 								<view class="store-option-head">
 									<text class="store-option-name">{{ item.name }}</text>
@@ -234,7 +261,7 @@
 									<image class="store-option-address-icon" src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
 									<text class="store-option-address">{{ item.address }}</text>
 								</view>
-								<text class="store-option-time">{{ item.time }}</text>
+								<text class="store-option-time">{{ item.shopHours || '' }}</text>
 							</view>
 						</view>
 						<view v-if="tempSelectedStoreId === item.id" class="store-check">
@@ -259,23 +286,26 @@
 						<text class="goods-main-title">鐗╁搧鍚嶇О</text>
 						<text class="goods-main-required">锛堝繀閫夛級</text>
 					</view>
-					<view class="goods-danger-tip">
+					<view class="goods-danger-tip"  @click="goRichText(10)">
 						<image class="goods-danger-icon" src="/static/icon/ic_tips@2x.png" mode="widthFix"></image>
 						<text>绂佸瘎鐗╁搧</text>
 					</view>
 				</view>
 				<text class="goods-popup-desc">涓虹‘淇濈墿鍝佸瘎閫掑畨鍏紝璇锋鏌ユ槸鍚︿笉澶瑰甫鏄撶噧鏄撶垎鐗╁搧</text>
-				<view class="goods-tag-grid">
-					<view
-						v-for="(item, index) in goodsOptions"
-						:key="index"
-						class="goods-tag"
-						:class="{ active: item.active }"
-						@click="goodsOptions.forEach((row,i) => row.active = i === index)"
-					>
-						<text>{{ item.name }}</text>
+				<view style="display: block;height: 500rpx;overflow-y: auto;margin-top:10px ;">
+					<view class="goods-tag-grid">
+						<view
+							v-for="(item, index) in goodsOptions"
+							:key="index"
+							class="goods-tag"
+							:class="{ active: item.active }"
+							@click="goodsOptions.forEach((row,i) => row.active = i === index)"
+						>
+							<text>{{ item.name }}</text>
+						</view>
 					</view>
-				</view>
+				</view> 
+				
 				<view class="goods-save-btn" @tap="confirmGoods">淇濆瓨</view>
 			</view>
 		</u-popup>
@@ -296,20 +326,34 @@
 						</view>
 						<text class="amount-row-value">{{ '锟�' + item.unitPrice }}</text>
 					</view>
+					<view v-if="activeMode === 'city' && amountData.distance" class="amount-row amount-row-extra">
+						<view class="amount-row-left">
+							<text class="amount-row-label">閰嶉�侀噷绋�</text>
+						</view>
+						<text class="amount-row-value">{{ amountData.distance + 'km' }}</text>
+					</view>
+					<view v-if="amountData.insuranceFee" class="amount-row amount-row-extra">
+						<view class="amount-row-left">
+							<text class="amount-row-label">琛屾潕淇濅环</text>
+						</view>
+						<text class="amount-row-value">{{ '锟�' + amountData.insuranceFee }}</text>
+					</view>
 				</view>
-				<view class="agreement-bar popup-agreement-bar">
-					<image class="agreement-icon" src="/static/icon/ic_accept_sel@2x.png" mode="widthFix"></image>
+				<view class="agreement-bar popup-agreement-bar" @click="toggleAgreement">
+					<image class="agreement-icon" :src="agreementChecked ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="widthFix" />
 					<text class="agreement-text">鎴戝凡闃呰骞跺悓鎰�</text>
-					<text class="agreement-link">銆婄敤鎴锋湇鍔″崗璁��</text>
+					<text class="agreement-link" @tap="goRichText(0)">銆婄敤鎴锋湇鍔″崗璁��</text>
 					<text class="agreement-text">鍙�</text>
-					<text class="agreement-link">銆婇殣绉佹斂绛栥��</text>
+					<text class="agreement-link" @tap="goRichText(1)">銆婇殣绉佹斂绛栥��</text>
 				</view>
 				<view class="bottom-action-row popup-action-row">
 					<view class="total-wrap">
 						<text class="total-label">鎬昏垂鐢�</text>
 						<text class="total-price">{{ amountData ? '锟�' + amountData.totalPrice : '锟�--' }}</text>
-						<text class="detail-text">鏄庣粏</text>
-						<u-icon name="arrow-up" size="13" color="#7B7F86"></u-icon>
+						<view style="display: flex; align-items: center;" @click="showAmountPopup = false">
+							<text class="detail-text">鏄庣粏</text>
+							<u-icon name="arrow-up" size="13" color="#7B7F86"></u-icon>
+						</view>
 					</view>
 					<view class="submit-btn active-submit-btn" @click="createOrder">绔嬪嵆涓嬪崟</view>
 				</view>
@@ -317,23 +361,34 @@
 		</u-popup>
 
 		<view class="bottom-bar">
-			<view class="agreement-bar">
-				<image class="agreement-icon" :src="agreementChecked ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="widthFix"></image>
+			<view class="agreement-bar" @click="toggleAgreement">
+				<image class="agreement-icon" :src="agreementChecked ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="widthFix" />
 				<text class="agreement-text">鎴戝凡闃呰骞跺悓鎰�</text>
-				<text class="agreement-link">銆婄敤鎴锋湇鍔″崗璁��</text>
+				<text class="agreement-link" @click="goRichText(0)">銆婄敤鎴锋湇鍔″崗璁��</text>
 				<text class="agreement-text">鍙�</text>
-				<text class="agreement-link">銆婇殣绉佹斂绛栥��</text>
+				<text class="agreement-link" @click="goRichText(1)">銆婇殣绉佹斂绛栥��</text>
 			</view>
 			<view class="bottom-action-row">
 				<view class="total-wrap">
 					<text class="total-label">鎬昏垂鐢�</text>
 					<text class="total-price">{{ amountData ? '锟�' + amountData.totalPrice : '锟�--' }}</text>
-					<text class="detail-text detail-click" @tap.stop="openAmountPopup">鏄庣粏</text>
-					<u-icon name="arrow-down" size="18" color="#999999"></u-icon>
+					<template v-if="amountData">
+						<text class="detail-text detail-click" @tap.stop="openAmountPopup">鏄庣粏</text>
+						<u-icon name="arrow-down" size="18" color="#999999"></u-icon>
+					</template>
 				</view>
 				<view class="submit-btn active-submit-btn" @click="createOrder">绔嬪嵆涓嬪崟</view>
 			</view>
 		</view>
+		
+		<!-- 閫夋嫨鏈嶅姟鐐�/鍦板潃 -->
+		<u-action-sheet
+			:show="showReceiveAddress"
+			@close="showReceiveAddress = false"
+			@select="caozuo"
+			:actions="actions"
+			:round="15"
+			cancelText="鍙栨秷" />
 	</view>
 </template>
 
@@ -354,13 +409,13 @@
 					{ label: '灏卞湴瀵勫瓨', value: 'local' },
 					{ label: '鍚屽煄瀵勯��', value: 'city' }
 				],
-				agreementChecked: true,
+				agreementChecked: false,
 				tempSelectedStoreId: 2,
 				selectedStoreId: 2,
 				tempSelectedGoodsIds: [1],
 				selectedGoodsIds: [1],
 				selectedLuggageId: 1,
-				selectedServiceTime: 1,
+				isUrgent: 0,
 				form: {
 					receiver: '',
 					mobile: '',
@@ -373,14 +428,17 @@
 					goodsImages: [],
 				},
 				amountData: null,
+				showInsuranceTip: false,
+				showInsuranceTipText: '',
 				luggageTypes: [],
-				serviceTimes: [
-					{ id: 1, name: '鏍囧噯杈�(棰勮6灏忔椂鍐呴�佽揪)', price: '锟�50' },
-					{ id: 2, name: '鎬ラ�熻揪(棰勮4灏忔椂鍐呴�佽揪)', price: '锟�70' }
-				],
+				serviceTimes: [],
 
 				storeList: [],
 				selectedStore: null,
+				sendStore: null,
+				receiveStore: null,
+				receiveAddr: null,
+				storePopupType: 'send',
 				storeForm: {
 					keyword: '',
 					page: 1,
@@ -388,13 +446,26 @@
 				},
 
 				goodsOptions: [],
-				uploadedImages: []
+				uploadedImages: [],
+
+				showReceiveAddress: false,
+				actions: [
+					{ name: '閫夋嫨鏈嶅姟鐐�' },
+					{ name: '閫夋嫨鍦板潃绨�' }
+				]
 			}
 		},
 		watch: {
 			'form.insurance': {
 				handler() {
 					this.calculateLocalPrice()
+				}
+			},
+			isUrgent: {
+				handler() {
+					if (this.activeMode === 'city') {
+						this.calculateRemotePrice()
+					}
 				}
 			}
 		},
@@ -412,12 +483,6 @@
 					.map(item => item.name)
 				return labels.join('銆�')
 			},
-			insuranceFeeText() {
-				if (!this.form.insurance) {
-					return ''
-				}
-				return '+10'
-			},
 			totalPriceText() {
 				return '锟�150.00'
 			}
@@ -426,8 +491,27 @@
 			this.getNearbyShopList()
 			this.getCategoryList()
 			this.getCitySizeList()
+			this.agreementChecked=false
+			uni.$on('updateAddress', (data) => {
+				console.log(data)
+				this.receiveAddr = data
+			})
 		},
 		methods: {
+			caozuo(e) {
+				var that = this;
+				if (e.name === '閫夋嫨鏈嶅姟鐐�') {
+					that.storePopupType = 'receive'
+					that.receiveStore = null
+					that.showStorePopup = true
+				} else if (e.name === '閫夋嫨鍦板潃绨�') {
+					that.receiveAddr = null
+					uni.navigateTo({
+						url: '/pages/address/address?type=1'
+					})
+				}
+				that.showReceiveAddress = false
+			},
 			async uploadFiles(filePaths, maxCount = 9) {
 				if (!filePaths || filePaths.length === 0) {
 					return []
@@ -497,9 +581,10 @@
 						})
 						try {
 							const uploadResults = await this.uploadFiles(tempFilePaths, maxCount)
+							const addrs = uploadResults.map(item => item.imgaddr)
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedImages = [...this.uploadedImages, ...fullPaths.map(url => ({ url }))]
-							this.form.goodsImages = [...this.form.goodsImages, ...fullPaths]
+							this.form.goodsImages = [...this.form.goodsImages, ...addrs]
 							uni.hideLoading()
 							uni.showToast({
 								title: '涓婁紶鎴愬姛',
@@ -519,28 +604,75 @@
 			},
 			switchMode(mode) {
 				this.activeMode = mode
+				this.selectedStore = null
+				this.sendStore = null
+				this.receiveStore = null
+				this.receiveAddr = null
+				this.form.receiver = ''
+				this.form.mobile = ''
+				this.form.arriveTime = ''
+				this.form.pickupTime = ''
+				this.form.goodType = ''
+				this.form.goodTypeName = ''
+				this.form.insurance = ''
+				this.form.remark = ''
+				this.form.goodsImages = []
+				this.amountData = null
+				this.uploadedImages = []
+				this.luggageTypes.forEach(item => {
+					item.count = 0
+				})
+			},
+			toggleAgreement() {
+				this.agreementChecked = !this.agreementChecked
+			},
+			goRichText(type) {
+				uni.navigateTo({
+					url: '/pages/rich-text/rich-text?type=' + type
+				})
 			},
 			openReceiveAddress() {
-				uni.showToast({
-					title: '鍙栦欢鍦板潃寰呮帴鍏�',
-					icon: 'none'
-				})
+				this.showReceiveAddress = true
 			},
 			openAmountPopup() {
 				this.showAmountPopup = true
 			},
 			openStorePopup() {
+				this.storePopupType = 'send'
+				this.tempSelectedStoreId = null
+				this.showStorePopup = true
+			},
+			openStorePopup0() {
+				this.storePopupType = 'send0'
 				this.tempSelectedStoreId = null
 				this.showStorePopup = true
 			},
 			confirmStore() {
-				this.selectedStore = this.storeList.find(item => item.active)
+				
+				console.log("=========================")
+				const selected = this.storeList.find(item => item.active)
+				console.log(selected)
+				if (this.storePopupType === 'send') {
+					this.sendStore = selected
+				} else if (this.storePopupType === 'receive') {
+					this.receiveStore = selected
+					this.receiveAddr = null
+					this.calculateRemotePrice()
+				} else {
+					this.selectedStore = selected
+					this.calculateLocalPrice()
+				}
 				this.showStorePopup = false
-				this.calculateLocalPrice()
 			},
 			confirmGoods() {
+				if (!this.goodsOptions.find(item => item.active)) {
+					uni.showToast({ title: '璇烽�夋嫨鐗╁搧淇℃伅', icon: 'none' })
+					return
+				}
 				this.form.goodTypeName = this.goodsOptions.find(item => item.active)?.name || ''
 				this.form.goodType = this.goodsOptions.find(item => item.active)?.id || ''
+				this.showInsuranceTip = this.goodsOptions.find(item => item.active)?.relationOtherField === '1'
+				this.showInsuranceTipText = this.goodsOptions.find(item => item.active)?.relationRemark
 				this.showGoodsPopup = false
 			},
 			confirmArriveTime(e) {
@@ -561,7 +693,12 @@
 				const day = String(date.getDate()).padStart(2, '0')
 				const hour = String(date.getHours()).padStart(2, '0')
 				const minute = String(date.getMinutes()).padStart(2, '0')
-				this.form.pickupTime = `${year}-${month}-${day} ${hour}:${minute}`
+				const pickupTime = `${year}-${month}-${day} ${hour}:${minute}`
+				if (this.form.arriveTime && new Date(pickupTime) <= new Date(this.form.arriveTime)) {
+					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬棰勮鍒板簵鏃堕棿', icon: 'none' })
+					return
+				}
+				this.form.pickupTime = pickupTime
 				this.showPickupTimePicker = false
 				this.calculateLocalPrice()
 			},
@@ -593,6 +730,7 @@
 						latitude: this.latitude,
 						longitude: this.longitude,
 						cityId: this.cityId,
+						name:this.storeForm.keyword,
 						sortType: 1
 					}
 				})
@@ -616,6 +754,13 @@
 				this.calculateLocalPrice()
 			},
 			async calculateLocalPrice() {
+				if (this.activeMode === 'city') {
+					this.calculateRemotePrice()
+				} else {
+					this.calculateLocalPriceOnly()
+				}
+			},
+			async calculateLocalPriceOnly() {
 				if (!this.selectedStore || !this.form.arriveTime || !this.form.pickupTime) {
 					return
 				}
@@ -641,12 +786,94 @@
 						item.unitPrice = item.unitPrice / 100
 					})
 					res.data.totalPrice = res.data.totalPrice / 100
+					res.data.insuranceFee = res.data.insuranceFee / 100
+					this.amountData = res.data
+				}
+			},
+			async calculateRemotePrice() {
+				if (!this.sendStore || !this.form.arriveTime || !this.form.pickupTime) {
+					return
+				}
+				if (!this.receiveStore && !this.receiveAddr) {
+					return
+				}
+				const luggageList = this.luggageTypes
+					.filter(item => item.count > 0)
+					.map(item => ({
+						categoryId: item.id,
+						quantity: item.count
+					}))
+				if (luggageList.length === 0) {
+					return
+				}
+				let fromLat = ''
+				let fromLgt = ''
+				let toLat = ''
+				let toLgt = ''
+				if (this.sendStore) {
+					fromLat = this.sendStore.latitude
+					fromLgt = this.sendStore.longitude
+				}
+				if (this.receiveStore) {
+					toLat = this.receiveStore.latitude
+					toLgt = this.receiveStore.longitude
+				} else if (this.receiveAddr) {
+					toLat = this.receiveAddr.latitude
+					toLgt = this.receiveAddr.longitude
+				}
+				const res = await this.$u.api.calculateRemotePrice({
+					cityId: this.cityId,
+					fromLat: fromLat,
+					fromLgt: fromLgt,
+					toLat: toLat,
+					toLgt: toLgt,
+					urgent: this.isUrgent,
+					depositStartTime: this.form.arriveTime + ':00',
+					depositEndTime: this.form.pickupTime + ':00',
+					items: luggageList,
+					declaredAmount: this.form.insurance || 0
+				})
+				if (res.code === 200) {
+					res.data.itemList.forEach(item => {
+						item.unitPrice = item.unitPrice / 100
+					})
+					res.data.totalPrice = res.data.totalPrice / 100
+					res.data.insuranceFee = res.data.insuranceFee / 100
+					this.serviceTimes = [
+						{ id: 0, name: '鏍囧噯杈�', serviceTime: res.data.standardHours, price: res.data.itemPrice / 100 },
+						{ id: 1, name: '鎬ラ�熻揪', serviceTime: res.data.urgentHours, price: (res.data.urgentFee + res.data.itemPrice) / 100 }
+					]
 					this.amountData = res.data
 				}
 			},
 			async createOrder() {
-				if (!this.selectedStore) {
-					uni.showToast({ title: '璇烽�夋嫨闂ㄥ簵', icon: 'none' })
+				if (this.activeMode === 'local') {
+					if (!this.selectedStore) {
+						uni.showToast({ title: '璇烽�夋嫨闂ㄥ簵', icon: 'none' })
+						return
+					}
+				} else {
+					if (!this.sendStore) {
+						uni.showToast({ title: '璇烽�夋嫨瀵勪欢鏈嶅姟鐐�', icon: 'none' })
+						return
+					}
+					if (!this.receiveStore && !this.receiveAddr) {
+						uni.showToast({ title: '璇烽�夋嫨鍙栦欢鍦板潃', icon: 'none' })
+						return
+					}
+				}
+				if (!this.form.receiver) {
+					uni.showToast({ title: '璇疯緭鍏ユ敹浠朵汉濮撳悕', icon: 'none' })
+					return
+				}
+				if (!this.form.mobile) {
+					uni.showToast({ title: '璇疯緭鍏ユ敹浠朵汉鐢佃瘽', icon: 'none' })
+					return
+				}
+				const mobileRegex = /^1\d{10}$/
+				const landlineRegex = /^\d{3,4}-?\d{7,8}$/
+				if (!mobileRegex.test(this.form.mobile) && !landlineRegex.test(this.form.mobile)) {
+					uni.showToast({ title: '璇疯緭鍏ユ纭殑鎵嬫満鍙锋垨鍥哄畾鐢佃瘽', icon: 'none' })
 					return
 				}
 				if (!this.form.arriveTime) {
@@ -655,6 +882,10 @@
 				}
 				if (!this.form.pickupTime) {
 					uni.showToast({ title: '璇烽�夋嫨棰勮鍙栦欢鏃堕棿', icon: 'none' })
+					return
+				}
+				if (new Date(this.form.pickupTime) <= new Date(this.form.arriveTime)) {
+					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬棰勮鍒板簵鏃堕棿', icon: 'none' })
 					return
 				}
 				const luggageList = this.luggageTypes
@@ -667,14 +898,33 @@
 					uni.showToast({ title: '璇烽�夋嫨琛屾潕绫诲瀷', icon: 'none' })
 					return
 				}
+				if (!this.form.goodType) {
+					uni.showToast({ title: '璇烽�夋嫨鐗╁搧淇℃伅', icon: 'none' })
+					return
+				}
+				if (!this.form.goodsImages ||!this.form.goodsImages.length) {
+					uni.showToast({ title: '璇蜂笂浼犵墿鍝佺収鐗�', icon: 'none' })
+					return
+				}
+				if (!this.form.goodsImages ||!this.form.goodsImages.length) {
+					uni.showToast({ title: '璇蜂笂浼犵墿鍝佺収鐗�', icon: 'none' })
+					return
+				}
+				if (this.form.insurance === '' || this.form.insurance <= 0) {
+					uni.showToast({ title: '璇疯緭鍏ヤ繚浠疯垂', icon: 'none' })
+					return
+				}
+				if (!this.agreementChecked) {
+					uni.showToast({ title: '璇峰厛闃呰骞跺悓鎰忕敤鎴锋湇鍔″崗璁強闅愮鏀跨瓥', icon: 'none' })
+					return
+				}
 				const items = luggageList.map(item => ({
 					categoryId: item.categoryId,
 					quantity: item.quantity
 				}))
-				const res = await this.$u.api.createOrder({
+				let orderParams = {
 					cityId: this.cityId,
 					declaredAmount: this.form.insurance || 0,
-					depositShopId: this.selectedStore.id,
 					expectedDepositTime: this.form.arriveTime + ':00',
 					expectedTakeTime: this.form.pickupTime + ':00',
 					goodType: this.form.goodType,
@@ -683,25 +933,47 @@
 					remark: this.form.remark,
 					takePhone: this.form.mobile,
 					takeUser: this.form.receiver,
-					type: this.activeMode === 'local' ? 0 : 1
-				})
+					type: this.activeMode === 'local' ? 0 : 1,
+					isUrgent: this.isUrgent
+				}
+				if (this.activeMode === 'local') {
+					orderParams.depositShopId = this.selectedStore.id
+				} else {
+					orderParams.depositShopId = this.sendStore.id
+					orderParams.fromShopId = this.sendStore.id
+					if (this.receiveStore) {
+						orderParams.toType = 0
+						orderParams.takeShopId = this.receiveStore.id
+						orderParams.takeLat = this.receiveStore.latitude
+						orderParams.takeLgt = this.receiveStore.longitude
+						orderParams.takeLocation = this.receiveStore.address
+					} else if (this.receiveAddr) {
+						orderParams.toType = 1
+						orderParams.toAddrId = this.receiveAddr.id
+						orderParams.takeLat = this.receiveAddr.latitude
+						orderParams.takeLgt = this.receiveAddr.longitude
+						orderParams.takeLocation = this.receiveAddr.addr
+					}
+				}
+				const res = await this.$u.api.createOrder(orderParams)
 				if (res.code === 200) {
-					uni.showToast({ title: '涓嬪崟鎴愬姛', icon: 'success' })
 					if (res.data) {
-						this.processPayment(res.data.response)
+						this.processPayment(res.data.response, res.data.orderId)
 					}
 				}
 			},
-			processPayment(paymentData) {
+			processPayment(paymentData, orderId) {
 				uni.requestPayment({
 					provider: 'wxpay',
 					timeStamp: paymentData.timeStamp || '',
 					nonceStr: paymentData.nonceStr || '',
-					package: paymentData.packageValue || '',
+					package: paymentData.package || '',
 					signType: paymentData.signType || 'MD5',
 					paySign: paymentData.paySign || '',
 					success: (res) => {
-						uni.showToast({ title: '鏀粯鎴愬姛', icon: 'success' })
+						uni.redirectTo({
+							url: '/pages/payment-success/payment-success?orderId=' + orderId
+						});
 					},
 					fail: (err) => {
 						if (err.errMsg.includes('cancel')) {
@@ -709,6 +981,11 @@
 						} else {
 							uni.showToast({ title: '鏀粯澶辫触', icon: 'none' })
 						}
+						uni.setStorageSync("orderStatus",-2)
+						uni.switchTab({
+							url: '/pages/itinerary/itinerary'
+						});
+						 
 					}
 				})
 			}
@@ -748,8 +1025,8 @@
 		position: relative;
 		width: 50%;
 		text-align: center;
-		font-size: 28rpx;
-		font-weight: 500;
+	    font-weight: 600;
+	    font-size: 32rpx;
 		color: #9097a3;
 	}
 
@@ -782,8 +1059,7 @@
 	.store-popup-wrap {
 		background: #ffffff;
 		border-radius: 24rpx 24rpx 0 0;
-		padding: 0 30rpx;
-		box-sizing: border-box;
+		padding: 0 30rpx 16rpx 30rpx;
 		box-sizing: border-box;
 	}
 
@@ -907,16 +1183,20 @@
 	.store-option-address-row {
 		margin-top: 8rpx;
 		display: flex;
-		align-items: center;
+		align-items: flex-start;
+		flex-wrap: wrap;
 	}
 
 	.store-option-address-icon {
+		flex-shrink: 0;
 		width: 24rpx;
 		height: 24rpx;
 		margin-right: 4rpx;
+		margin-top: 6rpx;
 	}
 
 	.store-option-address {
+		flex: 1;
 		font-size: 26rpx;
 		color: #9ea4af;
 	}
@@ -982,14 +1262,29 @@
 		flex-direction: column;
 		justify-content: center;
 	}
-	
-	.store-cell-copy-addr {
+
+	.store-cell-copy-addr1 {
 		display: flex;
 		align-items: baseline;
 		image {
 			width: 24rpx;
 			height: 24rpx;
 			margin-right: 4rpx;
+		}
+	}
+	
+	.store-cell-copy-addr {
+		display: flex;
+		flex-direction: column;
+		.store-cell-subtitle-container {
+			display: flex;
+			align-items: center;
+			image {
+				flex-shrink: 0;
+				width: 24rpx;
+				height: 24rpx;
+				margin-right: 4rpx;
+			}
 		}
 	}
 
@@ -1210,7 +1505,7 @@
 
 	.luggage-item {
 		display: flex;
-		align-items: baseline;
+		align-items: flex-end;
 		justify-content: space-between;
 		padding: 24rpx;
 		box-sizing: border-box;
@@ -1236,6 +1531,9 @@
 		height: 100rpx;
 		border-radius: 8rpx;
 		margin-right: 18rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
 		background: #f0f1f4;
 		overflow: hidden;
 		margin-right: 24rpx;
@@ -1481,6 +1779,9 @@
 		font-weight: 500;
 		color: #333333;
 		border: 2rpx solid transparent;
+	  white-space: nowrap; /* 闃叉鏂囨湰鎹㈣ */
+	  overflow: hidden; /* 闅愯棌婧㈠嚭鐨勫唴瀹� */
+	  text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙锋潵浠h〃琚慨鍓殑鏂囨湰 */
 		box-sizing: border-box;
 	}
 
@@ -1598,7 +1899,7 @@
 		padding-bottom: 14rpx;
 		display: flex;
 		align-items: center;
-		justify-content: flex-end;
+		justify-content: space-between;
 		font-size: 22rpx;
 	}
 
@@ -1606,6 +1907,12 @@
 		color: #999999;
 	}
 
+	.insurance-tip-warning {
+		color: #ff4d4f;
+		font-size: 22rpx;
+		font-weight: 400;
+	}
+
 	.insurance-tip-value {
 		margin-left: 8rpx;
 		color: #ff4d4f;

--
Gitblit v1.9.3