/*
  @description:标书费-字典信息
  @Modifier:sunxinman
  @routerPath:
  @date:2020-3-20 17:02
*/
/* 公用方法*/
import { filterDictText } from '@/assets/js/utils'// 常用方法
import { initGroupMixin } from '@/mixins/initGroupMixin' // 字典信息

export const TenderFeeGroupMixin = {
  mixins: [initGroupMixin],
  data() {
    return {
      // 费用类型
      costTypeList: [
        { typename: '资格预审文件费', typecode: '00' },
        { typename: '招标文件费', typecode: '01' }
      ],
      // 开票状态
      docInvoiceStatusList: [
        { typename: '未开票', typecode: '00' },
        { typename: '开票失败', typecode: '01' },
        { typename: '已开票', typecode: '02' }
      ],
      // 文件购买记录退款状态 / 标书费退款开票
      refundStatusList: [
        { typename: '未退款', typecode: '00' },
        { typename: '已退款', typecode: '01' },
        { typename: '退款中', typecode: '02' },
        { typename: '退款申请中', typecode: '03' },
        { typename: '退款审批驳回', typecode: '04' },
        { typename: '退款审批通过', typecode: '05' },
        { typename: '退款失败', typecode: '06' },
        { typename: '红冲中', typecode: '07' }
      ],
      // 接口红冲开票状态
      backInvoicestatusList: [
        { typename: '未红冲开票', typecode: '00' },
        { typename: '已经红冲开票', typecode: '01' },
        { typename: '红冲开票失败', typecode: '02' },
        { typename: '红冲开票申请中', typecode: '03' }
      ],
      // 接口实际退款状态
      backStatusList: [
        { typename: '未发起请求', typecode: '00' },
        { typename: '退款成功', typecode: '01' },
        { typename: '退款失败', typecode: '02' },
        { typename: '退款申请中', typecode: '03' }
      ],
      // 收款记账状态
      collectionBookkeepingStatusList: [
        { typename: '未记账', typecode: '00' },
        { typename: '已记账', typecode: '01' },
        { typename: '记账失败', typecode: '02' },
        { typename: '记账申请中', typecode: '03' }
      ],
      // 支付方式
      paymentMethodList: [
        // { typename: '对公支付', typecode: '01' },
        // { typename: '现金支付', typecode: '02' },
        // { typename: '卡支付', typecode: '03' }
        { typename: '支付宝', typecode: '00' },
        { typename: '微信', typecode: '01' },
        { typename: '银联聚合', typecode: '02' },
        { typename: '广发', typecode: '03' },
        { typename: '中金', typecode: '04' },
        { typename: '大唐', typecode: '05' }
      ],
      // 是否同城转账
      cityTransferList: [
        { typename: '否', typecode: '00' },
        { typename: '是', typecode: '01' }
      ],
      // 是否跨行转账
      interbankTransferList: [
        { typename: '否', typecode: '00' },
        { typename: '是', typecode: '01' }
      ],
      // 支付方式
      payTypeList: [
        { typename: '线上支付', typecode: '01' },
        { typename: '线下支付', typecode: '02' }
      ],
      // 发票类型
      invoiceTypeList: [
        { typename: '普票', typecode: '00' },
        { typename: '专票', typecode: '01' }
      ]
    }
  },
  methods: {
    filterDictText, // 字典值替换文本通用方法
    // 表格字典值替换文本-费用类型
    formatFeeType(row, column, cellValue) {
      return filterDictText(this.costTypeList, cellValue)
    },
    // 表格字典值替换文本-退款状态
    formatBackStatus(row, column, cellValue) {
      return filterDictText(this.refundStatusList, cellValue)
    },
    // 表格字典值替换文本-开票状态
    formatInvoiceStatus(row, column, cellValue) {
      return filterDictText(this.docInvoiceStatusList, cellValue)
    },
    // 表格字典值替换文本-收款记账状态
    formatBookkeepingStatus(row, column, cellValue) {
      return filterDictText(this.collectionBookkeepingStatusList, cellValue)
    }
  }
}
