<template>
  <div>
    <el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="150px" border>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="单据类型名称" prop="name">
            <el-input v-model="inputQuery.name" size="small" style="width: 90%"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="单据类型代码" prop="action">
            <el-input v-model="inputQuery.action" :disabled="true" size="small"
                      style="width: 90%"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="11" type="flex">
          <el-form-item label="出入库类型" prop="mainAction">
            <el-select v-model="inputQuery.mainAction"
                       size="small"
                       style="width: 90%"
                       placeholder="出入库类型"
                       @change="getOrderType">
              <el-option label="入库" value="WareHouseIn"></el-option>
              <el-option label="出库" value="WareHouseOut"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="往来单位类型" prop="corpType">
            <el-select v-model="inputQuery.corpType"
                       size="small"
                       style="width: 90%"
                       placeholder="往来信息"
                       @change="corpTypeChange"
            >
              <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-row>
      <el-row type="flex">

        <el-col :span="11" class="el-col">
          <el-form-item label="是否更改库存" prop="inStock">
            <el-select v-model="inputQuery.inStock"
                       size="small"
                       style="width: 90%"
                       placeholder=""
                       @change="inStock"
            >
              <el-option label="是" :value="true"></el-option>
              <el-option label="否" :value="false"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="11" type="flex">
          <el-form-item label="仓库类型" prop="actionType">
            <el-select v-model="inputQuery.actionType"
                       size="small"
                       style="width: 90%"
                       placeholder="请选择入库方式">
              <el-option label="入账库" :value="1"></el-option>
              <el-option label="预验收库" :value="2"></el-option>
              <el-option label="寄售库" :value="3"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="允许手动输入客户信息" prop="genUnit">
            <el-select v-model="inputQuery.genUnit"
                       :disabled="inputQuery.corpType != 1  || inputQuery.mainAction!='WareHouseOut'" style="width: 90%"
                       placeholder="是否允许"
            >
              <el-option label="允许" :value="true"></el-option>
              <el-option label="不允许" :value="false"></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="11">
          <el-form-item label="内部单据自动平衡" prop="supplementOrderType">
            <el-select :disabled="inputQuery.corpType !=3  || inputQuery.inStock!= true"
                       size="small"
                       style="width: 90%"
                       v-model="inputQuery.supplementOrderType"
                       clearable
                       placeholder="单据类型"
            >
              <el-option
                v-for="item in orderTypeList"
                :key="item.name"
                :label="item.name"
                :value="item.action"
              >
                <span style="float: left">{{ item.name }}</span>
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <!--   :disabled="inputQuery.mainAction!='WareHouseIn' || inputQuery.corpType!=2 "-->

      </el-row>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="供应商使用权限" prop="prefix">
            <el-select v-model="inputQuery.spUse"
                       style="width: 90%" placeholder="是否允许">
              <el-option label="无" :value="0"></el-option>
              <el-option label="可查看" :value="1"></el-option>
              <el-option label="增删改查" :value="2"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="物资近效期处理方式" prop="prefix">
            <el-select v-model="inputQuery.checkVailDate"
                       style="width: 90%" placeholder="">
              <el-option label="不处理" :value=0></el-option>
              <el-option label="弹框提醒" :value=1></el-option>
              <el-option label="禁止录入" :value=2></el-option>
            </el-select>
          </el-form-item>
        </el-col>


        <!--<el-col :span="11">-->
        <!--  <el-form-item label="预验收使用结束退回" prop="preInBack">-->
        <!--    <el-select v-model="inputQuery.preInBack"-->
        <!--               :disabled="inputQuery.actionType != 2 || inputQuery.mainAction!='WareHouseIn' ||-->
        <!--                        inputQuery.corpType != 2 || inputQuery.inStock==false "-->
        <!--               style="width: 90%"-->
        <!--               placeholder="是否退回"   -->
        <!--    >-->
        <!--      <el-option label="是" :value="true"></el-option>-->
        <!--      <el-option label="否" :value="false"></el-option>-->
        <!--    </el-select>-->
        <!--  </el-form-item>-->
        <!--</el-col>-->
      </el-row>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="物资过期处理方式" prop="prefix">
            <el-select v-model="inputQuery.checkExpire"
                       style="width: 90%" placeholder="">
              <el-option label="不处理" :value=0></el-option>
              <el-option label="弹框提醒" :value=1></el-option>
              <el-option label="禁止录入" :value=2></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="资质过期处理方式" prop="prefix">
            <el-select v-model="inputQuery.checkCertExpire"
                       style="width: 90%" placeholder="">
              <el-option label="不处理" :value=0></el-option>
              <el-option label="弹框提醒" :value=1></el-option>
              <el-option label="禁止录入" :value=2></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="单据前缀" prop="prefix">
            <el-input
              @input="inputQuery.prefix = inputQuery.prefix.replace(/[\W]/g, '')"
              v-model="inputQuery.prefix" size="small" style="width: 90%">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="排序" prop="sortNum">
            <el-input v-model="inputQuery.sortNum" type="number" min="0" max="999" size="small" style="width: 90%">
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="11">
          <el-form-item label="禁用单据类型" prop="prefix">
            <el-select v-model="inputQuery.enable" style="width: 90%" placeholder="状态">
              <el-option label="否" :value="true"></el-option>
              <el-option label="是" :value="false"></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="11">
          <el-form-item label="单据编辑状态" prop="prefix">
            <el-select v-model="inputQuery.editType" style="width: 90%" placeholder="编辑状态">
              <el-option label="仅查看" :value="1"></el-option>
              <el-option label="可编辑" :value="2"></el-option>
            </el-select>
          </el-form-item>
        </el-col>


      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="集采是否拆单" prop="groupBuySplit">
            <el-select v-model="inputQuery.groupBuySplit" style="width: 90%" placeholder="集采是拆单">
              <el-option label="拆单" :value="1"></el-option>
              <el-option label="不拆单" :value="2"></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="11">
          <el-form-item label="耗材校验方式" prop="vailHcType">
            <el-select v-model="inputQuery.vailHcType" style="width: 90%" placeholder="耗材校验方式">
              <el-option label="不校验耗材类别" :value="0"></el-option>
              <el-option label="只采集高值耗材" :value="1"></el-option>
              <el-option label="只采集普通耗材" :value="2"></el-option>
            </el-select>
          </el-form-item>
        </el-col>

      </el-row>

      <el-row>
        <el-col :span="11">
          <el-form-item prop="remark" label="备注">
            <el-input v-model="inputQuery.remark" size="small" style="width: 90%" type="textarea" autosize
            ></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="11">
          <el-form-item label="是否开启校验扫码" prop="codeCheck">
            <el-select v-model="inputQuery.codeCheck" style="width: 90%" placeholder="是否开启校验扫码">
              <el-option label="不校验" :value="0"></el-option>
              <el-option label="只允许录入扫码产品" :value="1"></el-option>
              <el-option label="只允许录入不扫码产品" :value="2"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <div style="margin-left: 25px">
      <el-collapse>
        <el-collapse-item title="供应商送货设置"
                          v-if="inputQuery.corpType==2 && inputQuery.mainAction!= 'WareHouseOut'">

          <div style="width: 100%;margin-top: 15px">
            <el-row>
              <el-col span="5">
                <span class="spanHeader">参数</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <span class="spanHeader">设置</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="spanHeader">参数设置说明</span>
              </el-col>
            </el-row>
            <el-divider direction="horizontal"></el-divider>
          </div>
          <el-row style="margin-top: 15px">
            <el-col span="5">
              <span class="sptext">采集UDI码时进行三期校验</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.codeFillCheck" style="width: 65%"
                         :disabled="inputQuery.corpType!=2 || inputQuery.mainAction!= 'WareHouseIn'"
                         placeholder="是否启用">
                <el-option label="启用" :value="true"></el-option>
                <el-option label="不启用" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">采集UDI码时进行三期校验</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">外包装码补齐关联关系</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.fillCodeRel" style="width: 65%" placeholder="是否启用"
                         :disabled="inputQuery.corpType!=2 || inputQuery.mainAction!= 'WareHouseIn'"
              >
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">外包装码补齐关联关系</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">校验物资是否可配送</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.vailDispatch" style="width: 65%" placeholder="是否启用"
                         :disabled="inputQuery.corpType!=2 || inputQuery.mainAction!= 'WareHouseIn'"
              >
                <el-option label="启用" :value="true"></el-option>
                <el-option label="不启用" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">校验物资是否可配送</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">校验是否集采产品</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.vailGroupBuy" style="width: 65%;margin-top: 4px" placeholder="是否启用">
                <el-option label="无需校验" :value=0></el-option>
                <el-option label="只采集集采产品" :value=1></el-option>
                <el-option label="只采集非集采产品" :value=2></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">校验是否集采产品</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">校验产品采购类型</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.vailProductAttributes" style="width: 65%" placeholder="是否校验">
                <el-option label="校验" :value=1></el-option>
                <el-option label="无需校验" :value=2></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">校验产品采购类型</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>


          <el-row v-if="inputQuery.actionType==2">
            <el-col span="5">
              <span class="sptext">预验收是否带回</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.inPreInBack" style="width: 65%;margin-top: 4px" placeholder="是否带回">
                <el-option label="带回" :value=1></el-option>
                <el-option label="不带回" :value=2></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">预验收是否带回</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
        </el-collapse-item>

        <el-collapse-item title="入库单据设置" v-if="inputQuery.mainAction=='WareHouseIn'">
          <div style="width: 100%;margin-top: 15px">
            <el-row>
              <el-col span="5">
                <span class="spanHeader">参数</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <span class="spanHeader">设置</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="spanHeader">参数设置说明</span>
              </el-col>
            </el-row>
            <el-divider direction="horizontal"></el-divider>
          </div>
          <el-row>
            <el-col span="5">
              <span class="sptext">是否设备入库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.devInType" style="width: 65%"
                         :disabled="!(inputQuery.mainAction =='WareHouseIn' && inputQuery.actionType == 1)"
                         placeholder="是否启用"
              >
                <el-option label="未启用" :value=0></el-option>
                <el-option label="启用" :value=1></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">设置是否设备入库</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

        </el-collapse-item>
        <el-collapse-item title="出库单据设置" v-if="inputQuery.mainAction!='WareHouseIn'">
          <div style="width: 100%;margin-top: 15px">
            <el-row>
              <el-col span="5">
                <span class="spanHeader">参数</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <span class="spanHeader">设置</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="spanHeader">参数设置说明</span>
              </el-col>
            </el-row>
            <el-divider direction="horizontal"></el-divider>
          </div>
          <el-row>
            <el-col span="5">
              <span class="sptext">物资使用出库模式</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.useDyCount" style="width: 65%"
                         :disabled=" inputQuery.mainAction!= 'WareHouseOut'  || inputQuery.corpType != 1"
                         placeholder="是否启用"
              >
                <el-option label="正常" :value="0"></el-option>
                <el-option label="物资多次使用出库" :value="1"></el-option>
                <el-option label="科室集合出库" :value="2"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">设置物资使用出库模式</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">预验收使用禁止无库存出库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.scanPreIn" style="width: 65%"
                         :disabled="inputQuery.useDyCount!=2 &&(  inputQuery.advancePreIn==1 || inputQuery.vailInv==1)"
                         @change="outChange"
                         placeholder="是否启用">
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">出库时必须校验预验收库存</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">寄售使用禁止无库存出库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.advancePreIn" style="width: 65%"
                         :disabled="inputQuery.useDyCount!=2 &&(  inputQuery.scanPreIn==1 || inputQuery.vailInv==1)"
                         @change="outChange"
                         placeholder="是否启用">
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">寄售使用禁止无库存出库</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">入账库使用禁止无库存出库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.vailInv" style="width: 65%"
                         :disabled="inputQuery.useDyCount!=2 &&( inputQuery.mainAction!= 'WareHouseOut' || inputQuery.advancePreIn==1 || inputQuery.scanPreIn==1)"
                         @change="outChange"
                         placeholder="是否启用"
              >
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">入账库使用禁止无库存出库</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">入账库是否允许无批次号出库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.vailInvBatchNo" style="width: 65%"
                         :disabled="inputQuery.useDyCount!=2 &&( inputQuery.mainAction!= 'WareHouseOut' || inputQuery.advancePreIn==1 || inputQuery.scanPreIn==1)"
                         @change="outChange"
                         placeholder="是否启用"
              >
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">允许无批次号出库则会根据产品入库时间先进先出</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>


          <el-row>
            <el-col span="5">
              <span class="sptext">按货位出库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.spaceOut" style="width: 65%"
                         :disabled=" inputQuery.mainAction!= 'WareHouseOut'  || (!inputQuery.scanPreIn && !inputQuery.advancePreIn && !inputQuery.vailInv)"
              >
                <el-option label="无" :value="0"></el-option>
                <el-option label="整单按指定货位出库" :value="1"></el-option>
                <el-option label="按物资摆放货位出库" :value="2"></el-option>
              </el-select>

            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">设置是否按货位出库</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">科室库存出库模式</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.deptNoInvType" style="width: 65%"
                         :disabled="inputQuery.mainAction!= 'WareHouseOut'  || !inputQuery.vailInv"
              >
                <el-option label="当前仓库库存出库" :value="0"></el-option>
                <el-option label="上级仓库库存出库" :value="1"></el-option>
                <el-option label="总库库存出库" :value="2"></el-option>
              </el-select>

            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">科室库存出库模式</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

          <el-row>
            <el-col span="5">
              <span class="sptext">预验收剩余库存自动退库</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.preInBack"
                         :disabled="inputQuery.scanPreIn ==false || inputQuery.corpType ==2 " @change="getPreInBack"
                         style="width: 65%"
                         placeholder="是否退回"
              >
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">预验收剩余库存自动退库</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">出库是否校验处方</span>
            </el-col>
            <el-col span="5">
              <el-select v-model="inputQuery.vailPrescribe" style="width: 65%"
                         :disabled="inputQuery.mainAction!= 'WareHouseOut'  || inputQuery.corpType != 1"
                         placeholder="是否启用">
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-col span="13">
              <span class="sptext">出库是否校验处方</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row>
            <el-col span="5">
              <span class="sptext">出库是否手输患者信息</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.inputSick" style="width: 65%"
                         :disabled="inputQuery.mainAction!= 'WareHouseOut'  || inputQuery.corpType != 1"
                         placeholder="是否启用">
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">出库是否手输患者信息</span>
            </el-col>
          </el-row>

          <el-divider></el-divider>
          <el-row v-if="inputQuery.preInBack==true">
            <el-col span="5">
              <span class="sptext">预验收剩余库存退库方式</span>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="5">
              <el-select v-model="inputQuery.backPreinType" style="width: 65%">
                <el-option label="按单使用和退库" :value="1"></el-option>
                <el-option label="按货位（仓库）使用和退库" :value="2"></el-option>
              </el-select>
            </el-col>
            <el-divider direction="vertical"></el-divider>
            <el-col span="13">
              <span class="sptext">预验收剩余库存退库方式</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>
          <el-row v-if="inputQuery.preInBack==true ">
            <el-col span="5">
              <span class="sptext">预验收退库单据类型</span>
            </el-col>

            <el-col span="5">
              <el-select v-model="inputQuery.preInBackAction" style="width: 65%">
                <el-option
                  v-for="item in preInBackList"
                  :key="item.name"
                  :label="item.name"
                  :value="item.action"
                >
                  <span style="float: left">{{ item.name }}</span>
                </el-option>
              </el-select>
            </el-col>
            <el-col span="13">
              <span class="sptext">预验收退库单据类型</span>
            </el-col>
          </el-row>
          <el-divider></el-divider>

        </el-collapse-item>

        <el-collapse-item title="是否校验业务单设置">
          <div>
            <div style="width: 100%;margin: 0 auto;margin-top: 20px">
              <el-row style="margin-bottom: 15px">
                <el-col span="18">
                  <el-checkbox v-model="inputQuery.checkEnable">
                    <span class="spanTitle">单据是否必须校验业务单，请指定单据的来源类型</span>
                  </el-checkbox>
                </el-col>
              </el-row>
            </div>

            <el-divider direction="horizontal"></el-divider>
            <div style="width: 100%;margin: 0 auto">
              <el-row>
                <el-col span="5">
                  <span class="spanHeader">参数</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="5">
                  <span class="spanHeader">设置</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="13">
                  <span class="spanHeader">参数设置说明</span>
                </el-col>
              </el-row>
              <el-divider direction="horizontal"></el-divider>
            </div>
            <!--      <el-row>-->
            <!--        <el-col span="5">-->
            <!--          <span class="sptext">需要手动校验业务单的单据来源类型</span>-->
            <!--        </el-col>-->
            <!--        <el-divider direction="vertical"></el-divider>-->
            <!--        <el-col span="5">-->
            <!--          <el-select v-model="inputQuery.checkEnable" style="width: 65%" placeholder="是否启用" clearable>-->
            <!--            <el-option label="启用" :value="true"></el-option>-->
            <!--            <el-option label="不启用" :value="false"></el-option>-->
            <!--          </el-select>-->
            <!--        </el-col>-->
            <!--        <el-divider direction="vertical"></el-divider>-->
            <!--        <el-col span="13">-->
            <!--          <span class="sptext">需要手动校验业务单的单据来源类型</span>-->
            <!--        </el-col>-->
            <!--      </el-row>-->

            <el-row>
              <el-col span="5">
                <span class="sptext">web端新增单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkWebNew" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">web端新增单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>
            <el-row v-if="inputQuery.checkWebNew == 3">
              <el-col span="5">
                <span class="sptext">有三期业务单校验方式</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkWebNewType" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="有三期业务单校验方式"
                >
                  <el-option label="扫码结果提交" :value="0"></el-option>
                  <el-option label="比对结果提交" :value="1"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">有三期业务单校验方式</span>
              </el-col>
            </el-row>
            <el-divider v-if="inputQuery.checkWebNew == 3"></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkPdaUn" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkPdaEd" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDIMS平台推送的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkUdims" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDIMS平台推送的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkPc" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkSp" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>
            <el-row>
              <el-col span="5">
                <span class="sptext">自动补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkChange" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">自动补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkBalance" :disabled="!inputQuery.checkEnable" style="width: 75%"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>
            <el-row>
              <el-col span="5">
                <span class="sptext">手工补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkCopy" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手工补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>
            <el-row>
              <el-col span="5">
                <span class="sptext">单据验收补单</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.checkReview" style="width: 75%" :disabled="!inputQuery.checkEnable"
                           placeholder="是否启用"
                >
                  <el-option label="扫码直接生成业务单" :value="0"></el-option>
                  <el-option label="有三期业务单配/拣货" :value="1"></el-option>
                  <el-option label="无三期业务单配/拣货" :value="2"></el-option>
                  <el-option label="有三期业务单校验" :value="3"></el-option>
                  <el-option label="业务单自动生成扫码单" :value="4"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">单据验收补单</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

          </div>
        </el-collapse-item>
        <el-collapse-item title="是否人工核对单据设置(一次审核)">
          <div>
            <div style="width: 100%;margin: 0 auto;margin-top: 20px">
              <el-row style="margin-bottom: 15px">
                <el-col span="18">
                  <el-checkbox v-model="inputQuery.thrCheckEnable">
                    <span class="spanTitle">单据是否必须人工核对，请指定单据的来源类型</span>
                  </el-checkbox>
                </el-col>
              </el-row>
            </div>
            <el-divider direction="horizontal"></el-divider>
            <div style="width: 100%;margin: 0 auto">
              <el-row>
                <el-col span="5">
                  <span class="spanHeader">参数</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="5">
                  <span class="spanHeader">设置</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="13">
                  <span class="spanHeader">参数设置说明</span>
                </el-col>
              </el-row>
              <el-divider direction="horizontal"></el-divider>
            </div>
            <el-row>
              <el-col span="5">
                <span class="sptext">web端新增单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckWebNew" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">web端新增单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckPdaUn" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckPdaEd" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDIMS平台推送的数据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckUdims" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDIMS平台推送的数据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckPc" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckSp" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">自动补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckChange" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">自动补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckBalance" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手工补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckCopy" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手工补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">单据验收补单</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckReview" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckReview"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">单据验收补单</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDI管理系统同步单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.thrCheckSp" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.thrCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDI管理系统同步单据</span>
              </el-col>
            </el-row>
          </div>
        </el-collapse-item>
        <el-collapse-item title="是否人工审核单据设置(二次审核)">
          <div>
            <div style="width: 100%;margin: 0 auto;margin-top: 20px">
              <el-row style="margin-bottom: 15px">
                <el-col span="18">
                  <el-checkbox v-model="inputQuery.secCheckEnable">
                    <span class="spanTitle">单据是否必须人工审核，请指定单据的来源类型</span>
                  </el-checkbox>
                </el-col>
              </el-row>
            </div>
            <el-divider direction="horizontal"></el-divider>
            <div style="width: 100%;margin: 0 auto">
              <el-row>
                <el-col span="5">
                  <span class="spanHeader">参数</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="5">
                  <span class="spanHeader">设置</span>
                </el-col>
                <el-divider direction="vertical"></el-divider>
                <el-col span="13">
                  <span class="spanHeader">参数设置说明</span>
                </el-col>
              </el-row>
            </div>


            <el-row>
              <el-col span="5">
                <span class="sptext">web端新增单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckWebNew" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">web端新增单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckPdaUn" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端未校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckPdaEd" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手持终端已校验单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDIMS平台推送的数据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckUdims" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDIMS平台推送的数据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckPc" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">UDI扫码通单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckSp" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内外网系统同步的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">自动补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckChange" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">自动补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckBalance" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">内部平衡补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">手工补单的单据</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckCopy" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">手工补单的单据</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>

            <el-row>
              <el-col span="5">
                <span class="sptext">单据验收补单</span>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="5">
                <el-select v-model="inputQuery.secCheckReview" style="width: 65%" placeholder="是否启用"
                           :disabled="!inputQuery.secCheckEnable"
                >
                  <el-option label="启用" :value="true"></el-option>
                  <el-option label="不启用" :value="false"></el-option>
                </el-select>
              </el-col>
              <el-divider direction="vertical"></el-divider>
              <el-col span="13">
                <span class="sptext">单据验收补单</span>
              </el-col>
            </el-row>
            <el-divider></el-divider>
          </div>
        </el-collapse-item>
      </el-collapse>
    </div>
  </div>
