<template>
  <a-modal
    title="事故单"
    v-model="accidentListModVis"
    :confirmLoading="confirmLoading"
    width="86%"
    style="top:330px;left:100px;minHeight:700px"
    :footer="null"
  >
    <!-- tabel 加载 -->
    <a-spin :spinning="confirmLoading">
      <!-- 回显信息  -->
      <div class="table-page-search-wrapper" style="marginTop:20px;">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="6" :sm="8">
              <a-form-item label="单号">
                <a-input v-model="accidentList.oddNum"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="责任人">
                <a-input v-model="accidentList.personLiable"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="日期">
                <a-input v-model="accidentList.date"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="工厂">
                <a-input v-model="accidentList.factory"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="客户">
                <a-input v-model="accidentList.customer"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="款号">
                <a-input v-model="accidentList.styleNum"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="计划单号">
                <a-input v-model="accidentList.planNum"> </a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="计划员">
                <a-input v-model="accidentList.planner"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="业务员">
                <a-input v-model="accidentList.salesman"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="承担方订单号">
                <a-input v-model="accidentList.undertakingOrderNo"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="物料">
                <a-input v-model="accidentList.materiel"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="QC">
                <a-input v-model="accidentList.qc"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="24" :sm="24">
              <a-form-item label="备注" class="noteBg">
                <a-input type="textarea" v-model="accidentList.note" style="minHeight:100px;"></a-input>

                <!-- 导出 打印 返回  -->
                <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="backFabricLossTable" icon="rollback">返回</a-button>
                    </span>
                  </a-col>
                </a-row>
              </a-form-item>
            </a-col>
          </a-row>
        </a-form>
      </div>
    </a-spin>
  </a-modal>
</template>

<script>
export default {
  name: 'AccidentListModal', // 事故单 弹框
  components: {},
  data() {
    return {
      loading: false, // 表格加载
      // orderDataform: this.$form.createForm(this),
      confirmLoading: false,
      accidentListModVis: false,
      accidentList: []
    }
  },
  // 接收父组件 方法
  props: {
    father: {
      type: Function,
      default: null
    }
  },
  created() {},
  methods: {
    // 第一行 导出
    handleExportXls() {},
    // 打印
    print() {},
    // 返回
    backFabricLossTable() {
      console.log('返回到面料损耗表')
      // this.$router.push('fabricLoss-table')
      // this.accidentListModVis = false
      this.close()
    },
    close() {
      this.$emit('close')
      this.accidentListModVis = 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>
