<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    cancelText="关闭"
    @cancel="handleCancel">
    <!-- 合同 -->
    <contract-detail-list v-if="columnValue === 'contractfpe'" :taskno="taskno"></contract-detail-list>
    <!-- 已收款 -->
    <collect-detail-list v-if="columnValue === 'taskmoney'" :taskno="taskno"></collect-detail-list>
    <!-- 材料费 -->
    <material-detail-list v-if="columnValue === 'clf'" :taskno="taskno"></material-detail-list>
    <!-- 专用费 -->
    <project-chb-zyf-list v-if="columnValue === 'zyf'" :taskno="taskno"></project-chb-zyf-list>
    <!-- 事务费 -->
    <project-chb-swf-list v-if="columnValue === 'swf'" :taskno="taskno"></project-chb-swf-list>
    <!-- 外协费 -->
    <project-chb-wxf-list v-if="columnValue === 'wxf'" :taskno="taskno"></project-chb-wxf-list>
    <!-- 装机 -->
    <mes-detail-list v-if="columnValue === 'zjcb'" :taskno="taskno"></mes-detail-list>
    <!-- 工时 -->
    <ky-bg-detail-list v-if="columnValue === 'workhour'" :taskno="taskno"></ky-bg-detail-list>
    <!-- 批产任务 -->
    <pichan-task-list v-if="columnValue === 'pichanTask'" :pichanInfo="pichanInfo"></pichan-task-list>

    <template slot="footer">
      <a-button @click="handleCancel">关闭</a-button>
    </template>
  </j-modal>
</template>

<script>
import ContractDetailList from './ContractDetailList.vue'
import CollectDetailList from './CollectDetailList.vue'
import MaterialDetailList from './MaterialDetailList.vue'
import ProjectChbSwfList from './ProjectChbSwfList.vue'
import ProjectChbWxfList from './ProjectChbWxfList.vue'
import ProjectChbZyfList from './ProjectChbZyfList.vue'
import MesDetailList from './MesDetailList.vue'
import KyBgDetailList from './KyBgDetailList.vue'
import PichanTaskList from './PichanTaskList.vue'

  export default {
    name: 'ProjectCostModal',
    components: {
      ContractDetailList,
      CollectDetailList,
      MaterialDetailList,
      ProjectChbZyfList,
      ProjectChbSwfList,
      ProjectChbWxfList,
      MesDetailList,
      KyBgDetailList,
      PichanTaskList,
    },
    data () {
      return {
        taskno: '',
        columnValue: '',
        pichanInfo: {},
        title:'',
        width: '60%',
        visible: false,
        disableSubmit: false
      }
    },
    methods: {
      show() {
        this.visible = true
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      },
    }
  }
</script>