</template>

<script>

import {candidateBusType} from '@/api/basic/busType'
import busTypeAdvancedSettings from '@/views/basic/busType/busTypeAdvancedSettings.vue'
import {isBlank} from '@/utils/strUtil'
import {getOriginBusType, selectList} from '@/api/basic/busOriginType'
import {getBasicUnitMaintains2} from '@/api/basic/basicUnitMaintain'

export default {
  name: 'BussinessTypeModify',
  props: {
    inputQuery: {
      type: Object,
      required: true
    },
    modifySubmit: {
      type: Function,
      required: true
    }
  },

  data() {
    return {
      formRules: {
        name: [{required: true, message: '请输入单据类型名称', trigger: 'blur'}],
        mainAction: [
          {
            required: true,
            message: '请选择出入库类型',
            trigger: 'change'
          }
        ],
        inStock: [
          {
            required: true,
            message: '请选择是否更改库存',
            trigger: 'change'
          }
        ],
        // busType: [
        //   {
        //     required: true,
        //     message: '请选择特定页面',
        //     trigger: 'change'
        //   }
        // ]
      },
      filterQuery: {
        enabled: true,
        isBuType: true,
        isFilterBind: true
      },
      preInBackList: [],
      orderTypeList: [],
      fromSpecialOptions: [],
      originTypes: [],
      value: '',
      options: [{
        value: 1,
        label: '客户信息'
      }, {
        value: 2,
        label: '供应商信息'
      },
        {
          value: 3,
          label: '内部科室'
        }, {
          value: 4,
          label: '特殊往来'
        }],
      twoCheck: false,
      settingDialogVisible: false,
      oldData: {}
    }
  },
  methods: {
    getList() {
      let originQuery = {
        onlyMain: true
      }
      getOriginBusType(originQuery)
        .then((response) => {
          this.originTypes = response.data.list || []
        })
        .catch(() => {
        })
    },
    findSpecialMethod() {
      let query = {
        corpType: 4
      }
      getBasicUnitMaintains2(query).then((response) => {
        this.fromSpecialOptions = response.data.list || []
      }).catch(() => {

      })
    },

    inStock() {
      if (!this.inputQuery.inStock) {
        this.inputQuery.supplementOrderType = ""
      }
    },

    corpTypeChange(type) {
      if (type != 2) {
        this.inputQuery.genUnit = false
      }
      if (this.inputQuery.corpType === 4) {
        this.findSpecialMethod()
      } else {
        this.inputQuery.defaultUnit = null
      }

      if (this.inputQuery.corpType !== 1) {
        this.inputQuery.genUnit = false
        this.inputQuery.useDyCount = 0
      } else {
        this.inputQuery.genUnit = this.oldData.genUnit
        this.inputQuery.useDyCount = this.oldData.useDyCount
      }

      if (this.inputQuery.corpType != 3) { //往来类型非内部使用时，平衡补单为空
        this.inputQuery.supplementOrderType = ""
      }

      if (this.inputQuery.corpType != 2) {    //往来类型非供应商时，采购方式未无
        this.inputQuery.actionType = 1;
        this.inputQuery.spUse = 0;
      }

      // if (this.inputQuery.corpType == 3) {//往来类型为内部科室
      //   this.inputQuery.inStock = null;
      //
      // }

    },

    selectBussinessList() {
      selectList().then((res) => {
        this.preInBackList = res.data;
      })
    },
    getPreInBack() {
      if (this.inputQuery.preInBack == false) {
        this.inputQuery.preInBackAction = null;
        this.inputQuery.backPreinType = '';
      } else {
        this.inputQuery.backPreinType = 1;
      }
    },
    //禁用库存出库
    outChange() {
      if (!this.inputQuery.scanPreIn && !this.inputQuery.scanPreIn && !this.inputQuery.scanPreIn) {
        this.inputQuery.spaceOut = 0;
      }
    },


    //获取单据类型
    getOrderType() {
      this.orderTypeList = []
      let query = {
        mainAction: this.inputQuery.mainAction,
        curAction: this.inputQuery.supplementOrderType
      }
      candidateBusType(query).then((response) => {
        let data = response.data || []
        if (data != null && data.length > 0) {
          for (var i = 0; i < data.length; i++) {
            if (data[i].action != this.inputQuery.action) {
              this.orderTypeList.push(data[i]);
            }
          }
        }

      }).catch(() => {

      })
      // if (this.inputQuery.mainAction != 'WareHouseIn') {
      //   this.inputQuery.actionType = null
      // }

      // 联动修改允许手动输入客户信息值
      // if (this.inputQuery.corpType != 1 || this.inputQuery.mainAction != "WarehouseOut") {
      //   this.inputQuery.genUnit = false;
      // }
    },

    // 单据类型高级设置弹窗
    advancedSettings() {
      if (isBlank(this.inputQuery.id)) {
        this.$message.warning('请先保存当前单据类型！')
      } else {
        this.settingDialogVisible = true
      }
    },

    // 高级设置保存
    saveSettings() {
      //默认初始化
      this.inputQuery.corpType = 2
      this.modifySubmit(this.inputQuery)
    },

    // 高级设置弹窗关闭
    cancelDialog() {
      this.settingDialogVisible = false
    }
  }
  ,
  computed: {
    corpType() {
      return this.inputQuery.corpType
    }
  }
  ,
  components: {
    busTypeAdvancedSettings
  }
  ,
  watch: {
    corpType: function (val) {
      if (val != 1) {
        this.inputQuery.orderTypeEnable = true
        this.inputQuery.supplementOrderType = ""
      } else {
        this.inputQuery.orderTypeEnable = false
      }
    },
    actionType: function (val) {
      if (val != 1) {
        this.inputQuery.devInType = 0
      }
    },
  }
  ,

  created() {
    if (this.inputQuery.mainAction != null && this.inputQuery.mainAction != '') {
      this.getOrderType()
    }
    this.getList()
    this.findSpecialMethod()
    this.selectBussinessList()
    this.oldData = Object.assign({}, this.inputQuery)
    if (this.inputQuery.id == null || this.inputQuery.id == '') {
      this.inputQuery.codeFillCheck = false;
      this.inputQuery.preInBack = false;
    }

  }

}

</script>

<style scoped>

.text {
  font-size: 13px;
  font-family: "Microsoft YaHei";
}

.check-box-group {
  margin-left: 25px;
  margin-bottom: 12px;
}

.el-divider {
  margin: 6px 0px 8px 0px;
  background: 0 0;
  border-top: 1px solid #E6EBF5;
}

.spanTitle {
  font-size: 15px;
  font-weight: bold;
  color: #000000
}

.spanHeader {
  font-size: 14px;
  font-weight: bold;
  color: #3d3b3b
}


.sptext {
  font-size: 13px;
  font-weight: normal;
}

/deep/ .el-collapse-item__header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 48px;
  line-height: 48px;
  background-color: #FFFFFF;
  color: #000610;
  cursor: pointer;
  border-bottom: 1px solid #e6ebf5;
  font-size: 16px;
  font-weight: 700;
  -webkit-transition: border-bottom-color 0.3s;
  transition: border-bottom-color 0.3s;
  outline: none;
}

/deep/ .el-collapse-item__content {
  padding-bottom: 10px;
  font-size: 13px;
  color: #303133;
  line-height: 1.7692307692;
}
</style>
