<template>
  <div class="eibs-tab">
    <!-- left -->
    <c-col :span="11">
      <c-col :span="24">
        <c-col :span="20">
          <el-form-item
            label="Export L/C Ref."
            prop="ledgrp.rec.ownref"
            style="width: 100%"
          >
            <c-input
              v-model="model.ledgrp.rec.ownref"
              maxlength="16"
              placeholder="Please input Export L/C Ref."
              style="width: 95%"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <!-- <c-col :span="1" style="text-align: right"> -->
        <c-col :span="1">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 10px 0 0; padding: 0 12px"
            size="small"
            type="primary"
            @click="onSeainf"
          >
            <span
              style="font-size: 15px; font-family: '宋体'; font-weight: bold"
              >i</span
            >
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <c-col :span="2" :offset="1" style="text-align: right">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 0"
            size="small"
            type="primary"
            :disabled="this.flag"
            @click="onDetpButgetref"
          >
            Get
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <!-- </c-col> -->
      </c-col>

      <c-col :span="24">
        <c-col :span="20">
          <el-form-item
            label="Bill Set Reference"
            prop="bedgrp.rec.ownref"
            style="width: 100%"
          >
            <c-input
              v-model="model.bedgrp.rec.ownref"
              maxlength="16"
              placeholder="Please input Bill Set Reference"
              style="width: 95%"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <!-- <c-col :span="1" style="text-align: right"> -->
        <c-col :span="1">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 10px 0 0; padding: 0 12px"
            size="small"
            type="primary"
            @click="onSeainf"
          >
            <span
              style="font-size: 15px; font-family: '宋体'; font-weight: bold"
              >i</span
            >
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <c-col :span="2" :offset="1" style="text-align: right">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 0"
            size="small"
            type="primary"
            :disabled="this.flag"
            @click="onDetpButgetref"
          >
            Get
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <!-- </c-col> -->
      </c-col>

      <c-col :span="24">
        <el-form-item label="Document Amount" prop="bedgrp.cbs.max.cur">
          <c-fullbox>
            <c-input
              v-model="model.bedgrp.cbs.max.cur"
              maxlength="3"
              style="width: 50%"
              placeholder="Please input Document Amount"
              disabled
            ></c-input>
            <c-input
              v-model="model.bedgrp.cbs.max.amt"
              style="width: 50%"
              placeholder="Please input Balance"
              disabled
            ></c-input>
            <template slot="footer">
              <c-checkbox
                v-model="model.betp.adaflg"
                style="margin-left: 10px"
                disabled
                >Add. Amount</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Open Amount" prop="bedgrp.cbs.opn1.cur">
            <c-input
              v-model="model.bedgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="Please input Open Amoun"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="bedgrp.cbs.opn1.amt">
            <c-input
              v-model="model.bedgrp.cbs.opn1.amt"
              placeholder="Please input Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Document Type" prop="bedgrp.rec.doctypcod">
          <c-select
            v-model="model.bedgrp.rec.doctypcod"
            style="width: 100%"
            placeholder="Please input Document Type"
            disabled
          >
            <el-option
              v-for="item in codes.doctypcod1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Maturity Date" prop="bedgrp.rec.matdat">
          <c-date-picker
            type="date"
            v-model="model.bedgrp.rec.matdat"
            style="width: 100%"
            placeholder="Please select Maturity Date"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Received on" prop="bedgrp.rec.rcvdat">
            <c-date-picker
              type="date"
              v-model="model.bedgrp.rec.rcvdat"
              style="width: 100%"
              placeholder="Please select Received on"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="Presented on" prop="bedgrp.rec.predat">
            <c-date-picker
              type="date"
              v-model="model.bedgrp.rec.predat"
              style="width: 100%"
              placeholder="Please select Presented on"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Document Status" prop="bedgrp.rec.docsta">
          <c-select
            v-model="model.bedgrp.rec.docsta"
            style="width: 100%"
            placeholder="Please select Document Status"
            disabled
            :code="codes.docsta1"
          >
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="11" :offset="1">
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Open Amt. L/C" prop="ledgrp.cbs.opn1.cur">
            <c-input
              v-model="model.ledgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="Please input Open Amt. L/C"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="ledgrp.cbs.opn1.amt">
            <c-input
              v-model="model.ledgrp.cbs.opn1.amt"
              placeholder="Please input Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Name" prop="bedgrp.rec.nam">
          <c-input
            v-model="model.bedgrp.rec.nam"
            maxlength="40"
            placeholder="Please input Name"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: 'Presented by',
            grp: 'bedgrp',
            rol: 'prb',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: 'Issuing Bank',
            grp: 'bedgrp',
            rol: 'iss',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: 'Applicant',
            grp: 'bedgrp',
            rol: 'apl',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
    </c-col>
    <c-col :span="24">
      <el-form-item style="margin-left: 0px">
        <el-divider />
      </el-form-item>
    </c-col>

    <!-- next part -->
    <!-- left -->
    <c-col :span="11">
      <c-col :span="24">
        <el-form-item
          label="Narrative of Maturity Amendment"
          prop="trnmod.swiadd.strinf"
        >
          <c-input
            type="textarea"
            v-model="model.trnmod.swiadd.strinf"
            maxlength="35"
            show-word-limit
            placeholder="Please input Narrative of Maturity"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Accept Amount" prop="setmod.doccur">
            <c-input
              v-model="model.setmod.doccur"
              maxlength="3"
              placeholder="Please input Accept Amount"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="setmod.docamt">
            <c-input
              v-model="model.setmod.docamt"
              placeholder="Please input Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Doc. Amount Part" prop="bedgrp.cbs.opn2.cur">
            <c-input
              v-model="model.bedgrp.cbs.opn2.cur"
              maxlength="3"
              placeholder="Please input Doc. Amount Part"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="aamset.utlamt">
            <c-input
              v-model="model.aamset.utlamt"
              placeholder="Please input Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Add. Amount Part" prop="bedgrp.cbs.opn2.cur">
            <c-input
              v-model="model.bedgrp.cbs.opn2.cur"
              maxlength="3"
              placeholder="Please input Add. Amount Part"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="aamset.utlamt2">
            <c-input
              v-model="model.aamset.utlamt2"
              placeholder="Please input Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="发送索偿电日期" prop="snadat">
          <c-date-picker
            type="date"
            v-model="model.snadat"
            style="width: 100%"
            placeholder="请选择发送索偿电日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="11" :offset="1">
      <c-col :span="24" style="margin: 0 0 10PX 150px">
        <c-checkbox v-model="cre752flg">Receive MT 752</c-checkbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Further Identification" prop="betp.furide">
          <c-select
            v-model="model.betp.furide"
            style="width: 100%"
            placeholder="Please select Further Identification"
            :disabled="!cre752flg"
            :code="codes.furide"
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Date of Advice" prop="bedgrp.rec.disdat">
          <c-date-picker
            type="date"
            v-model="model.bedgrp.rec.disdat"
            style="width: 100%"
            placeholder="Please select Date of Advice"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Reduction Amt." prop="setmod.doccur">
            <c-input
              v-model="model.setmod.doccur"
              maxlength="3"
              placeholder="Please input Reduction Amt."
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="setmod.redamt">
            <c-input
              v-model="model.setmod.redamt"
              placeholder="Please input Balance"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

    </c-col>

    <!-- <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="betp.ledget.sdamod.dadsnd">
            <c-input  v-model="model.betp.ledget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="参考号" prop="ledgrp.rec.ownref">
            <c-input  v-model="model.ledgrp.rec.ownref" maxlength="16"  placeholder="请输入参考号"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="betp.ledget.sdamod.seainf">
            <c-input  v-model="model.betp.ledget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Currency" prop="ledgrp.cbs.opn1.cur">
            <c-input  v-model="model.ledgrp.cbs.opn1.cur" maxlength="3"  placeholder="请输入Currency"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Balance" prop="ledgrp.cbs.opn1.amt">
            <c-input  v-model="model.ledgrp.cbs.opn1.amt"  placeholder="请输入Balance"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="betp.recget.sdamod.dadsnd">
            <c-input  v-model="model.betp.recget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据参考号" prop="bedgrp.rec.ownref">
            <c-input  v-model="model.bedgrp.rec.ownref" maxlength="16"  placeholder="请输入单据参考号"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="betp.recget.sdamod.seainf">
            <c-input  v-model="model.betp.recget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Externally Displayed Name to Identify the Contract" prop="bedgrp.rec.nam">
            <c-input  v-model="model.bedgrp.rec.nam" maxlength="40"  placeholder="请输入Externally Displayed Name to Identify the Contract"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据金额" prop="bedgrp.cbs.max.cur">
            <c-select v-model="model.bedgrp.cbs.max.cur" style="width:100%" placeholder="请选择单据金额">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="单据金额" prop="bedgrp.cbs.max.amt">
            <c-input  v-model="model.bedgrp.cbs.max.amt"  placeholder="请输入单据金额"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="交单人" prop="bedgrp.prb.pts.ref">
            <c-input  v-model="model.bedgrp.prb.pts.ref" maxlength="16"  placeholder="请输入交单人"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.betp.adaflg">Add. amount</c-checkbox>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据余额" prop="bedgrp.cbs.opn1.cur">
            <c-input  v-model="model.bedgrp.cbs.opn1.cur" maxlength="3"  placeholder="请输入单据余额"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Balance" prop="bedgrp.cbs.opn1.amt">
            <c-input  v-model="model.bedgrp.cbs.opn1.amt"  placeholder="请输入Balance"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Name of Party" prop="bedgrp.prb.pts.nam">
            <c-input  v-model="model.bedgrp.prb.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
        </el-form-item>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="开证行" prop="bedgrp.iss.pts.ref">
            <c-input  v-model="model.bedgrp.iss.pts.ref" maxlength="16"  placeholder="请输入开证行"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据类型" prop="bedgrp.rec.doctypcod">
            <c-select v-model="model.bedgrp.rec.doctypcod" style="width:100%" placeholder="请选择单据类型">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Name of Party" prop="bedgrp.iss.pts.nam">
            <c-input  v-model="model.bedgrp.iss.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="到期日" prop="bedgrp.rec.matdat">
            <c-date-picker type="date"  v-model="model.bedgrp.rec.matdat" style="width:100%"  placeholder="请选择到期日"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="到单日期" prop="bedgrp.rec.rcvdat">
            <c-date-picker type="date"  v-model="model.bedgrp.rec.rcvdat" style="width:100%"  placeholder="请选择到单日期"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Presentation Date" prop="bedgrp.rec.predat">
            <c-date-picker type="date"  v-model="model.bedgrp.rec.predat" style="width:100%"  placeholder="请选择Presentation Date"></c-date-picker>
        </el-form-item>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="申请人" prop="bedgrp.apl.pts.ref">
            <c-input  v-model="model.bedgrp.apl.pts.ref" maxlength="16"  placeholder="请输入申请人"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据状态" prop="bedgrp.rec.docsta">
            <c-input  v-model="model.bedgrp.rec.docsta" maxlength="40"  placeholder="请输入单据状态"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Name of Party" prop="bedgrp.apl.pts.nam">
            <c-input  v-model="model.bedgrp.apl.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Narrative of Maturity" prop="trnmod.swiadd.strinf">
            <c-input type="textarea" v-model="model.trnmod.swiadd.strinf" maxlength="35" show-word-limit placeholder="请输入Narrative of Maturity" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.betp.cre752flg">Create 752</c-checkbox>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="进一步的确认" prop="betp.furide">
            <c-select v-model="model.betp.furide" style="width:100%" placeholder="请选择进一步的确认">
              </c-select>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Date of Advice" prop="bedgrp.rec.disdat">
            <c-date-picker type="date"  v-model="model.bedgrp.rec.disdat" style="width:100%"  placeholder="请选择Date of Advice"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="document currency" prop="setmod.doccur">
            <c-select v-model="model.setmod.doccur" style="width:100%" placeholder="请选择document currency">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="document amount" prop="setmod.docamt">
            <c-input  v-model="model.setmod.docamt"  placeholder="请输入document amount"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Reduction Amt." prop="setmod.redamt">
            <c-input  v-model="model.setmod.redamt"  placeholder="请输入Reduction Amt."></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="附加金额" prop="bedgrp.cbs.opn2.cur">
            <c-select v-model="model.bedgrp.cbs.opn2.cur" style="width:100%" placeholder="请选择附加金额">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="单据金额" prop="aamset.utlamt">
            <c-input  v-model="model.aamset.utlamt"  placeholder="请输入单据金额"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="附加金额" prop="aamset.utlamt2">
            <c-input  v-model="model.aamset.utlamt2"  placeholder="请输入附加金额"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="发送索偿电日期" prop="snadat">
            <c-date-picker type="date"  v-model="model.snadat" style="width:100%"  placeholder="请选择发送索偿电日期"></c-date-picker>
        </el-form-item>
       </c-col> -->
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Betacc/Event";
import Ptsmsg from "~/views/Public/Ptsmsg";

export default {
  components: { "c-ptsmsg": Ptsmsg },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {};
  },
  computed: {
    cre752flg: {
      get() {
        return this.model.betp.cre752flg != "";
      },
      set(val) {
        this.model.betp.cre752flg = val ? "X" : "";
        this.model.betp.furide = "";
      },
    },
    flag() {
      return this.model.mtabut.coninf.usr.extkey == "";
    },
  },
  methods: { ...Event },
  created: function () {},
};
</script>
<style>
</style>
