From 8a899e63502939dbf034b90ba46741e0faa9023c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 08 五月 2026 18:49:32 +0800
Subject: [PATCH] 管理端bug修改

---
 small-program/pages/luggage-storage/luggage-storage.vue |   76 ++++++++++++++++++++++++++-----------
 1 files changed, 53 insertions(+), 23 deletions(-)

diff --git a/small-program/pages/luggage-storage/luggage-storage.vue b/small-program/pages/luggage-storage/luggage-storage.vue
index f56b395..55bc07d 100644
--- a/small-program/pages/luggage-storage/luggage-storage.vue
+++ b/small-program/pages/luggage-storage/luggage-storage.vue
@@ -64,11 +64,7 @@
 									</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>
+									<text class="store-cell-title">{{ receiveAddr.addr }}</text>
 								</view>
 							</view>
 						</view>
@@ -90,7 +86,7 @@
 						<input v-model="form.mobile" class="form-input" :class="{ 'filled-input': form.mobile }" type="number" placeholder="璇疯緭鍏ユ敹浠朵汉鐢佃瘽" placeholder-style="color: #B2B2B2;" />
 					</view>
 					<view class="form-row dashed-row">
-						<text class="form-label">棰勮鍒板簵鏃堕棿</text>
+						<text class="form-label">鍒板簵瀵勫瓨鏃堕棿</text>
 						<view class="row-picker" @click="showArriveTimePicker = true">
 							<text :class="form.arriveTime ? 'picker-value-text' : 'placeholder-text'">{{ form.arriveTime || '璇烽�夋嫨' }}</text>
 							<u-icon name="arrow-right" size="18" color="#222222"></u-icon>
@@ -98,7 +94,7 @@
 					</view>
 					<view class="form-row no-border">
 						<text class="form-label">棰勮鍙栦欢鏃堕棿</text>
-						<view class="row-picker" @click="showPickupTimePicker = true">
+						<view class="row-picker" @click="openPickupTimePicker">
 							<text :class="form.pickupTime ? 'picker-value-text' : 'placeholder-text'">{{ form.pickupTime || '璇烽�夋嫨' }}</text>
 							<u-icon name="arrow-right" size="18" color="#222222"></u-icon>
 						</view>
@@ -108,9 +104,10 @@
 					:show="showArriveTimePicker"
 					v-model="arriveTimeValue"
 					mode="datetime"
+					:minDate="Date.now()"
 					confirmText="纭畾"
 					cancelText="鍙栨秷"
-					title="閫夋嫨棰勮鍒板簵鏃堕棿"
+					title="閫夋嫨鍒板簵瀵勫瓨鏃堕棿"
 					@confirm="confirmArriveTime"
 					@cancel="showArriveTimePicker = false"
 					@close="showArriveTimePicker = false"
@@ -119,6 +116,7 @@
 					:show="showPickupTimePicker"
 					v-model="pickupTimeValue"
 					mode="datetime"
+					:minDate="pickupMinDate"
 					confirmText="纭畾"
 					cancelText="鍙栨秷"
 					title="閫夋嫨棰勮鍙栦欢鏃堕棿"
@@ -167,7 +165,7 @@
 							<text class="section-title">鐗╁搧淇℃伅</text>
 						</view>
 						<view class="required-wrap">
-							<text class="section-required goods-required-text" :style="{ color: form.goodTypeName ? '#111111' : '#B2B2B2' }">{{ form.goodTypeName || '蹇呴�夛紝璇烽�夋嫨' }}</text>
+							<text class="section-required goods-required-text" :style="{ color: form.goodTypeName ? '#111111' : 'red' }">{{ form.goodTypeName || '蹇呴�夛紝璇烽�夋嫨' }}</text>
 							<u-icon name="arrow-right" size="12" color="#A8AFBA"></u-icon>
 						</view>
 					</view>
@@ -175,9 +173,9 @@
 						<view class="upload-box" @click="chooseAndUploadImage(9)">
 							<image class="upload-icon" src="/static/image/btn_upload@2x.png" mode="widthFix"></image>
 						</view>
-						<view v-for="(item, index) in uploadedImages" :key="index" class="uploaded-box" @click="deleteImage(index)">
+						<view v-for="(item, index) in uploadedImages" :key="index" class="uploaded-box">
 							<image class="uploaded-image" :src="item.url" mode="aspectFill"></image>
-							<text class="uploaded-delete" @click="deleteImage(index)">鍒犻櫎</text>
+							<text class="uploaded-delete" @click.stop="deleteImage(index)">鍒犻櫎</text>
 						</view>
 					</view>
 				</view>
