<template>
  <div class="eibs-tab">
    <c-row>
      <c-col :span="11">
        <!-- Available with -->
        <c-col :span="24">
          <el-form-item label="指定银行" prop="ledgrp.rec.avbwth">
            <c-select
              v-model="model.ledgrp.rec.avbwth"
              style="width: 100%"
              placeholder="请选择指定银行"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
              title: '指定银行',
              grp: 'ledgrp',
              rol: 'avb',
            }"
            :noRef="true"
            :onlySearch="true"
            @onSeainf="onSeainf"
            @onAplpDet="onAvbpDet"
          >
          </c-ptap>
        </c-col>

        <c-col :span="24">
          <el-form-item label="名称地址" prop="ledgrp.blk.avbwthtxt">
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.avbwthtxt"
              maxlength="35"
              show-word-limit
              placeholder="请输入名称地址"
            ></c-input>
          </el-form-item>
        </c-col>
        <!-- <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.avb.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.avb.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col> -->

        <c-col :span="24">
          <el-form-item label="兑付方式" prop="ledgrp.rec.avbby">
            <c-select
              v-model="model.ledgrp.rec.avbby"
              style="width: 100%"
              placeholder="请选择兑付方式"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="期限描述" prop="ledgrp.blk.defdet">
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.defdet"
              maxlength="35"
              show-word-limit
              placeholder="请输入期限描述"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="汇票期限" prop="ledgrp.blk.dftat">
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.dftat"
              maxlength="35"
              show-word-limit
              placeholder="请输入汇票期限"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
              title: '汇票申请人',
              grp: 'ledgrp',
              rol: 'drw',
            }"
            :noRef="true"
            @onSeainf="onSeainf"
            @onAplpDet="onDrwpDet"
          >
          </c-ptap>
        </c-col>
      </c-col>

      <c-col :span="11" :offset="1">
        <c-col :span="24">
          <el-form-item label="最大金额详情" prop="ledgrp.blk.mixdet">
            <c-input
              type="textarea"
              :rows="4"
              v-model="model.ledgrp.blk.mixdet"
              maxlength="35"
              show-word-limit
              placeholder="请输入最大金额详情"
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Days of presentation period -->
        <c-col :span="24">
          <el-form-item label="交单期天数" prop="ledgrp.rec.prepers18">
            <c-input
              v-model="model.ledgrp.rec.prepers18"
              placeholder="请输入交单期天数"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="交单期" prop="ledgrp.blk.preper">
            <c-input
              type="textarea"
              v-model="model.ledgrp.blk.preper"
              maxlength="35"
              show-word-limit
              placeholder="请输入交单期"
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Additional Details to Code for Charges CHATO -->
        <c-col :span="24">
          <el-form-item label="附加收费详情" prop="ledgrp.blk.feetxt">
            <c-input
              type="textarea"
              :rows="6"
              v-model="model.ledgrp.blk.feetxt"
              maxlength="35"
              show-word-limit
              placeholder="请输入附加收费详情"
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Own Charges Borne by -->
        <c-col :span="18">
          <el-form-item label="自行承担费用" prop="ledgrp.rec.chato">
            <c-select
              v-model="model.ledgrp.rec.chato"
              style="width: 100%"
              placeholder="请选择"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="18">
          <el-form-item label="国家统计代码" prop="ledgrp.rec.stacty">
            <c-select
              v-model="model.ledgrp.rec.stacty"
              style="width: 100%"
              placeholder="请选择国家统计代码"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="18">
          <el-form-item label="兑付最高期限" prop="ledgrp.rec.tenmaxday">
            <c-input
              v-model="model.ledgrp.rec.tenmaxday"
              placeholder="请输入兑付最高期限"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-row>

    <c-row>
      <!-- Dispatch from -->
      <c-col :span="11">
        <el-form-item label="转运" prop="ledgrp.rec.shpfro">
          <c-input
            type="textarea"
            :rows="3"
            show-word-limit
            v-model="model.ledgrp.rec.shpfro"
            maxlength="65"
            placeholder="请输入"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="11" :offset="1">
        <el-form-item label="货物装运地(港）" prop="ledgrp.rec.porloa">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.porloa"
            maxlength="65"
            show-word-limit
            placeholder="请输入货物装运地(港）"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="11">
        <el-form-item label="航空/目的港" prop="ledgrp.rec.pordis">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.pordis"
            maxlength="65"
            show-word-limit
            placeholder="航空/目的港"
          ></c-input>
        </el-form-item>
      </c-col>

      <!-- Final Destination -->
      <c-col :span="11" :offset="1">
        <el-form-item label="货物目的地、交货地（港）" prop="ledgrp.rec.shpto">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.shpto"
            maxlength="65"
            show-word-limit
            placeholder="货物目的地、交货地（港）"
          ></c-input>
        </el-form-item>
      </c-col>

      <!-- Shipment Period -->
      <c-col :span="11">
        <el-form-item label="发货期" prop="ledgrp.blk.shpper">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.blk.shpper"
            maxlength="65"
            show-word-limit
            placeholder="请输入发货期"
          ></c-input>
        </el-form-item>
      </c-col>
    </c-row>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Ptap from "~/views/Public/Ptap";
import Event from "~/model/Letopn/Event";

export default {
  inject: ["root"],
  components: { "c-ptap": Ptap },
  props: ["model", "codes"],
  mixins: [CommonProcess],
  data() {
    return {};
  },
  methods: { ...Event },
  created: function () {},
  watch: {
    "model.ledgrp.avb.pts.adrblk": {
      handler(val, oldVal) {
        this.model.ledgrp.blk.avbwthtxt = val;
      },
      immediate: true,
    },
  },
};
</script>
<style>
</style>
