Commit 456c71ce authored by Facius's avatar Facius

improve: 订单cell优化

parent f93951f7
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
safe-area-inset-bottom safe-area-inset-bottom
width="690rpx" width="690rpx"
border-radius="12" border-radius="12"
@close="handleClose"
close-icon-color="#333333" close-icon-color="#333333"
> >
<view class="pop-view"> <view class="pop-view">
......
...@@ -312,6 +312,24 @@ export default { ...@@ -312,6 +312,24 @@ export default {
finish: 6, //已完工 finish: 6, //已完工
} }
}, },
typeList() {
return [
'waitAccept', // 待接单、
'waitAppointment', // 待预约、
'waitCheckIn', // 待签到、
'waitFinish', // 待完工、
'audit', // 审核中、
'exception', // 异常单、
'finish', //已完工
]
},
realType() {
if (this.type && this.typeList.indexOf(this.type) != -1) {
return this.type
} else {
return this.typeList[this.orderType]
}
},
orderDistance() { orderDistance() {
return this.distance( return this.distance(
this.orderData.contactAddressLatitud, this.orderData.contactAddressLatitud,
...@@ -340,7 +358,10 @@ export default { ...@@ -340,7 +358,10 @@ export default {
异常 orderStatus ==86 工单状态 等于86 异常 orderStatus ==86 工单状态 等于86
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110 已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/ */
if (!this.type) { if (this.type && this.typeList.indexOf(this.type) != -1) {
return this.types[this.type]
} else {
// 没传或传错type
if (this.orderData.orderStatus < 31) { if (this.orderData.orderStatus < 31) {
return 0 return 0
} else if (this.orderData.orderStatus == 31) { } else if (this.orderData.orderStatus == 31) {
...@@ -370,8 +391,6 @@ export default { ...@@ -370,8 +391,6 @@ export default {
} else { } else {
return 0 return 0
} }
} else {
return this.types[this.type]
} }
}, },
}, },
...@@ -401,7 +420,7 @@ export default { ...@@ -401,7 +420,7 @@ export default {
this.$emit( this.$emit(
func, func,
this.orderData, this.orderData,
this.type, this.realType,
this.showCountTime ? 'show' : '' this.showCountTime ? 'show' : ''
) )
this.otherAction() this.otherAction()
...@@ -416,7 +435,7 @@ export default { ...@@ -416,7 +435,7 @@ export default {
this.$emit( this.$emit(
func, func,
this.orderData, this.orderData,
this.type, this.realType,
this.showCountTime ? 'show' : '' this.showCountTime ? 'show' : ''
) )
this.otherAction() this.otherAction()
...@@ -429,7 +448,7 @@ export default { ...@@ -429,7 +448,7 @@ export default {
}, },
exceptionRecord() { exceptionRecord() {
// 如果是异常单告诉后台 // 如果是异常单告诉后台
if (this.type == 'exception') { if (this.realType == 'exception') {
this.$u.api.workerDealWithError(item.orderId).then(() => {}) this.$u.api.workerDealWithError(item.orderId).then(() => {})
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment