|
|
@@ -35,31 +35,40 @@ export function handleCommonCancelOrder(order: any) {
|
|
|
|
|
|
/**
|
|
|
* 统一充电订单状态处理
|
|
|
- * @param order
|
|
|
+ * @param status 0:待充电,20:充电中,30:结算中,80:已完成
|
|
|
*/
|
|
|
export function chargeOrderStatus(status: any) {
|
|
|
const statusObj = { icon: '', text: '', color: '' }
|
|
|
switch (status) {
|
|
|
+ // 0:待充电
|
|
|
case 0:
|
|
|
- statusObj.icon = 'charge-order-settlement'
|
|
|
+ statusObj.icon = 'charge-order-unknown'
|
|
|
statusObj.text = '待充电'
|
|
|
statusObj.color = '#FFA500'
|
|
|
break
|
|
|
- case 1:
|
|
|
+ // 20:充电中
|
|
|
+ case 20:
|
|
|
statusObj.icon = 'charge-order-ing'
|
|
|
statusObj.text = '充电中'
|
|
|
statusObj.color = '#4EDC86'
|
|
|
break
|
|
|
- case 2:
|
|
|
+ // 30:结算中
|
|
|
+ case 30:
|
|
|
statusObj.icon = 'charge-order-settlement'
|
|
|
statusObj.text = '结算中'
|
|
|
statusObj.color = '#3EB6F8'
|
|
|
break
|
|
|
- case 3:
|
|
|
+ // 80:已完成
|
|
|
+ case 80:
|
|
|
statusObj.icon = 'charge-order-settled'
|
|
|
statusObj.text = '已完成'
|
|
|
statusObj.color = '#AAAAAA'
|
|
|
break
|
|
|
+ default:
|
|
|
+ statusObj.icon = 'charge-order-unknown'
|
|
|
+ statusObj.text = '未知状态'
|
|
|
+ statusObj.color = '#CCCCCC'
|
|
|
+ break
|
|
|
}
|
|
|
return statusObj
|
|
|
}
|