<template>
  <a-modal
    :title="modalTitle"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    class="ant-modal2"
    @cancel="handleCancel"
  >
    <repair-part-used-table :type="3" :model-params="repairFormRecord" :table-params="extraQueryParam" />
    <template slot="footer">
      <a-button type="primary" @click="handleCancel()">返回</a-button>
    </template>
  </a-modal>
</template>

<script>
import { STable, Ellipsis } from '@/components'
import BaseForm from './BaseForm'
import Detail from './Detail'
import RepairPartUsedTable from '@/views/repair/part-used/modules/RepairPartUsedTable'

export default {
  name: 'RepairFeeList',
  components: {
    STable,
    Ellipsis,
    RepairPartUsedTable,
    BaseForm,
    Detail
  },
  data () {
    return {
      // 查询参数
      queryParam: {},
      modalTitle: '备件更换',
      visible: false,
      isCreated: false,
      repairFormRecord: {},
      extraQueryParam: {},
      confirmLoading: false
    }
  },
  created () {
    // 下拉框map
  },
  methods: {
    base (record, queryParam = {}) {
      this.visible = true
      this.extraQueryParam = queryParam
      this.repairFormRecord = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }
  }
}
</script>
