From a1c569d40b5d1d6571a197467a41fd3421c393ce Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 15 九月 2025 09:10:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/packaging-worker/packaging-worker.vue |   74 ++++++++++++++++++++++++-------------
 1 files changed, 48 insertions(+), 26 deletions(-)

diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue
index eb714bb..75139ff 100644
--- a/small-program/pages/packaging-worker/packaging-worker.vue
+++ b/small-program/pages/packaging-worker/packaging-worker.vue
@@ -9,7 +9,7 @@
 				<view class="list-item-row" @click="show = true">
 					<view class="list-item-row-label">鐢ㄥ伐鏃堕棿<b>*</b></view>
 					<view class="list-item-row-val">
-						<text>{{form.startDate ? form.startDate + ' 鑷� ' + form.endDate + ' (' + form.priceNum1 + '澶�) ' : '璇烽�夋嫨'}}</text>
+						<text>{{form.startDate ? form.startDate + ' 鑷� ' + form.endDate + ' (' + workDays + '澶�) ' : '璇烽�夋嫨'}}</text>
 						<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 					</view>
 				</view>
@@ -18,7 +18,7 @@
 					<view class="list-item-row" @click="selectAddress()">
 						<view class="list-item-row-label">鐢ㄥ伐鍦扮偣<b>*</b></view>
 						<view class="list-item-row-val">
-							<text>{{form.location ? form.location : '璇烽�夋嫨'}}</text>
+							<text style="width:80%;">{{form.location ? form.location : '璇烽�夋嫨'}}</text>
 							<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 						</view>
 					</view>
@@ -44,20 +44,13 @@
 							<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 						</view>
 					</view>
-					<view class="list-item-row">
-						<view class="list-item-row-label">鐢ㄥ伐鏁伴噺<b>*</b></view>
-						<view class="list-item-row-val">
-							<input type="number" v-model="form.priceNum2" @blur="getPrice" placeholder="璇疯緭鍏�" />
-							<text>浜�</text>
-						</view>
-					</view>
-					<view class="list-item-row" v-if="viewStatus">
+					<view class="list-item-row"  >
 						<view class="list-item-row-label">闇�姹傝ˉ鍏�</view>
 						<view class="list-item-row-val">
 							<textarea v-model="form.supplement" cols="30" rows="10" placeholder="濡傛灉鏈夌壒娈婅姹傦紝璇峰湪姝ゅ璇存槑" maxlength="200"></textarea>
 						</view>
 					</view>
-					<view class="list-item-row" v-if="viewStatus">
+					<view class="list-item-row"  >
 						<view class="list-item-row-label">鍥剧墖</view>
 						<view class="list-item-row-upload">
 							<view class="upload-item" v-for="(item, index) in form.multifileList" :key="index">
@@ -70,10 +63,10 @@
 							</view>
 						</view>
 					</view>
-					<view class="list-item-zk" @click="viewStatus = !viewStatus">
+				<!-- 	<view class="list-item-zk" @click="viewStatus = !viewStatus">
 						<text>{{viewStatus ? '鏀惰捣' : '琛ュ厖闇�姹�'}}</text>
 						<u-icon :name="viewStatus ? 'arrow-up' : 'arrow-down'" color="#00BC12" size="16"></u-icon>
-					</view>
+					</view> -->
 				</view>
 				<view class="list-item">
 					<view class="list-item-label">
@@ -84,16 +77,27 @@
 						<view :class="form.carType === item.id ? 'list-item-cate-item active' : 'list-item-cate-item'" v-for="(item, index) in settlementType" :key="index" @click="clickType(item.id)">{{item.name}}</view>
 					</view>
 					<view class="list-item-row">
-						<view class="list-item-row-label">澶╂暟</view>
+						<view class="list-item-row-label" v-if="form.carType === 0">鐢ㄥ伐澶╂暟</view>
+						<view class="list-item-row-label" v-if="form.carType === 1">宸ヤ綔鏃堕暱<b>*</b></view>
+						<view class="list-item-row-label" v-if="form.carType === 2">鍖呰閲嶉噺<b>*</b></view>
 						<view class="list-item-row-val">
-							<input v-model="form.priceNum1" disabled @blur="getPrice" type="number" placeholder="璇疯緭鍏�" />
-							<text>澶�</text>
+							<input v-model="form.priceNum1" :disabled="form.carType === 0" @blur="getPrice" type="digit" placeholder="璇疯緭鍏�" />
+							<text v-if="form.carType === 0">澶�</text>
+							<text v-if="form.carType === 1">灏忔椂</text>
+							<text v-if="form.carType === 2">鏂�</text>
+						</view>
+					</view>
+					<view class="list-item-row">
+						<view class="list-item-row-label">鐢ㄥ伐鏁伴噺<b>*</b></view>
+						<view class="list-item-row-val">
+							<input type="digit" v-model="form.priceNum2" @blur="getPrice" placeholder="璇疯緭鍏�" />
+							<text>浜�</text>
 						</view>
 					</view>
 					<view class="list-item-row">
 						<view class="list-item-row-label">璐圭敤鏍囧噯<b>*</b></view>
 						<view class="list-item-row-val">
