<template>
  <div class="wtsThree">
    <el-row :id="$route.query.state == 6 ? 'detail-main3' : ''" :class="{'is_detail':isExport}">
      <div id="outInDepotEntrust2"></div>
      <el-row style="text-align: center">
        <span class="title" id="protectedItems"
          >{{ jyrq }}天津市地方政府储备（{{ lsxz }}）竞价交易货源表</span
        >
      </el-row>

      <el-row style="margin-bottom: 20px">
        <div>
          <span style="float: left; font-weight: bold" class="songFont"
            >委托单位:{{ wtfmc }}
          </span>
        </div>
      </el-row>
      <el-row style="margin-bottom: 15px">
        <el-button type="primary" v-show="!detailF" plain @click="addlcdw"
          >新增承储单位</el-button
        >
      </el-row>
      <el-row>
        <el-form
          :model="formData"
          ref="formData1"
          :rules="formData.rules"
          :inline="
            $route.query.state == 1 || $route.query.state == 0 ? true : false
          "
        >
          <div v-for="(item, index) in formData.detailList" :key="index">
            <table border="1" v-if="!isExport" class="tabStyle borderNone">
              <tr align="center">
                <el-form-item
                  v-if="!detailF"
                  label="承储单位:"
                  :prop="item.dwbm"
                  :rules="formData.rules.dwbm"
                >
                  <el-select
                    filterable
                    v-model="item.dwbm"
                    placeholder="请选择"
                    style="width: 320px"
                    :disabled="detailF"
                    @change="getTablesskd($event, item,index)"
                  >
                    <el-option
                      v-for="item in cckdOptions"
                      :key="item.kddm"
                      :label="item.kdmc"
                      :value="item.kddm"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <span v-else>{{ item.dwmc }}</span>
                <el-button
                  v-show="!detailF && !newFlag"
                  type="primary"
                  size="medium"
                  plain
                  @click="seeChList(item, index)"
                  >选择仓号</el-button
                >

                <el-button
                  v-show="!detailF && newFlag"
                  type="primary"
                  size="medium"
                  plain
                  @click="seeChListNew(item, index)"
                  >添加仓号</el-button
                >
                <el-button
                  v-show="!detailF"
                  type="danger"
                  size="medium"
                  plain
                  @click="dodelete(index)"
                  >删除</el-button
                >
              </tr>
            </table>
            <table border="1" v-else class="tabStyle borderNone">
              <tr align="center">
                <td>{{item.dwmc}}</td>
              </tr>
            </table>
            <el-table
              border
              :data="item.detailList"
              style="margin-bottom: 20px"
              :summary-method="getSummaries"
              show-summary
            >
              <el-table-column align="center" label="标的" width="60">
                <template slot-scope="scope">
                  <span>{{ scope.$index + 1 }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="ccdd" label="仓号">
                <template slot-scope="scope">
                  <el-form-item
                    v-if="!detailF && newFlag"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.ccdd'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        message: '请输入',
                      },
                    ]"
                  >
                    <el-input
                      style="width: 100%"
                      :disabled="detailF"
                      placeholder="请输入"
                      v-model="item.detailList[scope.$index].ccdd"
                    >
                    </el-input>
                  </el-form-item>
                  <span v-else>{{ item.detailList[scope.$index].ccdd }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="pzmc" label="品种">
                <template slot-scope="scope">
                  <el-form-item
                    style="width: 100%"
                    v-if="!detailF && newFlag"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.pzbm'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        message: '请选择品种',
                      },
                    ]"
                  >
                    <el-select
                      style="width: 100%"
                      v-model="item.detailList[scope.$index].pzbm"
                      placeholder="请选择"
                      :disabled="detailF"
                      @change="
                        getTableItemInfo($event, scope.row, scope.$index)
                      "
                    >
                      <el-option
                        v-for="item in pzOptions"
                        :key="item.pzbm"
                        :label="item.pzmc"
                        :value="item.pzbm"
                      ></el-option>
                    </el-select>
                  </el-form-item>

                  <span v-else>{{ item.detailList[scope.$index].pzmc }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="scnd" label="生产年限">
                <template slot-scope="scope">
                  <el-form-item
                    style="width: 100%"
                    v-if="!detailF && newFlag"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.scnd'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        message: '请选择',
                      },
                    ]"
                  >
                    <el-select
                      style="width: 100%"
                      v-model="item.detailList[scope.$index].scnd"
                      placeholder="请选择"
                      :disabled="detailF"
                      multiple
                    >
                      <el-option
                        v-for="item in ndOptions"
                        :key="item"
                        :label="item"
                        :value="item"
                      ></el-option>
                    </el-select>
                  </el-form-item>

                  <span v-else>{{
                    Array.isArray(item.detailList[scope.$index].scnd)
                      ? item.detailList[scope.$index].scnd.toString()
                      : item.detailList[scope.$index].scnd
                  }}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                prop="lssl"
                label="数量(吨)"
                width="80"
              >
                <template slot-scope="scope">
                  <el-form-item
                    v-if="!detailF"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.lssl'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        validator: lssl,
                      },
                    ]"
                  >
                    <el-input
                      :disabled="detailF"
                      v-model="item.detailList[scope.$index].lssl"
                    >
                    </el-input>
                  </el-form-item>

                  <span v-else>{{
                    String(item.detailList[scope.$index].lssl).indexOf(".") > -1
                      ? Number(item.detailList[scope.$index].lssl).toFixed(3)
                      : item.detailList[scope.$index].lssl
                  }}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                prop="wcsj"
                label="质量指标"
                v-if="zlzbPz.indexOf('小麦粉') > -1"
              >
                <el-table-column align="center" prop="jgjd" label="加工精度">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.jgjd'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].jgjd"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in jgjdOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].jgjd }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="sf" label="水分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sf }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="hf" label="灰分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.hf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].hf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].hf }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="szqw" label="气味口味">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.szqw'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择气味口味',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].szqw"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in qwkwOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].szqw }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column
                align="center"
                prop="wcsj"
                label="质量指标"
                v-if="
                  zlzbPz.indexOf('小麦') > -1 && zlzbPz.indexOf('小麦粉') == -1
                "
              >
                <el-table-column align="center" prop="sf" label="水分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sf }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="zhaz" label="杂质%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.zhaz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].zhaz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].zhaz }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="bwsl" label="不完善粒%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.bwsl'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'blur',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].bwsl"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].bwsl }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="rz" label="容重g/L">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.rz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'blur',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].rz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].rz }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column
                align="center"
                prop="wcsj"
                label="质量指标"
                v-if="zlzbPz.indexOf('米') > -1"
              >
                <el-table-column align="center" prop="sm" label="碎米%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sm'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sm"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sm }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="sf" label="水分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sf }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="zhaz" label="杂质%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.zhaz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].zhaz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].zhaz }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="szqw"
                  label="色泽气味"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.szqw'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].szqw"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in qwkwOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].szqw }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column
                align="center"
                prop="wcsj"
                label="质量指标"
                v-if="zlzbPz.indexOf('稻谷') > -1"
              >
                <el-table-column align="center" prop="ccl" label="出糙率%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.ccl'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].ccl"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].ccl }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="sf" label="水分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sf }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="zhaz" label="杂质%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.zhaz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].zhaz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].zhaz }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="szqw"
                  label="色泽气味"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.szqw'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].szqw"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in qwkwOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].szqw }}</span>
                  </template>
                </el-table-column>
              </el-table-column>

              <!-- <el-table-column
                align="center"
                prop="wcsj"
                label="质量指标"
                v-show="zlzbPz.indexOf('小麦粉') > -1"
              >
                <el-table-column
                  align="center"
                  prop="jgjd"
                  label="加工精度"
                  v-if="zlzbPz.indexOf('小麦粉') > -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.jgjd'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].jgjd"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in jgjdOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].jgjd }}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" prop="sf" label="水分%">
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sf }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="hf"
                  label="灰分%"
                  v-if="zlzbPz.indexOf('小麦粉') > -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.hf'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].hf"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].hf }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="szqw"
                  label="气味口味"
                  v-if="zlzbPz.indexOf('小麦粉') > -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.szqw'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择气味口味',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].szqw"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in qwkwOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].szqw }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="ccl"
                  label="出糙率%"
                  v-if="zlzbPz.indexOf('稻谷') > -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.ccl'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].ccl"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].ccl }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="szqw"
                  label="色泽气味"
                  width="130"
                  v-if="zlzbPz.indexOf('小麦粉') == -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.szqw'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请选择',
                        },
                      ]"
                    >
                      <el-select
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].szqw"
                        :disabled="detailF"
                      >
                        <el-option
                          v-for="item in qwkwOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].szqw }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="zhaz"
                  label="杂质%"
                  v-if="zlzbPz.indexOf('小麦粉') == -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.zhaz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].zhaz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].zhaz }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="bwsl"
                  label="不完善粒%"
                  v-if="
                    zlzbPz.indexOf('小麦') > -1 &&
                    zlzbPz.indexOf('小麦粉') == -1
                  "
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.bwsl'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'blur',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].bwsl"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].bwsl }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="rz"
                  label="容重g/L"
                  v-if="
                    zlzbPz.indexOf('小麦') > -1 &&
                    zlzbPz.indexOf('小麦粉') == -1
                  "
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.rz'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'blur',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].rz"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].rz }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="sm"
                  label="碎米%"
                  v-if="zlzbPz.indexOf('米') > -1"
                >
                  <template slot-scope="scope">
                    <el-form-item
                      v-if="!detailF"
                      :prop="
                        'detailList.' +
                        index +
                        '.detailList.' +
                        scope.$index +
                        '.sm'
                      "
                      :rules="[
                        {
                          required: true,
                          trigger: 'change',
                          message: '请输入',
                        },
                      ]"
                    >
                      <el-input
                        :disabled="detailF"
                        style="width: 90%"
                        v-model="item.detailList[scope.$index].sm"
                      >
                      </el-input>
                    </el-form-item>
                    <span v-else>{{ item.detailList[scope.$index].sm }}</span>
                  </template>
                </el-table-column>
              </el-table-column> -->
              <el-table-column
                align="center"
                prop="wcsj"
                label="完成时间"
                width="120"
              >
                <template slot-scope="scope">
                  <el-form-item
                    v-if="!detailF"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.wcsj'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        message: '请选择完成时间',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="item.detailList[scope.$index].wcsj"
                      :disabled="detailF"
                      style="width: 90%"
                      type="date"
                      placeholder="请选择"
                      value-format="yyyy-MM-dd"
                    ></el-date-picker>
                  </el-form-item>

                  <span v-else>{{ item.detailList[scope.$index].wcsj }}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                prop="rknl"
                :label="isExport?'出库能力 (吨/天)':'出库能力(吨/天)'"
              >
                <template slot-scope="scope">
                  <el-form-item
                    v-if="!detailF"
                    :prop="
                      'detailList.' +
                      index +
                      '.detailList.' +
                      scope.$index +
                      '.rknl'
                    "
                    :rules="[
                      {
                        required: true,
                        trigger: 'blur',
                        validator: rknl,
                      },
                    ]"
                  >
                    <el-input
                      style="width: 90%"
                      :disabled="detailF"
                      v-model="item.detailList[scope.$index].rknl"
                    >
                    </el-input>
                  </el-form-item>

                  <span v-else>{{
                    String(item.detailList[scope.$index].rknl).indexOf(".") > -1
                      ? Number(item.detailList[scope.$index].rknl).toFixed(3)
                      : item.detailList[scope.$index].rknl
                  }}</span>
                </template>
              </el-table-column>
              <el-table-column align="center" label="操作" v-if="!detailF">
                <template slot-scope="scope">
                  <span
                    style="color: #4588db; cursor: pointer; font-size: 16px"
                    @click="addch(index, scope.$index)"
                    >添加仓号</span
                  >
                  <span
                    style="color: #4588db; cursor: pointer; font-size: 16px"
                    @click="deleteTableItem(index, scope.$index)"
                    >删除</span
                  >
                </template></el-table-column
              >
            </el-table>
          </div>
          <el-row v-if="$route.query.zt >= '91000400'">
            <el-col :span="22">
              <el-form-item
                prop="slrshjg"
                label="受理人审核"
                label-width="100px"
              >
                <el-radio-group
                  :disabled="
                    $route.query.state != 5 ||
                    ($route.query.zt != '91000400' &&
                      $route.query.zt != '91000405')
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.slrshjg"
                >
                  <el-radio class="radioSize" :label="1">同意</el-radio>
                  <el-radio class="radioSize" :label="2">不同意</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="$route.query.zt >= '91000400'">
            <el-col :span="23">
              <el-form-item prop="slryj" label="受理人意见" label-width="100px">
                <el-input
                  :disabled="
                    $route.query.state != 5 ||
                    ($route.query.zt != '91000400' &&
                      $route.query.zt != '91000405')
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.slryj"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="$route.query.zt >= '91000400'">
            <el-col :span="11">
              <el-form-item prop="slr" label="受理人" label-width="100px">
                <el-input
                  :disabled="
                    $route.query.state != 5 ||
                    ($route.query.zt != '91000400' &&
                      $route.query.zt != '91000405')
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.slr"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="11">
              <el-form-item prop="slrq" label="受理日期" label-width="100px">
                <el-date-picker
                  v-model="formData.entryAndExitOrderVO.slrq"
                  :disabled="
                    $route.query.state != 5 ||
                    ($route.query.zt != '91000400' &&
                      $route.query.zt != '91000405')
                  "
                  class="inputwidth"
                  type="date"
                  placeholder="请选择"
                  value-format="yyyy-MM-dd"
                ></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row v-if="$route.query.zt >= '91000405'">
            <el-col :span="22">
              <el-form-item
                prop="jyzxshrshjg"
                label="审核人审核"
                label-width="100px"
              >
                <el-radio-group
                  :disabled="
                    $route.query.state != 5 || $route.query.zt != '91000500'
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.jyzxshrshjg"
                >
                  <el-radio class="radioSize" :label="1">同意</el-radio>
                  <el-radio class="radioSize" :label="2">不同意</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="$route.query.zt >= '91000405'">
            <el-col :span="23">
              <el-form-item
                prop="jyzxshryj"
                label="审核人意见"
                label-width="100px"
              >
                <el-input
                  :disabled="
                    $route.query.state != 5 || $route.query.zt != '91000500'
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.jyzxshryj"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="$route.query.zt >= '91000405'">
            <el-col :span="11">
              <el-form-item prop="jyzxshr" label="审核人" label-width="100px">
                <el-input
                  :disabled="
                    $route.query.state != 5 || $route.query.zt != '91000500'
                  "
                  class="inputwidth"
                  v-model="formData.entryAndExitOrderVO.jyzxshr"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="11">
              <el-form-item
                prop="jyzxshrq"
                label="审核日期"
                label-width="100px"
              >
                <el-date-picker
                  v-model="formData.entryAndExitOrderVO.jyzxshrq"
                  :disabled="
                    $route.query.state != 5 || $route.query.zt != '91000500'
                  "
                  class="inputwidth"
                  type="date"
                  placeholder="请选择"
                  value-format="yyyy-MM-dd"
                ></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-row>
    </el-row>

    <chDialog
      ref="chDialog"
      @seeChList="seeChList"
      @getxzCfList="getxzCfList"
      type="wtsThree"
    ></chDialog>
    <el-row class="btn-footer">
      <el-button
        type="primary"
        icon="iconfont iconshangyibu"
        @click="goToSpage()"
        >上一页</el-button
      >
      <el-button
        v-if="!detailF"
        type="primary"
        icon="iconfont iconbaocun"
        @click="handleSave"
        >保存</el-button
      >
      <el-button
        v-if="!detailF"
        type="primary"
        icon="iconfont icontijiao"
        @click="handleSubmit"
        >提交</el-button
      >
      <el-button
        v-if="$route.query.state == 4 && downTzFlag"
        type="primary"
        icon="iconfont icongaizhang"
        @click="signature"
        >盖章</el-button
      >
      <el-button
        v-if="$route.query.state == 4 && downTzFlag"
        type="primary"
        icon="iconfont icongaizhang"
        @click="doreject"
        >驳回</el-button
      >
      <!-- <el-button type="primary" icon="iconfont iconxiayibu" @click="goTopage()"
        >下一页</el-button
      > -->
      <el-button
        v-if="$route.query.state == 5"
        type="primary"
        icon="iconfont icontijiao"
        @click="handleAudit"
        >提交</el-button
      >
      <el-button
        v-if="$route.query.state == 6"
        type="primary"
        size="small"
        class="iconfont icondaochu11"
        @click="exportTable"
        >导出</el-button
      >
      <el-button
        type="primary"
        icon="iconfont iconfanhui"
        @click="$router.push('index')"
        >返回</el-button
      >
    </el-row>
    <sealDialog
      ref="sealDialog"
      sealId="outInDepotEntrust2"
      @sealTodo="sealTodo"
      @sealError="sealError"
    ></sealDialog>
  </div>
