Browse Source

fix: 修复订单状态检查和页面跳转逻辑

修复订单详情页的状态检查逻辑,将checkOrderStatus方法重构为checkStatus并整合到onOrderDetail中
修正工作详情页的错误跳转逻辑和订单ID引用
调整支付页面显示用户信息的逻辑,增加employResume字段判断
修复日期选择器的最小日期限制问题
修正订单状态文本显示错误
master
前端-胡立永 1 day ago
parent
commit
5ac2977f26
7 changed files with 42 additions and 53 deletions
  1. +1
    -1
      components/order-status/index.vue
  2. +4
    -1
      pages/home/index.vue
  3. +10
    -19
      pages_subpack/job-order-detail/index.vue
  4. +11
    -19
      pages_subpack/order-detail/index.vue
  5. +4
    -4
      pages_subpack/pay/index.vue
  6. +3
    -0
      pages_subpack/release/component/enterprise.vue
  7. +9
    -9
      pages_subpack/work-detail/index.vue

+ 1
- 1
components/order-status/index.vue View File

@ -73,7 +73,7 @@
},
'1' : {//
'job-order': {
0: '等待企业确认',
0: '待待师傅确认',
1: '订单进行中',
2: '试工完成',
3: '企业待支付',


+ 4
- 1
pages/home/index.vue View File

@ -119,6 +119,10 @@
},
onShow() {
this.rpageNo = 1
this.rlist = []
this.tpageNo = 1
this.tList = []
this.onBannerList()
this.onTaskList()
this.onRolelist()
@ -138,7 +142,6 @@
that.tList = []
that.onTaskList()
}
},
onReachBottom() {
let that = this


+ 10
- 19
pages_subpack/job-order-detail/index.vue View File

@ -285,27 +285,17 @@
this.type = options.type || ''
},
onShow(){
this.checkOrderStatus()
this.onOrderDetail()
},
methods: {
//
checkOrderStatus() {
methods: {
checkStatus(){
let that = this
let params = {
orderId: that.orderId
}
orderDetail(params).then(response => {
that.obj = response.result
// orderStatusSeek
if (that.type && that.obj && !that.obj.orderStatusSeek && that.obj.status > 0) {
uni.navigateTo({
url: "/pages_subpack/payment/index?id=" + that.orderId
})
}
}).catch(error => {
})
},
if (that.type && that.obj && !that.obj.orderStatusSeek && that.obj.status > 0 && that.obj.status < 4) {
uni.navigateTo({
url: "/pages_subpack/payment/index?id=" + that.orderId
})
}
},
onOrderDetail() {
let that = this
let params = {
@ -313,6 +303,7 @@
}
orderDetail(params).then(response => {
that.obj = response.result
this.checkStatus()
}).catch(error => {
})


+ 11
- 19
pages_subpack/order-detail/index.vue View File

@ -201,27 +201,18 @@
this.orderId = options.orderId
},
onShow() {
this.checkOrderStatus()
},
//
checkOrderStatus() {
let that = this
let params = {
orderId: that.orderId
}
orderDetail(params).then(response => {
that.obj = response.result
// orderStatusSeek
if (that.obj && !that.obj.orderStatusSeek && that.obj.status > 0) {
uni.navigateTo({
url: "/pages_subpack/payment/index?id=" + that.orderId
})
}
}).catch(error => {
})
this.onOrderDetail()
},
methods: {
checkStatus(){
let that = this
// orderStatusSeek
if (that.obj && !that.obj.orderStatusSeek && that.obj.status > 0 && that.obj.status < 4) {
uni.navigateTo({
url: "/pages_subpack/payment/index?id=" + that.orderId
})
}
},
onOrderDetail() {
let that = this
let params = {
@ -229,6 +220,7 @@
}
orderDetail(params).then(response => {
that.obj = response.result
this.checkStatus()
}).catch(error => {
})


+ 4
- 4
pages_subpack/pay/index.vue View File

@ -16,14 +16,14 @@
</view>
<view class="se-flex se-flex-h-fs se-mt-30 se-py-20 se-px-30 se-bs se-bgc-white se-br-20">
<image class="se-a-30" src="@/static/image/46502.png" mode=""></image>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.workUser }}</text>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.workPhone }}</text>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.employResume ? detail.employResume.name : detail.workUser }}</text>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.employResume ? detail.employResume.phone : detail.workPhone }}</text>
</view>
<view class="se-mt-30 se-py-20 se-px-30 se-bs se-bgc-white se-br-20">
<view class="se-flex se-flex-h-sb se-pb-20 se-b-b">
<view class="se-flex se-flex-h-fs">
<image class="se-w-30 se-h-40" src="@/static/image/47961.png" mode=""></image>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.workUser }}</text>
<text class="se-c-black se-fs-32 se-ml-20">{{ detail.employResume ? detail.employResume.name : detail.workUser }}</text>
</view>
<view>
<text class="se-c-orange se-fs-32 se-ml-20">$ {{ detail.payMoney }}</text>
@ -163,7 +163,7 @@
if (this.detail.type == 1) {
//
return basePrice + premiumFee + trafficFee;
return basePrice + premiumFee
} else {
//
return basePrice;


+ 3
- 0
pages_subpack/release/component/enterprise.vue View File

@ -108,6 +108,7 @@
<u-datetime-picker
:show="showMinDate"
:value="form.dateMin"
:minDate="todayTimestamp"
mode="datetime"
closeOnClickOverlay
@confirm="dateMinConfirm"
@ -117,6 +118,7 @@
<u-datetime-picker
:show="showMaxDate"
:value="form.dateMax"
:minDate="todayTimestamp"
mode="datetime"
closeOnClickOverlay
@confirm="dateMaxConfirm"
@ -138,6 +140,7 @@
return {
showMinDate:false,
showMaxDate:false,
todayTimestamp: new Date().setHours(0, 0, 0, 0),
showPicker: false,
showIndustry: false,


+ 9
- 9
pages_subpack/work-detail/index.vue View File

@ -161,7 +161,7 @@
// url:"/pages_subpack/payment/index?id="+response.result.id
// })
uni.navigateTo({
url:"/pages_subpack/order-detail/index?orderId="+error.result.id
url:"/pages_subpack/order-detail/index?orderId="+response.result.id
})
} else {
// 0
@ -176,7 +176,7 @@
//
if (error.result && error.result.id) {
//
if (error.result.status == 0) {
// if (error.result.status == 0) {
setTimeout(()=>{
// if(error.result.orderStatusSeek == 'Y'){
uni.navigateTo({
@ -188,13 +188,13 @@
// })
// }
}, 800);
} else {
//
uni.showToast({
title: error.message || '操作失败',
icon: 'none'
})
}
// } else {
// //
// uni.showToast({
// title: error.message || '',
// icon: 'none'
// })
// }
} else {
uni.showToast({
title: error.message || '操作失败',


Loading…
Cancel
Save