-							<input v-model="form.price" type="number" @blur="getPrice" placeholder="璇疯緭鍏�" />
+							<input v-model="form.price" type="digit" @blur="getPrice" placeholder="璇疯緭鍏�" />
 							<text>{{form.priceUnit}}</text>
 						</view>
 					</view>
@@ -130,9 +134,9 @@
 				</view>
 			</view>
 			<view class="footer-bottom">
-				<div class="footer-bottom-btn" @click="submit">
-					<text>绔嬪嵆涓嬪崟</text>
-					<text>锛堟湇鍔″畬鎴愬悗浠樻锛�</text>
+				<div class="footer-bottom-btn" @click="submit" >
+					<text>{{form.id?'纭淇敼':'绔嬪嵆涓嬪崟'}}</text>
+					<text v-if="!form.id">锛堟湇鍔″畬鎴愬悗浠樻锛�</text>
 				</div>
 			</view>
 			<view style="width: 100%; height: env(safe-area-inset-bottom);"></view>
@@ -143,6 +147,7 @@
 			:show="show"
 			color="#00BC12"
 			mode="range"
+			 :allowSameDay="true"
 			@close="show = false"
 			@confirm="confirmDate" />
 		
@@ -198,11 +203,12 @@
 				},
 				settlementType: [
 					{ name: '鎸夊ぉ浠樿垂', id: 0 },
-					{ name: '鎸夋浠樿垂', id: 1 },
+					{ name: '鎸夊皬鏃朵粯璐�', id: 1 },
 					{ name: '鎸夐噸閲忎粯璐�', id: 2 }
 				],
 				cateList: [],
-				viewStatus: false
+				viewStatus: true,
+				workDays: 0
 			};
 		},
 		onLoad(option) {
@@ -221,11 +227,13 @@
 						if (!this.form.multifileList) {
 							this.form.multifileList = []
 						}
+						this.workDays = res.data.totalDays
 						// this.clickType()
 					}
 					
 				})
 			} else {
+				this.form.linkName = this.userInfo.name
 				this.form.linkPhone = this.userInfo.telephone
 				this.form.priceNum1 = option.days
 				this.form.startDate = option.startDate
@@ -234,6 +242,8 @@
 				this.form.lgt = option.longitude
 				this.form.location = option.address
 				this.form.workType = option.workType
+				this.form.days = option.days
+				this.workDays = option.days
 			}
 			this.getCateList()
 		},
@@ -243,12 +253,16 @@
 				if (!this.form.categoryId) {
 					return uni.showToast({ title: '璇烽�夋嫨鍒嗘嫞鍝佺', icon: 'none' })
 				}
+				if (this.form.carType !=0 && !this.form.priceNum1) {
+					var t = this.form.carType ==1?"宸ヤ綔鏃堕暱":"鍖呰閲嶉噺"
+					return uni.showToast({ title: '璇疯緭鍏�'+t, icon: 'none' })
+				}
 				if (!this.form.priceNum2) {
 					return uni.showToast({ title: '璇疯緭鍏ョ敤宸ユ暟閲�', icon: 'none' })
 				}
 				if (!this.form.price) {
 					return uni.showToast({ title: '璇疯緭鍏ヨ垂鐢ㄦ爣鍑�', icon: 'none' })
-				}
+				} 
 				if (!this.form.linkPhone) {
 					return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
 				}
@@ -282,8 +296,9 @@
 					this.$u.api.getTotal({
 						price: Number(this.form.price) * 100,
 						priceNum1: this.form.priceNum1,
-						priceNum2: this.form.priceNum2,
+						priceNum2:  this.form.priceNum2,
 						type: this.form.type,
+						carType:this.form.carType ,
 						workType: this.form.workType
 					}).then(res => {
 						if (res.code === 200) {
@@ -296,7 +311,11 @@
 			confirmDate(e) {
 				this.form.startDate = e[0]
 				this.form.endDate = e[e.length - 1]
-				this.form.priceNum1 = e.length;
+				let time = this.form.startDate == this.form.endDate ? 1 : 0
+				this.workDays = e.length - time;
+				if (this.form.carType === 0) {
+					this.form.priceNum1 = e.length - time;
+				}
 				this.show = false
 				this.getPrice()
 			},
@@ -305,7 +324,7 @@
 					success: (res) => {
 						this.form.lat = res.latitude
 						this.form.lgt = res.longitude
-						this.form.address = res.address
+						this.form.address =res.name ||  res.address
 					}
 				});
 			},
@@ -313,10 +332,13 @@
 				this.form.carType = id
 				if (id === 0) {
 					this.form.priceUnit = '鍏�/浜�/澶�'
+					this.form.priceNum1 = this.workDays
 				} else if (id === 1) {
 					this.form.priceUnit = '鍏�/浜�/灏忔椂'
+					this.form.priceNum1 = ''
 				} else {
 					this.form.priceUnit = '鍏�/鏂�'
+					this.form.priceNum1 = ''
 				}
 			},
 			confirmCategary(e) {

--
Gitblit v1.9.3