</template>

<script>
import sealDialog from "@/components/sealDialog/index.vue";
import {
  getPzOptions,
  // warehouseListByKddm,
  selectkdxxList,
} from "@/api/transaction/tradeEntrust/outInDepotEntrust/index.js";
import { warehouseList } from "@/api/base/index.js";

import chDialog from "./chDialog.vue";
import { getCodeName, getTreeVal } from "@/utils/statusList";
import htmlToPdf from "@/utils/htmlToPdf";

import { listWarehouseInventory } from "@/api/base/index.js";
export default {
  components: { chDialog, sealDialog },
  props: ["wtfmc", "jyrq", "lsxz", "goodsList", "zlzbPz", "jyfx", "newFlag"],
  data() {
    return {
      pzProps: {
        label: "dictName",
        value: "dictCode",
        children: "subDataDictionarys",
        // checkStrictly: true,

        emitPath: false,
      },
      pzOptions: [],
      detailF: false,
      formData: {
        detailList: [{ dwbm: "", dwmc: "", detailList: [] }],
        rules: {},
        entryAndExitOrderVO: {
          slrq: "",
          slr: "",
          slrshjg: "",
          slryj: "",
          jyzxshrshjg: "",
          jyzxshryj: "",
          jyzxshr: "",
          jyzxshrq: "",
        },
      },
      ndOptions: [
        new Date().getFullYear() - 10,
        new Date().getFullYear() - 9,
        new Date().getFullYear() - 8,
        new Date().getFullYear() - 7,
        new Date().getFullYear() - 6,
        new Date().getFullYear() - 5,
        new Date().getFullYear() - 4,
        new Date().getFullYear() - 3,
        new Date().getFullYear() - 2,
        new Date().getFullYear() - 1,
        new Date().getFullYear(),
        new Date().getFullYear() + 1,
        new Date().getFullYear() + 2,
        new Date().getFullYear() + 3,
        new Date().getFullYear() + 4,
        new Date().getFullYear() + 5,
        new Date().getFullYear() + 6,
        new Date().getFullYear() + 7,
        new Date().getFullYear() + 8,
        new Date().getFullYear() + 9,
        new Date().getFullYear() + 10,
      ],
      cckdOptions: [],
      lhfsOptions: ["是", "否"],
      downTzFlag: true,
      jgjdOptions: ["精碾", "适碾"],
      qwkwOptions: ["正常", "不正常"],
      isExport:false,
    };
  },
  created() {
    this.getInfo();
    // this.getAudit();
  },
  mounted() {},
  methods: {
    exportTable() {
      // 获取要复制的元素
      this.isExport = true;
      setTimeout(() => {
      let src_ul = document.getElementById("detail-main3");
      htmlToPdf.downloadPDF(src_ul, "货源表.pdf");
        setTimeout(() => {
          this.isExport = false;
        });
      },500);
      // let _that = this
      // setTimeout(() => {
      //   _that.$print(document.getElementById("detail-main3"));
      //   setTimeout(() => {
      //     _that.isExport = false
      //   });
      // },500);
    },
    handleSave() {
      this.$refs.formData1.validate((valid) => {
        if (valid) {
          if (this.jyfx == "采购,销售") {
            this.$emit("handleSave", 23);
          } else {
            this.$emit("handleSave", 3);
          }
        } else {
          this.$message({ type: "warning", message: "请正确填写信息！" });
        }
      });
    },
    handleSubmit() {
      this.$refs.formData1.validate((valid) => {
        if (valid) {
          if (this.jyfx == "采购,销售") {
            this.$emit("handleSubmit", 23);
          } else {
            this.$emit("handleSubmit", 3);
          }
        } else {
          this.$message({ type: "warning", message: "请正确填写信息！" });
        }
      });
    },
    //校验
    lssl(rule, value, callback) {
      console.log(value);
      if (!value) {
        callback(new Error("请输入数量"));
      } else {
        if (!/^[1-9]\d{0,10}(\.\d{1,3})?$/.test(value)) {
          callback(new Error("请输入数字,保留三位小数"));
        } else {
          callback();
        }
      }
    },
    rknl(rule, value, callback) {
      console.log(value);
      if (!value) {
        callback(new Error("请输入出库能力"));
      } else {
        callback();
      }
      // else {
      //      if (!/^[1-9]\d{0,10}(\.\d{1,3})?$/.test(value)) {
      //        callback(new Error("请输入数字,保留三位小数"));
      //      } else {
      //        callback();
      //      }
      //    }
    },
    getTableItemInfo(value, row, index) {
      row.pzmc = getCodeName(value, this.pzOptions, "pzbm", "pzmc");
    },
    getSummaries() {},
    seeChListNew(item, index) {
      item.detailList.push({
        ccdd: "",
        cfbm: "",
        scnd: [new Date().getFullYear()],
      });
    },
    seeChList(item, index, cfmc, goodsList, index1, flag) {
      console.log(index1, "index1");
      if (item.tyshxydm) {
        // console.log(item.dwbm);
        let data = {
          sskddm: item.tyshxydm,
          cfmc: cfmc ? cfmc : "",
          goodsList: goodsList ? goodsList : this.goodsList,
        };
        listWarehouseInventory(data).then((res) => {
          if (res.infoCode == 200) {
            this.$nextTick(() => {
              this.$refs.chDialog.dialogVisible = true;
              this.$refs.chDialog.lcdwIndex = index;
              flag ? (this.$refs.chDialog.lcdwIndex1 = index1) : "";
              flag ? (this.$refs.chDialog.goodsList = goodsList) : "";
              flag
                ? (this.$refs.chDialog.flag = flag)
                : (this.$refs.chDialog.flag = false);
              this.$refs.chDialog.lcdwItem = item;
              this.$refs.chDialog.tableData = res.data.data;
              this.$refs.chDialog.toggleSelection([]);
            });
          }
        });
      } else {
        this.$message({ type: "warning", message: "请先选择承储单位" });
      }
    },
    getxzCfList(val, index, index1, flag) {
      let list = JSON.parse(JSON.stringify(val));
      console.log(list, "list");
      console.log(index1);
      if (flag) {
        let ccddStr = "";
        let cfbmStr = "";
        for (let i = 0; i < list.length; i++) {
          // for (
          //   let j = 0;
          //   j < this.formData.detailList[index].detailList.length;
          //   j++
          // ) {
          // if (
          //   this.formData.detailList[index].detailList[index1].cfbm.indexOf(
          //     list[i].cfbm
          //   ) > -1
          // ) {
          //   this.$message({
          //     type: "warning",
          //     message: list[i].ccdd + "已存在！",
          //   });
          //   return;
          // }
          ccddStr += `,${list[i].ccdd}`;
          cfbmStr += `,${list[i].cfbm}`;
          // }
          // list[i].lssl = "";
          // list[i].wcsj = "";
          // list[i].rknl = "";
          // list[i].sfkc = "是";
        }
        console.log(
          this.formData.detailList[index].detailList,
          "this.formData.detailList[index].detailList"
        );
        this.formData.detailList[index].detailList[index1].ccdd += ccddStr;
        this.formData.detailList[index].detailList[index1].cfbm += cfbmStr;
        // this.formData.detailList[index].detailList[index1].lssl = "";
        this.$refs.chDialog.dialogVisible = false;
      } else {
        for (let i = 0; i < list.length; i++) {
          // for (
          //   let j = 0;
          //   j < this.formData.detailList[index].detailList.length;
          //   j++
          // ) {
          //   if (
          //     list[i].cfbm == this.formData.detailList[index].detailList[j].cfbm
          //   ) {
          //     this.$message({
          //       type: "warning",
          //       message: list[i].ccdd + "已存在！",
          //     });
          //     return;
          //   }
          // }
          // this.$set(list[i], "lssl", "");
          // this.$set(list[i], "wcsj", "");
          // this.$set(list[i], "rknl", "");
          list[i].lssl = "";
          list[i].wcsj = "";
          list[i].rknl = "";
          // list[i].sfkc = "是";
        }
        console.log(
          this.formData.detailList[index].detailList,
          "this.formData.detailList[index].detailList"
        );
        this.formData.detailList[index].detailList =
          this.formData.detailList[index].detailList.concat(list);
        this.$refs.chDialog.dialogVisible = false;
      }
    },
    getTablesskd(val, row,index) {
      console.log(row, "row");
	  this.formData.detailList[index].dwbm=row.dwbm
	  this.formData.detailList[index].dwmc=row.dwmc
	  this.formData.detailList[index].detailList=[]
	  // this.formData.detailList=[{ dwbm: row.dwbm, dwmc: row.dwmc,detailList: [] }]
      row.dwmc = getCodeName(val, this.cckdOptions, "kddm", "kdmc");
      row.tyshxydm = getCodeName(val, this.cckdOptions, "kddm", "tyshxydm");
      console.log(row, "row");
    },
    //轮出+
    addlcdw() {
      this.formData.detailList.push({
        dwbm: "",
        detailList: [],
      });
    },
    //轮出-
    dodelete(index) {
      this.$confirm("此操作将删除该信息, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.formData.detailList.splice(index, 1);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    getInfo() {
      if (
        this.$route.query.state == 2 ||
        this.$route.query.state == 4 ||
        this.$route.query.state == 5 ||
        this.$route.query.state == 6
      ) {
        this.showType = true;
        this.detailF = true;
      }
      let detailsData = {
        company: sessionStorage.getItem("orgCode"),
      };
      selectkdxxList().then((res) => {
        if (res.infoCode == "200") {
          this.cckdOptions = res.data;
        }
      });
      // getPzOptions({ pdictCode: 11, groupId: "PM001" }).then((res) => {
      //   this.pzOptions = res.data;
      // });
    },
    deleteTableItem(index, index1) {
      // if(index1==0&&this.formData.detailList[index].detailList.length==1){

      // }else{
      this.formData.detailList[index].detailList.splice(index1, 1);
      // }
    },
    addch(index, index1) {
      console.log(
        "this.formData.detailList[index][index1]",
        this.formData.detailList[index].detailList[index1]
      );
      this.seeChList(
        this.formData.detailList[index],
        index,
        "",
        [this.formData.detailList[index].detailList[index1]],
        index1,
        true
      );
    },
    goToSpage() {
      this.$emit("goToSpage", 1);
    },
    doreject() {
      this.$confirm("是否确认驳回？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.downTzFlag = false;
          let data = {
            wtbm: this.$route.query.wtbm,
            ztmc: "签章驳回",
            zt: "91000103",
          };
          this.$emit("doSeal", data, "驳回");
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消驳回",
          });
        });
    },
    signature() {
      this.$confirm("是否确认盖章？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.downTzFlag = false;
          this.$refs.sealDialog.getData();
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消盖章",
          });
        });
    },
    sealError() {
      this.downTzFlag = true;
    },
    sealTodo(sealData) {
      // var sh = this.$GetSealData("websignApply");
      let sh = `newSeal${sealData}`;
      var id = "";
      let data = {
        wtbm: this.$route.query.wtbm,
        wtfqz: sh,
        ztmc: "待受理人审核",
        zt: "91000400",
      };
      this.$emit("doSeal", data, "盖章");
    },
    handleAudit() {
      let zt = "";
      let ztmc = "";
      if (
        this.$route.query.zt == "91000400" ||
        this.$route.query.zt == "91000405"
      ) {
        if (this.formData.entryAndExitOrderVO.slrshjg == 1) {
          zt = "91000500";
          ztmc = "待审核人审核";
        } else if (this.formData.entryAndExitOrderVO.slrshjg == 2) {
          zt = "91000401";
          ztmc = "受理人已驳回";
        }
      } else if (this.$route.query.zt == "91000500") {
        if (this.formData.entryAndExitOrderVO.jyzxshrshjg == 1) {
          zt = "91000600";
          ztmc = "已确认";
        } else if (this.formData.entryAndExitOrderVO.jyzxshrshjg == 2) {
          zt = "91000405";
          ztmc = "审核人已驳回";
        }
      }
      let data = {
        wtbm: this.$route.query.wtbm,
        slrq: this.formData.entryAndExitOrderVO.slrq,
        slr: this.formData.entryAndExitOrderVO.slr,
        slrshjg: this.formData.entryAndExitOrderVO.slrshjg,
        slryj: this.formData.entryAndExitOrderVO.slryj,
        jyzxshrshjg: this.formData.entryAndExitOrderVO.jyzxshrshjg,
        jyzxshryj: this.formData.entryAndExitOrderVO.jyzxshryj,
        jyzxshr: this.formData.entryAndExitOrderVO.jyzxshr,
        jyzxshrq: this.formData.entryAndExitOrderVO.jyzxshrq,
        // wtfqz: sh,
        ztmc: ztmc,
        zt: zt,
      };
      this.$emit("doAudit", data, "提交");
    },
  },
};
</script>

