From f222a7fbe8f5a9f279467f986a1e4ca9a86217e6 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 12 九月 2025 09:13:09 +0800
Subject: [PATCH] 优化
---
small-program/pages/order-details/order-details.vue | 211 +++++++++++++++++++++++++++-------------------------
1 files changed, 111 insertions(+), 100 deletions(-)
diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index eadd734..328e11b 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -55,7 +55,8 @@
<text v-if="info.type===2">璁㈤鍗�</text>
</view>
- <view v-if="info.type===0" class="order-info-wz">{{info.categoryName || ''}}锝渰{info.priceNum1 || '' }}{{info.workType === 0?'鏂�':'浜�'}}</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">
<image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
@@ -111,16 +112,10 @@
</view>
<view class="price-row">
<view class="price-row-label">棰勪及鎬昏垂鐢�(鍏�)</view>
- <view class="price-row-val" :style="{color: userInfo.id !== info.acceptMemberId ? '#FF0000' : ''}">
+ <view class="price-row-val" :style="{color: (!isPushlishor&&info.status!=4&&info.status!=5) || (isPushlishor&&info.type!=2 &&info.status!=4&&info.status!=5) ? '#FF0000' : ''}">
楼{{((info.originEstimatedAccount||0)/100).toFixed(2) }}
</view>
- </view>
- <view class="price-row" v-if="isAcceptor&&(info.type==2 || (info.status!=5&& info.status!=4))">
- <view class="price-row-label">瀹為檯鍒拌处(鍏�)</view>
- <view class="price-row-val" style="color: #FF0000;">
- 楼{{((info.receiveAccount || 0) / 100).toFixed(2) }}
- </view>
- </view>
+ </view>
</view>
<template v-if="info.type!=2&&(info.status==5|| info.status==4)">
<view class="order-info-x"></view>
@@ -142,7 +137,7 @@
</view>
<view class="price-row">
<view class="price-row-label">瀹為檯鎬昏垂鐢�(鍏�)</view>
- <view class="price-row-val" style="color: #FF0000">
+ <view class="price-row-val" :style="{color: info.status !=4 ? '#FF0000' : ''}">
楼{{((info.estimatedAccount||0)/100).toFixed(2) }}
</view>
</view>
@@ -160,12 +155,12 @@
<view class="order-info-supplement-title">瀹為檯璐圭敤</view>
</view>
<view class="order-info-price">
- <view class="price-row">
- <view class="price-row-label" v-if="isPushlishor">瀹為檯鏀粯</view>
+ <view class="price-row" v-if="isPushlishor">
+ <view class="price-row-label" >瀹為檯鏀粯(鍏�)</view>
<view class="price-row-val" style="color: #FF0000;">楼{{((info.payAccount||0)/100).toFixed(2) }} </view>
</view>
<view class="price-row" v-if="isAcceptor && info.status==4" >
- <view class="price-row-label">瀹為檯鍒拌处</view>
+ <view class="price-row-label">瀹為檯鍒拌处(鍏�)</view>
<view class="price-row-val" style="color: #FF0000;">楼{{((info.receiveAccount||0)/100).toFixed(2) }} </view>
</view>
@@ -242,13 +237,16 @@
<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>
+ <sunui-mverify v-if="1==2" hint="寮�濮嬩綔涓�" @change="getaccept($event)"></sunui-mverify>
+ <view class="order-footer-btn" >
+ <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>
@@ -297,7 +295,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
@@ -351,23 +363,23 @@
<viem class="money">{{((info.price||0)/100).toFixed(2) }}{{info.priceUnit || '' }}</viem>
</view>
<view class="querenfee-c" >
- <view class="querenfee-c-info1"><text style="color: red;">*</text>瀹為檯{{feeFrom.priceParam1.name}}</view>
+ <view class="querenfee-c-info1"><text style="color: red;">*</text>瀹為檯{{feeFrom.priceParam1.name}}:</view>
<view class="querenfee-c-input">
- <input type="number" placeholder-style="color: #999999; font-size: 56rpx; font-weight: 500;" @input="getTotal" v-model="feeFrom.priceNum1" placeholder="璇疯緭鍏�" />
+ <input type="number" placeholder-style="color: #999999; font-size: 50rpx; font-weight: 500;" @input="getTotal" v-model="feeFrom.priceNum1" placeholder="0" />
</view>
<text class="querenfee-c-danw">{{feeFrom.priceParam1.unit}}</text>
</view>
<view class="querenfee-c" v-if="feeFrom.priceParam2.name !=null">
<view class="querenfee-c-info1"><text style="color: red;">*</text>瀹為檯{{feeFrom.priceParam2.name}}锛�</view>
<view class="querenfee-c-input">
- <input type="number" v-model="feeFrom.priceNum2" placeholder-style="color: #999999; font-size: 56rpx; font-weight: 500;" @input="getTotal" placeholder="璇疯緭鍏�" />
+ <input type="number" v-model="feeFrom.priceNum2" placeholder-style="color: #999999; font-size: 50rpx; font-weight: 500;" @input="getTotal" placeholder="0" />
</view>
- <text class="querenfee-c-info1" >{{feeFrom.priceParam2.unit}}</text>
+ <text class="querenfee-c-danw" >{{feeFrom.priceParam2.unit}}</text>
</view>
<view class="querenfee-c">
<view class="querenfee-c-info1">鍏朵粬璐圭敤锛�</view>
<view class="querenfee-c-input">
- <input type="digit" v-model="feeFrom.confirmOtherFee" placeholder-style="color: #999999; font-size: 56rpx; font-weight: 500;" placeholder="璇疯緭鍏�" />
+ <input type="digit" v-model="feeFrom.confirmOtherFee" placeholder-style="color: #999999; font-size: 50rpx; font-weight: 500;" @input="getTotal" placeholder="0" />
</view>
<text class="querenfee-c-danw">鍏�</text>
</view>
@@ -439,6 +451,7 @@
show5:false,
show6:false,
show7:false,
+ show8:false,
actionFlag:null,
timeInfo:'00:00:00',
timeInfo1:'00:00:00',
@@ -478,25 +491,30 @@
onShow(options) {
this.getOrderData()
},
- methods:{
- getaccept(e) {
- if (!e.msg) return;
+ methods:{
+ 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) {
@@ -532,8 +550,11 @@
price: this.info.price,
priceUnit: this.feeFrom.priceParam1.unit,
priceNum1: this.feeFrom.priceNum1 || 0,
- priceNum2: this.feeFrom.priceNum2 || 0,
- type: this.info.type
+ priceNum2: this.feeFrom.priceNum2 || 0,
+ confirmOtherFee:(this.feeFrom.confirmOtherFee||0)*100,
+ type: this.info.type,
+ carType:this.info.carType ,
+ workType: this.info.workType
}).then(res => {
if (res.code === 200) {
this.confirmPayFee = (res.data / 100) || '0'
@@ -541,6 +562,7 @@
})
},
confirmFee(){
+ var that =this
if (!this.feeFrom.priceNum1) {
return uni.showToast({
title: '瀹為檯' + this.feeFrom.priceParam1.name + '涓嶈兘涓虹┖',
@@ -553,18 +575,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,
@@ -644,17 +654,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}
@@ -670,7 +669,7 @@
}
})
},
- acceptDo(){
+ acceptDoBiz(){
var that = this
var param = {orderId: this.id}
this.$u.api.accept(param).then(res =>{
@@ -680,6 +679,18 @@
that.getOrderData()
}
})
+ },
+ acceptDo() {
+ var that = this;
+ uni.requestSubscribeMessage({
+ tmplIds: ['AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8','3YSC7gouRlSjHXz4CrWOGFzPmGwEBtFj4snwdfMvKHk','tDpYImlrdv-0d3euTrHbYZ1cEZvjVHTNlqHvV0tpLHg'],
+ success(res) {
+ that.acceptDoBiz()
+ },
+ fail(err) {
+ that.acceptDoBiz()
+ }
+ })
},
cancelDo(){
var that = this
@@ -720,27 +731,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 '璇峰敖蹇畬鎴愭敮浠橈紝鍙戝竷璁㈠崟'
@@ -752,11 +743,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 '璁㈠崟宸插彇娑�'
}
@@ -820,15 +837,8 @@
//濡傛灉鏄帴鍗曟柟
that.isAcceptor =true
}
- if(that.isAcceptor ||that.isPushlishor ){
+ // if(that.isAcceptor ||that.isPushlishor ){
that.info = res.data
- if(that.userInfo.id === that.info.releaseMemberId ){
- //濡傛灉鏄彂鍗曟柟
- that.isPushlishor =true
- }else if(that.userInfo.id === that.info.acceptMemberId ){
- //濡傛灉鏄帴鍗曟柟
- that.isAcceptor =true
- }
that.amount = ((that.info.estimatedAccount || 0) / 100).toFixed(2)
if(that.info.wayInfo){
that.wayList = JSON.parse(that.info.wayInfo)
@@ -840,9 +850,9 @@
that.updateTimeInfo1()
}
that.initPriceNumParam()
- }else{
- uni.showToast({ title: '璁㈠崟淇℃伅涓嶅瓨鍦�', icon: 'error', duration: 2000 });
- }
+ // }else{
+ // uni.showToast({ title: '璁㈠崟淇℃伅涓嶅瓨鍦�', icon: 'error', duration: 2000 });
+ // }
}
})
},
@@ -853,13 +863,13 @@
this.feeFrom.priceParam2.unit =null
if(this.info.type==0 && this.info.workType==1){
//鍒嗘嫞宸�
- this.feeFrom.priceParam1.name ='鐢ㄥ伐澶╂暟锛�'
+ this.feeFrom.priceParam1.name ='鐢ㄥ伐澶╂暟'
this.feeFrom.priceParam1.unit ='澶�'
- this.feeFrom.priceParam2.name ='鐢ㄥ伐浜烘暟锛�'
+ this.feeFrom.priceParam2.name ='鐢ㄥ伐浜烘暟'
this.feeFrom.priceParam2.unit ='浜�'
}else if(this.info.type==0 && this.info.workType==0){
//閲囨憳宸�
- this.feeFrom.priceParam1.name ='閲囨憳閲嶉噺锛�'
+ this.feeFrom.priceParam1.name ='閲囨憳閲嶉噺'
this.feeFrom.priceParam1.unit ='鏂�'
this.feeFrom.priceParam2.name =null
this.feeFrom.priceParam2.unit =null
@@ -874,10 +884,10 @@
}else if(this.info.carType==1){
//鎸夊皬鏃�
this.feeFrom.priceParam1.name ='宸ヤ綔鏃堕暱'
- this.feeFrom.priceParam1.unit ='鏃�'
+ this.feeFrom.priceParam1.unit ='灏忔椂'
this.feeFrom.priceParam2.name ='鐢ㄥ伐浜烘暟'
this.feeFrom.priceParam2.unit ='浜�'
- }else if(this.info.carType==1){
+ }else if(this.info.carType==2){
//鎸夊皬鏃�
this.feeFrom.priceParam1.name ='鍖呰閲嶉噺'
this.feeFrom.priceParam1.unit ='鏂�'
@@ -1220,6 +1230,7 @@
font-weight: 500;
font-size: 32rpx;
color: #666666;
+ margin-right: 2rpx;
border-radius: 44rpx;
border: 1rpx solid #B2B2B2;
}
--
Gitblit v1.9.3