<template>
  <div class="eibs-tab">
    <c-row>
      <c-col :span="11">
        <!-- Available with -->
        <c-col :span="24">
          <el-form-item label="Available with" prop="ledgrp.rec.avbwth">
            <c-select
              v-model="model.ledgrp.rec.avbwth"
              style="width: 100%"
              placeholder="请选择Available with"
            >
            </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="Available by" prop="ledgrp.rec.avbby">
            <c-select
              v-model="model.ledgrp.rec.avbby"
              style="width: 100%"
              placeholder="请选择Available by"
              :code="codes.avbby"
            >
            </c-select>
          </el-form-item>
        </c-col>

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

        <c-col :span="24">
          <el-form-item label="Drafts at" prop="ledgrp.blk.dftat">
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.dftat"
              maxlength="35"
              show-word-limit
              placeholder="请输入Drafts at"
            ></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="Mixed Payment Details" prop="ledgrp.blk.mixdet">
            <c-input
              type="textarea"
              :rows="4"
              v-model="model.ledgrp.blk.mixdet"
              maxlength="35"
              show-word-limit
              placeholder="请输入Mixed Payment Details"
            ></c-input>
          </el-form-item>
        </c-col>

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

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

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

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

        <c-col :span="18">
          <el-form-item label="Country or region Code" prop="ledgrp.rec.stacty">
            <c-select
              v-model="model.ledgrp.rec.stacty"
              style="width: 100%"
              placeholder="请选择Country or region Code"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="18">
          <el-form-item label="Maximum Tenor" prop="ledgrp.rec.tenmaxday">
            <c-input
              v-model="model.ledgrp.rec.tenmaxday"
              placeholder="请输入Maximum Tenor"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-row>

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

      <c-col :span="11" :offset="1">
        <el-form-item label="Air-/Port of Departure" prop="ledgrp.rec.porloa">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.porloa"
            maxlength="65"
            show-word-limit
            placeholder="请输入Air-/Port of Departure"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="11">
        <el-form-item label="Air-/Port of Destination" prop="ledgrp.rec.pordis">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.pordis"
            maxlength="65"
            show-word-limit
            placeholder="Air-/Port of Destination"
          ></c-input>
        </el-form-item>
      </c-col>

      <!-- Final Destination -->
      <c-col :span="11" :offset="1">
        <el-form-item label="Final Destination" prop="ledgrp.rec.shpto">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.rec.shpto"
            maxlength="65"
            show-word-limit
            placeholder="请输入Final Destination"
          ></c-input>
        </el-form-item>
      </c-col>

      <!-- Shipment Period -->
      <c-col :span="11">
        <el-form-item label="Shipment Period" prop="ledgrp.blk.shpper">
          <c-input
            type="textarea"
            :rows="3"
            v-model="model.ledgrp.blk.shpper"
            maxlength="65"
            show-word-limit
            placeholder="请输入Shipment Period"
          ></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>
