<!-- 检验委托-临时 -->
<template>
  <div class="examination">
    <div class="common-head-search">
      <el-form :inline="true">
        <el-form-item label="检验类型">
          <el-select v-model="search.testTypeCode" clearable filterable collapse-tags size="small" style="width: 100px"
            placeholder="请选择查询内容">
            <el-option v-for="item in sampleTypeNameType" :key="item.baseName" :label="item.baseName"
              :value="item.baseCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label='计划单位'>
          <el-select v-model="search.planCompanyNo" clearable filterable collapse-tags size="small"
            style="width:120px;margin-right: 10px;" placeholder="请选择查询内容">
            <el-option v-for="item in entrOrgNameType" :key="item.baseName" :label="item.orgName" :value="item.orgCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label='物料名称'>
          <el-input v-model="search.matName" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
            style="width: 120px;margin-right: 10px;"></el-input>
        </el-form-item>
        <el-form-item label='供应商'>
          <el-input v-model="search.suppName" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
            style="width: 120px;margin-right: 10px;"></el-input>
        </el-form-item>
        <el-form-item label='委托样号'>
          <el-input v-model="search.carNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
            style="width: 120px;margin-right: 10px;"></el-input>
        </el-form-item>
        <el-form-item label='合同号'>
          <el-input v-model="search.contractNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
            style="width: 120px;margin-right: 10px;"></el-input>
        </el-form-item>
        <el-form-item label='预报号'>
          <el-input v-model="search.planNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
            style="width: 120px;margin-right: 10px;"></el-input>
        </el-form-item>
        <el-form-item label="委托日期">
          <el-date-picker v-model="search.entrTime[0]" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"
            placeholder="开始日期" size="mini" style="width: 140px">
          </el-date-picker>
          <span>至</span>
          <el-date-picker v-model="search.entrTime[1]" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"
            placeholder="结束日期" size="mini" style="width: 140px">
          </el-date-picker>
          <!-- <el-date-picker
           v-model="search.entrTime"
           type="daterange"
           range-separator="至"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           size="small"
           style="width:270px"
           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 icon="el-icon-refresh" type="info" plain size="mini" @click="reset">重置</el-button>
        </el-form-item>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <el-input v-model="values" ref="autoInput" size="mini" style="display: inline-block; width: 150px"
          @input="autoSubmit()" placeholder="扫码接收" clearable :disabled="inputLoading"></el-input>
      </el-form>
    </div>
    <el-row>
      <el-col :span="14">
        <el-tabs v-model="activeName" type="border-card" class="testManagement_left">
          <el-tab-pane label="有效委托" name="first">
            <div class="common-title-div" style="height: auto; margin-top: -10px;">
              <div class="common-title-name" style="width:281px">
                <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/logo.png' />
                检验委托信息
              </div>
              <el-button icon="el-icon-search" style="height: 100%;margin-left: -220px;margin-top: 28px;" type="goon"
                size="mini" @click="countList">物料统计</el-button>
              <div>
                <el-button icon="el-icon-circle-plus-outline" type="goon" size="mini"
                  @click="addData">新增临时委托</el-button>
                <el-button icon="el-icon-edit" type="goon" size="mini" @click="modifyData">修改</el-button>
                <el-button icon="el-icon-check" type="goon" size="mini" :loading="subLoading8"
                  @click="updateSampleNo">修改委托编号</el-button>
                <!-- <el-button icon="el-icon-check" type="goon" size="mini" :loading='subLoading' style="border:3px;"  @click="submitData">提交</el-button> -->
                <!-- <el-button icon="el-icon-back" type="danger" size="mini" :loading='subLoading' style="border:3px;"  @click="cancelData">取消提交</el-button> -->
                <el-button icon="el-icon-back" type="danger" size="mini" :loading='subLoading' style="border:3px;"
                  @click="disable">停用</el-button>
                <!-- <el-button icon="el-icon-printer" type="goon" size="mini" :loading="printLoading" @click="printQRCode">打印标签</el-button> -->
              </div>
            </div>
            <div class="common-table-div" style="margin-bottom:0;margin-top:0">
              <el-table id="excelTable" v-loading="dataLoading" ref="dataTable" border @row-click='saveDataMain'
                :height="height_top" highlight-current-row :data="table.list" :icore-filter-flag="icoreFilterFlag"
                :header-cell-style="tableHeaderCellStyle" width='50%' @cell-click='searchFollow'
                @selection-change="selectRow" :cell-class-name="tableRowClassName" :summary-method="getSummaries"
                show-summary>
                <el-table-column type="index" label="NO" fixed="left" align="center" width="35"></el-table-column>
                <el-table-column type="selection" width="45" fixed="left" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="60px" prop="stateFlag1" label="状态"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="carNo" label="委托编号"
                  align="center">
                  <template slot-scope="scope">
                    <el-input v-model="scope.row.carNo" :id="scope.column.id + '--' + scope.$index"
                      @keydown.native="keyDown($event, scope.row, scope.$index)" size="small" style="width: 100%">
                    </el-input>

                  </template>
                </el-table-column>
                <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="sampleNo" label="中心编号"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="125px" prop="matName" label="物料"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="145px" prop="entrTime1" label="委托日期"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="memo" label="备注"
                  align="center">
                  <template slot-scope="scope">
                    <el-input v-model="scope.row.memo" :id="scope.column.id + '--' + scope.$index"
                      @keydown.native="keyDown($event, scope.row, scope.$index)" size="small" style="width: 100%">
                    </el-input>
                  </template>
                </el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="smpDeliName"
                  label="取样频次" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planCompanyName"
                  label="计划单位" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="companyName"
                  label="检验单位" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="deptName" label="检验车间"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sectionName"
                  label="检验班组" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleTypeName"
                  label="样品类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="entrTypeName"
                  label="委托类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="testTypeName"
                  label="检验类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="140px" prop="matClassName"
                  label="物料分类" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="140px" prop="matShapeName"
                  label="试样形状" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleNum" label="样品数量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleWgt" label="样品重量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isSmp1" label="是否取样"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isPrep1" label="是否组合"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isCheck1" label="是否外检"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isMater1" label="是否计量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="isCiq1" label="是否商检"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="isBatch1" label="是否配批"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="createMan" label="创建人"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="createTime" label="创建时间"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="updateMan" label="修改人"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="updateTime" label="修改时间"
                  align="center"></el-table-column>
              </el-table>
            </div>
            <div class="common-foot-style">
              <el-pagination @size-change="pageSizeChange" @current-change="pageCurrentChange"
                :current-page="page.pageNum" :page-sizes="[100, 200, 500, 800, 1000]" :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="first1">
            <div class="common-title-div" style="height: auto">
              <div class="common-title-name" style="width:150px">
                <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/logo.png' />
                停用委托信息
              </div>
              <div>
                <el-button icon="el-icon-check" type="goon" size="mini" :loading='subLoadingq' style="border:3px;"
                  @click="removeNumber">清除编号</el-button>
                <el-button icon="el-icon-check" type="goon" size="mini" :loading='subLoadingq' style="border:3px;"
                  @click="enable">启用</el-button>
              </div>
            </div>
            <div class="common-table-div" style="margin-bottom:0;margin-top:0">
              <el-table id="excelTable" v-loading="dataLoading" ref="dataTable" border @row-click='saveDataMain'
                :height="height_top" highlight-current-row :data="table.list1" :icore-filter-flag="icoreFilterFlag"
                :header-cell-style="tableHeaderCellStyle" width='50%' @cell-click='searchFollow'
                @selection-change="selectRow1" :cell-class-name="tableRowClassName" :summary-method="getSummaries"
                show-summary>
                <el-table-column type="index" label="NO" fixed="left" align="center" width="35"></el-table-column>
                <el-table-column type="selection" width="45" fixed="left" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="60px" prop="stateFlag1" label="状态"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="carNo" label="委托编号"
                  align="center">
                  <template slot-scope="{ row }">
                    <el-input v-model="row.carNo" size="small" style="width: 100%">
                    </el-input>
                  </template>
                </el-table-column>
                <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="sampleNo" label="中心编号"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="125px" prop="matName" label="物料"
                  align="center"></el-table-column>
                <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="contractNo" label="合同号" align="center"></el-table-column> -->
                <el-table-column sortable :show-overflow-tooltip="true" min-width="145px" prop="entrTime1" label="委托日期"
                  align="center"></el-table-column>
                <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="suppName" label="供应商" align="center"></el-table-column> -->
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="memo" label="备注"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="smpDeliName"
                  label="取样频次" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planCompanyName"
                  label="计划单位" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="companyName"
                  label="检验单位" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="deptName" label="检验车间"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sectionName"
                  label="检验班组" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleTypeName"
                  label="样品类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="entrTypeName"
                  label="委托类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="testTypeName"
                  label="检验类型" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="140px" prop="matClassName"
                  label="物料分类" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="140px" prop="matShapeName"
                  label="试样形状" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleNum" label="样品数量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleWgt" label="样品重量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isSmp1" label="是否取样"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isPrep1" label="是否组合"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isCheck1" label="是否外检"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="isMater1" label="是否计量"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="isCiq1" label="是否商检"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="isBatch1" label="是否配批"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="createMan" label="创建人"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="createTime" label="创建时间"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="updateMan" label="修改人"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="updateTime" label="修改时间"
                  align="center"></el-table-column>
              </el-table>
            </div>
            <div class="common-foot-style">
              <el-pagination @size-change="pageSizeChange" @current-change="pageCurrentChange"
                :current-page="page.pageNum" :page-sizes="[100, 200, 500, 800, 1000]" :page-size="page.pageSize"
                layout="total, sizes, prev, pager, next, jumper" :total="page.totalPage" background>
              </el-pagination>
            </div>
          </el-tab-pane>
        </el-tabs>
      </el-col>
      <el-col :span="10">
        <el-tabs v-model="activeName2" type="border-card" class="testManagement_left">
          <el-tab-pane label="检验项目" name="first">
            <div class="common-title-div" style="height:75px; margin-top: 25px;">
              <div class="common-title-name">
                <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/logo.png' />
                计划检验项目表
              </div>
              <div>
                <el-button icon="el-icon-circle-plus-outline" type="goon" size="mini" @click="addData2">新增</el-button>
                <el-button icon="el-icon-remove-outline" type="danger" size="mini" @click="deleteData2">删除</el-button>
              </div>
            </div>
            <div class="common-table-div" style="margin-bottom:0;margin-top:0">
              <el-table v-loading="dataLoading2" ref="dataTable2" border :height="height_bot" @row-click='saveData'
                highlight-current-row :data="table.list2" :icore-filter-flag="icoreFilterFlag"
                :header-cell-style="tableHeaderCellStyle" :cell-class-name="tableRowClassName2"
                :summary-method="getSummaries" show-summary>
                <el-table-column type="index" label="NO" fixed="left" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="anlyItemNo"
                  label="分析项目编号" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="anlyItemName"
                  label="分析项目" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="minSign" label="下限符"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="minValue" label="最小值"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="maxSign" label="上限符"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="maxValue" label="最大值"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" 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="160px" prop="createTime" label="创建时间"
                  align="center"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="测试项目" name="second">
            <div class="common-title-div" style="height:75px; margin-top: 25px;">
              <div class="common-title-name">
                <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/logo.png' />
                计划测试项目表
              </div>
              <div>
                <el-button icon="el-icon-circle-plus-outline" type="goon" size="mini" @click="addData2">新增</el-button>
                <el-button icon="el-icon-remove-outline" type="danger" size="mini" @click="deleteData2">删除</el-button>
              </div>
            </div>
            <div class="common-table-div" style="margin-bottom:0;margin-top:0">
              <el-table v-loading="dataLoading3" ref="dataTable3" border :height="height_bot" highlight-current-row
                :data="table.list3" :icore-filter-flag="icoreFilterFlag" :header-cell-style="tableHeaderCellStyle"
                :cell-class-name="tableRowClassName2" :summary-method="getSummaries" show-summary>
                <el-table-column type="index" label="NO" fixed="left" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="anlyItemNo"
                  label="分析项目编号" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="anlyItemName"
                  label="分析项目" align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="minSign" label="下限符"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="minValue" label="最小值"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="maxSign" label="上限符"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="maxValue" label="最大值"
                  align="center"></el-table-column>
                <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" 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="160px" prop="createTime" label="创建时间"
                  align="center"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
    <div id="printContainer2" style="margin-left: 25px; margin-top: 3px" v-show="false">
      <div id="printContent">
        <div v-for="(item, index) in printData" :key="item.id"
          style="height: 200px; width: 439px;border: 1px solid #fff; position: relative">
          <div>
            <div style="font-size: 15px; line-height: 18px; margin-left: 25px;; margin-top: 10px">
              产品名称：{{ item.matName }}
            </div>
            <div style="font-size: 15px; line-height: 18px; margin-left: 25px;">
              委托编号：{{ item.carNo }}
            </div>
            <div style="font-size: 15px; line-height: 18px; margin-left: 25px;">
              中心编号：{{ item.sampleNo }}
            </div>
            <div style="font-size: 15px; line-height: 18px; margin-left: 25px">
              接样日期：{{ item.entrTime }}
              &nbsp;&nbsp;&nbsp;&nbsp;保存周期：{{ item.matEngAbbr }}天
            </div>
            <div v-if="item.anlyName.length > 80" style="
                  margin-left: 25px;
                  word-wrap: break-word;
                  word-break: normal;
                  font-size: 15px;
                  line-height: 18px;
                ">
              <span style="font-size: 13px">检验项目：</span>{{ item.anlyName }}
            </div>
            <div v-else style="
                  margin-left: 25px;
                  word-wrap: break-word;
                  word-break: normal;
                  font-size: 15px;
                  line-height: 18px;
                " :id="'anlyName' + index">
              <span style="font-size: 13px">检验项目：{{ item.anlyName ? item.anlyName : '' }}</span>
            </div>
            <div style="text-align: center; margin-bottom: 0px;">
              <img width="83%" :id="`barcode${item.id}`" />
            </div>
            <div v-if="printData.length > 1" style="page-break-after: always"></div>
          </div>
        </div>
      </div>
    </div>
    <div is="alertComponets" :showFlag="showFlag" :Params="Params" @refresh='refresh'></div>
    <div is="alertComponets2" :showFlag2="showFlag2" :Params="Params" :Params2="Params2" @refresh='refresh2'></div>
    <el-dialog @close="closeDialog" :visible.sync="dialogTableCount" width="80%">
      <el-table id="excelTable3" ref="dataTable3" border :data="tableCount">
        <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="MAT_NAME" label="物料编号"
          align="center"></el-table-column>
        <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="COUNT" label="个数"
          align="center"></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
