From f93f455134ff234be9d257c0f432c8052f1c32cd Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 18 七月 2025 19:20:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/index/index.vue |  836 ++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 561 insertions(+), 275 deletions(-)

diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 02cd67c..880b9c9 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -5,122 +5,76 @@
 			<view class="index-j-head">
 				<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
 				<view class="index-c-title" :style="{ height: navHeight + 'px' }">
-					<text>杩戝揩</text>
+					<text>鎺ュ崟澶у巺</text>
 				</view>
 			</view>
 			<view class="search" :style="{ top: statusbarHeight + navHeight + 'px' }">
 				<view class="index-j-cate">
-					<view class="index-j-cate-item">
-						<text>鍏ㄩ儴</text>
-						<view class="index-j-cate-item-x"></view>
-					</view>
-					<view class="index-j-cate-item">
-						<text>鐢ㄥ伐</text>
-					</view>
-					<view class="index-j-cate-item">
-						<text>杩愯揣</text>
-					</view>
-					<view class="index-j-cate-item">
-						<text>璁㈤</text>
+					<view class="index-j-cate-item" v-for="(item, index) in searchType" :key="index" @click="clickCate(item.id)">
+						<text :style="{ color: typeVal === item.id ? '#222222' : '', fontSize: typeVal === item.id ? '36rpx' : '', fontWeight: typeVal === item.id ? '600' : '' }">{{item.name}}</text>
+						<view class="index-j-cate-item-x" v-if="typeVal === item.id"></view>
 					</view>
 				</view>
 				<view class="index-j-search">
-					<view class="index-j-search-item active">鏈�鏂板彂甯�</view>
-					<view class="index-j-search-item">璺濈浼樺厛</view>
-					<view class="index-j-search-item">浠锋牸浠庨珮鍒颁綆</view>
+					<view :class="sortType === item.id ? 'index-j-search-item active' : 'index-j-search-item'" v-for="(item, index) in sortList" :key="index" @click="clickSort(item.id)">{{item.name}}</view>
 				</view>
 			</view>
 			<view class="index-j-list">
-				<view class="index-list-item">
+				<view class="index-list-item" v-for="(item, index) in orderList" :key="index">
 					<view class="index-list-item-head">
 						<view class="index-list-item-head-l">
 							<view class="xoam"></view>
-							<text>璁㈤鍗�</text>
+							<text v-if="item.type === 0 && item.workType === 0">鐢ㄥ伐鍗� - 閲囨憳宸�</text>
+							<text v-else-if="item.type === 0 && item.workType === 1">鐢ㄥ伐鍗� - 鍒嗘嫞宸�</text>
+							<text v-else-if="item.type === 0 && item.workType === 2">鐢ㄥ伐鍗� - 鍖呰宸�</text>
+							
+							<text v-else-if="item.type === 1">杩愯揣鍗�-{{item.categoryName}}-{{item.carUnit}}</text>
+							
+							<text v-else-if="item.type === 2">璁㈤鍗�</text>
 						</view>
-						<view class="index-list-item-head-r">璺濈 1.3km</view>
+						<view class="index-list-item-head-r">璺濈 {{item.distance}}km</view>
 					</view>
-					<view class="index-list-item-info">
-						鍗堥5鍏�(30浠�)锝滄櫄椁�8鍏�(20浠�)
+					<view class="index-list-item-info" v-if="item.type === 0 && item.workType === 0">
+						{{item.categoryName}}锝渰{item.priceNum1}}鏂�
 					</view>
-					<view class="index-list-item-dz">
-						<image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
-						<text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
+					<view class="index-list-item-info" v-if="item.type === 0 && item.workType === 1">
+						{{item.categoryName}}锝渰{item.priceNum1}}浜�
 					</view>
-					<view class="index-list-item-dz">
-						<image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
-						<text>07-26 鑷� 07-27锛�2澶╋級</text>
+					<view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2">
+						{{item.categoryName}}锝渰{item.priceNum1}}浜�
 					</view>
-					<view class="index-list-item-price">
-						<text>棰勪及锛�</text>
-						<text>楼1000.00</text>
+					<view class="index-list-item-info" v-if="item.type === 1">
+						{{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}锝滅敤杞{item.priceNum1}}澶�
 					</view>
-					<view class="eidt">
-						<sunui-mverify @change="mverify"></sunui-mverify>
+					<view class="index-list-item-info" v-if="item.type === 2">
+						{{item.wayInfoCopy}}
 					</view>
-				</view>
-				<view class="index-list-item">
-					<view class="index-list-item-head">
-						<view class="index-list-item-head-l">
-							<view class="xoam"></view>
-							<text>杩愯揣鍗�-灏忚揣杞�-鍘㈠紡</text>
-						</view>
-						<view class="index-list-item-head-r">寰呮帴鍗曟柟鎺ュ崟</view>
-					</view>
-					<view class="index-list-item-info">
-						钁¤悇锝�20000鏂わ綔闇�2杈�
-					</view>
-					<view class="index-list-item-date">
-						<image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
-						<text>07-26 鑷� 07-27锛�2澶╋級</text>
-					</view>
-					<view class="address">
+					
+					<view class="address" v-if="item.type === 1">
 						<view class="address-xian"></view>
