constant.js 3.97 KB
// 订单状态
export const orderStatusList = [
  {
    confId: 1,
    confLabel: '待升级'
  },
  {
    confId: 2,
    confLabel: '战败'
  },
  {
    confId: 3,
    confLabel: '待支付'
  },
  {
    confId: 4,
    confLabel: '已支付'
  },
  /* {
  confId: 5,
  confLabel: '已退款'
},  */ {
    confId: 6,
    confLabel: '已评价'
  },
  {
    confId: 9,
    confLabel: '已撤销'
  },
  {
    confId: 10,
    confLabel: '已关闭'
  },
  {
    confId: 11,
    confLabel: '错误订单'
  },
  {
    confId: 12,
    confLabel: '已退款'
  }
]

// 升级状态
export const upgradeList = [
  {
    confId: 'Y',
    confLabel: '已升级'
  },
  {
    confId: 'N',
    confLabel: '不升级'
  }
]

// 施工状态
export const constructionList = [
  {
    confId: 'Y',
    confLabel: '已施工'
  },
  {
    confId: 'N',
    confLabel: '未施工'
  }
]

// 分账状态
export const profitAllocationStatusList = [
  {
    confId: 1,
    confLabel: '未分账'
  },
  {
    confId: 2,
    confLabel: '已分账'
  },
  {
    confId: 4,
    confLabel: '待分账'
  }
]

// 订单来源
export const sourceList = [
  {
    confId: '1',
    confLabel: '小程序订单'
  },
  {
    confId: '7',
    confLabel: '系统导入'
  }
]

export const payType = {
  1: '微信支付',
  2: '4S店支付',
  3: 'POS机收款',
  4: '支付宝支付'
}

export const businessType = [
  {
    optionId: 1,
    optionLabel: '1.2'
  },
  {
    optionId: 2,
    optionLabel: '1.3'
  },
  {
    optionId: 3,
    optionLabel: '2.0'
  }
]

export const orderManageStatusList = [
  { confId: '1', confName: '待付款' },
  { confId: '2', confName: '已支付' },
  { confId: '3', confName: '已失效' },
  // { confId: '21', confName: '待收货(待核销)' },
  { confId: '21', confName: '待核销' },
  { confId: '22', confName: '已核销' },
  // { confId: '22', confName: '已收货(已核销)' },
  { confId: '6', confName: '待发货' },
  // { confId: '7', confName: '待核销' },
  // { confId: '8', confName: '已核销' },
  { confId: '9', confName: '售后中' },
  { confId: '10', confName: '售后完成' },
  { confId: '11', confName: '待审批' }
]

export const afterSaleStatusList = [
  { confId: '1', confName: '待审核' },
  { confId: '2', confName: '审核成功' },
  { confId: '3', confName: '审核失败' },
  { confId: '4', confName: '待确认' },
  { confId: '5', confName: '退款中' },
  { confId: '6', confName: '已退款' },
  { confId: '7', confName: '退款失败' }
]

export const orderSourceList = [
  { confId: '1', confName: '商城订单' },
  { confId: '2', confName: '直播订单' },
  { confId: '3', confName: '活动订单' },
  { confId: '4', confName: '众筹订单' }
]

export const deliveryTypeList = [
  { confId: '1', confName: '到店核销' },
  { confId: '2', confName: '快递到家' }
]

function getExplorer() {
  var ua = navigator.userAgent.toLocaleLowerCase()
  var browserType = null
  if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
    browserType = 'IE'
  } else if (ua.match(/firefox/) != null) {
    browserType = '火狐'
  } else if (ua.match(/ubrowser/) != null) {
    browserType = 'UC'
  } else if (ua.match(/opera/) != null) {
    browserType = '欧朋'
  } else if (ua.match(/bidubrowser/) != null) {
    browserType = '百度'
  } else if (ua.match(/metasr/) != null) {
    browserType = '搜狗'
  } else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
    browserType = 'QQ'
  } else if (ua.match(/maxthon/) != null) {
    browserType = '遨游'
  } else {
    browserType = '谷歌'
  }
  return browserType
}
// 园区店模式/经营模式
export const manageTypeList = [
  { confId: 0, confLabel: '园区店' },
  { confId: 1, confLabel: '驻店' }
]

export const exportFn = url => {
  let browserType = getExplorer()
  if (browserType == 'QQ') {
    window.open(url)
    return
  }
  let iframe = document.createElement('iframe')
  iframe.style.display = 'none'
  iframe.src = url
  document.body.appendChild(iframe)
}