 <!-- 配批管理 -->
<template>
  <div class="resource">
    <div style="margin: 10px 0 0 7px;">
      <el-form :inline="true">
        <el-form-item label="委托单位">
          <el-select
            v-model="search.entrOrgCode"
            clearable
            filterable
            collapse-tags
            size="small"
            style="width: 120px; margin-right: 10px"
            placeholder="请选择委托单位"
          >
            <el-option
              v-for="item in entrOrgType"
              :key="item.orgCode"
              :label="item.orgName"
              :value="item.orgCode"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="合同号">
          <el-input
            v-model="search.contractNo"
            @keyup.enter.native="searchData()"
            size="small"
            placeholder="请输入合同号"
            style="width: 120px"
          ></el-input>
        </el-form-item>
        <el-form-item label="批次号">
          <el-input
            clearable
            v-model="search.batchNo"
            @keyup.enter.native="searchData()"
            size="small"
            placeholder="请输入批次号"
            style="width: 120px"
          ></el-input>
        </el-form-item>
        <el-form-item label="物料名称">
          <el-input
            v-model="search.matName"
            @keyup.enter.native="searchData()"
            size="small"
            placeholder="请输入物料名称"
            style="width: 120px"
          ></el-input>
        </el-form-item>
        <el-form-item label="送货批次号">
          <el-input
            v-model="search.lotsNo"
            @keyup.enter.native="searchData()"
            size="small"
            placeholder="请输入送货批次号"
            style="width: 120px"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="委托日期">
          <el-date-picker
            v-model="search.entrTime"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            size="small"
            style="width: 220px"
            format="yyyy-MM-dd"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button
            icon="el-icon-search"
            type="goon"
            size="mini"
            @click="searchData"
            >查询</el-button
          >
          <el-button size="mini" type="goon" @click="doExport"
            >导出excel</el-button
          >
          <el-button
            icon="el-icon-refresh"
            type="info"
            plain
            size="mini"
            @click="reset"
            >重置</el-button
          >
        </el-form-item>
      </el-form>
    </div>
    <!-- 未配批信息表表头 -->
    <el-tabs type="border-card" v-model="activeName">
      <el-tab-pane label="未配批" name="first">
        <span slot="label"
          >未配批<el-badge
            :max="10"
            :hidden="page.totalPage == 0"
            style="margin-top: -18px"
            :value="page.totalPage"
          ></el-badge
        ></span>
        <div class="common-title-div">
          <div class="common-title-name" style="display: inline-block">
            <img
              style="width: 25px; height: 25px"
              src="../../../../assets/img/imgScreen/logo.png"
            />
            <span>未配批信息</span>
          </div>
          <!-- <div class="zy-title-name">
                <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/logo.png' />
                未配批信息
              </div> -->
          <div style="display: inline-block">
            <el-button
              type="goon"
              icon="el-icon-check"
              size="mini"
              v-privilege="activeMenu + 'batch'"
              @click="distribution"
              >配批</el-button
            >
            <el-button
              type="goon"
              icon="el-icon-check"
              size="mini"
              v-if="false"
              @click="addBatch"
              >追加批次</el-button
            >
          </div>
        </div>
        <div class="common-table-div">
          <el-table
            v-loading="dataLoading1"
            ref="dataTable"
            border
            :height="height_top"
            highlight-current-row
            @selection-change="handleSelectionChange"
            :data="table.list"
            :icore-filter-flag="icoreFilterFlag"
            :header-cell-style="tableHeaderCellStyle"
            :summary-method="getSummaries"
            show-summary
          >
            <el-table-column
              type="index"
              label="NO"
              align="center"
            ></el-table-column>
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <!-- <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="140px"
              prop="entrTimeName"
              label="委托日期"
              align="center"
            ></el-table-column> -->
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matName"
              label="物料"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="suppName"
              label="供应商"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="contractNo"
              label="合同号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="lotsNo"
              label="送货批次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netNum"
              label="送货量"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="carNo"
              label="车号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="grossWeight"
              label="毛重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="tareWeight"
              label="皮重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netWeight"
              label="净重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="koZa"
              label="扣杂"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="wetWgt"
              label="净湿重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="water"
              label="水分"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="dryWgt"
              label="干重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matOrigin"
              label="产地"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="transportTypeName"
              label="运输类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="acceptName"
              label="收货单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sendPlace"
              label="发站"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="packTypeName"
              label="包装方式"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isCiqName"
              label="是否商检"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isBatchName"
              label="是否配批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="headName"
              label="完批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="smpDeliName"
              label="取样频次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="unloadPlace"
              label="卸货地点"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="planCompanyName"
              label="计划单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="companyName"
              label="检验单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="deptName"
              label="检验车间"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sectionName"
              label="检验班组"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sampleTypeName"
              label="样品类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netWgt"
              label="重量(t)"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="memo"
              label="备注"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="createMan"
              label="创建人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="createTime"
              label="创建时间"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="updateMan"
              label="修改人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="updateTime"
              label="修改时间"
              align="center"
            ></el-table-column>
          </el-table>
        </div>
        <div class="zy-foot-page">
          <el-pagination
            @size-change="pageSizeChange"
            @current-change="pageCurrentChange"
            :current-page="page.pageNum"
            :page-sizes="[10, 20, 50, 100, 200]"
            :page-size="page.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="page.totalPage"
            background
          >
          </el-pagination>
        </div>
      </el-tab-pane>
      <el-tab-pane label="已配批" name="second">
        <div class="common-title-div">
          <div class="common-title-name" style="display: inline-block">
            <img
              style="width: 25px; height: 25px"
              src="../../../../assets/img/imgScreen/logo.png"
            />
            <span>已配批信息</span>
          </div>
          <div style="display: inline-block">
            <el-button
              icon="el-icon-remove-outline"
              type="danger"
              size="mini"
              :loading="unbatchLoading"
              v-privilege="activeMenu + 'cancelBatch'"
              @click="unbatch"
              >取消配批</el-button
            >
            <el-button
              icon="el-icon-check"
              type="goon"
              size="mini"
              :loading="checkLoading"
              v-privilege="activeMenu + 'audit'"
              @click="checkData"
              >审核</el-button
            >
          </div>
        </div>
        <div class="common-table-div">
          <el-table
            v-loading="dataLoading2"
            ref="dataTable2"
            border
            :height="height_bot"
            highlight-current-row
            @selection-change="handleSelectionChange2"
            :row-class-name="tableRowClassName"
            :data="table.list2"
            :icore-filter-flag="icoreFilterFlag"
            :header-cell-style="tableHeaderCellStyle"
            :summary-method="getSummaries"
            show-summary
          >
            <el-table-column
              type="index"
              label="NO"
              fixed="left"
              align="center"
            ></el-table-column>
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matName"
              label="物料"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="suppName"
              label="供应商"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="contractNo"
              label="合同号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="lotsNo"
              label="送货批次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="carNo"
              label="车号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="markNo"
              label="样号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="batchNo"
              label="批次号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netNum"
              label="送货量"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="grossWeight"
              label="毛重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="tareWeight"
              label="皮重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netWeight"
              label="净重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="koZa"
              label="扣杂"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="wetWgt"
              label="净湿重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="water"
              label="水分"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="dryWgt"
              label="干重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sampleWgt"
              label="样量"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="transportTypeName"
              label="运输类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="140px"
              prop="entrTimeName"
              label="委托日期"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matOrigin"
              label="产地"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="acceptName"
              label="收货单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sendPlace"
              label="发站"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="packTypeName"
              label="包装方式"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isCiqName"
              label="是否商检"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isBatchName"
              label="是否配批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="headName"
              label="完批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="smpDeliName"
              label="取样频次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="unloadPlace"
              label="卸货地点"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="planCompanyName"
              label="计划单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="companyName"
              label="检验单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="deptName"
              label="检验车间"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sectionName"
              label="检验班组"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sampleTypeName"
              label="样品类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="140px"
              prop="netWgt"
              label="重量(t)"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="80px"
              prop="stateFlagName"
              label="状态"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="createMan"
              label="创建人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="createTime"
              label="创建时间"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="updateMan"
              label="修改人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="updateTime"
              label="修改时间"
              align="center"
            ></el-table-column>
          </el-table>
        </div>
        <div class="zy-foot-page">
          <el-pagination
            @size-change="pageSizeChange2"
            @current-change="pageCurrentChange2"
            :current-page="page2.pageNum"
            :page-sizes="[10, 20, 50, 100, 200]"
            :page-size="page2.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="page2.totalPage"
            background
          >
          </el-pagination>
        </div>
      </el-tab-pane>
      <el-tab-pane label="已审核" name="three">
        <div class="common-title-div">
          <div class="common-title-name" style="display: inline-block">
            <img
              style="width: 25px; height: 25px"
              src="../../../../assets/img/imgScreen/logo.png"
            />
            <span>已审核信息</span>
          </div>
          <el-button
            icon="el-icon-remove-outline"
            type="danger"
            size="mini"
            :loading="unbatchLoading"
            v-privilege="activeMenu + 'cancelBatch'"
            @click="backData"
            >退回待配批</el-button
          >
        </div>
        <div class="common-table-div">
          <el-table
            v-loading="dataLoading2"
            ref="dataTable2"
            border
            :height="height_bot"
            highlight-current-row
            :row-class-name="tableRowClassName"
            :data="table.list3"
            :icore-filter-flag="icoreFilterFlag"
            :header-cell-style="tableHeaderCellStyle"
            :summary-method="getSummaries"
            @selection-change="handleSelectionChange3"
            show-summary
          >
            <el-table-column
              type="index"
              label="NO"
              fixed="left"
              align="center"
            ></el-table-column>
            <el-table-column
              type="selection"
              width="55"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matName"
              label="物料"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="suppName"
              label="供应商"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="contractNo"
              label="合同号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="lotsNo"
              label="送货批次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="carNo"
              label="车号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="ssId"
              label="S码"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="markNo"
              label="样号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="batchNo"
              label="批次号"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netNum"
              label="送货量"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="grossWeight"
              label="毛重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="tareWeight"
              label="皮重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="netWeight"
              label="净重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="koZa"
              label="扣杂"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="wetWgt"
              label="净湿重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="water"
              label="水分"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="dryWgt"
              label="干重"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sampleWgt"
              label="样量"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="transportTypeName"
              label="运输类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="140px"
              prop="entrTimeName"
              label="委托日期"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="matOrigin"
              label="产地"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="acceptName"
              label="收货单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sendPlace"
              label="发站"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="packTypeName"
              label="包装方式"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isCiqName"
              label="是否商检"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="isBatchName"
              label="是否配批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="headName"
              label="完批"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="smpDeliName"
              label="取样频次"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="unloadPlace"
              label="卸货地点"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="planCompanyName"
              label="计划单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="companyName"
              label="检验单位"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="deptName"
              label="检验车间"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sectionName"
              label="检验班组"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="100px"
              prop="sampleTypeName"
              label="样品类型"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="140px"
              prop="netWgt"
              label="重量(t)"
              align="center"
            ></el-table-column>
            <el-table-column
              :show-overflow-tooltip="true"
              sortable
              min-width="80px"
              prop="stateFlagName"
              label="状态"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="createMan"
              label="创建人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="createTime"
              label="创建时间"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="80px"
              prop="updateMan"
              label="修改人"
              align="center"
            ></el-table-column>
            <el-table-column
              sortable
              :show-overflow-tooltip="true"
              min-width="140px"
              prop="updateTime"
              label="修改时间"
              align="center"
            ></el-table-column>
          </el-table>
        </div>
        <div class="zy-foot-page">
          <el-pagination
            @size-change="pageSizeChange3"
            @current-change="pageCurrentChange3"
            :current-page="page3.pageNum"
            :page-sizes="[10, 20, 50, 100, 200]"
            :page-size="page3.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="page3.totalPage"
            background
          >
          </el-pagination>
        </div>
      </el-tab-pane>
    </el-tabs>
    <el-dialog @close="closeDialog" :visible.sync="dialogTableVisible">
      <div slot="title" class="titleBox" style="display: flex">
        <i class="el-icon-edit-outline" style="font-size: 20px"></i>
        <span style="margin-left: 10px; font-size: 18px">追加批次</span>
      </div>
      <el-form
        :model="baseData"
        ref="baseData"
        :rules="rules"
        label-width="80px"
        :inline="false"
        size="normal"
      >
        <el-row>
          <el-col :span="24">
            <el-form-item prop="batchNo" label="批次号">
              <el-input
                v-model="baseData.batchNo"
                size="small"
                style="width: 100%"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button
          type="goon"
          size="mini"
          icon="el-icon-check"
          :loading="addLoading"
          @click="addData()"
          >确定</el-button
        >
        <el-button
          size="mini"
          type="goon"
          icon="el-icon-remove-outline"
          @click="closeDialog"
          >取消</el-button
        >
      </span>
    </el-dialog>
    <el-dialog @close="closeDialog" :visible.sync="dialogTableVisible2">
      <div slot="title" class="titleBox" style="display: flex">
        <i class="el-icon-edit-outline" style="font-size: 20px"></i>
        <span style="margin-left: 10px; font-size: 18px">批次</span>
      </div>
      <el-form
        :model="formData"
        ref="formData"
        :rules="formRules"
        label-width="80px"
        :inline="false"
        size="normal"
      >
        <el-row>
          <el-col :span="24">
            <el-form-item prop="batchNo" label="批次号">
              <el-input
                v-model="formData.batchNo"
                size="small"
                style="width: 100%"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item prop="sumSampleNum" label="总样量">
              <el-input
                v-model="formData.sumSampleNum"
                size="small"
                style="width: 100%"
                type="number"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button
          type="goon"
          size="mini"
          icon="el-icon-check"
          :loading="addLoading2"
          @click="addData2()"
          >确定</el-button
        >
        <el-button
          size="mini"
          type="goon"
          icon="el-icon-remove-outline"
          @click="closeDialog"
          >取消</el-button
        >
      </span>
    </el-dialog>
    <!-- 已配批表表头 -->
  </div>
