<template>
  <!-- 成本分配统计表  辅料 转入数量 -->
  <a-modal
    title="转入数量"
    v-model="ingredientsTransferQuantityModVis"
    :confirmLoading="confirmLoading"
    width="86%"
    style="top:330px;left:100px;"
    :footer="null"
  >
    <!-- tabel 加载 -->
    <a-spin :spinning="confirmLoading">
      <a-table
        :loading="loading"
        bordered
        :columns="ingredientsTransferQuantityColumns"
        :data-source="ingredientsTransferQuantityData"
        :pagination="false"
      >
      </a-table>
      <!-- 导出 打印 返回  -->
      <a-row style="marginTop:20px;">
        <a-col :md="24" :sm="12">
          <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="cancel" icon="rollback">取消</a-button>
          </span>
        </a-col>
      </a-row>
    </a-spin>
  </a-modal>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: 'IngredientsTransferQuantityModal', // 辅料 转入数量 弹框
  mixins: [JeecgListMixin],
  components: { JEllipsis },
  data() {
    return {
      // 辅料- 转入数量 表头
      ingredientsTransferQuantityColumns: [
        {
          title: '存货名称',
          dataIndex: 'inventoryName',
          width: 120,
          className: 'replacecolor'
        },
        {
          title: '计划单号',
          dataIndex: 'planNum',
          width: 120,
          className: 'replacecolor'
        },

        {
          title: '转入数量',
          dataIndex: 'transferQuantity',
          width: 120,
          className: 'replacecolor'
        },
        {
          title: '单位成本',
          dataIndex: 'unitCost',
          width: 120,
          className: 'replacecolor'
        },
        {
          title: '总成本',
          dataIndex: 'totalCost',
          width: 120,
          className: 'replacecolor'
        }
      ],
      ingredientsTransferQuantityData: [{}],
      loading: false, // 表格加载
      // orderDataform: this.$form.createForm(this),
      confirmLoading: false,
      ingredientsTransferQuantityModVis: false
    }
  },
  // 接收父组件 方法
  props: {
    father: {
      type: Function,
      default: null
    }
  },
  created() {},
  methods: {
    // 第一行 导出
    // handleExportXls() {},
    // 打印
    print() {},
    // 取消
    cancel() {
      console.log('返回成本分配统计表')
      // this.$router.push('fabricLoss-table')
      // this.ingredientsTransferQuantityModVis = false
      this.close()
    },

    close() {
      this.$emit('close')
      this.ingredientsTransferQuantityModVis = 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>