-						<view class="address-row">
-							<image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image>
-							<text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
-						</view>
-						<view class="address-row">
-							<image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image>
-							<text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥笢闂ㄤ繚瀹夊</text>
-						</view>
-						<view class="address-row">
-							<image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image>
-							<text>瀹夊窘鑾茶姳绉戞妧浜т笟鍥眴绫崇鎶�鏈夐檺鍏徃</text>
+						<view class="address-row" v-for="(address, i) in item.wayInfo" :key="i">
+							<image src="/static/icon/ic_qidian@2x.png" mode="widthFix" v-if="i === 0"></image>
+							<image src="/static/icon/ic_jingguo@2x.png" mode="widthFix" v-else-if="i !== 0 && i !== item.wayInfo.length - 1"></image>
+							<image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix" v-else-if="i === item.wayInfo.length - 1"></image>
+							<text>{{item.location}}</text>
 						</view>
 					</view>
+					<template v-if="[0, 2].includes(item.type)">
+						<view class="index-list-item-dz">
+							<image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
+							<text>{{item.location}}</text>
+						</view>
+						<view class="index-list-item-dz">
+							<image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
+							<text>{{item.startDate}} 鑷� {{item.endDate}}锛坽{item.priceNum1}}澶╋級</text>
+						</view>
+					</template>
 					<view class="index-list-item-price">
 						<text>棰勪及锛�</text>
-						<text>楼1000.00</text>
+						<text>楼{{item.estimatedAccount / 100}}</text>
 					</view>
 					<view class="eidt">
-						<sunui-mverify @change="mverify"></sunui-mverify>
-					</view>
-				</view>
-				<view class="index-list-item">
-					<view class="index-list-item-head">
-						<view class="index-list-item-head-l">
-							<view class="xoam"></view>
-							<text>鐢ㄥ伐鍗�-閲囨憳宸�</text>
-						</view>
-						<view class="index-list-item-head-r">寰呮帴鍗�</view>
-					</view>
-					<view class="index-list-item-info">
-						钁¤悇锝�2000鏂�
-					</view>
-					<view class="index-list-item-dz">
-						<image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
-						<text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
-					</view>
-					<view class="index-list-item-dz">
-						<image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
-						<text>07-26 鑷� 07-27锛�2澶╋級</text>
-					</view>
-					<view class="index-list-item-price">
-						<text>棰勪及锛�</text>
-						<text>楼1000.00</text>
-					</view>
-					<view class="eidt">
-						<sunui-mverify @change="mverify"></sunui-mverify>
+						<sunui-mverify @change="getaccept($event, item.id, index)"></sunui-mverify>
 					</view>
 				</view>
 			</view>
@@ -146,119 +100,71 @@
 				</view>
 			</view>
 			
+			<!-- 璁㈤ -->
 			<template v-if="typeId === 2">
 				<view class="list">
 					<view class="list-item">
 						<view class="list-item-label">鏃堕棿鍦扮偣</view>
-						<view class="list-item-row">
+						<view class="list-item-row" @click="show = true">
 							<view class="list-item-row-label">鐢ㄩ鏃ユ湡<b>*</b></view>
 							<view class="list-item-row-val">
-								<text>璇烽�夋嫨</text>
+								<text>{{ form.startDate ? form.startDate + ' 鑷� ' + form.endDate + '锛�' + form.days + '澶╋級' : '璇烽�夋嫨'}}</text>
 								<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-radio">
-								<view class="radio-item">
-									<view class="radio-item-label">鏃╅</view>
+								<view class="radio-item" v-for="(item, index) in orderFood" :key="index">
+									<view class="radio-item-label">{{item.name}}</view>
 									<view class="radio-item-list">
 										<view class="radio-item-list-l">
-											<view class="radio-item-list-item active">5鍏�</view>
-											<view class="radio-item-list-item">8鍏�</view>
-											<view class="radio-item-list-item">10鍏�</view>
+											<view :class="child.active ? 'radio-item-list-item active' : 'radio-item-list-item'" v-for="(child, childIndex) in item.list" :key="childIndex" @click="selectMenu(index, childIndex)">{{child.price}}鍏�</view>
 										</view>
 										<view class="radio-item-list-data">
 											<text>浠芥暟锛�</text>
-											<input type="number" placeholder="0">
-											<text style="color: #999999;">浠�</text>
-										</view>
-									</view>
-								</view>
-								<view class="radio-item">
-									<view class="radio-item-label">鍗堥</view>
-									<view class="radio-item-list">
-										<view class="radio-item-list-l">
-											<view class="radio-item-list-item active">5鍏�</view>
-											<view class="radio-item-list-item">8鍏�</view>
-											<view class="radio-item-list-item">10鍏�</view>
-										</view>
-										<view class="radio-item-list-data">
-											<text>浠芥暟锛�</text>
-											<input type="number" placeholder="0">
-											<text style="color: #999999;">浠�</text>
-										</view>
-									</view>
-								</view>
-								<view class="radio-item">
-									<view class="radio-item-label">鏅氶</view>
-									<view class="radio-item-list">
-										<view class="radio-item-list-l">
-											<view class="radio-item-list-item active">5鍏�</view>
-											<view class="radio-item-list-item">8鍏�</view>
-											<view class="radio-item-list-item">10鍏�</view>
-										</view>
-										<view class="radio-item-list-data">
-											<text>浠芥暟锛�</text>
-											<input type="number" placeholder="0">
+											<input type="number" v-model="item.num" placeholder="璇疯緭鍏�">
 											<text style="color: #999999;">浠�</text>
 										</view>
 									</view>
 								</view>
 							</view>
 						</view>