</template>
<script>
import {
  getCookie, formatDate, isStartEndDate
} from '@/utils/util.js';
import {
  cookieUserId,
  cookieUserName
} from '@/config/config.js';

import { exportToExcel } from '../../../../utils/utils.js'
let userName = getCookie(cookieUserName);
let userId = getCookie(cookieUserId);
export default {
  data () {
    return {
      table: {
        list: [],
        list2: [],
        list3: []
      },
      dialogTableVisible: false,
      dialogTableVisible2: false,
      addLoading: false,
      addLoading2: false,
      baseData: {},
      formData: {},
      activeName: 'first',
      dataLoading1: false,
      dataLoading2: false,
      distriLoading: false,
      unbatchLoading: false,
      checkLoading: false,
      icoreFilterFlag: true,
      page: {
        pageSize: 50,
        pageNum: 1,
        totalPage: 0
      },
      rules: {
        batchNo: [{ required: true, message: '不能为空', trigger: 'blur' }]
      },
      formRules: {
        batchNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
        sumSampleNum: [{ required: true, message: '不能为空', trigger: 'blur' }]
      },
      page2: {
        pageSize: 50,
        pageNum: 1,
        totalPage: 0
      },
      page3: {
        pageSize: 50,
        pageNum: 1,
        totalPage: 0
      },
      addBatchLoading: false,
      entrOrgType: [],
      height_top: 0,
      height_bot: 0,
      multipleSelection3: [],
      multipleSelection4: [],
      search: {
        entrOrgCode: '',
        entrTime: [],
        matName: '',
        lotsNo: '',
        contractNo: '',
        batchNo: ''
      },
      activeMenu: '',
      multipleSelection5: [],
      unbatchLoading: false
    }
  },
  created () {
    this.height_top = window.innerHeight - 230
    this.height_bot = window.innerHeight - 230
    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
    this.activeMenu = window.top.localStorage.getItem('activeMenu')
  },
  mounted () {
    this.axios.post("pass/baseManagement/v1/sysorgs/querySysOrgCompanyAll", {}, { individualType: 'json' }).then(response => {
      this.entrOrgType = response.data
    });
    this.searchData()
    this.addScreen();
    this.addScreen2();
  },
  methods: {
    getYNM (date) {
      let year = date.getFullYear().toString();
      let month = date.getMonth() + 1;
      let day = date.getDate();
      month = month < 10 ? "0" + month : month;
      day = day < 10 ? "0" + day : day;
      return `${year}-${month}-${day}`;
    },
    getSummaries (param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "合计";
        }
        if (index === 1) {
          sums[index] = data.length;
        } else if (column.property === "netWgt") {
          let val = 0;
          for (let i in data) {
            val = this.floatComputed(
              data[i].netWgt ? data[i].netWgt : 0,
              val,
              "+"
            );
          }
          sums[index] = val;
        }
      });
      return sums;
    },
    closeDialog () {
      this.baseData = {}
      this.addLoading = false
      this.formData = {}
      this.addLoading2 = false
      this.dialogTableVisible = false
      this.dialogTableVisible2 = false;
    },
    //  配批
    distribution () {
      if (this.multipleSelection3.length < 1) {
        this.$message.warning('请勾选您要分配的数据！')
        return
      }
      this.dialogTableVisible2 = true;
    },
    addData2 () {
      this.formData.batchNo = this.formData.batchNo.trim()
      this.$refs['formData'].validate((valid) => {
        if (valid) {
          this.multipleSelection3.forEach(item => {
            item.batchNo = this.formData.batchNo
          })
          let obj = this.multipleSelection3[0]
          if (this.multipleSelection3.every(item => item.contractNo === obj.contractNo) && this.multipleSelection3.every(item => item.lotsNo === obj.lotsNo)) {
            this.addLoading2 = true
            this.axios.post('pass/testManagement/v1/limstestbatchs/batchToIsCiq', { limsTestBatchDtos: this.multipleSelection3, sumSampleNum: this.formData.sumSampleNum }, { individualType: 'json' }).then(res => {
              if (res.code == 0 || res.code == 200) {
                this.dialogTableVisible2 = false;
                this.$message.success(res.message);
                this.searchData();
              } else {
                this.$message.error(res.message);
              }
              this.addLoading2 = false
            }).catch(e => {
              this.addLoading2 = false
              this.$message.error(e.message)
            })
          } else {
            this.$message.warning('勾选的数据送货批次或合同号不一致,无法进行配批操作，请核实数据后再试!');
          }
        }
      })
    },
    //追加批次
    addBatch () {
      if (this.multipleSelection3.length < 1) {
        this.$message.warning('请勾选您要追加批次号的数据！')
        return
      }
      this.dialogTableVisible = true;
      // this.distriLoading = true
      // this.axios.post('pass/testManagement/v1/limstestbatchs/batch', this.multipleSelection3, {individualType: 'json'}).then(res => {
      //   if (res.code == 0 || res.code == 200) {
      //    this.$message.success(res.message);
      //    this.searchData()
      //   } else {
      //    this.$message.error(res.message)
      //   }
      //   this.distriLoading = false
      // }).catch(e => {
      //   this.distriLoading = false
      //   this.$message.error(e.message)
      // })
    },
    // 退回待配批
    backData () {
      if (this.multipleSelection5.length < 1) {
        this.$message.warning('请勾选您要取消的数据！');
        return
      }
      let bcid = [];
      for (let i = 0; i < this.multipleSelection5.length; i++) {
        bcid.push(this.multipleSelection5[i].bcId);
      }
      // console.log('bcid', bcid)
      this.unbatchLoading = true
      this.axios.post('pass/testManagement/v1/limstestbatchs/unCheckLimsTestBatch', bcid, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.searchData()
        } else {
          this.$message.error(res.message)
        }
        this.unbatchLoading = false
      }).catch(e => {
        this.unbatchLoading = false
        this.$message.error(e.message)
      })
    },
    addData () {
      this.$refs['baseData'].validate((valid) => {
        if (valid) {
          this.addLoading = true
          this.multipleSelection3.forEach(item => {
            item.batchNo = this.baseData.batchNo
          })
          this.axios.post("pass/testManagement/v1/limstestbatchs/batchAdds", this.multipleSelection3, { individualType: "json" }).then((res) => {
            if (res.code == 0 || res.code == 200) {
              this.dialogTableVisible = false;
              this.$message.success(res.message);
              this.searchData()
            } else {
              this.$message.error(res.message);
            }
            this.addLoading = false
          }).catch((e) => {
            this.addLoading = false
            this.$message.error(e.message);
          });
        }
      })
    },
    // 查询
    searchData () {
      this.page.pageNum = 1;
      this.page.pageSize = 50
      this.page2.pageNum = 1
      this.page2.pageSize = 50
      this.page3.pageNum = 1
      this.page3.pageSize = 50
      this.mainData()
      this.depData()
      this.subData()
    },
    handleSelectionChange3 (val) {
      // 判断选中数据中是否存在状态为3的数据
      // 有取消选中行并给出提示信息
      let dataList = []
      val.forEach(item => {
        if (item.stateFlag - 0 === 3) {
          this.$refs.dataTable2.toggleRowSelection(item, false)
          this.$message.warning('生产科已审核的数据不允许进行操作')
        } else {
          dataList.push(item)
        }
      })
      this.multipleSelection5 = [...dataList];
    },
    mainData () {
      this.dataLoading1 = true;
      let startTime = ''
      let endTime = ''
      if (!this.search.entrTime) {
        startTime = ''
        endTime = ''
      } else {
        startTime = this.search.entrTime[0] + ' 00:00:00'
        endTime = this.search.entrTime[1] + ' 23:59:59'
      }
      let tempobj = {
        'object': {
          'entrOrgCode': this.search.entrOrgCode,
          'matName': this.search.matName,
          'validFlag': 1,
          'isCiq': 1,
          lotsNo: this.search.lotsNo,
          contractNo: this.search.contractNo,
          batchNo: this.search.batchNo
        },
        'list': [0],
        'pageIndex': this.page.pageNum,
        'pageSize': this.page.pageSize,
        'startTime2': startTime,
        'endTime2': endTime
      }
      this.axios.post('pass/testManagement/v1/limstestbatchs/queryLimsTestBatchPage', tempobj, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.table.list = res.data.list;
          this.page.totalPage = res.data.total;
          this.table.list.forEach(item => {
            item.stateFlagName = item.stateFlag == 0 ? "未配批" : item.stateFlag == 1 ? "已配批" : ''
            item.isBatchName = item.isBatch == 0 ? "否" : item.isBatch == 1 ? "是" : ''
            item.headName = item.heatNo == 0 ? "未完批" : item.heatNo == 1 ? "已完批" : ''
            item.isCiqName = item.isCiq == 0 ? "否" : item.isCiq == 1 ? "是" : ''
            item.entrTimeName = formatDate(item.entrTime, 'yyyy-MM-dd')
            let { wetWgt, dryWgt } = this.calculateWgt(item.grossWeight - 0, item.tareWeight - 0, item.koZa - 0, item.water - 0)
            item.wetWgt = wetWgt
            item.dryWgt = dryWgt
          })
        } else {
          this.$message.error(res.message);
        }
        this.dataLoading1 = false;
      }).catch(e => {
        this.dataLoading1 = false;
        this.$message.error(e.message);
      });
    },
    depData () {
      this.dataLoading2 = true;
      let startTime = ''
      let endTime = ''
      if (!this.search.entrTime) {
        startTime = ''
        endTime = ''
      } else {
        startTime = this.search.entrTime[0] + ' 00:00:00'
        endTime = this.search.entrTime[1] + ' 23:59:59'
      }
      let tempobj = {
        'object': {
          'entrOrgCode': this.search.entrOrgCode,
          'matName': this.search.matName,
          'isCiq': 1,
          lotsNo: this.search.lotsNo,
          contractNo: this.search.contractNo,
          batchNo: this.search.batchNo
        },
        'list': [1],
        'pageIndex': this.page2.pageNum,
        'pageSize': this.page2.pageSize,
        'startTime2': startTime,
        'endTime2': endTime
      }
      this.axios.post('pass/testManagement/v1/limstestbatchs/queryLimsTestBatchPage', tempobj, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.table.list2 = res.data.list;
          this.table.list2.forEach(item => {
            item.stateFlagName = item.stateFlag == 0 ? "未配批" : item.stateFlag == 1 ? "已配批" : item.stateFlag == 2 ? "已审核" : ''
            item.isBatchName = item.isBatch == 0 ? "否" : item.isBatch == 1 ? "是" : ''
            item.headName = item.heatNo == 0 ? "未完批" : item.heatNo == 1 ? "已完批" : ''
            item.isCiqName = item.isCiq == 0 ? "否" : item.isCiq == 1 ? "是" : ''
            item.entrTimeName = formatDate(item.entrTime, 'yyyy-MM-dd')
            let { wetWgt, dryWgt } = this.calculateWgt(item.grossWeight - 0, item.tareWeight - 0, item.koZa - 0, item.water - 0)
            item.wetWgt = wetWgt
            item.dryWgt = dryWgt
          })
          this.page2.totalPage = res.data.total;
        } else {
          this.$message.error(res.message)
        }
        this.dataLoading2 = false;
      }).catch(e => {
        this.dataLoading2 = false;
        this.$message.error(e.message)
      });
    },
    subData () {
      this.dataLoading2 = true;
      let startTime = ''
      let endTime = ''
      if (!this.search.entrTime) {
        startTime = ''
        endTime = ''
      } else {
        startTime = this.search.entrTime[0] + ' 00:00:00'
        endTime = this.search.entrTime[1] + ' 23:59:59'
      }
      let tempobj = {
        'object': {
          'entrOrgCode': this.search.entrOrgCode,
          'matName': this.search.matName,
          'isCiq': 1,
          lotsNo: this.search.lotsNo,
          contractNo: this.search.contractNo,
          batchNo: this.search.batchNo
        },
        'list': [2,3],
        'pageIndex': this.page3.pageNum,
        'pageSize': this.page3.pageSize,
        'startTime2': startTime,
        'endTime2': endTime
      }
      this.axios.post('pass/testManagement/v1/limstestbatchs/queryLimsTestBatchPage', tempobj, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.table.list3 = res.data.list;
          this.table.list3.forEach(item => {
            item.stateFlagName = item.stateFlag == 0 ? "未配批" : item.stateFlag == 1 ? "已配批" : item.stateFlag == 2 ? "已审核" : ''
            item.isBatchName = item.isBatch == 0 ? "否" : item.isBatch == 1 ? "是" : ''
            item.headName = item.heatNo == 0 ? "未完批" : item.heatNo == 1 ? "已完批" : ''
            item.isCiqName = item.isCiq == 0 ? "否" : item.isCiq == 1 ? "是" : ''
            item.entrTimeName = formatDate(item.entrTime, 'yyyy-MM-dd')
            let { wetWgt, dryWgt } = this.calculateWgt(item.grossWeight - 0, item.tareWeight - 0, item.koZa - 0, item.water - 0)
            item.wetWgt = wetWgt
            item.dryWgt = dryWgt
          })
          this.page3.totalPage = res.data.total;
        } else {
          this.$message.error(res.message)
        }
        this.dataLoading2 = false;
      }).catch(e => {
        this.dataLoading2 = false;
        this.$message.error(e.message)
      });
    },
    // 计算净湿重和干重
    calculateWgt (grsWgt, tareWgt, koZ, water) {
      // 净湿重=毛重-皮重-扣杂（字段位置 水分前）
      // 干重=净湿重-净湿重*水分/100 （字段位置-水分后）
      try {
        let wetWgt = this.floatComputed(this.floatComputed(grsWgt, tareWgt, '-'), koZ, '-')
        let dryWgt = 0
        // 判断水分是否有值
        if (water - 0 === 0) {
          dryWgt = ''
        } else {
          let multipW = this.floatComputed(wetWgt - 0, water - 0, '*')
          if (multipW !== 0) {
            let deW = this.floatComputed(multipW, 100, '/')
            dryWgt = this.floatComputed(wetWgt, deW, '-')
          } else {
            dryWgt = ''
          }
        }
        return {
          wetWgt: wetWgt - 0 !== 0 ? (wetWgt - 0).toFixed(3) : '',
          dryWgt: dryWgt - 0 !== 0 ? (dryWgt - 0).toFixed(3) : ''
        }
      } catch (e) {
        // console.log('会产生错误的毛，皮，扣杂，水分重量')
        // console.log(grsWgt, tareWgt, koZ, water)
        console.log(e)
      }
    },
    // 重置
    reset () {
      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
      this.search.entrOrgCode = '';
      this.search.matName = '';
      this.searchData();
    },
    // 取消配批
    unbatch () {
      if (this.multipleSelection4.length < 1) {
        this.$message.warning('请勾选您要取消的数据！')
        return
      }
      let flag = false
      this.multipleSelection4.forEach(item => {
        if (item.stateFlag == 2) {
          return flag = true
        }
      })
      if (flag) {
        this.$message.warning('已审核的数据，不可以取消配批,请选择状态为未审核的数据')
        return
      }
      this.unbatchLoading = true
      this.axios.post('pass/testManagement/v1/limstestbatchs/notBatch', this.multipleSelection4, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.searchData()
        } else {
          this.$message.error(res.message)
        }
        this.unbatchLoading = false
      }).catch(e => {
        this.unbatchLoading = false
        this.$message.error(e.message)
      })
    },
    // 审核
    checkData () {
      if (this.multipleSelection4.length < 1) {
        this.$message.warning('请勾选您要审核的数据！')
        return
      }
      //如果水分差值超过3 就进行提示
      let sortArr = this.multipleSelection4.map(item => item.water).sort()
      if ((Math.max(...sortArr) - Math.min(...sortArr)) >= 3) {
        this.$confirm('要审核的数据中水分差值大于等于3, 是否继续操作?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.sureCheck()
        })
      } else {
        this.sureCheck()
      }
    },
    sureCheck () {
      let tempArr = []
      this.multipleSelection4.map(item => {
        tempArr.push(item.id)
      })
      this.checkLoading = true
      this.axios.post('pass/testManagement/v1/limstestbatchs/checkLimsTestBatch', tempArr, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.searchData()
        } else {
          this.$message.error(res.message)
        }
        this.checkLoading = false
      }).catch(e => {
        this.checkLoading = false
        this.$message.error(e.message)
      })
    },
    pageSizeChange (size) {
      this.page.pageNum = 1
      this.page.pageSize = size;
      this.mainData();
    },
    pageCurrentChange (index) {
      this.page.pageNum = index;
      this.mainData();
    },
    handleSelectionChange (val) {
      this.multipleSelection3 = val;
    },
    pageSizeChange2 (size) {
      this.page2.pageNum = 1
      this.page2.pageSize = size;
      this.depData();
    },
    pageCurrentChange2 (index) {
      this.page2.pageNum = index;
      this.depData();
    },
    pageSizeChange3 (size) {
      this.page3.pageNum = 1
      this.page3.pageSize = size;
      this.subData();
    },
    pageCurrentChange3 (index) {
      this.page3.pageNum = index;
      this.subData();
    },
    handleSelectionChange2 (val) {
      this.multipleSelection4 = val;
    },
    tableRowClassName ({ row, column, rowIndex, columnIndex }) {
      if (row.stateFlag === '3') {
        return 'error-green';
      }
      return '';
    },
    addScreen () {
      this.$nextTick(() => {
        let ss = document.createElement('div');
        ss.innerHTML = '筛选';
        ss.style = 'text-align: center;'
        this.$refs.dataTable.$el.getElementsByClassName('el-table__fixed')[0].getElementsByTagName('td')[0].appendChild(ss);
      });
    },
    addScreen2 () {
      this.$nextTick(() => {
        let ss = document.createElement('div');
        ss.innerHTML = '筛选';
        ss.style = 'text-align: center;'
        this.$refs.dataTable2.$el.getElementsByClassName('el-table__fixed')[0].getElementsByTagName('td')[0].appendChild(ss);
      });
    },
    // 表格上横线
    tableHeaderCellStyle () {
      return 'color: rgb(255,255,255);border-bottom: 1px solid #DCDFE7;'
    },
    doExport () {
      let tHeader = [];
      let filterVal = [];
      let dataList = []
      switch (this.activeName) {
        // 未配批
        case 'first':
          break;
        // 已配批
        case 'second':
          if (this.multipleSelection4.length > 0) {
            dataList = [...this.multipleSelection4]
          } else {
            dataList = [...this.table.list2]
          }
          tHeader = ['到货批次', '新批号', '物料', '车皮号', '样号', '毛重', '皮重', '净重', '扣杂', '净湿重', '水分', '干重', '样量', '进厂时间']
          filterVal = ['lotsNo', 'batchNo', 'matName', 'carNo', 'markNo', 'grossWeight', 'tareWeight', 'netWeight', 'koZa', 'wetWgt', 'water', 'dryWgt', 'sampleWgt', 'jLnetTime']
          exportToExcel(dataList, tHeader, filterVal, '商检重量表', [], [], [])
          break;
        // 已审核
        case 'three':
          if (this.multipleSelection5.length > 0) {
            dataList = [...this.multipleSelection5]
          } else {
            dataList = [...this.table.list3]
          }
          tHeader = ['到货批次', '新批号', '物料', '车皮号', '样号', '毛重', '皮重', '净重', '扣杂', '净湿重', '水分', '干重', '样量', '进厂时间']
          filterVal = ['lotsNo', 'batchNo', 'matName', 'carNo', 'markNo', 'grossWeight', 'tareWeight', 'netWeight', 'koZa', 'wetWgt', 'water', 'dryWgt', 'sampleWgt', 'jLnetTime']
          exportToExcel(dataList, tHeader, filterVal, '商检重量表', [], [], [])
          break;
      }
    }
  }
}
</script>
<style lang="less">
</style>
