// 订单状态，0->待支付，1->交易成功待提货，2提货成功待收货，3->交易关闭，4->申请退款，5->待退款，6->已退款，7->已完成， 8->退款审核未通过
// export const OrderState = {
//   UN_PAY: 0,
//   SUCCESS: 1,
//   // UN_RECEIVE: 2,
//   CLOSE: 3,
//   APPLY_REFUND: 4,
//   UN_REFUND: 5,
//   REFUND_SUCCESS: 6,
//   FINISH: 7,
//   REFUND_FAIL: 8,
//   CANCEL_PAY: 9
// }
//
// export const OrderStateObj = {
//   [OrderState.UN_PAY]: {
//     label: '待支付',
//     color: 'default'
//   },
//   [OrderState.SUCCESS]: {
//     label: '交易成功',
//     color: 'primary'
//   },
//   // [OrderState.UN_RECEIVE]: {
//   //   label: '待收货',
//   //   color: 'primary'
//   // },
//   [OrderState.CLOSE]: {
//     label: '交易关闭',
//     color: 'default'
//   },
//   [OrderState.APPLY_REFUND]: {
//     label: '申请退款',
//     color: 'warning'
//   },
//   [OrderState.UN_REFUND]: {
//     label: '退款中',
//     color: 'primary'
//   },
//   [OrderState.REFUND_SUCCESS]: {
//     label: '已退款',
//     color: 'success'
//   },
//   [OrderState.FINISH]: {
//     label: '已完成',
//     color: 'success'
//   },
//   [OrderState.REFUND_FAIL]: {
//     label: '退款审核未通过',
//     color: 'default'
//   },
//   [OrderState.CANCEL_PAY]: {
//     label: '取消支付',
//     color: 'default'
//   }
// }
//
export const DeliveryType = {
  EXPRESS: 2,
  SELF: 1
}

export const DeliveryTypeName = {
  [DeliveryType.SELF]: '自 提',
  [DeliveryType.EXPRESS]: '快 递'
}

export const DeliveryStatus = {
  UN_SHIP: 0,
  UN_PICK_UP: 1,
  FINISH: 2,
  CANCEL: 3,
  UN_REFUND: 4,
  REFUND_SUCCESS: 5,
  CLOSED: 6,
  REJECT: 7,
  TO_BE_SIGNED: 8
}

export const DeliveryStatusObj = {
  [DeliveryStatus.UN_SHIP]: {
    label: '待发货',
    color: 'default'
  },
  [DeliveryStatus.UN_PICK_UP]: {
    label: '已发货',
    color: 'blue'
  },
  [DeliveryStatus.FINISH]: {
    label: '已收货',
    color: 'green'
  },
  [DeliveryStatus.CANCEL]: {
    label: '已撤销',
    color: 'default'
  },
  [DeliveryStatus.UN_REFUND]: {
    label: '待退货',
    color: 'default'
  },
  [DeliveryStatus.REFUND_SUCCESS]: {
    label: '已退货',
    color: 'green'
  },
  [DeliveryStatus.CLOSED]: {
    label: '交易结束',
    color: 'gray'
  },
  [DeliveryStatus.REJECT]: {
    label: '商家驳回',
    color: 'warning'
  },
  [DeliveryStatus.TO_BE_SIGNED]: {
    label: '退货待签收',
    color: 'default'
  }
}

// 已上 旧模板

// 以下 新模板
// 订单状态，1->交易成功，2->交易关闭，3定金已付，4->待退款，5->已退款，6->支付中，7->待支付
export const OrderState = {
  SUCCESS: 1,
  CLOSE: 2,
  DEPOSIT: 3,
  UN_REFUND: 4,
  REFUND_SUCCESS: 5,
  UN_PAY: 6,
  PAYING: 7,
  REJECT: 9,
  PAYMENT_BEHALF: 10,
  ONLINE_REFUND_FAILED: 11,
  REFUND_PROGRESS: 12,
  REFUND_FAILED: 13,
  ORDER_FINISH: 14
}
export const OrderStateObj = {
  [OrderState.SUCCESS]: {
    label: '交易成功',
    color: 'success'
  },
  [OrderState.CLOSE]: {
    label: '交易关闭',
    color: 'gray'
  },
  [OrderState.DEPOSIT]: {
    label: '定金已付',
    color: 'primary'
  },
  [OrderState.UN_REFUND]: {
    label: '待退款',
    color: 'default'
  },
  [OrderState.REFUND_SUCCESS]: {
    label: '已退款',
    color: 'success'
  },
  [OrderState.UN_PAY]: {
    label: '支付中',
    color: 'primary'
  },
  [OrderState.PAYING]: {
    label: '待支付',
    color: 'default'
  },
  [OrderState.REJECT]: {
    label: '驳回',
    color: 'default'
  },
  [OrderState.PAYMENT_BEHALF]: {
    label: '待付尾款',
    color: 'default'
  },
  [OrderState.ONLINE_REFUND_FAILED]: {
    label: '链上退款失败',
    color: 'default'
  },
  [OrderState.REFUND_PROGRESS]: {
    label: '退款中',
    color: 'default'
  },
  [OrderState.REFUND_FAILED]: {
    label: '退款失败',
    color: 'default'
  },
  [OrderState.ORDER_FINISH]: {
    label: '订单完成',
    color: 'success'
  }
}

export const PayType = {
  INTEGRAL: 0,
  ZFB: 1,
  WX: 2,
  CCNY: 3
}
export const PayTypeObj = {
  [PayType.INTEGRAL]: '积分支付',
  [PayType.ZFB]: '支付宝',
  [PayType.WX]: '微信',
  [PayType.CCNY]: 'ccny'
}

export const ComplaintStatus = {
  IN_PROCESS: 1,
  COMPLETED: 2
}
export const ComplaintStatusObj = {
  [ComplaintStatus.IN_PROCESS]: '处理中',
  [ComplaintStatus.COMPLETED]: '已完成'
}

export const OrderStatus = {
  GOODS_ORDERS: 1,
  PICK_UP_ORDER: 2
}
export const OrderStatusObj = {
  [OrderStatus.GOODS_ORDERS]: '商品订单',
  [OrderStatus.PICK_UP_ORDER]: '提货订单'
}
