/*
  @description:评审-公用字典
  @Modifier:
  @routerPath:
  @date:2020-6-3 17:49
*/
/* api*/
/* 混合开发*/
import {
  initGroupMixin
} from '@/mixins/initGroupMixin' // 全局公用字典
import { queryProcurementProjectInitInfo } from '@/api/procurement/procurementProject'
import { queryProcurementEvaluationManagerDataInitInfo } from '@/api/procurement/procurementEvaluation'

export const procurementSelectMixin = {
  data() {
    return {
      isInvitationMeetRoom: [
      // {
      //   typename: '未邀请',
      //   typecode: '00'
      // },
      // {
      //   typename: '已邀请',
      //   typecode: '01'
      // },
      // {
      //   typename: '已取消',
      //   typecode: '02'
      // }
      ],
      exchangeStatus: [
      ],
      signatureStatus: [{
        typename: '待流转',
        typecode: '00'
      },
      {
        typename: '签章中',
        typecode: '01'
      },
      {
        typename: '已完成',
        typecode: '02'
      }
      ],
      isFinishSignature: [{
        typename: '未完成',
        typecode: '00'
      }, {
        typename: '已完成签章',
        typecode: '01'
      },
      {
        typename: '占用',
        typecode: '02'
      }
      ],
      // 审核状态 00-待办理 01-审核通过 -02审核不通过
      auditStatusList: [
        {
          typename: '待办理',
          typecode: '00'
        },
        {
          typename: '审核通过',
          typecode: '01'
        },
        {
          typename: '审核不通过',
          typecode: '02'
        }
      ]
    }
  },
  mixins: [initGroupMixin], // 公共方
  created() {
    this.inCodes()
  },
  methods: {
    // 查询字典
    inCodes() {
      queryProcurementProjectInitInfo().then(res => {
        this.measuringUnitList = res.data.purchaseUnit.typeList // 计量单位
        this.isInvitationMeetRoom = res.data.isInvitationMeetRoom.typeList // 邀请加入会议 邀请状态
      }).catch(() => {
      })
    },
    inPcode() {
      queryProcurementEvaluationManagerDataInitInfo().then(res => {
        this.exchangeStatus = res.data.exchangeStatus // 签章状态
      }).catch(() => {
      })
    }
  }
}
