<template>
  <el-form
    class="content-main cfxxNewAdd"
    label-width="208px"
    :data="formQuery"
  >
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="仓房信息" name="first">
        <el-row>
          <el-col :span="24">
            <h3 class="h3">仓房基本信息</h3>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓房编码:">
              <el-input
                class="inputWidth"
                disabled
                readonly="readonly"
                placeholder="系统自动生成"
                v-model="formQuery.cfbh"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓房序号:">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.cfxh"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <!-- <el-row>
      <el-col :span="12">
        <el-form-item label="廒间序号:">
          <el-input
            class="inputWidth"
            disabled
            v-model="formQuery.ajxh"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="货位序号:">
          <el-input
            class="inputWidth"
            disabled
            v-model="formQuery.hwxh"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row> -->
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓房名称:">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.gfcfmc"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="建设时间:">
              <el-date-picker
                class="inputWidth"
                disabled
                v-model="formQuery.jssj"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="交付使用日期:">
              <el-date-picker
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.jfsyrq"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="启用日期:">
              <el-date-picker
                class="inputWidth"
                disabled
                v-model="formQuery.cfqyrq"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓房类型:">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cflx"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in cxOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓房状态:">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cfzt"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in cfztOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="储存粮食类型:" prop="grainType">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.grainType"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in grainOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="核定仓容(吨):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.dczlrj"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="设计仓容(吨):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.sjcr"
              ></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="隔热保冷性能:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.grblxn"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="能否散装存储:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.sfszcc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="有无机械通风设施:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.ywjxtfss"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="能否环流熏蒸杀虫:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.nfxlsc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="有无粮情检测设施:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.ywlqckqk"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓房用途:" prop="cfyt">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.cfyt"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设计使用年限(年):" prop="sjsynx">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.sjsynx"
              ></el-input>
              <!-- <el-date-picker
                  clearable
                  class="inputWidth"
                  :disabled="showLock"
                  v-model="formQuery.sjsynx"
                  type="year"
                  value-format="yyyy"
                  placeholder="选择日期"
                ></el-date-picker> -->
            </el-form-item>
          </el-col>
          <!-- <el-col :span="12">
            <el-form-item label="其他用途:" prop="qtyt">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.qtyt"
              ></el-input>
            </el-form-item>
          </el-col> -->
          <el-col :span="12">
            <el-form-item label="低温仓类型:" prop="dwclx">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.dwclx"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in dwcOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="有无不动产权证:" prop="realEstateCertificate">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.realEstateCertificate"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="设计年限:" prop="sjnx">
              <el-date-picker
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.sjnx"
                type="year"
                value-format="yyyy"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="有无竣工验收或验收备案:"
              prop="acceptanceQualified"
            >
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.acceptanceQualified"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="防雨防潮性能:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.fyfcxn"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设计单位:" prop="sjdw">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.sjdw"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="建设单位:" prop="jsdw">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.jsdw"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="监理单位:" prop="jldw">
              <el-input
                clearable
                class="inputWidth"
                disabled
                placeholder="请输入"
                v-model="formQuery.jldw"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="密闭杀虫性能:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.mbscxn"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <h3 class="h3">结构</h3>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="墙体:">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.qtjg"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="墙体厚度(cm):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.qthd"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="屋面:">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cfwm"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地面:">
              <el-select
                clearable
                class="inputWidth"
                :disabled="showLock"
                v-model="formQuery.dmjg"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in dmOption"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="檐高(m):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cfyg"
              ></el-input>
            </el-form-item>
          </el-col>
          <!-- </el-row> -->
          <!-- <el-row> -->
          <el-col :span="12">
            <el-form-item label="房顶:" prop="fdjg">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.fdjg"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in fdOption"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="房架:" prop="fjjg">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.fjjg"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in fjOption"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <!-- </el-row> -->
          <!-- <el-row> -->
          <el-col :span="12">
            <el-form-item label="窗户数量:" prop="windowNum">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.windowNum"
              ></el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="12">
        <el-form-item label="檐高(米):" prop="cfyg">
          <el-input
            class="inputWidth"
            :disabled="showLock"
            v-model="formQuery.cfyg"
          ></el-input>
        </el-form-item>
      </el-col> -->
        </el-row>
        <el-row>
          <el-col :span="24">
            <h3 class="h3">仓外</h3>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="长(m):" prop="cwc">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cwc"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="宽(m):" prop="cwk">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cwk"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="檐高(m):" prop="cwyg">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cwyg"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="顶高(m):" prop="cwdg">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cwdg"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="筒仓外径(m):" prop="cwtcwj">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cwtcwj"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <h3 class="h3">仓内</h3>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="长(m):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cnc"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="宽(m):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cnk"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="檐高(m):" prop="cnyg">
              <el-input
                :min="0"
                class="inputWidth"
                disabled
                v-model="formQuery.cnyg"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="装粮线高(m):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cnzlxg"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="筒仓内径(m):">
              <el-input
                class="inputWidth"
                disabled
                v-model="formQuery.cntcnj"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓内体积(m³):" prop="cntj">
              <el-input
                :min="0"
                class="inputWidth"
                disabled
                v-model="formQuery.cntj"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <h3 class="h3">其他</h3>
          </el-col>
        </el-row>
        <el-row class="warehouseDoorVOList">
          <el-row style="margin-bottom: 5px">
            <el-col :span="12">
              <el-form-item label="仓门数量:" prop="cmsl">
                <el-input
                  class="inputWidth"
                  disabled
                  v-model="formQuery.cmsl"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- <el-form-item label="" prop="workOffice"> -->
          <el-table
            :data="formQuery.warehouseDoorVOList"
            :key="tableKey"
            border
            fit
            highlight-current-row
            style="width: 98%; margin-bottom: 25px"
          >
            <el-table-column align="center" label="仓门位置">
              <template slot-scope="scope">
                <el-form :model="scope.row">
                  <el-form-item prop="cmmc">
                    <el-input v-model="scope.row.cmmc" disabled></el-input>
                  </el-form-item>
                </el-form>
              </template>
            </el-table-column>
            <el-table-column align="center" label="仓门高度(m)">
              <template slot-scope="scope">
                <el-form :model="scope.row">
                  <el-form-item
                    prop="cmgd"
                    :rules="[
                      {
                        required: false,
                        message: '请填写库门高度，仅限两位小数',
                        validator: validateUsername,
                      },
                      {
                        pattern: /^\d{1,2}(\.\d{1,2})?$/,
                        message: '库门高度精确到两位小数点',
                      },
                    ]"
                  >
                    <el-input
                      v-model="scope.row.cmgd"
                      style="width: 100%"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-form>
              </template>
            </el-table-column>
            <el-table-column align="center" label="仓门宽度(m)">
              <template slot-scope="scope">
                <el-form :model="scope.row">
                  <el-form-item
                    prop="cmkd"
                    :rules="[
                      {
                        required: false,
                        message: '请填写库门宽度，仅限两位小数',
                      },
                      {
                        pattern: /^\d{1,2}(\.\d{1,2})?$/,
                        message: '库门宽度精确到两位小数点',
                      },
                    ]"
                  >
                    <el-input
                      v-model="scope.row.cmkd"
                      style="width: 100%"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-form>
              </template>
            </el-table-column>
            <!-- <el-table-column align="center" fixed="right"  label="操作" width="100">
                    <template slot-scope="scope">
                      <el-button @click="addZJ()" size="mini" title="添加" type="text" class="el-icon-plus"> </el-button>
                    <el-button @click="deleteNodeBtn(scope.$index)" size="mini" title="删除" disabled type="text" class="el-icon-minus">
                    </el-button>
                    </template>
                </el-table-column> -->
          </el-table>
          <!-- </el-form-item> -->
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="通风方式:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.tffs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="屋面隔热:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.grfs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options4"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="墙体隔热:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.qtgr"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options5"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="控温措施:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.kwcs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options6"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓门保温:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.dwc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options7"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="窗户保温:">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.chbw"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options8"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="保温门:" prop="bwm">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.bwm"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="保温窗:" prop="bwc">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.bwc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="双层保温窗:" prop="scbwc">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.scbwc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="外控内开窗:" prop="wknkc">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.wknkc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓内吊顶:" prop="cndd">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cndd"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓内保温吊顶:" prop="cdbwdd">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cdbwdd"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="隔层排积热:" prop="gcpjr">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.gcpjr"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓顶外隔热层:" prop="cdwgrc">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cdwgrc"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="保温墙体:" prop="bwqt">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.bwqt"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="保温涂料:" prop="bwtl">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.bwtl"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="制冷设备:" prop="zlsb">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.zlsb"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地笼通风:" prop="dltf">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.dltf"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="轴流风机:">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.zlfj"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电子测温:" prop="dzcw">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.dzcw"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="自动流粮口:" prop="zdllk">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.zdllk"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="环流熏蒸:" prop="hlxz">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.hlxz"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="内环流:" prop="cnhl">
              <el-select
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.cnhl"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item clearable label="仓内摄像头:" prop="cnsxt">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.cnsxt"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="隔热措施:" prop="grfs">
              <el-input
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.grfs"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item clearable label="气密性:" prop="qmx">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.qmx"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in grxnoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item
              clearable
              label="有无防火防爆防盗设施:"
              prop="ywfhfbfdss"
            >
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.ywfhfbfdss"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsNfStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              clearable
              label="有无防鼠防雀防虫装置及设施:"
              prop="ywfsfqfczz"
            >
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.ywfsfqfczz"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsNfStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="隔热保温措施:" prop="grbwcs">
              <el-input
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.grbwcs"
              ></el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="12">
              <el-form-item clearable label="有无粮情检测设施:" prop="ywlqckqk">
                <el-select
                  class="inputWidth"
                  :disabled="showLock"
                  v-model="formQuery.ywlqckqk"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in options1"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col> -->
          <el-col :span="12">
            <el-form-item
              clearable
              label="能否富氮低氧气调储粮:"
              prop="nffddyqtcl"
            >
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.nffddyqtcl"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsNfStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="粮情技术:" prop="lqjs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.lqjs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in lqjsOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              clearable
              label="是否已进行信息化改造:"
              prop="sfyjxxxhgz"
            >
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.sfyjxxxhgz"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in sfyjxxxhgzOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="储粮功效:" prop="clgx">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.clgx"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in clgxoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item clearable label="能否隔热保温:" prop="nfgrbw">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.nfgrbw"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in optionsNfStr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="隔热性能:" prop="grxn">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.grxn"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in grxnoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item clearable label="结构材料:" prop="jgcl">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.jgcl"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in gclOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="通风系统型式:" prop="tfxtxs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.tfxtxs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in tfxtxsOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item clearable label="通风技术:" prop="tfjs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.tfjs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in gclOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="杀虫技术:" prop="scjs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.scjs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in scjsOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item clearable label="控温技术:" prop="kwjs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.kwjs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in gclOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item clearable label="挡粮门型式:" prop="dlmxs">
              <el-select
                class="inputWidth"
                disabled
                v-model="formQuery.dlmxs"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in dlmxsOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item clearable label="保管员信息:" prop="bgr">
              <el-input
                clearable
                class="inputWidth"
                disabled
                v-model="formQuery.bgr"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item
              clearable
              label-width="208px"
              label="变更原因(仓房状态、仓房用途变更时，必须填写):"
            >
              <el-input
                clearable
                style="width: 96%"
                disabled
                v-model="formQuery.changeReason"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-tab-pane>

      <el-tab-pane label="货位信息" name="second">
        <!-- <el-row class="addBtnBg">
          <el-button
            type="primary"
            class="iconfont iconxinzeng"
            size="small"
            @click="addHwList()"
            >新增</el-button
          >
        </el-row> -->
        <el-row>
          <el-form class="content-main" :model="formHw" ref="formHw">
            <el-table
              :data="formHw.tableData"
              stripe
              border
              fit
              highlight-current-row
              style="width: 100%"
            >
              <el-table-column align="center" label="序号" width="70">
                <template slot-scope="scope">
                  <span>{{ scope.$index + 1 }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="cfmc" label="货位名称">
                <!-- <template slot-scope="scope">
                  <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.cfmc'"
                    :rules="formHw.rules.cfmc"
                  >
                    <el-input
                      clearable
                      :disabled="showLock"
                      style="width: 95%"
                      v-model="scope.row.cfmc"
                    ></el-input>
                  </el-form-item>
                  <span v-else>{{ scope.row.cfmc }}</span>
                </template> -->
              </el-table-column>
              <el-table-column align="center" prop="hwxh" label="货位序号">
                <!-- <template slot-scope="scope">
                  <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.hwxh'"
                    :rules="{
                      required: true,
                      validator: (rule, value, callback) =>
                        hwxh(rule, value, callback, scope.row.cfbh),
                      trigger: ['change', 'blur'],
                    }"
                  >
                    <el-input
                      clearable
                      :disabled="showLock"
                      style="width: 95%"
                      v-model="scope.row.hwxh"
                    ></el-input>
                  </el-form-item>
                  <span v-else>{{ scope.row.hwxh }}</span>
                </template> -->
              </el-table-column>
              <el-table-column align="center" prop="cfbh" label="货位编号">
                <template slot-scope="scope">
                  <!-- <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.cfbh'"
                    :rules="formHw.rules.cfbh"
                  >
                    <el-input
                      clearable
                      placeholder="系统自动生成"
                      disabled
                      style="width: 95%"
                      v-model="scope.row.cfbh"
                    ></el-input>
                  </el-form-item> -->
                  <!-- <span v-if="!showLock">系统自动生成</span> -->
                  <span>{{ scope.row.cfbh }}</span>
                </template>
              </el-table-column>
              <!-- <el-table-column align="center" prop="cfmc" label="仓房名称">
                <template slot-scope="scope">
                  <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.cfmc'"
                    :rules="formHw.rules.cfmc"
                  >
                    <el-input
                      :disabled="showLock"
                      style="width: 95%"
                      v-model="scope.row.cfmc"
                    ></el-input>
                  </el-form-item>
                  <span v-else>{{ scope.row.cfmc }}</span>
                </template>
              </el-table-column> -->
              <el-table-column align="center" prop="qyrq" label="启用日期">
                <!-- <template slot-scope="scope">
                  <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.qyrq'"
                    :rules="formHw.rules.qyrq"
                  >
                    <el-date-picker
                      clearable
                      class="inputWidth"
                      style="width: 95%"
                      :disabled="showLock"
                      v-model="scope.row.qyrq"
                      type="date"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      placeholder="选择日期"
                    ></el-date-picker>
                  </el-form-item>
                  <span v-else>{{ scope.row.qyrq }}</span>
                </template> -->
              </el-table-column>
              <el-table-column align="center" prop="hwrl" label="货位容量(吨)">
                <template slot-scope="scope">
                  <!-- <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.hwrl'"
                    :rules="formHw.rules.hwrl"
                  >
                    <el-input
                      clearable
                      :disabled="showLock"
                      style="width: 95%"
                      v-model="scope.row.hwrl"
                    ></el-input>
                  </el-form-item> -->
                  <span>{{
                    String(scope.row.hwrl).indexOf(".") > -1
                      ? Number(scope.row.hwrl).toFixed(3)
                      : scope.row.hwrl
                  }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="status" label="使用状态">
                <template slot-scope="scope">
                  <!-- <el-form-item
                    v-if="!showLock"
                    :prop="'tableData.' + scope.$index + '.status'"
                    :rules="formHw.rules.status"
                  >
                    <el-select
                      clearable
                      style="width: 95%"
                      :disabled="showLock"
                      v-model="scope.row.status"
                      placeholder="请选择"
                    >
                      <el-option
                        v-for="item in syOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item> -->
                  <span>{{ scope.row.status == 1 ? "在用" : "弃用" }}</span>
                </template></el-table-column
              ></el-table
            ></el-form
          ></el-row
        ></el-tab-pane
      ></el-tabs
    >
    <!-- // </template> -->
    <!-- <el-table-column
                align="center"
                label="操作"
                width="70"
                v-if="!showLock"
              >
                <template slot-scope="scope">
                  <span
                    v-show="!scope.row.sendResult"
                    class="iconfont iconjianshao addTableSpan"
                    @click="dorkdelete(scope.$index)"
                  ></span>
                </template>
              </el-table-column> -->
    <!-- <div class="addTable" v-if="!showLock">
            <span
              class="iconfont iconzengjia addTableSpan"
              @click="addTableItem"
            ></span>
          </div> -->
    <!-- </el-row>
      </el-tab-pane> -->
    <!-- </el-tabs> -->
    <el-row v-if="isChecked">
      <el-col :span="24">
        <h3 class="h3">审批信息</h3>
      </el-col>
    </el-row>
    <el-row v-if="isChecked">
      <el-col :span="24">
        <el-form-item label="审批:">
          <el-radio v-model="formQuery.sfba" :disabled="showLock" :label="5"
            >通过</el-radio
          >
          <el-radio v-model="formQuery.sfba" :disabled="showLock" :label="3"
            >驳回</el-radio
          >
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="审核意见:">
          <el-input
            style="width: 90%"
            :disabled="showLock"
            v-model="formQuery.shyj"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="审核人:">
          <el-input
            disabled
            style="width: 80%"
            v-model="formQuery.shrmc"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="审核时间:">
          <el-input
            disabled
            style="width: 80%"
            v-model="formQuery.shsj"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>
    <el-col :span="24">
      <div style="text-align: center; margin-top: 20px">
        <el-button
          type="primary"
          icon="iconfont iconbaocun"
          v-if="!showLock"
          @click="saveSubmit()"
          >保存</el-button
        >
        <el-button type="primary" icon="iconfont iconfanhui" @click="cancel"
          >返回</el-button
        >
      </div>
    </el-col>
  </el-form>
</template>

<script>
import { detailsFn, addFn, editFn, dataDictionary } from "@/api/jcxxwh/cfxx";
import { getNowDate } from "@/utils";
export default {
  name: "slqyxxsb",
  data() {
    const validateUsername = (rule, value, callback) => {
      if (value > 3) {
        alert(2);
        callback(new Error("请输入正确的用户名"));
      } else {
        callback();
      }
    };
    return {
      grainOptions: [
        // 0:原粮；1：成品粮
        {
          value: "0",
          label: "原粮",
        },
        {
          value: "1",
          label: "成品粮",
        },
      ],
      activeName: "first",
      showLock: false,
      formQuery: {
        cfbh: "",
        shyj: "",
        warehouseDoorVOList: [{}],
      },
      tableKey: "",
      isChecked: true,
      options: [
        {
          value: 1,
          label: "能",
        },
        {
          value: 0,
          label: "否",
        },
        {
          value: 9,
          label: "其他或不确定",
        },
      ],
      optionsStr: [
        {
          value: "1",
          label: "有",
        },
        {
          value: "0",
          label: "无",
        },
        {
          value: "9",
          label: "其他或不确定",
        },
      ],
      options1: [
        {
          value: 1,
          label: "有",
        },
        {
          value: 0,
          label: "无",
        },
        {
          value: 9,
          label: "其他或不确定",
        },
      ],
      options2: [
        {
          value: "0",
          label: "储粮（含待轮入、中央储备粮和地方储备粮）",
        },
        {
          value: "1",
          label: "闲置（可用于储粮的空仓）",
        },
        {
          value: "2",
          label: "物资",
        },
      ],
      options3: [
        {
          value: 0,
          label: "自然通风",
        },
        {
          value: 1,
          label: "轴流通风",
        },
        {
          value: 2,
          label: "离心通风",
        },
        {
          value: 3,
          label: "单管通风",
        },
      ],
      options4: [
        {
          value: 0,
          label: "双层屋面",
        },
        {
          value: 1,
          label: "仓内吊顶",
        },
        {
          value: 2,
          label: "保温隔热涂料",
        },
      ],
      options5: [
        {
          value: 0,
          label: "保温隔热涂料",
        },
        {
          value: 1,
          label: "墙体增厚",
        },
      ],
      options6: [
        {
          value: 0,
          label: "内环流",
        },
        {
          value: 1,
          label: "空调",
        },
      ],
      options7: [
        {
          value: 0,
          label: "单层",
        },
        {
          value: 1,
          label: "双层",
        },
      ],
      options8: [
        {
          value: 0,
          label: "单层",
        },
        {
          value: 1,
          label: "双层",
        },
        {
          value: 2,
          label: "三层",
        },
      ],
      dwcOptions: [
        {
          value: 1,
          label: "低温仓",
        },
        {
          value: 2,
          label: "准低温箱",
        },
        {
          value: 3,
          label: "普通仓",
        },
        {
          value: 4,
          label: "保温仓",
        },
      ],
      cfxhOptions: [],
      cxOptions: [
        {
          value: "10101",
          label: "平房仓",
        },
        {
          value: "10102",
          label: "筒仓",
        },
        {
          value: "10103",
          label: "浅圆仓",
        },
        {
          value: "10104",
          label: "楼房仓",
        },
        {
          value: "10105",
          label: "地下仓",
        },
      ],
      cfztOptions: [
        {
          value: "1",
          label: "完好",
        },
        // {
        //   value: "2",
        //   label: "需小修",
        // },
        {
          value: "3",
          label: "需大修",
        },
        {
          value: "4",
          label: "待报废",
        },
        {
          value: "7",
          label: "报废",
        },
        // {
        //   value: "5",
        //   label: "待拆除",
        // },
        // {
        //   value: "6",
        //   label: "死角仓",
        // },
        {
          value: "9",
          label: "其他",
        },
      ],
      dmOption: [
        {
          value: "01",
          label: "防水混凝土",
        },
        {
          value: "02",
          label: "砖混",
        },
        {
          value: "03",
          label: "砂浆",
        },
        {
          value: "04",
          label: " 钢筋混凝土楼板式地面",
        },
        {
          value: "05",
          label: " 临时地坪",
        },
        {
          value: "06",
          label: "其他",
        },
      ],
      fdOption: [
        {
          value: "01",
          label: "大型屋面板",
        },
        {
          value: "02",
          label: "混凝土",
        },
        {
          value: "03",
          label: "钢板",
        },
        {
          value: "04",
          label: "双T板",
        },
        {
          value: "05",
          label: "彩钢板",
        },
        {
          value: "06",
          label: "其他",
        },
      ],
      fjOption: [
        {
          value: "01",
          label: "预制折线型板",
        },
        {
          value: "02",
          label: "现浇拱板",
        },
        {
          value: "03",
          label: "钢架",
        },
        {
          value: "04",
          label: "木屋架",
        },
        {
          value: "05",
          label: "土门式刚架",
        },
        {
          value: "06",
          label: "双T板",
        },
        {
          value: "07",
          label: "其他",
        },
      ],
      grxnoptions: [
        {
          value: "1",
          label: "Ⅰ级",
        },
        {
          value: "2",
          label: "Ⅱ级",
        },
        {
          value: "3",
          label: "Ⅲ级",
        },
        {
          value: "4",
          label: "Ⅳ级",
        },
      ],
      optionsNfStr: [
        {
          value: "1",
          label: "能",
        },
        {
          value: "0",
          label: "否",
        },
        {
          value: "9",
          label: "其他或不确定",
        },
      ],
      lqjsOptions: [
        {
          value: "1",
          label: "Ⅰ级",
        },
        {
          value: "2",
          label: "Ⅱ级",
        },
        {
          value: "3",
          label: "Ⅲ级",
        },
        {
          value: "4",
          label: "无粮情检测技术",
        },
      ],
      sfyjxxxhgzOptions: [
        {
          value: "1",
          label: "是",
        },
        {
          value: "0",
          label: "否",
        },
      ],
      clgxoptions: [
        {
          value: "0",
          label: "A类仓房",
        },
        {
          value: "1",
          label: "B类仓房",
        },
        {
          value: "2",
          label: "C类仓房",
        },
        {
          value: "3",
          label: "D类仓房",
        },
      ],
      gclOptions: [
        {
          value: "1",
          label: "Ⅰ级",
        },
        {
          value: "2",
          label: "Ⅱ级",
        },
        {
          value: "3",
          label: "Ⅲ级",
        },
      ],
      tfxtxsOptions: [
        {
          value: "0",
          label: "竖向通风",
        },
        {
          value: "1",
          label: "横向通风",
        },
        {
          value: "2",
          label: "径向通风",
        },
        {
          value: "3",
          label: "全网板通风",
        },
        {
          value: "4",
          label: "其它",
        },
      ],
      scjsOptions: [
        {
          value: "1",
          label: "Ⅰ级",
        },
        {
          value: "2",
          label: "Ⅱ级",
        },
        {
          value: "3",
          label: "Ⅲ级",
        },
      ],
      dlmxsOptions: [
        {
          value: "01",
          label: "“一字型”挡粮板",
        },
        {
          value: "02",
          label: "“三角形”挡粮门",
        },
        {
          value: "03",
          label: "“弧形”挡粮门",
        },
        {
          value: "04",
          label: "围包",
        },
        {
          value: "05",
          label: "其它型式",
        },
      ],
      formHw: { tableData: [] },
    };
  },
  methods: {
    getInfo(code) {
      let data = {
        cfxh: code,
        kddm: this.$route.query.kddm,
      };
      detailsFn(data).then((res) => {
        this.formQuery = res.data;
        this.formHw.tableData = res.data.hwxxsjyVOList;
        this.formQuery.tffs = this.formQuery.tffs
          ? Number(this.formQuery.tffs)
          : this.formQuery.tffs;
        this.formQuery.grfs = this.formQuery.grfs
          ? Number(this.formQuery.grfs)
          : this.formQuery.grfs;
        this.formQuery.kwcs = this.formQuery.kwcs
          ? Number(this.formQuery.kwcs)
          : this.formQuery.kwcs;
        if (this.formQuery.ajxh.slice(1) == "-0") {
          this.formQuery.ajxh = "无";
        }
        if (this.$route.query.status == "edit") {
          this.formQuery.sfba = 5;
          this.formQuery.shrmc = sessionStorage.getItem("userName");
          this.formQuery.shsj = getNowDate(new Date());
          this.formQuery.shyj = "";
        }
        this.getNum(this.formQuery.dczlrj, "dczlrj");
        this.getNum(this.formQuery.sjcr, "sjcr");
      });
    },
    getNum(val, name) {
      console.log(val, name);
      // if (this.showLock) {
      this.formQuery[name] =
        String(val).indexOf(".") > -1 ? Number(val).toFixed(3) : val;
      // }
    },
    // 库门的动态添加
    addZJ() {
      const newList = {
        cmmc: "",
        cmgd: "",
        cmkd: "",
      };
      this.formQuery.warehouseDoorVOList.push(newList);
    },
    // 库门的动态删除
    deleteNodeBtn(i) {
      this.formQuery.warehouseDoorVOList.splice(i, 1);
    },
    saveSubmit() {
      this.formQuery.tyshxydm = sessionStorage.getItem("tyshxydm");
      editFn(this.formQuery).then((res) => {
        if (res.infoCode == 200) {
          this.$message({
            message: "审核成功",
            type: "success",
          });
          this.$router.push({ path: "/jcxxsh/cfxxsh" });
        } else {
          this.$message({
            message: "审核失败",
            type: "error",
          });
        }
      });
    },
    cancel() {
      this.$router.go(-1);
    },
  },
  created() {
    if (this.$route.query.status == "detail") {
      this.showLock = true;
      this.getInfo(this.$route.query.cfbhNum);
    } else if (this.$route.query.status == "edit") {
      this.showLock = false;
      this.getInfo(this.$route.query.cfbhNum);
    } else {
      this.showLock = false;
    }
    // dataDictionary("5473").then((res) => {
    //   if (res.infoCode == 200) {
    //     this.cxOptions = res.data;
    //   }
    // });
  },
};
</script>

<style scoped lang="scss">
.cfxxNewAdd /deep/.el-tabs__nav-wrap {
  overflow: inherit !important;
}
.content-main {
  margin: 10px 10px 0;
  padding-top: 20px;
}

.span-inline-block {
  float: left;
  margin-right: 5px;
  width: 80px;
  text-align: right;
  line-height: 30px;
}

.inputWidth {
  width: 90% !important;
}

.h3 {
  width: 98%;
  // height: 35px;
  text-align: center;
  font-size: 1em;
  line-height: 2.5;
  color: #fff;
  background-color: #49a2fa;
  margin-bottom: 20px;
  padding: 0;
}

.el-form {
  overflow: hidden;
  overflow-y: auto;
}

.el-row {
  .el-tooltip {
    float: left;
    padding: 0 12px 0 0;
    width: 118px;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
    color: #525357;
    font-size: 14px;
    line-height: 40px;
    box-sizing: border-box;
  }
}

.warehouseDoorVOList .el-form-item {
  margin: 0 !important;
}
</style>