import {
  getCookie,
  formatDate
} from '@/utils/util.js';
import {
  cookieUserId,
  cookieUserName
} from '@/config/config.js'
import alertComponets from './alertComponents';
import alertComponets2 from './alertComponents2';
import JsBarcode from 'jsbarcode'
let userName = getCookie(cookieUserName);
let userId = getCookie(cookieUserId);
export default {
  components: { alertComponets, alertComponets2 },
  data() {
    return {
      table: {
        list: [],
        list1: [],
        list2: [],
        list3: []
      },
      values: '',
      timeId: null,
      activeName: 'first',
      activeName2: 'first',
      saveRow: {},
      selectRows: [],
      selectRow1s: [],
      dataLoading: false,
      dataLoading2: false,
      dataLoading3: false,
      inputLoading: false,
      subLoading: false,
      subLoadingq: false,
      icoreFilterFlag: true,
      printLoading: false,
      page: {
        pageSize: 200,
        pageNum: 1,
        totalPage: 0
      },
      page2: {
        pageSize: 200,
        pageNum: 1,
        totalPage: 0
      },
      savaDep: {},
      list: [],
      entrId: '',
      showFlag: false,
      Params: {},
      showFlag2: false,
      Params2: {},
      tableCount: [],
      dialogTableCount: false,
      entrOrgNameType: [],
      entrOrgNameType1: [],
      sampleTypeNameType: [],
      multipleSelection3: [],
      multipleSelection4: [],
      search: {
        entrTime: [],
        testTypeCode: '',
        planCompanyName: '',
        matName: '',
        suppName: '',
        carNo: '',
        contractNo: '',
        planNo: ''
      },
      height_top: 0,
      height_bot: 0,
      activeMenu: '',
      cancelEntrustLoading: false,
      printData: [],
      subLoading8: false,
      editRow: {}
    }
  },
  created() {
    this.height_top = window.innerHeight - 190;
    this.height_bot = window.innerHeight - 190;
    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/limsbaseinfos/queryBaseInfoByBaseCode",
        { validFlag: 1, baseCode: 4803 },
        { individualType: "json" }
      )
      .then((res) => {
        this.sampleTypeNameType = res.data;
      });
    this.search.testTypeCode = '480301';
    this.axios.post("pass/baseManagement/v1/sysorgs/querySysOrgCompanyAll", {}, { individualType: 'json' }).then(response => {
      this.entrOrgNameType = 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;
        }
        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;
    },
    keyDown(event, row, rindex) {
      let tdTarget = event.target;
      let pid = tdTarget.id;
      if (!pid) {
        return true;
      }
      let ids = pid.split("--");
      if (ids.length != 2) {
        return true;
      }
      let columnId = ids[0];
      let index = ids[1];
      let that = this;
      while (tdTarget.tagName !== 'TD') {
        tdTarget = tdTarget.parentElement;
      }
      // 如果按下键盘下键或者回车键
      if (event.keyCode === 40 || event.keyCode === 13) {
        let ind = Number(rindex) + 1;
        let id = '#' + columnId + '--' + ind;
        let input = $(id);
        if (input) {
          this.$refs.dataTable.setCurrentRow(this.table.list[ind]);
          input.focus();
          input.blur();
          input.select(); // 选中内容
          event.stopPropagation();
          event.stopImmediatePropagation();
          event.preventDefault();
          return false;
        }
      } else if (event.keyCode === 38) { // 键盘上键
        let ind = Number(index) - 1;
        let id = '#' + columnId + '--' + ind;
        let input = $(id);
        if (input) {
          this.$refs.dataTable.setCurrentRow(this.table.list[ind]);
          input.focus();
          input.select(); // 选中内容
          event.stopPropagation();
          event.stopImmediatePropagation();
          event.preventDefault();
          return false;
        }
      }
    },
    refresh(arg) {
      if (arg !== 2) {
        arg = 1
      }
      this.setFlag();
      if (arg === 1) {
        this.mainData();
        this.mainData1();
      }
    },
    refresh1() {
      this.setFlag();
    },
    refresh2() {
      this.depData(this.entrId);
    },
    addData() {
      this.showFlag = !this.showFlag;
      this.Params = null;
    },
    saveDataMain(row) {
      this.saveRow = Object.assign({}, row)
      this.editRow = row
    },
    modifyData() {
      if (JSON.stringify(this.saveRow) === "{}") {
        this.$message.warning('请点击选中一条您要修改的数据')
        return
      }
      if (this.saveRow.stateFlag == 1) {
        this.$message.warning('数据已提交，不可进行修改')
        return
      }
      this.Params = this.saveRow
      this.showFlag = !this.showFlag;
    },
    removeNumber() {
      this.subLoadingq = true;
      this.axios.post("pass/testManagement/v1/api/reflection/removeMapPkALL").then(res => {
        if (res.code == 0 || res.code == 200) {
          this.subLoadingq = false
          this.$message.success(res.message);
        } else {
          this.subLoadingq = false
          this.$message.error(res.message)
        }
      })
    },
    autoSubmit() {
      if (!this.values) {
        this.$message.warning('请先用扫码枪扫描标签')
        return
      }
      if (!this.timeId) {
        this.timeId = setTimeout(() => {
          this.inputLoading = true
          this.axios.post('pass/testManagement/v1/limstestentrusts/scanningSubmit', { carNo: this.values }, { individualType: 'json' }).then(res => {
            if (res.code == 0 || res.code == 200) {
              this.$nextTick(() => {
                this.$refs.autoInput.focus()
              })
              this.values = ''
              this.inputLoading = false
              this.$message.success("操作成功！");
              this.mainData()
            } else {
              this.$nextTick(() => {
                this.$refs.autoInput.focus()
              })
              this.values = ''
              this.inputLoading = false
              this.$message.error(res.message)
            }
          }).catch(e => {
            this.$nextTick(() => {
              this.$refs.autoInput.focus()
            })
            this.values = ''
            this.inputLoading = false
            this.$message.error(e.message)
          })
          this.timeId = null;
        }, 1000);
      }
    },
    //检验委托信息提交
    async submitData() {
      if (this.selectRows.length == 0) {
        return this.$message.warning('请至少勾选一条数据进行提交!');
      }
      let ids = []
      for (let i = 0; i < this.selectRows.length; i++) {
        let item = this.selectRows[i];
        if (item.stateFlag === '1') {
          return this.$message.warning('委托编号为[' + item.id + ']的数据已经提交，无法再次进行提交!');
        }
        if (item.validFlag === '1') {
          ids.push(item.id)
        }
      }
      this.subLoading = true
      for (let i = 0; i < this.selectRows.length; i++) {
        let item = this.selectRows[i];
        const str = await this.axios.post("pass/testManagement/v1/limstestentrusts/saveLimsTestEntrust", item, { individualType: "json", });
        if (str.succeed) {
          const str1 = await this.axios.post('pass/testManagement/v1/limstestentrusts/submit', [item.entrId], { individualType: 'json' });
          if (str1.code == 0 || str1.code == 200) {
            this.$message.success(str1.message);
          } else {
            this.$message.warning(str1.message)
          }
        } else {
          this.$message.error(str.message)
        }
      }
      this.subLoading = false;
      this.mainData();
      this.mainData1();
    },
    saveData(row) {
      this.savaDep = Object.assign({}, row)
    },
    addData2() {
      if (JSON.stringify(this.saveRow) === "{}") {
        this.$message.warning('请点击选中一条检验委托信息数据')
        return
      }
      if (this.saveRow.stateFlag == 1) {
        this.$message.warning('数据已提交，不可进行新增')
        return
      }
      this.showFlag2 = !this.showFlag2;
      this.Params2 = null;
      this.Params = this.saveRow
    },
    deleteData2() {
      if (JSON.stringify(this.savaDep) === "{}") {
        this.$message.warning('请点击选中一条检验委托信息数据')
        return
      }
      if (this.saveRow.stateFlag == 1) {
        this.$message.warning('数据已提交，不可进行删除')
        return
      }
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.axios.post('pass/testManagement/v1/limstestentrustds/deleteLimsTestEntrustD?id=' + this.savaDep.id, { individualType: 'json' }).then(res => {
          if (res.succeed) {
            this.dialogTableVisible = false;
            this.$message.success('删除成功');
            this.depData(this.entrId)
          } else {
            this.$message.error(res.message)
          }
        }).catch(e => {
          this.$message.error(e.message)
        })
      }).catch(() => { });
    },
    searchData() {
      this.page.pageNum = 1;
      this.page.pageSize = 200
      this.mainData()
      this.mainData1()
    },
    // 取消待取样
    cancelEntrustData() {
      if (JSON.stringify(this.saveRow) === "{}") {
        this.$message.warning('请点击选中一条您要取消提交的数据')
        return
      }
      this.cancelEntrustLoading = true
      this.axios.post('pass/testManagement/v1/pretrackscales/doUpdateLimsFlag', [this.saveRow.planNo], { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.mainData()
        } else {
          this.$message.error(res.message)
        }
        this.cancelEntrustLoading = false
      }).catch(e => {
        this.cancelEntrustLoading = false
        this.$message.error(e.message)
      })
    },
    updateSampleNo() {
      if (this.selectRows.length == 0) {
        return this.$message.warning('请至少勾选一条您要修改的数据!');
      }
      this.subLoading8 = true
      this.axios.post("pass/testManagement/v1/limstestentrusts/saveLimsTestEntrustList", this.selectRows, { individualType: "json", }).then((res) => {
        if (res.succeed) {
          this.subLoading8 = false
          this.$message.success("修改成功");
          this.searchData()
        } else {
          this.subLoading8 = false
          this.$message.error(res.message);
        }
      }).catch((e) => {
        this.subLoading8 = false
        this.$message.error(e.message);
      });
    },
    closeDialog() {
      this.dialogTableCount = false;
      this.tableCount = [];
    },
    countList() {
      let obj = {
        object: {
          entrOrgNo: this.search.planCompanyNo, // 委托单位
          sampleTypeCode: 480105,
          matName: this.search.matName,
          suppName: this.search.suppName,
          carNo: this.search.carNo,
          contractNo: this.search.contractNo,
          planNo: this.search.planNo,
          validFlag: '1',
          stateFlag: '1'
        },
        list: [this.search.testTypeCode],
        'startTime': this.startTime,
        'endTime': this.endTime
      }
      this.axios.post('pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustCount', obj, { individualType: 'json' }).then(res => {
        this.tableCount = res.data
        this.dialogTableCount = true;
      }).catch(e => {
        this.$message.error('查询错误!');
      });
    },
    mainData() {
      this.saveRow = {}
      this.dataLoading = true;
      if (!this.search.entrTime) {
        this.startTime = ''
        this.endTime = ''
      } else {
        this.startTime = this.search.entrTime[0] + ' 00:00:00'
        this.endTime = this.search.entrTime[1] + ' 23:59:59'
      }
      let obj = {
        object: {
          entrOrgNo: this.search.planCompanyNo, // 委托单位
          sampleTypeCode: 480105,
          matName: this.search.matName,
          suppName: this.search.suppName,
          carNo: this.search.carNo,
          contractNo: this.search.contractNo,
          planNo: this.search.planNo,
          validFlag: '1',
        },
        list: [this.search.testTypeCode],
        'startTime': this.startTime,
        'endTime': this.endTime,
        pageIndex: this.page.pageNum,
        pageSize: this.page.pageSize
      }
      this.axios.post('pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustPage', obj, { individualType: 'json' }).then(res => {
        this.table.list = res.data.list;
        this.table.list.forEach(item => {
          item.stateFlag1 = item.validFlag == '0' ? '已停用' : item.stateFlag === '0' ? '编辑' : item.stateFlag === '1' ? '提交' : ''
          item.isCiq1 = item.isCiq === '0' ? '否' : item.isCiq === '1' ? '是' : ''
          item.isBatch1 = item.isBatch === '0' ? '否' : item.isBatch === '1' ? '是' : ''
          item.isSmp1 = item.isSmp === '0' ? '否' : item.isSmp === '1' ? '是' : ''
          item.isPrep1 = item.isPrep === '0' ? '否' : item.isPrep === '1' ? '是' : ''
          item.isCheck1 = item.isCheck === '0' ? '否' : item.isCheck === '1' ? '是' : ''
          item.isMater1 = item.isMater === '0' ? '否' : item.isMater === '1' ? '是' : ''
          item.entrTime1 = formatDate(item.entrTime, 'yyyy-MM-dd' + ' ' + 'HH:mm:ss')
        })
        this.dataLoading = false;
        if (this.table.list.length > 0) {
          this.$refs.dataTable.setCurrentRow(this.table.list[0])
          this.searchFollow(this.table.list[0])
        }
        this.page.totalPage = res.data.total;
      }).catch(e => {
        this.dataLoading = false;
      });
    },
    mainData1() {
      this.saveRow = {}
      this.dataLoading = true;
      if (!this.search.entrTime) {
        this.startTime = ''
        this.endTime = ''
      } else {
        this.startTime = this.search.entrTime[0] + ' 00:00:00'
        this.endTime = this.search.entrTime[1] + ' 23:59:59'
      }
      let obj = {
        object: {
          entrOrgNo: this.search.planCompanyNo, // 委托单位
          sampleTypeCode: 480105,
          matName: this.search.matName,
          suppName: this.search.suppName,
          carNo: this.search.carNo,
          contractNo: this.search.contractNo,
          planNo: this.search.planNo,
          validFlag: '0',
        },
        list: [this.search.testTypeCode],
        'startTime': this.startTime,
        'endTime': this.endTime,
        pageIndex: this.page.pageNum,
        pageSize: this.page.pageSize
      }
      this.axios.post('pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustPage', obj, { individualType: 'json' }).then(res => {
        this.table.list1 = res.data.list;
        this.table.list1.forEach(item => {
          item.stateFlag1 = item.validFlag == '0' ? '已停用' : item.stateFlag === '0' ? '编辑' : item.stateFlag === '1' ? '提交' : ''
          item.isCiq1 = item.isCiq === '0' ? '否' : item.isCiq === '1' ? '是' : ''
          item.isBatch1 = item.isBatch === '0' ? '否' : item.isBatch === '1' ? '是' : ''
          item.isSmp1 = item.isSmp === '0' ? '否' : item.isSmp === '1' ? '是' : ''
          item.isPrep1 = item.isPrep === '0' ? '否' : item.isPrep === '1' ? '是' : ''
          item.isCheck1 = item.isCheck === '0' ? '否' : item.isCheck === '1' ? '是' : ''
          item.isMater1 = item.isMater === '0' ? '否' : item.isMater === '1' ? '是' : ''
          item.entrTime1 = formatDate(item.entrTime, 'yyyy-MM-dd' + ' ' + 'HH:mm:ss')
        })
        this.dataLoading = false;
        this.page.totalPage = res.data.total;
      }).catch(e => {
        this.dataLoading = false;
      });
    },
    enable() {//启用
      if (this.selectRow1s.length == 0) {
        return this.$message.warning('请至少勾选一条您要启用的数据!');
      }
      // if (this.saveRow.validFlag != 0) {
      //   this.$message.warning('数据未停用，不可启用！')
      //   return
      // }
      let ids = []
      for (let i = 0; i < this.selectRow1s.length; i++) {
        let item = this.selectRow1s[i];
        if (item.validFlag === '1') {
          return this.$message.warning('委托编号为[' + item.id + ']的数据为启用，无法再次进行启用!');
        }
        if (item.validFlag === '0') {
          ids.push(item.id)
        }
      }
      this.subLoadingq = true
      this.axios.post('pass/testManagement/v1/limstestentrusts/enable', ids, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.mainData();
          this.mainData1();
        } else {
          this.$message.error(res.message)
        }
        this.subLoadingq = false
      }).catch(e => {
        this.subLoadingq = false
        this.$message.error(e.message)
      })
    },
    disable() {//停用
      if (this.selectRows.length == 0) {
        return this.$message.warning('请至少勾选一条您要停用的数据!');
      }
      let ids = []
      for (let i = 0; i < this.selectRows.length; i++) {
        let item = this.selectRows[i];
        if (item.validFlag === '0') {
          return this.$message.warning('委托编号为[' + item.id + ']的数据为停用，无法再次进行停用!');
        }
        if (item.validFlag === '1') {
          ids.push(item.id)
        }
      }
      this.subLoading = true
      this.axios.post('pass/testManagement/v1/limstestentrusts/disable', ids, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.mainData();
          this.mainData1();
        } else {
          this.$message.error(res.message)
        }
        this.subLoading = false
      }).catch(e => {
        this.subLoading = false
        this.$message.error(e.message)
      })
    },
    setFlag() {
      this.showFlag = false
      this.showFlag2 = false
    },
    cancelData() {//取消提交
      if (this.selectRows.length == 0) {
        return this.$message.warning('请至少勾选一条您要取消提交的数据!');
      }
      // if (this.saveRow.stateFlag != 1) {
      //   this.$message.warning('数据不是提交状态，不可取消提交！')
      //   return
      // }
      let ids = []
      for (let i = 0; i < this.selectRows.length; i++) {
        let item = this.selectRows[i];
        if (item.stateFlag === '0') {
          return this.$message.warning('委托编号为[' + item.id + ']的数据为编辑状态，无法再次进行取消提交!');
        }
        if (item.validFlag === '1') {
          ids.push(item.id)
        }
      }
      this.subLoading = true
      this.axios.post('pass/testManagement/v1/limstestentrusts/cancel', ids, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.mainData();
          this.mainData1();
        } else {
          this.$message.error(res.message)
        }
        this.subLoading = false
      }).catch(e => {
        this.subLoading = false
        this.$message.error(e.message)
      })
    },
    // 打印条形码
    printQRCode() {
      if (this.selectRows.length == 0) {
        this.$message.warning('请勾选您要打印的数据')
        return
      }
      let flag = this.selectRows.some(u => u.stateFlag != 1)
      if (flag) {
        return this.$message.warning('未提交数据不允许进行打印，请重新进行勾选')
      }
      let entrIds = [];
      this.selectRows.forEach(p => {
        entrIds.push(p.entrId)
      })
      this.axios.post('pass/testManagement/v1/limssampleinfos/queryLimsSampleInfosPage', { object: { entrIds }, pageIndex: 1, pageSize: 200 }, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.$message.success(res.message);
          this.printData = res.data.list
          this.runPrint(this.printData)
          this.searchData()
        } else {
          this.$message.error(res.message)
        }
      })
    },
    runPrint(arr) {
      setTimeout(() => {
        arr.forEach(item => {
          item.createTime = item.createTime ? formatDate(item.createTime, 'yyyy-MM-dd') : '';
          let newStr = item.sampleNo.replace('-U', '(筛上)').replace('-D', '(筛下)').replace('-B', '(边)')
            .replace('-Z', '(中)').replace('-T', '(2mm)').replace('-H', '(合金)').replace('-R', '(熔渣)');
          item.newSampleNo = newStr
          JsBarcode(`#barcode${item.id}`, item.sampleNo, {
            format: 'CODE128',
            lineColor: '#000',
            background: '#fff',
            width: 1,
            height: 15,
            displayValue: false
          })
        })
        setTimeout(() => {
          this.printPage('printContent');
        }, 1500)
      }, 100);
    },
    searchFollow(row) {
      this.saveRow = row
      this.entrId = row.entrId ? row.entrId : ''
      this.page2.pageNum = 1
      this.page2.pageSize = 50
      this.depData(this.entrId)
      this.getRevMsg(this.entrId)
      this.getSendMsg(this.entrId)
    },
    selectRow(val) {
      this.selectRows = val
    },
    selectRow1(val) {
      this.selectRow1s = val
    },
    getRevMsg(entrId) {
      if (!entrId) {
        return this.$message.warning('获取接收电文参数错误! entrId为空!')
      }
      this.dataLoading3 = true;
      this.axios.post('pass/testManagement/v1/limstestentrusts/queryMsgByEntrId', { object: { entrId: entrId }, pageIndex: this.page2.pageNum, pageSize: this.page2.pageSize }, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.dataLoading3 = false;
          this.table.list3 = res.data.list;
        } else {
          this.dataLoading3 = false;
          return this.$message.warning(res.message)
        }
      }).catch(e => {
        this.dataLoading3 = false;
        return this.$message.error(e.message)
      })
    },
    depData(entrId) {
      this.savaDep = {},
        this.dataLoading2 = true;
      this.axios.post('pass/testManagement/v1/limstestentrustds/queryLimsTestEntrustDPage', { object: { entrId: entrId }, pageIndex: this.page2.pageNum, pageSize: this.page2.pageSize }, { individualType: 'json' }).then(res => {
        if (res.code == 0 || res.code == 200) {
          this.table.list2 = res.data.list;
          this.page2.totalPage = res.data.total;
          this.table.list2.forEach(item => {
            item.validFlag1 = item.validFlag === '0' ? '无效' : item.validFlag === '1' ? '有效' : ''
          })
        } else {
          this.$message.error(res.message)
        }
        this.dataLoading2 = false;
      }).catch(e => {
        this.dataLoading2 = false;
        this.$message.error(e.message)
      });
    },
    reset() {
      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
      this.search.planCompanyNo = '';
      this.search.matName = ''
      this.searchData();
    },
    pageSizeChange(size) {
      this.page.pageSize = size;
      this.mainData();
      this.mainData1();
    },
    pageCurrentChange(index) {
      this.page.pageNum = index;
      this.mainData();
      this.mainData1();
    },
    handleSelectionChange2(val) {
      this.multipleSelection4 = val;
    },
    pageSizeChange2(size) {
      this.page2.pageSize = size;
      this.depData(this.entrId);
    },
    pageCurrentChange2(index) {
      this.page2.pageNum = index;
      this.depData(this.entrId);
    },
    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);
      });
    },
    tableRowClassName({
      row, column, rowIndex, columnIndex
    }) {
      if (columnIndex === 13) {
        if (row.validFlag !== '1') {
          return 'error-row';
        }
      }
      if (columnIndex === 2) {
        if (row.validFlag !== '1') {
          return 'error-row';
        }
        if (row.stateFlag === '1') {
          return 'error-green';
        }
        return '';
      }
    },
    tableRowClassName2({
      row, column, rowIndex, columnIndex
    }) {
      if (columnIndex === 5) {
        if (row.validFlag !== '1') {
          return 'error-row';
        }
        return '';
      }
    },
    tableHeaderCellStyle() {
      return 'color: rgb(255,255,255);border-bottom: 1px solid #DCDFE7;'
    }
  }
}
</script>
<style scoped></style>