-						<view class="list-item-row">
+						<view class="list-item-row" @click="selectAddress(1)">
 							<view class="list-item-row-label">鐢ㄩ鍦扮偣<b>*</b></view>
 							<view class="list-item-row-val">
-								<text>璇烽�夋嫨</text>
+								<text>{{form.address ? form.address : '璇烽�夋嫨'}}</text>
 								<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 							</view>
 						</view>
 						<view class="list-item-row">
 							<view class="list-item-row-label">鍦扮偣鎻忚堪</view>
 							<view class="list-item-row-val">
-								<input type="text" placeholder="璇疯緭鍏�" />
+								<input type="text" v-model="form.locationRemark" placeholder="璇疯緭鍏�" />
 							</view>
 						</view>
-					</view>
-					<view class="list-item">
-						<view class="list-item-label">闇�姹�</view>
-						<view class="list-item-row">
-							<view class="list-item-row-label">鐢ㄩ浜烘暟<b>*</b></view>
-							<view class="list-item-row-user">
-								<view class="user-item">
-									<text>鏃╅</text>
-									<input type="text" placeholder="璇疯緭鍏�" />
-									<text>浠�</text>
-								</view>
-								<view class="user-item">
-									<text>鍗堥</text>
-									<input type="text" placeholder="璇疯緭鍏�" />
-									<text>浠�</text>
-								</view>
-							</view>
-						</view>
-						<view class="list-item-row">
+						<view class="list-item-row" v-if="viewStatus">
 							<view class="list-item-row-label">闇�姹傝ˉ鍏�</view>
 							<view class="list-item-row-val">
-								<textarea cols="30" rows="10" placeholder="璇疯緭鍏�" maxlength="200"></textarea>
+								<textarea v-model="form.supplement" cols="30" rows="10" placeholder="璇疯緭鍏�" maxlength="200"></textarea>
 							</view>
 						</view>
-						<view class="list-item-row">
+						<view class="list-item-row" v-if="viewStatus">
 							<view class="list-item-row-label">鍥剧墖</view>
 							<view class="list-item-row-upload">
-								<view class="upload-item">
-									<image src="/static/logo.png" mode="widthFix"></image>
+								<view class="upload-item" v-for="(item, index) in form.multifileList" :key="index">
+									<image :src="item.url" mode="widthFix"></image>
+									<image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image>
 								</view>
-								<view class="upload-item">
+								<view class="upload-item" @click="uploadImg">
 									<u-icon name="plus" color="#999999" size="24"></u-icon>
 									<text>鐐瑰嚮涓婁紶</text>
 								</view>
 							</view>
 						</view>
-						<view class="list-item-zk">
-							<text>琛ュ厖闇�姹�</text>
-							<u-icon name="arrow-down" color="#00BC12" size="16"></u-icon>
+						<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 class="list-item">
@@ -266,13 +172,13 @@
 						<view class="list-item-row">
 							<view class="list-item-row-label">鑱旂郴浜�</view>
 							<view class="list-item-row-val">
-								<input type="text" placeholder="璇疯緭鍏�" />
+								<input type="text" v-model="form.linkName" placeholder="璇疯緭鍏�" />
 							</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" placeholder="璇疯緭鍏�" maxlength="11" />
+								<input type="number" v-model="form.linkPhone" placeholder="璇疯緭鍏�" maxlength="11" />
 							</view>
 						</view>
 					</view>
@@ -282,19 +188,13 @@
 					<view class="footer-price">
 						<view class="footer-price-info">棰勪及鎬昏垂鐢�</view>
 						<view class="footer-price-num">
-							<text>0</text>
+							<text>{{totalPrice}}</text>
 							<text>鍏�</text>
 						</view>
 					</view>
-					<view class="footer-bottom">
-						<view class="footer-bottom-kf">
-							<image src="/static/logo.png" mode="widthFix"></image>
-							<text>瀹㈡湇</text>
-						</view>
-						<div class="footer-bottom-btn">
-							<text>绔嬪嵆涓嬪崟</text>
-							<text>锛堟湇鍔″畬鎴愬悗浠樻锛�</text>
-						</div>
+					<view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }">
+						<view class="box-hz-btn-kf">瀹㈡湇</view>
+						<view class="box-hz-btn-next" @click="submit">涓嬩竴姝�</view>
 					</view>
 				</view>
 			</template>
@@ -323,10 +223,10 @@
 							</view>
 							<view class="box-hz-list-item" @click="selectAddress(1)">
 								<view class="box-hz-list-item-label"><text>鐢ㄥ伐鍦扮偣锛�</text></view>
-								<view :class="form.address ? 'box-hz-list-item-val active' :'box-hz-list-item-val'">
+								<view :class="form.location ? 'box-hz-list-item-val active' :'box-hz-list-item-val'">
 									<view class="box-hz-list-item-val-left">
 										<image class="icon" src="/static/icon/ic_location@2x.png" mode="widthFix"></image>