@@ -491,6 +489,12 @@
 			},
 			totalPriceText() {
 				return '锟�150.00'
+			},
+			pickupMinDate() {
+				if (this.form.arriveTime) {
+					return new Date(this.form.arriveTime).getTime()
+				}
+				return Date.now()
 			}
 		},
 		onLoad() {
@@ -498,25 +502,34 @@
 			this.getCategoryList()
 			this.getCitySizeList()
 			this.agreementChecked=false
+			this.getContactInfo()
+			
+			if (uni.getStorageSync('selectedStore')) {
+				this.selectedStore = uni.getStorageSync('selectedStore')
+				uni.removeStorageSync('selectedStore')
+			}
+
 			uni.$on('updateAddress', (data) => {
-				console.log(data)
+				this.form.receiver = data.name
+				this.form.mobile = data.phone
 				this.receiveAddr = data
+				this.receiveAddr.addr = data.provinceName + data.cityName + data.districtName + data.addr
 			})
 		},
 		methods: {
 			caozuo(e) {
 				var that = this;
+				this.receiveStore = null
+				this.receiveAddr = null
 				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
+				this.showReceiveAddress = false
 			},
 			async uploadFiles(filePaths, maxCount = 9) {
 				if (!filePaths || filePaths.length === 0) {
@@ -689,8 +702,17 @@
 				const hour = String(date.getHours()).padStart(2, '0')
 				const minute = String(date.getMinutes()).padStart(2, '0')
 				this.form.arriveTime = `${year}-${month}-${day} ${hour}:${minute}`
+				this.form.pickupTime = ''
+				this.pickupTimeValue = e.value + 3600000
 				this.showArriveTimePicker = false
 				this.calculateLocalPrice()
+			},
+			openPickupTimePicker() {
+				if (!this.form.arriveTime) {
+					uni.showToast({ title: '璇峰厛閫夋嫨鍒板簵瀵勫瓨鏃堕棿', icon: 'none' })
+					return
+				}
+				this.showPickupTimePicker = true
 			},
 			confirmPickupTime(e) {
 				const date = new Date(e.value)
@@ -701,7 +723,7 @@
 				const minute = String(date.getMinutes()).padStart(2, '0')
 				const pickupTime = `${year}-${month}-${day} ${hour}:${minute}`
 				if (this.form.arriveTime && new Date(pickupTime) <= new Date(this.form.arriveTime)) {
-					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬棰勮鍒板簵鏃堕棿', icon: 'none' })
+					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬鍒板簵瀵勫瓨鏃堕棿', icon: 'none' })
 					return
 				}
 				this.form.pickupTime = pickupTime
@@ -725,6 +747,17 @@
 						item.count = 0
 					})
 					this.luggageTypes = res.data || []
+				}
+			},
+			async getContactInfo() {
+				const res = await this.$u.api.getContactInfo({})
+				if (res.code === 200 && res.data) {
+					if (res.data.name) {
+						this.form.receiver = res.data.name
+					}
+					if (res.data.phone) {
+						this.form.mobile = res.data.phone
+					}
 				}
 			},
 			async getNearbyShopList() {
@@ -767,7 +800,7 @@
 				}
 			},
 			async calculateLocalPriceOnly() {
-				if (!this.selectedStore || !this.form.arriveTime || !this.form.pickupTime) {
+				if (!this.form.arriveTime || !this.form.pickupTime) {
 					this.amountData = null
 					return
 				}
@@ -783,7 +816,6 @@
 				}
 				const res = await this.$u.api.calculateLocalPrice({
 					cityId: this.cityId,
-					shopId: this.selectedStore.id,
 					depositStartTime: this.form.arriveTime + ':00',
 					depositEndTime: this.form.pickupTime + ':00',
 					items: luggageList,
@@ -799,7 +831,7 @@
 				}
 			},
 			async calculateRemotePrice() {
-				if (!this.sendStore || !this.form.arriveTime || !this.form.pickupTime) {
+				if (!this.sendStore) {
 					this.amountData = null
 					return
 				}
@@ -839,8 +871,6 @@
 					toLat: toLat,
 					toLgt: toLgt,
 					urgent: this.isUrgent,
-					depositStartTime: this.form.arriveTime + ':00',
-					depositEndTime: this.form.pickupTime + ':00',
 					items: luggageList,
 					declaredAmount: this.form.insurance || 0
 				})
@@ -888,7 +918,7 @@
 					return
 				}
 				if (!this.form.arriveTime) {
-					uni.showToast({ title: '璇烽�夋嫨棰勮鍒板簵鏃堕棿', icon: 'none' })
+					uni.showToast({ title: '璇烽�夋嫨鍒板簵瀵勫瓨鏃堕棿', icon: 'none' })
 					return
 				}
 				if (!this.form.pickupTime) {
@@ -896,7 +926,7 @@
 					return
 				}
 				if (new Date(this.form.pickupTime) <= new Date(this.form.arriveTime)) {
-					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬棰勮鍒板簵鏃堕棿', icon: 'none' })
+					uni.showToast({ title: '棰勮鍙栦欢鏃堕棿蹇呴』澶т簬鍒板簵瀵勫瓨鏃堕棿', icon: 'none' })
 					return
 				}
 				const luggageList = this.luggageTypes

--
Gitblit v1.9.3