<template>
  <a-modal
    title="发票数量"
    v-model="invoiceQuantityModVis"
    :confirmLoading="confirmLoading"
    width="86%"
    style="top:330px;left:100px;"
    :footer="null"
  >
    <!-- tabel 加载 -->
    <a-spin :spinning="confirmLoading">
      <!-- table -->
      <div style="marginTop:30px;">
        <a-table
          :loading="loading"
          :columns="invoiceQuantityColumns"
          :data-source="invoiceQuantityData"
          :pagination="false"
          bordered
        >
        </a-table>

        <!-- 导出 打印 返回  -->
        <a-row>
          <a-col :md="24" :sm="12" style="marginTop:20px;">
            <span style="float: right;" class="table-operator">
              <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
              <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
              <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
            </span>
          </a-col>
        </a-row>
      </div>
    </a-spin>
  </a-modal>
</template>

<script>
export default {
  name: 'InvoiceQuantityModal', // 发票数量 弹框
  components: {},
  data() {
    return {
      // 表头
      invoiceQuantityColumns: [
        {
          title: '开票数',
          dataIndex: 'iquantityInvoice',
          width: 120,
          key: '',
          className: 'replacecolor'
        },
        {
          title: '未开票数',
          dataIndex: 'iquantityInvoiceN',
          width: 120,
          key: '',
          className: 'replacecolor'
        },
        {
          title: '结算数量',
          dataIndex: 'iquantitySettle',
          width: 120,
          key: '',
          className: 'replacecolor'
        },
        {
          title: '未结算数量',
          dataIndex: 'iquantitySettleN',
          width: 120,
          key: '',
          className: 'replacecolor'
        }
      ],
      invoiceQuantityData: [],
      size: 'small', // 查询按钮变小
      loading: false, // 表格加载
      // orderDataform: this.$form.createForm(this),
      confirmLoading: false,
      invoiceQuantityModVis: false
    }
  },
  // 接收父组件 方法
  props: {
    father: {
      type: Function,
      default: null
    }
  },
  created() {},
  methods: {
    // 第一行 导出
    handleExportXls() {},
    // 打印
    print() {},
    // 返回
    backFabricLossTable() {
      console.log('返回到面料损耗表')
      // this.$router.push('fabricLoss-table')
      // this.invoiceQuantityModVis = false
      this.close()
    },

    close() {
      this.$emit('close')
      this.invoiceQuantityModVis = false
    }
  }
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/overwriter.less';
/deep/ .ant-table-thead > tr > th {
  text-align: center;
  // font-weight: 700;
}

/deep/ .ant-table-tbody {
  text-align: center;
}

// /deep/ th.replacecolor {
//   background-color: #ccc;
// }
</style>
