/*
  @description:保证金-字典信息
  @Modifier:sunxinman
  @routerPath:
  @date:2020-3-24 11:38
*/
/* 公用方法*/
import { filterDictText, moneyFormat, numberChinese } from '@/assets/js/utils'// 常用方法
export const cashDepositGroupMixin = {
  data() {
    return {
      // 保证金管理列表退款状态
      refundStatusList: [
        { typename: '收款中', typecode: '00' },
        { typename: '未退款', typecode: '01' },
        { typename: '退款完成', typecode: '02' }
      ],
      // 项目经理保证金退款管理列表------主表退款状态
      refundFeeList: [
        { typename: '退款审批中', typecode: '00' },
        { typename: '退款审批驳回', typecode: '01' },
        { typename: '待退款', typecode: '02' },
        { typename: '退款中', typecode: '03' },
        { typename: '已退款', typecode: '04' },
        { typename: '退款全部失败', typecode: '05' },
        { typename: '退款部分失败', typecode: '06' },
        { typename: '已打回', typecode: '07' }
      ],
      // 项目经理保证金退款管理列表---明细退款状态
      detailRefundStatuList: [
        { typename: '待审批', typecode: '00' },
        { typename: '待退款', typecode: '01' },
        { typename: '退款审批驳回', typecode: '02' },
        { typename: '退款中', typecode: '03' },
        { typename: '已打回', typecode: '04' },
        { typename: '已退款', typecode: '05' },
        { typename: '退款失败', typecode: '06' },
        { typename: '待确认', typecode: '07' },
        { typename: '确认驳回', typecode: '08' }
      ],
      // 财预部保证金退款员退款列表退款状态
      redundFeeSList: [
        { typename: '退款审批中', typecode: '00' },
        { typename: '退款审批驳回', typecode: '01' },
        { typename: '待退款', typecode: '02' },
        { typename: '退款中', typecode: '03' },
        { typename: '已退款', typecode: '04' },
        { typename: '退款全部失败', typecode: '05' },
        { typename: '退款部分失败', typecode: '06' },
        { typename: '已打回', typecode: '07' }
      ],
      // 财预部保证金退款员退款列表点击退款到新增页面的退款状态
      redundFeeAddList: [
        { typename: '待退款', typecode: '00' },
        { typename: '退款中', typecode: '01' },
        { typename: '已退款', typecode: '02' },
        { typename: '退款失败', typecode: '03' }
      ],
      // 退款逾期状态
      refundExpireStatusList: [
        { typename: '未逾期', typecode: '00' },
        { typename: '已逾期', typecode: '01' }
      ],
      // 保证金归还方
      cashDepositRefunderList: [
        { typename: '招标人', typecode: '01' },
        { typename: '投标人', typecode: '02' }
      ],
      // 来款是否正确（错误款项确认状态）
      isThePaymentCorrectList: [
        { typename: '是', typecode: '01' },
        { typename: '否', typecode: '02' }
      ],
      // 保证金状态
      cashDepositStatuslist: [
        { typename: '未确认', typecode: '00' },
        { typename: '已收款', typecode: '01' },
        { typename: '待退款', typecode: '02' },
        { typename: '退款中', typecode: '03' },
        { typename: '已退款', typecode: '04' }
      ],
      // 保函管理状态
      letterManageStatusList: [
        { typename: '保存', typecode: '00' },
        { typename: '待确认', typecode: '01' },
        { typename: '已确认', typecode: '02' },
        { typename: '驳回', typecode: '03' },
        { typename: '已退款', typecode: '04' }
      ],
      // 币种
      currencyList: [
        { typename: '人民币', typecode: '00' },
        { typename: '美元', typecode: '01' },
        { typename: '欧元', typecode: '02' },
        { typename: '日元', typecode: '03' },
        { typename: '瑞士法郎', typecode: '04' },
        { typename: '港元', typecode: '05' },
        { typename: '新台币', typecode: '06' },
        { typename: '澳门元', typecode: '07' }
      ],
      // 发票
      invoiceTypeList: [
        { typename: '电子发票（普通）', typecode: '00' },
        { typename: '普通发票', typecode: '01' },
        { typename: '增值税专用发票', typecode: '02' }
      ],
      // 错误入账状态
      errorModelList: [
        { typename: '是', typecode: '01' },
        { typename: '否', typecode: '00' }
      ],
      // 收款记账状态/退款记账状态
      billingStatusList: [
        { typename: '未记账', typecode: '00' },
        { typename: '记账中', typecode: '01' },
        { typename: '已记账', typecode: '02' },
        { typename: '记账失败', typecode: '03' },
        { typename: '手工记账', typecode: '04' }
      ],
      // 退款记账状态
      refundBookStatusList: [
        { typename: '未记账', typecode: '00' },
        { typename: '记账中', typecode: '01' },
        { typename: '已记账', typecode: '02' },
        { typename: '记账失败', typecode: '03' },
        { typename: '手工记账', typecode: '04' }
      ],
      // 是否中标
      winStatusttList: [
        { typename: '是', typecode: '01' },
        { typename: '否', typecode: '00' }
      ],
      phaseTypeList: [], // 资格审查方式
      projectIndustryList: [] // 行业分类
    }
  },
  methods: {
    moneyFormat,
    numberChinese,
    filterDictText,
    // 表格字典值替换文本-是否中标
    formatWinStatus(row, column, cellValue) {
      return filterDictText(this.winStatusttList, cellValue)
    },
    // 表格字典值替换文本-单笔退款状态
    formatRefundStatus(row, column, cellValue) {
      return filterDictText(this.detailRefundStatuList, cellValue)
    },
    // 表格字典值替换文本-退款状态 一个标段包可能发起多次退款申请，每个退款申请可能包含多个标段包。
    formatRefundFeeList(row, column, cellValue) {
      return filterDictText(this.refundFeeList, cellValue)
    },
    // 表格字典值替换文本-错误来款
    formatErrorStatus(row, column, cellValue) {
      return filterDictText(this.errorModelList, cellValue)
    },
    // 表格字典值替换文本-退款记账状态
    formatBookkeepingStatus(row, column, cellValue) {
      return filterDictText(this.billingStatusList, cellValue)
    },
    // 表格字典值替换文本-退款逾期
    formatRefundOverdueStatus(row, column, cellValue) {
      return filterDictText(this.refundExpireStatusList, cellValue)
    },
    // 表格字典值替换文本-保证金状态
    formatPayStatus(row, column, cellValue) {
      return filterDictText(this.cashDepositStatuslist, cellValue)
    }
  }
}