-										<text>{{form.address ? form.address : '璇烽�夋嫨鐢ㄥ伐鍦扮偣'}}</text>
+										<text>{{form.location ? form.location : '璇烽�夋嫨鐢ㄥ伐鍦扮偣'}}</text>
 									</view>
 									<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 								</view>
@@ -337,65 +237,64 @@
 					<!-- 杩愯揣 -->
 					<template v-if="typeId === 1">
 						<view class="box-hz-cate">
-							<view :class="carId === item.id ? 'box-hz-cate-item active' : 'box-hz-cate-item'" v-for="(item, index) in car" :key="index" @click="clickCar(item.id)">
+							<view :class="form.categoryId === item.id ? 'box-hz-cate-item active' : 'box-hz-cate-item'" v-for="(item, index) in car" :key="index" @click="clickCar(item)">
 								<text>{{item.name}}</text>
-								<view class="box-hz-cate-item-x" v-if="carId === item.id"></view>
+								<view class="box-hz-cate-item-x" v-if="form.categoryId === item.id"></view>
 							</view>
 						</view>
 						<view class="box-hz-car">
 							<view class="box-hz-car-image">
-								<image src="/static/image/ic_sanlunche@2x.png" mode="widthFix" v-if="carId === 1"></image>
-								<image src="/static/image/ic_xiaohuoche@2x.png" mode="widthFix" v-else-if="carId === 2"></image>
+								<image :src="carImage" mode="widthFix"></image>
 							</view>
-							<view class="box-hz-car-info" v-if="carId === 1">
-								鍘㈤暱3.8锝�4.0绫�  杞介噸1.5锝�2.0鍚�  杞芥柟12.3锝�18.4鏂�
-							</view>
-							<view class="box-hz-car-info" v-else-if="carId === 2">
-								鍘㈤暱3.8锝�4.0绫�  杞介噸1.5锝�2.0鍚�  杞芥柟12.3锝�18.4鏂�
+							<view class="box-hz-car-info" v-if="carRemark">
+								{{carRemark || ''}}
 							</view>
 						</view>
 						<view class="box-hz-list">
-							<view class="box-hz-list-item">
+							<view class="box-hz-list-item" @click="show = true">
 								<view class="box-hz-list-item-label"><text>鐢ㄨ溅鏃堕棿锛�</text></view>
-								<view class="box-hz-list-item-val">
+								<view :class="form.startDate ? 'box-hz-list-item-val active' : 'box-hz-list-item-val'">
 									<view class="box-hz-list-item-val-left">
 										<image class="icon" src="/static/icon/ic_time@2x.png" mode="widthFix"></image>
-										<text>璇烽�夋嫨鐢ㄨ溅鏃堕棿</text>
+										<text>{{ form.startDate ? form.startDate + ' 鑷� ' + form.endDate : '璇烽�夋嫨鐢ㄥ伐鏃堕棿'}}</text>
 									</view>
-									<image class="icon1" src="/static/icon/home_ar_next@2x.png" mode="widthFix"></image>
+									<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 								</view>
 							</view>
 							<view class="box-hz-list-item">
 								<view class="box-hz-list-item-label">
 									<text>鐢ㄨ溅鏃堕棿锛�</text>
-									<text>+澧炲姞閫旂粡鐐�</text>
+									<text @click="addAddr">+澧炲姞閫旂粡鐐�</text>
 								</view>
 								<view class="item-d">
-									<view class="item-d-row">
+									<view class="item-d-row" @click="selectAddress(2)">
 										<view class="item-d-row-icon">
 											<image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image>
 										</view>
 										<view class="item-d-row-val">
-											<text>璇烽�夋嫨鐢ㄨ溅璧风偣</text>
-											<image src="/static/icon/home_ar_next@2x.png" mode="widthFix"></image>
+											<text>{{form.address ? form.address : '璇烽�夋嫨鐢ㄨ溅璧风偣'}}</text>
+											<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 										</view>
 									</view>
-									<view class="item-d-row">
+									<view class="item-d-row" v-for="(item, index) in form.wayInfoDTOList" :key="index" @click="selectAddress(4, index)">
 										<view class="item-d-row-icon">
 											<image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image>
 										</view>
 										<view class="item-d-row-val">
-											<text style="color: #999999;">璇烽�夋嫨閫旂粡鍦扮偣</text>
-											<image src="/static/icon/home_ar_next@2x.png" mode="widthFix"></image>
+											<text>{{item.location ? item.location : '璇烽�夋嫨閫旂粡鍦扮偣'}}</text>
+											<view style="display: flex; align-items: center; flex-shrink: 0;">
+												<image src="/static/icon/ic_delete@2x.png" style="margin-right: 22rpx; width: 32rpx; height: 32rpx;" @click.stop="form.wayInfoDTOList.splice(index, 1)" mode="widthFix"></image>
+												<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
+											</view>
 										</view>
 									</view>
-									<view class="item-d-row">
+									<view class="item-d-row" @click="selectAddress(3)">
 										<view class="item-d-row-icon">
 											<image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image>
 										</view>
 										<view class="item-d-row-val">
-											<text>璇烽�夋嫨鐢ㄨ溅缁堢偣</text>
-											<image src="/static/icon/home_ar_next@2x.png" mode="widthFix"></image>
+											<text>{{form.locationEnd ? form.locationEnd : '璇烽�夋嫨鐢ㄨ溅缁堢偣'}}</text>
+											<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
 										</view>
 									</view>
 								</view>