<style lang="scss" scoped>
// .buttonClass /deep/.el-form--inline .el-form-item {
//   vertical-align: baseline;
//   margin: 22px 10px;
// }
// .buttonClass /deep/.el-button--primary {
//   border: 1px solid #b3d8ff;
//   height: auto;
//   padding: 10px 20px;
//   vertical-align: unset;
// }
.wtsThree /deep/.el-table .cell {
  padding-right: 0px;
}
.el-table /deep/ .cell.require_star:before {
  content: "*";
  color: red;
}
.tableMar {
  margin-bottom: 20px;
}
.title {
  margin-bottom: 20px;
  text-align: center;
  font-size: 16px;
}
.inputwidth {
  width: 90% !important;
}
.tabStyle {
  width: 100%;
  // height: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  border: 1px solid #ebeef5;

  td,
  .thPad {
    padding: 0;
  }
  tr {
    height: 40px;
    line-height: 40px;
    border-top: 1px solid #ebeef5;
  }
  .tabTit {
    font-weight: 500;
    font-size: 14px;
  }
}
.btn-footer {
  text-align: center;
  margin: 20px;
}
// /deep/.el-button--primary.is-plain {
//   color: #409eff !important;
//   background: #ecf5ff !important;
//   border: 1px solid #b3d8ff !important;
//   height: auto !important;
//   padding: 10px 20px !important;
//   vertical-align: unset !important;
// }
/deep/.el-button--primary.is-plain {
  color: #409eff !important;
  background: #ecf5ff !important;
  border: 1px solid #b3d8ff !important;
  border: 1px solid #b3d8ff !important;
  height: auto !important;
  padding: 8px 20px !important;
  vertical-align: unset !important;
}
/deep/.el-button--danger.is-plain {
  background: #fef0f0 !important;
  border-color: #f56c6c !important;
  color: #f56c6c !important;
  height: auto !important;
  padding: 8px 20px !important;
  vertical-align: unset !important;
}
/deep/.el-form--inline .el-form-item {
  vertical-align: baseline;
  margin: 0px 10px 22px 0px;
}
#detail-main3 {
  padding: 70px 40px 40px 40px;
}
.is_detail{
  width: 1000px;
}
</style>
<style>
#outInDepotEntrust2 {
  position: relative;
}

#outInDepotEntrust2 > div {
  top: -17px !important;
  left: 295px !important;
}
</style>