From 202d13acd6f02b6573213e49326bc1f092d57b99 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期五, 12 九月 2025 18:22:13 +0800 Subject: [PATCH] 优化 --- small-program/pages/mine/mine.vue | 37 +++++++++++- small-program/pages/packaging-worker/packaging-worker.vue | 7 +- small-program/static/icon/ar_address@2x.png | 0 small-program/pages/demand-hall/demand-hall.vue | 10 +- small-program/pages/using-workers/using-workers.vue | 18 ++++-- small-program/pages/index/index.vue | 17 +++-- small-program/static/icon/ic_change@2x.png | 0 small-program/pages/order-details/order-details.vue | 60 +++++++++++++------ small-program/pages/freight/freight.vue | 24 +++++--- 9 files changed, 121 insertions(+), 52 deletions(-) diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue index ced6e03..638a127 100644 --- a/small-program/pages/demand-hall/demand-hall.vue +++ b/small-program/pages/demand-hall/demand-hall.vue @@ -63,13 +63,13 @@ {{item.categoryName}}锝渰{item.priceNum2}}浜� </view> <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 0"> - {{item.categoryName}}锝渰{item.priceNum1}}澶� 锝渰{item.priceNum2}}浜� + {{item.categoryName}}锝渰{item.priceNum1}}澶� | {{item.priceNum2}}浜� </view> <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 1"> - {{item.categoryName}}锝渰{item.priceNum1}}灏忔椂 锝渰{item.priceNum2}}浜� + {{item.categoryName}}锝渰{item.priceNum1}}灏忔椂 | {{item.priceNum2}}浜� </view> <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 2"> - {{item.categoryName}}锝渰{item.priceNum1}}鏂� + {{item.categoryName}}锝渰{item.priceNum1}}鏂� | {{item.priceNum2}}浜� </view> <view class="index-list-item-info" v-if="item.type === 1"> {{item.carUnit}} | {{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}锝滅敤杞{item.priceNum1}}{{item.carType === 0?"澶�":"娆�"}} @@ -233,8 +233,8 @@ async onShow(options) { var flag = getApp().globalData.orderStatus console.log(getApp().globalData,"=====================================") - this.status = '' - this.commentStatus='' + // this.status = '' + // this.commentStatus='' // status: this.status === 5 ? 4 : this.status, // commentStatus: this.status === 5 ? 0 : '', if(flag =='1'){//鍙戝崟鏂瑰緟鎺ュ崟 diff --git a/small-program/pages/freight/freight.vue b/small-program/pages/freight/freight.vue index d40229d..d0f17e9 100644 --- a/small-program/pages/freight/freight.vue +++ b/small-program/pages/freight/freight.vue @@ -91,7 +91,7 @@ <view class="list-item-row"> <view class="list-item-row-label">杩愯緭閲嶉噺/鏁伴噺<b>*</b></view> <view class="list-item-row-val"> - <input type="text" style="flex: 3;" v-model="form.transportNum" placeholder="璇疯緭鍏�" /> + <input type="digit" style="flex: 3;" v-model="form.transportNum" placeholder="璇疯緭鍏�" /> <!-- <view @click="show4 = true" style="width: 100rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end;"> <text>{{form.transportUnit}}</text> <u-icon name="arrow-down" color="#111111" size="16"></u-icon> @@ -110,14 +110,15 @@ <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"> + <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index" @click="preview(index, form.multifileList)"> <image :src="item.url || item.fileurlFull" mode="widthFix"></image> - <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> + <image class="upload-item-dele" @click.stop="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> </view> <view class="upload-item" @click="uploadImg"> <u-icon name="plus" color="#999999" size="24"></u-icon> <text>鐐瑰嚮涓婁紶</text> </view> + <view style="width: 215rpx; height: 0;"></view> </view> </view> <!-- <view class="list-item-zk" @click="viewStatus = !viewStatus"> @@ -136,14 +137,14 @@ <view class="list-item-row" v-if="form.carType==0"> <view class="list-item-row-label">鐢ㄨ溅澶╂暟</view> <view class="list-item-row-val"> - <input type="number" v-model="form.totalDays" disabled placeholder="" /> + <input type="digit" v-model="form.totalDays" disabled placeholder="" /> <text>澶�</text> </view> </view> <view class="list-item-row" v-if="form.carType==1"> <view class="list-item-row-label">鐢ㄨ溅娆℃暟<b>*</b></view> <view class="list-item-row-val"> - <input type="number" v-model="form.priceNum1" @input="getPrice" placeholder="璇疯緭鍏�" /> + <input type="digit" v-model="form.priceNum1" @input="getPrice" placeholder="璇疯緭鍏�" /> <text>娆�</text> </view> </view> @@ -355,7 +356,11 @@ this.getCategoryLists() }, methods: { - handleInputPrice(e) { + preview(current, arr) { + let urls = arr.map(item => item.url || item.fileurlFull) + uni.previewImage({ current, urls }) + }, + handleInputPrice(e) { try{ this.form.price = Number(this.form.price).toFixed(3) }catch(e){ @@ -932,21 +937,22 @@ width: 100%; display: flex; align-items: center; + justify-content: space-between; flex-wrap: wrap; padding: 30rpx 0; box-sizing: border-box; .upload-item { - width: 156rpx; - height: 156rpx; + width: 215rpx; + height: 215rpx; display: flex; align-items: center; flex-direction: column; justify-content: center; background: #F8F9FB; border-radius: 8rpx; - margin-right: 20rpx; border: 2rpx solid #EEEEEE; position: relative; + margin-bottom: 15rpx; &:last-child { margin: 0 !important; } diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue index a5e872a..15c8086 100644 --- a/small-program/pages/index/index.vue +++ b/small-program/pages/index/index.vue @@ -137,7 +137,7 @@ </view> <view class="radio-item-list-data"> <text style="flex-shrink: 0;">浠芥暟锛�</text> - <input type="number" v-model="item.num" placeholder="璇疯緭鍏�"> + <input type="digit" v-model="item.num" placeholder="璇疯緭鍏�"> <text style="color: #999999;">浠�</text> <view class="radio-item-list-data-btn" @click="clear(index)">鍙栨秷</view> </view> @@ -167,14 +167,15 @@ <view class="list-item-row" > <view class="list-item-row-label">鍥剧墖</view> <view class="list-item-row-upload"> - <view class="upload-item" v-if=" form.multifileList" v-for="(item, index) in form.multifileList" :key="index"> + <view class="upload-item" v-if=" form.multifileList" v-for="(item, index) in form.multifileList" :key="index" @click="preview(index, form.multifileList)"> <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> + <image class="upload-item-dele" @click.stop="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> </view> <view class="upload-item" @click="uploadImg"> <u-icon name="plus" color="#999999" size="24"></u-icon> <text>鐐瑰嚮涓婁紶</text> </view> + <view style="width: 208rpx; height: 0;"></view> </view> </view> <!-- <view class="list-item-zk" @click="viewStatus = !viewStatus"> @@ -583,6 +584,10 @@ } }, methods: { + preview(current, arr) { + let urls = arr.map(item => item.url || item.fileurlFull) + uni.previewImage({ current, urls }) + }, goOrderDetail(id){ uni.navigateTo({ url: '/pages/order-details/order-details?id='+id @@ -1584,19 +1589,19 @@ width: 100%; display: flex; align-items: center; + justify-content: space-between; flex-wrap: wrap; padding: 30rpx 0; box-sizing: border-box; .upload-item { - width: 156rpx; - height: 156rpx; + width: 208rpx; + height: 208rpx; display: flex; align-items: center; flex-direction: column; justify-content: center; background: #F8F9FB; border-radius: 8rpx; - margin-right: 20rpx; border: 2rpx solid #EEEEEE; position: relative; &:last-child { diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue index 26b9905..7cf91be 100644 --- a/small-program/pages/mine/mine.vue +++ b/small-program/pages/mine/mine.vue @@ -15,8 +15,9 @@ <view class="info-box-head-info" v-if="isLogin"> <view class="info-box-head-info-name" @click="jump(1)">{{userInfo.nickName||'鍖垮悕'}}</view> <view class="info-box-head-info-type"> - <view class="info-box-head-info-type-val">{{userInfo.useIdentity==1?'鐢ㄥ伐鎺ュ崟鏂�':'鐢ㄥ伐鍙戝竷鏂�'}}</view> - <view class="info-box-head-info-type-wz" @click="editUseIdentity">鍒囨崲</view> + <view class="info-box-head-info-type-val1" v-if="userInfo.useIdentity==1">鐢ㄥ伐鎺ュ崟鏂�</view> + <view class="info-box-head-info-type-val" v-else>鐢ㄥ伐鍙戝竷鏂�</view> + <!-- <view class="info-box-head-info-type-wz" @click="editUseIdentity">鍒囨崲</view> --> </view> </view> <view class="info-box-head-info" v-else @click="jump(5)"> @@ -24,6 +25,10 @@ <view class="info-box-head-info-type"> <view class="info-box-head-info-type-wz">寰俊鎺堟潈鐧诲綍</view> </view> + </view> + <view class="info-box-head-qiehuan" @click="editUseIdentity"> + <image src="/static/icon/ic_change@2x.png" mode="widthFix"></image> + <text>鍒囨崲韬唤</text> </view> </view> <view class="info-box-label">璐︽埛浣欓</view> @@ -484,7 +489,6 @@ width: 100%; height: 108rpx; display: flex; - align-items: center; margin-bottom: 30rpx; .info-box-head-image { width: 108rpx; @@ -498,6 +502,20 @@ margin-right: 24rpx; image { width: 100%; + } + } + .info-box-head-qiehuan { + flex-shrink: 0; + display: flex; + image { + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; + } + text { + font-weight: 400; + font-size: 28rpx; + color: #00BC12; } } .info-box-head-info { @@ -528,6 +546,19 @@ border: 2rpx solid #FD9E24; margin-right: 20rpx; } + .info-box-head-info-type-val1 { + width: 144rpx; + height: 42rpx; + line-height: 42rpx; + text-align: center; + background: rgba(91,190,56,0.06); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #00BC12; + border: 2rpx solid #00BC12; + margin-right: 20rpx; + } .info-box-head-info-type-wz { font-weight: 400; font-size: 24rpx; diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue index 328e11b..6f14214 100644 --- a/small-program/pages/order-details/order-details.vue +++ b/small-program/pages/order-details/order-details.vue @@ -58,14 +58,14 @@ <view v-if="info.type===0" class="order-info-wz"> {{info.categoryName || ''}}锝渰{info.priceNum1 || '' }}{{feeFrom.priceParam1.unit}}{{feeFrom.priceParam2.name!=null?(' | '+info.priceNum2+feeFrom.priceParam2.unit):''}}</view> <view v-if="info.type===1" class="order-info-wz">{{info.carUnit || ''}}{{' | '}}{{info.transportTypeName || ''}}{{' | '}}{{info.transportNum || '' }}{{info.transportUnit||''}}{{' | '}}闇�{{info.priceNum2 || '' }}杈�</view> - <view class="order-info-address"> + <view class="order-info-address" v-if="info.type!==1" @click="openAddr({ lat: info.lat, lgt: info.lgt, location: info.location })"> <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image> <view class="order-info-address-info"> <text>{{info.location || '' }}</text> <text>{{info.locationRemark || '' }}</text> </view> </view> - <view class="order-info-address"> + <view class="order-info-address" v-if="info.type!==1"> <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image> <view class="order-info-address-info"> <text>{{info.startDate || ''}}{{' 鑷� '}}{{info.endDate || ''}}({{info.totalDays||0}}澶�)</text> @@ -73,11 +73,14 @@ </view> <view class="address" v-if="info.type===1 && wayList && wayList.length>0"> <view class="address-xian"></view> - <view class="address-row" v-for="(item,index) in wayList" style="display: block;margin: 10px" :key="index"> + <view class="address-row" v-for="(item,index) in wayList" style="display: block;margin: 10px" :key="index" @click="openAddr(item)"> <image v-if="index === 0" src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image> <image v-if="index >0 && index < wayList.length-1" src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image> <image v-if="index === wayList.length-1" src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image> - <text>{{item.location || ''}}</text> + <view class="address-row-info"> + {{item.location || ''}} + <image class="address-row-right" src="/static/icon/ar_address@2x.png" mode="widthFix"></image> + </view> </view> </view> <view class="order-info-x"></view> @@ -85,8 +88,8 @@ <view class="order-info-supplement-title">闇�姹傝ˉ鍏咃細</view> <view class="order-info-supplement-val">{{info.supplement || '' }}</view> <view class="order-info-supplement-list"> - <view class="order-info-supplement-list-item" v-for="(item,index) in info.multifileList" v-if="info.multifileList && info.multifileList.length>0" :key="item.imgurl"> - <image v-if="item.fileurlFull" :src="item.fileurlFull" @click="previemImg(item.fileurlFull)" mode="widthFix"></image> + <view class="order-info-supplement-list-item" v-for="(item,index) in info.multifileList" v-if="info.multifileList && info.multifileList.length>0" :key="item.imgurl" @click="previemImg(index, info.multifileList)"> + <image v-if="item.fileurlFull" :src="item.fileurlFull" mode="widthFix"></image> </view> <view style="width: 156rpx; height: 0;"></view> <view style="width: 156rpx; height: 0;"></view> @@ -236,9 +239,9 @@ </view> <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view> <view class="order-footer" v-if="![99].includes(info.status)"> - <template v-if="isPushlishor && info.isUpdate!=1 &&info.status ===2"> + <template v-if="isPushlishor && info.isUpdate != 1 && info.status === 2"> <sunui-mverify v-if="1==2" hint="寮�濮嬩綔涓�" @change="getaccept($event)"></sunui-mverify> - <view class="order-footer-btn" > + <view class="order-footer-btn" v-if="comparisonTime(info.startDate)"> <view class="order-footer-btn-b" @click="show8 = true">寮�濮嬩綔涓�</view> </view> </template> @@ -251,7 +254,6 @@ <view class="order-footer-btn-b" v-if="isPushlishor && ((info.status ===3 && info.type===2))" @click="payment1">瀹屾垚浣滀笟</view> <view class="order-footer-btn-b" v-if="info.type !=2 && info.isUpdate!=1&& isPushlishor && (info.status ===0 || info.status ===1|| info.status ===2)" @click="jumpEdit()">淇敼璁㈠崟</view> <view class="order-footer-btn-b" @click="show5 =true" v-if="isAcceptor&& (info.isUpdate==1 && info.status ===2)">淇敼纭</view> - <!-- <view class="order-footer-btn-b" @click="startJobs()" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">寮�濮嬩綔涓�</view> --> <view class="order-footer-btn-b" @click="show6 =true" v-if="!isPushlishor && (info.status ===1)">鎶㈠崟</view> </view> <view style="width: 100%; height: env(safe-area-inset-bottom);"></view> @@ -490,8 +492,22 @@ }, onShow(options) { this.getOrderData() + console.log(this.comparisonTime('2025-09-13')) }, methods:{ + comparisonTime(start) { + let startDate = new Date().getTime(); + let endDate = new Date(start).getTime(); + + return startDate >= endDate; + }, + openAddr(e) { + uni.openLocation({ + latitude: e.lat, + longitude: e.lgt, + name: e.location + }) + }, beginDo(e) { var that = this uni.requestSubscribeMessage({ @@ -716,11 +732,9 @@ }) }, - previemImg(src){ - uni.previewImage({ - current: src, - urls: [src] - }); + previemImg(current, arr) { + let urls = arr.map(item => item.fileurlFull) + uni.previewImage({ current, urls }); }, contactPhone(phone){ if(phone !=null && phone!=''){ @@ -888,11 +902,11 @@ this.feeFrom.priceParam2.name ='鐢ㄥ伐浜烘暟' this.feeFrom.priceParam2.unit ='浜�' }else if(this.info.carType==2){ - //鎸夊皬鏃� + //鎸夐噸閲� this.feeFrom.priceParam1.name ='鍖呰閲嶉噺' this.feeFrom.priceParam1.unit ='鏂�' - this.feeFrom.priceParam2.name =null - this.feeFrom.priceParam2.unit =null + this.feeFrom.priceParam2.name ='鐢ㄥ伐浜烘暟' + this.feeFrom.priceParam2.unit ='浜�' } }else if(this.info.type==1 && this.info.carType==0){ //杩愯揣鍗� 鎸夊ぉ鏁� @@ -1659,8 +1673,7 @@ z-index: 2; width: 100%; display: flex !important; - align-items: center; - margin-bottom: 30rpx ; + margin-bottom: 32rpx ; margin-left: 0rpx !important; margin-top: 0rpx !important; &:last-child { @@ -1672,10 +1685,17 @@ flex-shrink: 0; margin-right: 24rpx; } - text { + .address-row-info { + width: 100%; font-weight: 400; font-size: 28rpx; color: #333333; + .address-row-right { + width: 8rpx; + height: 16rpx; + margin-left: 12rpx; + margin-top: 15rpx; + } } } } diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue index 13f4553..75139ff 100644 --- a/small-program/pages/packaging-worker/packaging-worker.vue +++ b/small-program/pages/packaging-worker/packaging-worker.vue @@ -81,7 +81,7 @@ <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="form.carType === 0" @blur="getPrice" type="number" placeholder="璇疯緭鍏�" /> + <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> @@ -90,14 +90,14 @@ <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="璇疯緭鍏�" /> + <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> @@ -227,6 +227,7 @@ if (!this.form.multifileList) { this.form.multifileList = [] } + this.workDays = res.data.totalDays // this.clickType() } diff --git a/small-program/pages/using-workers/using-workers.vue b/small-program/pages/using-workers/using-workers.vue index 3a0d54b..e87979b 100644 --- a/small-program/pages/using-workers/using-workers.vue +++ b/small-program/pages/using-workers/using-workers.vue @@ -49,7 +49,7 @@ <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.priceNum1" @blur="getPrice" placeholder="璇疯緭鍏�" /> + <input type="digit" v-model="form.priceNum1" @blur="getPrice" placeholder="璇疯緭鍏�" /> <text>鏂�</text> </view> </view> @@ -62,14 +62,15 @@ <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"> + <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index" @click="preview(index, form.multifileList)"> <image :src="item.url || item.fileurlFull" mode="widthFix"></image> - <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> + <image class="upload-item-dele" @click.stop="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> </view> <view class="upload-item" @click="uploadImg"> <u-icon name="plus" color="#999999" size="24"></u-icon> <text>鐐瑰嚮涓婁紶</text> </view> + <view style="width: 215rpx; height: 0;"></view> </view> </view> <!-- <view class="list-item-zk" @click="viewStatus = !viewStatus"> @@ -226,6 +227,10 @@ this.getCateList() }, methods: { + preview(current, arr) { + let urls = arr.map(item => item.url || item.fileurlFull) + uni.previewImage({ current, urls }) + }, // 鎻愪氦璁㈠崟 submit() { var that = this; @@ -629,21 +634,22 @@ width: 100%; display: flex; align-items: center; + justify-content: space-between; flex-wrap: wrap; padding: 30rpx 0; box-sizing: border-box; .upload-item { - width: 156rpx; - height: 156rpx; + width: 215rpx; + height: 215rpx; display: flex; align-items: center; flex-direction: column; justify-content: center; background: #F8F9FB; border-radius: 8rpx; - margin-right: 20rpx; border: 2rpx solid #EEEEEE; position: relative; + margin-bottom: 15rpx; &:last-child { margin: 0 !important; } diff --git a/small-program/static/icon/ar_address@2x.png b/small-program/static/icon/ar_address@2x.png new file mode 100644 index 0000000..dafc78e --- /dev/null +++ b/small-program/static/icon/ar_address@2x.png Binary files differ diff --git a/small-program/static/icon/ic_change@2x.png b/small-program/static/icon/ic_change@2x.png new file mode 100644 index 0000000..76f8c32 --- /dev/null +++ b/small-program/static/icon/ic_change@2x.png Binary files differ -- Gitblit v1.9.3