<template>

  <div>
    <el-form :model="inputQuery" label-width="120px">
      <span>单据设置：</span>
      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group" style="margin-top: 12px">
            <el-checkbox v-model="inputQuery.enable" style="width: 200px"
                         border>启用单据类型
            </el-checkbox>

            <el-checkbox v-model="inputQuery.genUnit" :disabled="inputQuery.corpType !=1" style="width: 200px" border>
              允许手动输入客户信息
            </el-checkbox>

            <el-checkbox v-model="inputQuery.useDyCount" :disabled="inputQuery.corpType !=1" style="width: 200px"
                         border>允许科室多次使用出库
            </el-checkbox>

            <el-checkbox v-model="inputQuery.outToSpms" style="width: 200px;" border>
              手持终端提交单据至自助平台
            </el-checkbox>

          </div>
        </el-col>
      </el-row>

      <el-row type=" flex">
        <el-col :span="24">
          <div class="check-box-group">
            <el-checkbox v-model="inputQuery.entrutSpms" style="width: 200px" border>允许验收自助平台单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.advanceType" style="width: 200px" border>寄售类型单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.preIn"
                         :disabled="inputQuery.corpType!='2'"
                         style="width: 200px" border>预验收

            </el-checkbox>

            <el-checkbox v-model="inputQuery.spUse" style="width: 200px;" border>
              允许供应商使用
            </el-checkbox>

          </div>
        </el-col>
      </el-row>
      <el-row>
        <div class="check-box-group">
          <el-checkbox v-model="inputQuery.preInBack" :disabled="!inputQuery.preIn" style="width: 200px" border>预验收是否带回
          </el-checkbox>
        </div>
      </el-row>
      <el-divider></el-divider>
      <span>单据默认选项：</span>
      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group" style="margin-top: 12px">
            <el-checkbox v-model="inputQuery.scanPreIn" :disabled="inputQuery.corpType!='1'" style="width: 200px"
                         border>出库时必须校验预验收库存
            </el-checkbox>

            <el-checkbox v-model="inputQuery.vailInv" :disabled="inputQuery.mainAction!='WareHouseOut'"
                         style="width: 200px" border>是否只允许有库存产品出库
            </el-checkbox>

            <el-checkbox v-model="inputQuery.codeFillCheck" style="width: 200px;" border>采集UDI码时进行三期校验
            </el-checkbox>
          </div>
        </el-col>
      </el-row>

      <el-row :gutter="20" type="flex">
        <el-col :span="24" >
          <div class="check-box-group" style="margin-top: 12px">
            <el-checkbox v-model="inputQuery.vailDispatch"  border  style="width: 200px;">校验产品是否可配送
            </el-checkbox>
            <span style="margin-left: 45px">校验是否集采产品:</span>
            <el-select v-model="inputQuery.vailGroupBuy" style="margin-left: 5px"
                       size="mini">
              <el-option label="无需校验" :value=0></el-option>
              <el-option label="只采集集采产品" :value=1></el-option>
              <el-option label="只采集非集采产品" :value=2></el-option>
            </el-select>
          </div>
        </el-col>
      </el-row>

      <el-divider></el-divider>
      <el-row type="flex">
        <el-col :span="24">
          <div class="text item">
            <el-checkbox v-model="inputQuery.checkEnable" style="width: 240px">需要校验的单据来源类型(一次复核)
            </el-checkbox>
          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group" style="margin-top: 12px;">
            <el-checkbox v-model="inputQuery.checkWebNew" :disabled="!inputQuery.checkEnable"
                         style="width: 200px" border>web端新增单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkPdaUn" :disabled="!inputQuery.checkEnable"
                         style="width: 200px" border>手持终端未校验单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkPdaEd" :disabled="!inputQuery.checkEnable"
                         style="width: 200px" border>手持终端已校验单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkUdims" :disabled="!inputQuery.checkEnable"
                         style="width: 200px;" border>UDIMS平台
            </el-checkbox>

          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group">
            <el-checkbox v-model="inputQuery.checkPc" :disabled="!inputQuery.checkEnable" style="width: 200px" border>
              UDI扫码通
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkSp" :disabled="!inputQuery.checkEnable" style="width: 200px" border>
              自助平台同步
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkChange" :disabled="!inputQuery.checkEnable" style="width: 200px"
                         border>自动补单
            </el-checkbox>

            <el-checkbox v-model="inputQuery.checkBalance" :disabled="!inputQuery.checkEnable" style="width: 200px;"
                         border>平衡补单
            </el-checkbox>

          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group">
            <el-checkbox v-model="inputQuery.checkCopy" :disabled="!inputQuery.checkEnable" style="width: 200px" border>
              手动补单
            </el-checkbox>
          </div>
        </el-col>
      </el-row>


      <el-divider></el-divider>
      <el-row type="flex">
        <el-col :span="4">
          <div class="text item">
            <el-checkbox v-model="inputQuery.secCheckEnable"
                         :disabled="twoCheck" style="width: 240px">需要单据复核的单据来源类型(二次复核)
            </el-checkbox>
          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group" style="margin-top: 12px">
            <el-checkbox v-model="inputQuery.secCheckWebNew" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>web端新增单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckPdaUn" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>手持终端未校验单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckPdaEd" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>手持终端已校验单据
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckUdims" :disabled="!inputQuery.secCheckEnable" style="width: 200px;"
                         border>UDIMS平台
            </el-checkbox>
          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group">
            <el-checkbox v-model="inputQuery.secCheckPc" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>UDI扫码通
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckSp" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>自助平台同步
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckChange" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>自动补单
            </el-checkbox>

            <el-checkbox v-model="inputQuery.secCheckBalance" :disabled="!inputQuery.secCheckEnable"
                         style="width: 200px;" border>平衡补单
            </el-checkbox>
          </div>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <div class="check-box-group">
            <el-checkbox v-model="inputQuery.secCheckCopy" :disabled="!inputQuery.secCheckEnable" style="width: 200px"
                         border>手动补单
            </el-checkbox>

          </div>
        </el-col>
      </el-row>

    </el-form>
  </div>

</template>

<script>
export default {
  name: "busTypeAdvancedSettings",
  props: {
    inputQuery: {
      type: Object,
      required: true
    }
  },

  data() {
    return {}
  }

}
</script>

<style scoped>

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

</style>