@@ -413,7 +312,6 @@
 		
 		<!-- 閫夋嫨鏃ユ湡鑼冨洿 -->
 		<u-calendar :show="show" color="#00BC12" mode="range" @close="show = false" @confirm="confirmDate"></u-calendar>
-		
 	</view>
 </template>
 
@@ -423,24 +321,32 @@
 	export default {
 		components: { sunuiMverify },
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid'])
+			...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid', 'latitude', 'longitude']),
+			totalPrice() {
+				return this.form.estimatedAccount / 100
+			}
 		},
-		onShow(options){
+		onShow(options) {
 			this.typeViewId = 0
-			if(this.token &&this.token!='' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
-				this.isLogin=true
+			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+				this.isLogin = true
 			}
 			if (this.userInfo && this.userInfo.useIdentity == 1) {
 				this.typeViewId = 1
-			} 
+			}
 		},
 		data() {
 			return {
 				show: false,
 				isLogin: false,
 				typeId: 0,
-				carId: 1,
 				type: [
+					{ name: '鐢ㄥ伐', id: 0 },
+					{ name: '杩愯揣', id: 1 },
+					{ name: '璁㈤', id: 2 }
+				],
+				searchType: [
+					{ name: '鍏ㄩ儴', id: '' },
 					{ name: '鐢ㄥ伐', id: 0 },
 					{ name: '杩愯揣', id: 1 },
 					{ name: '璁㈤', id: 2 }
@@ -450,56 +356,314 @@
 					{ name: '鍒嗘嫞宸�', id: 1 },
 					{ name: '鍖呰宸�', id: 2 }
 				],
-				car: [
-					{ name: '涓夎疆杞�', id: 1 },
-					{ name: '灏忚揣杞�', id: 2 }
+				sortList: [
+					{ name: '鏈�鏂板彂甯�', id: 0 },
+					{ name: '璺濈浼樺厛', id: 1 },
+					{ name: '浠锋牸浠庨珮鍒颁綆', id: 2 }
 				],
+				car: [],
 				btn: require('@/static/image/btn.png'),
 				typeViewId: 0,
+				carImage: '',
+				carRemark: '',
+				
+				orderFood: [],
+				viewStatus: false,
 				
 				form: {
 					startDate: '',
 					endDate: '',
 					latitude: '',
 					longitude: '',
-					address: '',
+					location: '',
+					locationEnd: '',
+					wayInfoDTOList: [],
 					workType: 0,
-					days: ''
+					categoryId: '',
+					categoryName: '',
+					days: '',
+					locationRemark: '',
+					supplement: '',
+					multifileList: [],
+					linkName: '',
+					linkPhone: '',
+					estimatedAccount: '',
+					price: ''
+				},
+				sortType: 0,
+				orderList: [],
+				typeVal: '',
+				page: 1,
+				next: true
+			}
+		},
+		async onLoad() {
+			await this.$onLaunched;
+			this.getCategoryLists()
+			this.getOrderList()
+			this.form.linkPhone = this.userInfo.telephone
+		},
+		watch: {
+			typeId: {
+				handler(news, old) {
+					this.form.startDate = ''
+					
+					this.form.endDate = ''
+					this.form.latitude = ''
+					this.form.longitude = ''
+					this.form.location = ''
+					this.form.locationEnd = ''
+					this.form.wayInfoDTOList = ''
+					this.form.workType = ''
+					this.form.days = ''
+					this.form.locationRemark = ''
+					this.form.supplement = ''
+					this.form.multifileList = []
+					this.form.linkName = ''
+					this.form.estimatedAccount = ''
+					this.form.price = ''
+					this.viewStatus = false
+				}
+			},
+			orderFood: {
+				deep: true,
+				handler(news, old) {
+					let price = 0
+					news.forEach(item => {
+						let num = 0
+						item.list.forEach(child => {
+							if (child.active) {
+								num = Number(child.price)
+							}
+						})
+						if (item.num && num > 0) {
+							price += num * item.num
+						}
+					})
+					this.form.price = price
+				}
+			},
+			'form.price': {
+				handler(news, old) {
+					if (news > 0) {
+						this.getPrice()
+					}
 				}
 			}
 		},
+		onReachBottom() {
+			this.getOrderList()
+		},
 		methods: {
+			// 鎵嬪姩鎺ュ崟
+			getaccept(e, orderId, index) {
+				this.$u.api.accept({ orderId })
+					.then(res => {
+						uni.showToast({ title: '鎶㈠崟鎴愬姛锛�', icon: 'success', duration: 2000 })
+						setTimeout(() => {
+							this.page = 1
+							this.next = true
+							this.orderList = []
+							this.getOrderList()
+						}, 2000)
+					})
+			},
+			clickSort(id) {
+				this.sortType = id
+				this.page = 1
+				this.next = true
+				this.orderList = []
+				this.getOrderList()
+			},
+			clickCate(id) {
+				this.typeVal = id
+				this.page = 1
+				this.next = true
+				this.orderList = []
+				this.getOrderList()
+			},
+			// 璁㈠崟鍒嗛〉
+			getOrderList() {
+				if (!this.next) return;
+				this.$u.api.orderPage({
+					capacity: 10,
+					page: this.page,
+					model: {
+						queryMyOrderType: 2,
+						type: this.typeVal,
+						sortType: this.sortType,
+						queryLat: this.latitude,
+						queryLgt: this.longitude
+					}
+				}).then(res => {
+					res.data.records.forEach(item => {
+						// 璁㈤鍗�
+						if (item.type === 2) {
+							item.wayInfoCopy = JSON.parse(item.wayInfo).map(item => {
+								return `${item.name}${item.price / 100}鍏�(${item.num}浠�)`
+							}).join(' | ')
+						// 杩愯揣
+						} else if (item.type === 1) {
+							item.wayInfo = JSON.parse(item.wayInfo)
+						}
+					})
+					this.orderList = [...this.orderList, ...res.data.records]
+					
+					if (this.orderList.length === res.data.total) {
+						this.next = false
+					}
+				})
+			},
+			// 鎻愪氦璁㈠崟
+			submit() {
+				if (!this.form.startDate) {
+					return uni.showToast({ title: '璇烽�夋嫨鐢ㄩ鏃堕棿', icon: 'none' })
+				}
+				if (this.form.price === 0) {
+					return uni.showToast({ title: '璇烽�夋嫨鐢ㄩ鏃堕棿', icon: 'none' })
+				}
+				if (!this.form.address) {
+					return uni.showToast({ title: '璇烽�夋嫨鐢ㄩ鍦扮偣', icon: 'none' })
+				}
+				if (!this.form.linkPhone) {
+					return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
+				}
+				let cateringDTOList = []
+				this.orderFood.forEach(item => {
+					item.list.forEach(child => {
+						if (child.active) {
+							cateringDTOList.push({
+								name: item.name,
+								num: item.num,
+								price: (Number(child.price) * Number(item.num)) * 100
+							})
+						}
+					})
+				})
+				this.$u.api.release({
+					...this.form,
+					type: 2,
+					price: Number(this.form.price) * 100,
+					priceNum1: this.form.days,
+					location: this.form.address,
+					lat: this.form.latitude,
+					lgt: this.form.longitude,
+					cateringDTOList
+				}).then(res => {
+					if (res.code == 200) {
+						wx.requestPayment({
+							timeStamp: res.data.object.timeStamp,
+							nonceStr: res.data.object.nonceStr,
+							package: res.data.object.packageVal,
+							signType: res.data.object.signType,
+							paySign: res.data.object.paySign,
+							success (res1) {
+								if (res1.errMsg = 'requestPayment:ok') {
+									uni.showToast({ title: '鏀粯鎴愬姛', icon: 'success', duration: 2000 });
+									setTimeout(() => {
+										uni.navigateTo({
+											url: `/pages/success/success?orderId=${res.data.id}`
+										})
+									}, 1500)
+								}
+							},
+							fail(err) {
+								console.log(err)
+							}
+						})
+					}
+				})
+				console.log(cateringDTOList)
+			},
+			uploadImg() {
+				uni.chooseImage({
+					success: (chooseImageRes) => {
+						const tempFilePaths = chooseImageRes.tempFilePaths;
+						uni.uploadFile({
+							url: this.$baseUrl + '/web/public/upload',
+							filePath: tempFilePaths[0],
+							name: 'file',
+							formData: {
+								'folder': 'orders'
+							},
+							success: (uploadFileRes) => {
+								const res = JSON.parse(uploadFileRes.data)
+								this.form.multifileList.push({
+									fileurl: res.data.imgaddr,
+									name: res.data.originname,
+									url: res.data.url,
+									type: 0
+								})
+							}
+						});
+					}
+				});
+			},
+			// 璁$畻閲戦
+			getPrice() {
+				var that = this
+				if (that.form.price && that.form.days) {
+					that.$u.api.getTotal({
+						price: Number(that.form.price) * 100,
+						priceNum1: that.form.days,
+						type: 2
+					}).then(res => {
+						that.form.estimatedAccount = res.data
+					})
+				}
+			},
+			addAddr() {
+				this.form.wayInfoDTOList.push({
+					lat: '',
+					lgt: '',
+					location: ''
+				})
+			},
 			confirmDate(e) {
 				this.form.startDate = e[0]
 				this.form.endDate = e[e.length - 1]
 				this.form.days = e.length;
 				this.show = false
+				if (this.typeId === 2) {
+					this.getPrice()
+				}
 			},
-			selectAddress(type) {
+			selectAddress(type, index) {
 				uni.chooseLocation({
 					success: (res) => {
-						if (type === 1) {
+						if ([1,2].includes(type)) {
 							this.form.latitude = res.latitude
 							this.form.longitude = res.longitude
 							this.form.address = res.address
+						} else if (type === 3) {
+							this.form.locationEnd = res.address
+							this.form.latEnd = res.latitude
+							this.form.lgtEnd = res.longitude
+						} else if (type === 4) {
+							this.form.wayInfoDTOList[0].lat = res.latitude
+							this.form.wayInfoDTOList[0].lgt = res.longitude
+							this.form.wayInfoDTOList[0].location = res.address
 						}
 					}
 				});
-				// uni.getLocation({
-				// 	type: 'gcj02',
-				// 	success: function (res) {
-				// 		console.log(res)
-				// 	}
-				// });
 			},
 			clickType(e) {
 				this.typeId = e
+				if (e === 2) {
+					this.form.categoryId = this.car[0].id
+					this.form.categoryName = this.car[0].name
+					this.carRemark = this.car[0].remark
+					this.carImage = this.car[0].iconFull
+				}
 			},
 			clickTypeWork(e) {
 				this.form.workType = e
 			},
-			clickCar(e) {
-				this.carId = e
+			clickCar(item) {
+				this.form.categoryId = item.id
+				this.form.categoryName = item.name
+				this.carImage = item.iconFull
+				this.carRemark = item.remark
 			},
 			jump() {
 				if(!this.userInfo || !this.token){
@@ -511,31 +675,96 @@
 				
 				const { form } = this;
 				
-				if (!form.startDate || !form.endDate) {
-					return uni.showToast({ title: '璇烽�夋嫨鐢ㄥ伐鏃堕棿', icon: 'none' })
-				} else if (!form.latitude || !form.longitude) {
-					return uni.showToast({ title: '璇烽�夋嫨鐢ㄥ伐鍦扮偣', icon: 'none' })
-				}
-				
-				// 閲囨憳宸�
-				if (this.form.workType === 0) {
+				// 鐢ㄥ伐
+				if (this.typeId === 0) {
+					
+					if (!form.startDate || !form.endDate) {
+						return uni.showToast({ title: '璇烽�夋嫨鐢ㄥ伐鏃堕棿', icon: 'none' })
+					} else if (!form.latitude || !form.longitude) {
+						return uni.showToast({ title: '璇烽�夋嫨鐢ㄥ伐鍦扮偣', icon: 'none' })
+					}
+					
+					// 閲囨憳宸�
+					if (this.form.workType === 0) {
+						uni.navigateTo({
+							url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+						})
+					// 鍒嗘嫞宸�
+					} else if (this.form.workType === 1) {
+						uni.navigateTo({
+							url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+						})
+					// 鍖呰宸�
+					} else if (this.form.workType === 2) {
+						uni.navigateTo({
+							url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+						})
+					}
+				// 杩愯揣
+				} else if (this.typeId === 1) {
+					
+					if (!form.startDate || !form.endDate) {
+						return uni.showToast({ title: '璇烽�夋嫨鐢ㄨ溅鏃堕棿', icon: 'none' })
+					} else if (!form.latitude || !form.longitude) {
+						return uni.showToast({ title: '璇烽�夋嫨鐢ㄨ溅璧风偣', icon: 'none' })
+					} else if (!form.latEnd || !form.lgtEnd) {
+						return uni.showToast({ title: '璇烽�夋嫨鐢ㄨ溅缁堢偣', icon: 'none' })
+					}
+					
+					let carData = {
+						startDate: form.startDate,
+						endDate: form.endDate,
+						lat: form.latitude,
+						lgt: form.longitude,
+						location: form.address,
+						latEnd: form.latEnd,
+						lgtEnd: form.lgtEnd,
+						locationEnd: form.locationEnd,
+						wayInfoDTOList: form.wayInfoDTOList,
+						categoryId: form.categoryId,
+						categoryName: form.categoryName,
+						days: form.days
+					}
+					
+					uni.setStorageSync('carData', carData);
+					
 					uni.navigateTo({
-						url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
-					})
-				// 鍒嗘嫞宸�
-				} else if (this.form.workType === 1) {
-					uni.navigateTo({
-						url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
-					})
-				// 鍖呰宸�
-				} else if (this.form.workType === 2) {
-					uni.navigateTo({
-						url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
+						url: `/pages/freight/freight`
 					})
 				}
 			},
-			mverify(e){
-				console.log('楠岃瘉缁撴灉:',e);
+			// 閫夋嫨濂楅
+			selectMenu(a, b) {
+				this.orderFood.forEach((item, index) => {
+					if (index === a) {
+						item.list.forEach((child, childIndex) => {
+							child.active = b === childIndex
+						})
+					}
+				})
+			},
+			getCategoryLists() {
+				this.$u.api.getCategoryList({ type: 1 })
+					.then(res => {
+						this.car = res.data
+						this.form.categoryId = res.data[0].id
+						this.form.categoryName = res.data[0].name
+						this.carRemark = res.data[0].remark
+						this.carImage = res.data[0].iconFull
+					})
+				this.$u.api.getCategoryList({ type: 2 })
+					.then(res => {
+						res.data.forEach(item => {
+							item.num = ''
+							item.list = item.detailList.map(child => {
+								return {
+									active: false,
+									price: child
+								}
+							})
+						})
+						this.orderFood = res.data
+					})
 			}
 		}
 	}
@@ -921,7 +1150,7 @@
 							.radio-item {
 								width: 100%;
 								display: flex;
-								align-items: center;
+								align-items: self-end;
 								margin-bottom: 30rpx;
 								&:last-child {
 									margin: 0 !important;
@@ -941,6 +1170,8 @@
 										width: 100%;
 										display: flex;
 										align-items: center;
+										justify-content: space-between;
+										flex-wrap: wrap;
 										.active {
 											background: #00BC12 !important;
 											color: #ffffff !important;
@@ -955,9 +1186,15 @@
 											font-weight: 400;
 											font-size: 28rpx;
 											color: #111111;
-											margin-right: 30rpx;
-											&:last-child {
-												margin: 0 !important;
+											margin-top: 30rpx;
+											&:nth-child(1) {
+												margin-top: 0 !important;
+											}
+											&:nth-child(2) {
+												margin-top: 0 !important;
+											}
+											&:nth-child(3) {
+												margin-top: 0 !important;
 											}
 										}
 									}
@@ -979,6 +1216,10 @@
 											color: #222222;
 											text-align: right;
 											margin: 0 30rpx;
+											&::-webkit-input-placeholder {
+												color: #999999;
+												font-weight: 400;
+											}
 										}
 									}
 								}
@@ -1002,6 +1243,7 @@
 								border-radius: 8rpx;
 								margin-right: 20rpx;
 								border: 2rpx solid #EEEEEE;
+								position: relative;
 								&:last-child {
 									margin: 0 !important;
 								}
@@ -1013,6 +1255,14 @@
 									font-size: 26rpx;
 									color: #666666;
 									margin-top: 16rpx;
+								}
+								.upload-item-dele {
+									position: absolute;
+									top: -20rpx;
+									right: -20rpx;
+									width: 40rpx;
+									height: 40rpx;
+									z-index: 9;
 								}
 							}
 						}
@@ -1110,52 +1360,82 @@
 						}
 					}
 				}
