From 3d460140b7af3a281b54d17b457c8aff12b9d5c2 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 15 九月 2025 17:09:52 +0800
Subject: [PATCH] 前端
---
small-program/pages/order-details/order-details.vue | 194 +++++++++++++++++++++++++++--------------------
1 files changed, 111 insertions(+), 83 deletions(-)
diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index cf4ca6a..b58da71 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -55,16 +55,17 @@
<text v-if="info.type===2">璁㈤鍗�</text>
</view>
- <view v-if="info.type===0" class="order-info-wz">{{info.categoryName || ''}}锝渰{info.priceNum1 || '' }}{{feeFrom.priceParam1.unit}}{{info.type==0&info.workType==2&&info.carType==2?' | '+info.priceNum2+'浜�':''}}</view>
+ <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>
@@ -72,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>
@@ -84,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>
@@ -235,19 +239,21 @@
</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">
- <sunui-mverify hint="寮�濮嬩綔涓�" @change="getaccept($event)"></sunui-mverify>
+ <template v-if="isPushlishor && info.isUpdate != 1 && info.status === 2 && info.canStart===1">
+ <sunui-mverify v-if="1==2" hint="寮�濮嬩綔涓�" @change="getaccept($event)"></sunui-mverify>
+ <view class="order-footer-btn" v-if="comparisonTime(info.startDate)">
+ <view class="order-footer-btn-b" @click="show8 = true">寮�濮嬩綔涓�</view>
+ </view>
</template>
- <view class="order-footer-btn" v-else>
+ <view class="order-footer-btn" v-else >
<view class="order-footer-btn-a" @click="show = true" v-if="1==2&& isAcceptor && info.status ===2">鍙栨秷璁㈠崟</view>
<view class="order-footer-btn-a" @click="show = true" v-if="isPushlishor && (info.status ===0 || info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
<view class="order-footer-btn-b" @click="show2=true" v-if="isPushlishor && (info.status ===4 && info.commentStatus!=1)">鍘昏瘎浠�</view>
- <view class="order-footer-btn-b" v-if="isPushlishor&&((info.status ===5 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">{{info.type === 2 ? '缁х画鏀粯' : '绔嬪嵆鏀粯'}}</view>
+ <view class="order-footer-btn-b" v-if="isPushlishor&&((info.status ===5 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">{{info.type === 2 ? '缁х画鏀粯' : '瀹屾垚骞舵敮浠�'}}</view>
<view class="order-footer-btn-b" @click="show7 = true" v-if=" info.type!==2 &&isAcceptor && info.status ===3">纭璐圭敤</view>
<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>
@@ -291,7 +297,21 @@
</view>
<view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
<view class="btn1" @click="show6 = false">鎴戝啀鎯虫兂</view>
- <view class="btn2" @click="acceptDo">纭鎺ュ崟</view>
+ <view class="btn2" @click="acceptDo()">纭鎺ュ崟</view>
+ </view>
+ </u-modal>
+ <u-modal
+ title="娓╅Θ鎻愮ず"
+ :show="show8"
+ closeOnClickOverlay
+ showCancelButton
+ >
+ <view class="slot-content">
+ 寮�濮嬩綔涓氬悧锛�
+ </view>
+ <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
+ <view class="btn1" @click="show8 = false">鎴戝啀鎯虫兂</view>
+ <view class="btn2" @click="beginDo()">纭寮�濮�</view>
</view>
</u-modal>
<u-modal
@@ -433,6 +453,7 @@
show5:false,
show6:false,
show7:false,
+ show8:false,
actionFlag:null,
timeInfo:'00:00:00',
timeInfo1:'00:00:00',
@@ -471,26 +492,45 @@
},
onShow(options) {
this.getOrderData()
+ console.log(this.comparisonTime('2025-09-13'))
},
- methods:{
- getaccept(e) {
- if (!e.msg) return;
+ 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({
+ tmplIds: ['3rOz7DAnawrkKDM8b5_XW4FLivISWYov6d7QSC4ORsg'],
+ success(res) {
+ that.startJobs()
+ },
+ fail(err) {
+ that.startJobs()
+ }
+ })
+ },
+ startJobs(e) {
+ var that = this
this.$u.api.begin({ orderId: this.info.id })
.then(res => {
if (res.code === 200) {
- this.getOrderData()
+ that.show8=false
+ that.getOrderData()
}
})
},
- // 寮�濮嬩綔涓�
- startJobs() {
- this.$u.api.begin({ orderId: this.info.id })
- .then(res => {
- if (res.code === 200) {
- this.getOrderData()
- }
- })
- },
+
// 淇敼
jumpEdit() {
if (this.info.type === 0 && this.info.workType === 0) {
@@ -551,18 +591,6 @@
icon: 'none'
})
}
- uni.requestSubscribeMessage({
- tmplIds: ['3rOz7DAnawrkKDM8b5_XW4FLivISWYov6d7QSC4ORsg'],
- success(res) {
- that.doConfirmFeeBiz()
- },
- fail(err) {
- that.doConfirmFeeBiz()
- }
- })
- },
- doConfirmFeeBiz(){
- var that = this
this.$u.api.confirmFee({
confirmFeeRemark: this.feeFrom.confirmFeeRemark,
confirmOtherFee: (this.feeFrom.confirmOtherFee||0)*100,
@@ -642,17 +670,6 @@
}
})
},
- beginDo(){
- var that = this
- var param = {orderId: this.id}
- this.$u.api.begin(param).then(res =>{
- if(res.code ===200){
- that.show3=false
- uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'error', duration: 2000 });
- that.getOrderData()
- }
- })
- },
confirmUpdDo(status){
var that = this
var param = {orderId: this.id,status:status}
@@ -715,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!=''){
@@ -730,27 +745,7 @@
},
//璁㈠崟鐘舵��:0=寰呮敮浠� 1=寰呮帴鍗曪紱2=宸叉帴鍗曪紱3=杩涜涓紱4=宸插畬鎴愶紱99=宸插彇娑�
getStatusInfo(){
- if(this.userInfo.id === this.info.acceptMemberId){
- //濡傛灉鏄帴鍗曟柟
- if(this.info.status === 0){
- return ''
- }else if(this.info.status === 1){
- return ''
- }else if(this.info.status === 2){
- if(this.info.isUpdate==1){
- return ''
- }
- return '鎮ㄥ凡鎺ュ崟锛岃鎸夋椂瀹屾垚璁㈠崟浠诲姟'
- }else if(this.info.status === 5){
- return '鎮ㄥ凡纭璐圭敤锛岀瓑寰呭彂鍗曟柟鏀粯'
- }else if(this.info.status === 3){
- return '璁㈠崟杩涜涓紝璇锋寜鏃跺畬鎴愯鍗曚换鍔�'
- }else if(this.info.status === 4){
- return '鎮ㄧ殑璁㈠崟宸插畬鎴�'
- }else if(this.info.status === 99){
- return '璁㈠崟宸插彇娑�'
- }
- }else{
+ if(this.isPushlishor){
//濡傛灉鏄彂甯冩柟
if(this.info.status === 0){
return '璇峰敖蹇畬鎴愭敮浠橈紝鍙戝竷璁㈠崟'
@@ -762,11 +757,37 @@
if(this.info.isUpdate==1){
return '璁㈠崟宸蹭慨鏀癸紝璇风瓑寰呮帴鍗曟柟纭'
}
- return '璁㈠崟宸叉帴鍗曪紝璇锋嫋鍔ㄤ笅鏂光�滃紑濮嬩綔涓氣�濇寜閽�'
+ return '璁㈠崟宸叉帴鍗曪紝璇风偣鍑讳笅鏂光�滃紑濮嬩綔涓氣�濇寜閽�'
}else if(this.info.status === 3){
- return this.info.type!=2?'璁㈠崟瀹屾垚鍚庤鐐瑰嚮涓嬫柟鈥滃畬鎴愬苟鏀粯鈥濇寜閽�':'璁㈠崟姝e湪杩涜涓�'
+ if(this.info.type ==2){
+ return '璁㈠崟浣滀笟杩涜涓紝璇风偣鍑讳笅鏂光�滃畬鎴愨�濇寜閽畬鎴愪綔涓�'
+ }
+ return '璁㈠崟姝e湪杩涜涓紝绛夊緟浣滀笟瀹屾垚鎺ュ崟鏂圭‘璁よ垂鐢�'
+ }else if(this.info.status === 5){
+ return '鎺ュ崟鏂瑰凡纭璐圭敤锛岃鐐瑰嚮涓嬫柟鈥滃畬鎴愬苟鏀粯鈥濇寜閽�'
}else if(this.info.status === 4){
return this.info.commentStatus==1?'鎮ㄧ殑璁㈠崟宸插畬鎴愶紝娆㈣繋鍐嶆浣跨敤': '鎮ㄧ殑璁㈠崟宸插畬鎴愶紝璇峰強鏃惰瘎浠�'
+ }else if(this.info.status === 99){
+ return '璁㈠崟宸插彇娑�'
+ }
+ //濡傛灉鏄帴鍗曟柟
+
+ }else{
+ if(this.info.status === 0){
+ return ''
+ }else if(this.info.status === 1){
+ return '鍙戝崟鏂瑰凡鎴愬姛鍙戣捣璁㈠崟锛屾偍鍙互杩涜鎺ュ崟'
+ }else if(this.info.status === 2){
+ if(this.info.isUpdate==1){
+ return ''
+ }
+ return '鎮ㄥ凡鎺ュ崟锛岃鎸夋椂瀹屾垚璁㈠崟浠诲姟'
+ }else if(this.info.status === 5){
+ return '鎮ㄥ凡纭璐圭敤锛岀瓑寰呭彂鍗曟柟鏀粯'
+ }else if(this.info.status === 3){
+ return '璁㈠崟杩涜涓紝璇锋寜鏃跺畬鎴愯鍗曚换鍔�'
+ }else if(this.info.status === 4){
+ return '鎮ㄧ殑璁㈠崟宸插畬鎴�'
}else if(this.info.status === 99){
return '璁㈠崟宸插彇娑�'
}
@@ -881,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){
//杩愯揣鍗� 鎸夊ぉ鏁�
@@ -1223,6 +1244,7 @@
font-weight: 500;
font-size: 32rpx;
color: #666666;
+ margin-right: 2rpx;
border-radius: 44rpx;
border: 1rpx solid #B2B2B2;
}
@@ -1651,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 {
@@ -1664,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;
+ }
}
}
}
--
Gitblit v1.9.3