order-constants.js 2.2 KB
// 订单来源, 接口对应查询参数: tabType
export const ownType = {
  BUY: 'buy', // 买家
  SELL: 'sell', // 卖家
};

// 卖家订单状态, 接口对应查询参数: type
export const sellerOrderStatus = {
  IN_SALE: 1, // 出售中
  TO_BE_DELIVERED: 2, // 待发货
  SHIPPED: 3, // 已发货
  DONE: 5, // 交易完成
  FAILED: 6, // 交易失败
};

// 买家订单状态,接口对应查询参数: type
export const buyerOrderStatus = {
  UNPAID: 2, // 未付款
  TO_BE_DELIVERED: 3, // 待发货
  PENDING_RECEIPT: 4, // 待收货
  DONE: 5, // 交易成功
  FAILED: 6, // 交易失败
};

// 卖家订单状态, 接口对应查询参数: type
export const sellerOrderStatusList = [
  {
    value: 1,
    text: '出售中',
  },
  {
    value: 2,
    text: '待发货',
  },
  {
    value: 3,
    text: '已发货',
  },
  {
    value: 5,
    text: '交易完成',
  },
  {
    value: 6,
    text: '交易失败',
  },
];

// 买家订单状态,接口对应查询参数: type
export const buyerOrderStatusList = [
  {
    value: 1,
    text: '全部',
  },
  {
    value: 2,
    text: '待付款',
  },
  {
    value: 3,
    text: '待发货',
  },
  {
    value: 4,
    text: '待收货',
  },
];

// 订单操作
// ts IOrderAction[]
export const orderActionsMap = {
  DEL_ORDER: {
    code: 'del_order',
    name: 'DEL_ORDER',
    text: '删除',
  },
  BUY_AGAIN: { code: 'buy_again', name: 'BUY_AGAIN', text: '再次购买' },
  SHOW_DETAIL: {
    code: 'show_detail',
    name: 'SHOW_DETAIL',
    text: '查看详情',
  },
  SHOW_EXPRESS: {
    code: 'show_express',
    name: 'SHOW_EXPRESS',
    text: '查看物流',
  },
  CONFIRM_DELIVERY: {
    code: 'confirm_delivery',
    name: 'CONFIRM_DELIVERY',
    text: '确认收货',
  },
  SOLD_AGAIN: {
    code: 'sold_again',
    name: 'SOLD_AGAIN',
    text: '再次出售',
  },
  NOT_SOLD: {
    code: 'not_sold',
    confirmTips: '您确定不卖此商品吗?',
    name: 'NOT_SOLD',
    text: '不卖了',
  },
  PAY_EARNESTMONEY: {
    code: 'pay_earnestMoney',
    name: 'PAY_EARNESTMONEY',
    text: '支付保证金',
  },
  NOT_ENTRY_CHANGE_PRICE: {
    code: 'not_entry_change_price',
    name: 'NOT_ENTRY_CHANGE_PRICE',
    text: '调价',
  },
};