-				.footer-bottom {
+				.box-hz-btn {
 					width: 100%;
+					height: 88rpx;
+					background-repeat: no-repeat;
+					background-size: 100% 100%;
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
-					.footer-bottom-kf {
+					.box-hz-btn-kf {
 						flex-shrink: 0;
-						margin-right: 40rpx;
+						width: 188rpx;
+						height: 100%;
 						display: flex;
-						flex-direction: column;
 						align-items: center;
 						justify-content: center;
-						image {
-							width: 36rpx;
-							height: 36rpx;
-						}
-						text {
-							font-weight: 400;
-							font-size: 24rpx;
-							color: #222222;
-							margin-top: 8rpx;
-						}
+						font-weight: 500;
+						font-size: 32rpx;
+						color: #8B2300;
 					}
-					.footer-bottom-btn {
+					.box-hz-btn-next {
 						flex: 1;
-						height: 88rpx;
+						height: 100%;
 						display: flex;
 						align-items: center;
 						justify-content: center;
-						background: #00BC12;
-						box-shadow: 0rpx 8rpx 12rpx 0rpx rgba(91,190,56,0.16);
-						border-radius: 44rpx;
-						text {
-							&:nth-child(1) {
-								font-weight: 500;
-								font-size: 32rpx;
-								color: #FFFFFF;
-							}
-							&:nth-child(2) {
-								font-weight: 500;
-								font-size: 26rpx;
-								color: #FFFFFF;
-							}
-						}
+						font-weight: 500;
+						font-size: 32rpx;
+						color: #FFFFFF;
 					}
 				}
+				// .footer-bottom {
+				// 	width: 100%;
+				// 	display: flex;
+				// 	align-items: center;
+				// 	justify-content: space-between;
+				// 	.footer-bottom-kf {
+				// 		flex-shrink: 0;
+				// 		margin-right: 40rpx;
+				// 		display: flex;
+				// 		flex-direction: column;
+				// 		align-items: center;
+				// 		justify-content: center;
+				// 		image {
+				// 			width: 36rpx;
+				// 			height: 36rpx;
+				// 		}
+				// 		text {
+				// 			font-weight: 400;
+				// 			font-size: 24rpx;
+				// 			color: #222222;
+				// 			margin-top: 8rpx;
+				// 		}
+				// 	}
+				// 	.footer-bottom-btn {
+				// 		flex: 1;
+				// 		height: 88rpx;
+				// 		display: flex;
+				// 		align-items: center;
+				// 		justify-content: center;
+				// 		background: #00BC12;
+				// 		box-shadow: 0rpx 8rpx 12rpx 0rpx rgba(91,190,56,0.16);
+				// 		border-radius: 44rpx;
+				// 		text {
+				// 			&:nth-child(1) {
+				// 				font-weight: 500;
+				// 				font-size: 32rpx;
+				// 				color: #FFFFFF;
+				// 			}
+				// 			&:nth-child(2) {
+				// 				font-weight: 500;
+				// 				font-size: 26rpx;
+				// 				color: #FFFFFF;
+				// 			}
+				// 		}
+				// 	}
+				// }
 			}
 			.box {
 				width: 100%;
@@ -1179,9 +1459,12 @@
 						.box-hz-car-image {
 							width: 432rpx;
 							height: 200rpx;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							overflow: hidden;
 							image {
 								width: 100%;
-								height: 100%;
 							}
 						}
 						.box-hz-car-info {
@@ -1244,7 +1527,8 @@
 								border: 2rpx solid #FD9E24;
 								.item-d-row {
 									width: 100%;
-									height: 100rpx;
+									// height: 100rpx;
+									height: auto;
 									display: flex;
 									align-items: center;
 									justify-content: space-between;
@@ -1260,7 +1544,9 @@
 									}
 									.item-d-row-val {
 										flex: 1;
-										height: 100%;
+										// height: 100%;
+										padding: 30rpx 0;
+										box-sizing: border-box;
 										display: flex;
 										align-items: center;
 										justify-content: space-between;

--
Gitblit v1.9.3