<template>
  <div class="eibs">
    <!-- 顶部 -->
    <c-col :span="24">
      <el-form-item
        label="出口信用证转账:"
        prop="lttp.lttinf"
        style="width: 100%"
      >
      </el-form-item>
    </c-col>
    <!-- left -->
    <c-col :span="12" style="padding-right: 20px;">
      <c-col :span="24">
        <el-form-item
          label="转让信用证业务编号"
          prop="ledgrp.rec.ownref"
          style="width: 100%"
        >
          <c-input
            v-model="model.ledgrp.rec.ownref"
            maxlength="16"
            placeholder="请输入信用证参考号"
            style="width: 100%"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="信用证金额" prop="ledgrp.cbs.nom1.cur">
            <c-select
              v-model="model.ledgrp.cbs.nom1.cur"
              maxlength="3"
              placeholder="请输入信用证金额"
              :code="codes.curtxt1"
              disabled
            ></c-select>
          </el-form-item>
        </c-col>
        <c-col :span="8">
          <el-form-item label="" label-width="5px" prop="ledgrp.cbs.nom1.amt">
            <c-input
              v-model="model.ledgrp.cbs.nom1.amt"
              class="m-input-currency"
              placeholder="请输入金额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="4">
          <c-checkbox v-model="model.lttp.aamp.aammod.addamtflg" disabled
            >附加金额</c-checkbox
          >
        </c-col>
      </c-col>
      <!-- <c-col :span="24">
        <el-form-item label="信用证金额" prop="ledgrp.cbs.nom1.cur">
          <c-fullbox>
            <c-input
              v-model="model.ledgrp.cbs.nom1.cur"
              maxlength="3"
              style="width: 50%"
              placeholder="请输入信用证金额"
              disabled
            ></c-input>
            <c-input
              v-model="model.ledgrp.cbs.nom1.amt"
              style="width: 50%"
              placeholder="请输入"
              class="m-input-currency"
              disabled
            ></c-input>
            <template slot="footer">
              <c-checkbox
                v-model="model.lttp.aamp.aammod.addamtflg"
                style="margin-left: 10px"
                disabled
                >附加金额</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col> -->
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="余额" prop="ledgrp.cbs.opn1.cur">
            <c-select
              v-model="model.ledgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="请输入余额"
              :code="codes.curtxt1"
              disabled
            ></c-select>
          </el-form-item>
        </c-col>
        <c-col :span="8">
          <el-form-item label="" label-width="5px" prop="ledgrp.cbs.opn1.amt">
            <c-input
              v-model="model.ledgrp.cbs.opn1.amt"
              class="m-input-currency"
              placeholder="请输入金额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="3" :offset="1">
          <c-checkbox v-model="model.ledgrp.rec.revflg" disabled
            >循环信用证</c-checkbox
          >
        </c-col>
      </c-col>
      <!-- <c-col :span="24">
        <el-form-item label="余额" prop="ledgrp.cbs.opn1.cur">
          <c-fullbox>
            <c-input
              v-model="model.ledgrp.cbs.opn1.cur"
              maxlength="3"
              style="width: 50%"
              placeholder="请输入余额"
              disabled
            ></c-input>
            <c-input
              v-model="model.ledgrp.cbs.opn1.amt"
              style="width: 50%"
              placeholder="请输入"
              class="m-input-currency"
              disabled
            ></c-input>
            <template slot="footer">
              <c-checkbox
                v-model="model.ledgrp.rec.revflg"
                style="margin-left: 10px"
                disabled
                >循环信用证</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col> -->
      <c-col :span="24">
        <el-form-item label="被授权的银行当事人" prop="ledgrp.avbnam">
          <c-input
            v-model="model.ledgrp.avbnam"
            style="width: 100%"
            placeholder="请输入被授权的银行当事人"
            disabled
          >
          </c-input>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="by" prop="ledgrp.rec.avbby">
          <c-fullbox>
            <c-input
              v-model="model.ledgrp.rec.avbby"
              maxlength="3"
              style="width: 100%"
              placeholder="请输入"
              disabled
              :code="codes.avbby"
            ></c-input>
            <template slot="footer">
              <c-checkbox
                v-model="model.ledgrp.rec.redclsflg"
                style="margin-left: 10px"
                disabled
                >红/绿条款</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="开证日期" prop="ledgrp.rec.opndat">
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.opndat"
              style="width: 100%"
              placeholder="请选择开证日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="装运日期" prop="ledgrp.rec.shpdat">
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.shpdat"
              style="width: 100%"
              placeholder="请选择装运日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="到期日及其到期地点" prop="ledgrp.rec.expdat">
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.expdat"
              style="width: 100%"
              placeholder="请选择到期日及其到期地点"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" prop="ledgrp.rec.expplc">
            <c-input
              v-model="model.ledgrp.rec.expplc"
              style="width: 100%"
              placeholder=""
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="信用证类型" prop="ledgrp.rec.lcrtyp">
          <c-select
            v-model="model.ledgrp.rec.lcrtyp"
            style="width: 100%"
            placeholder="请选择信用证类型"
            disabled
          >
            <el-option
              v-for="item in codes.lcrtyp1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="12" style="padding-left: 20px;" >
      <c-col :span="24">
        <el-form-item label="简略信息" prop="ledgrp.rec.nam">
          <c-input
            v-model="model.ledgrp.rec.nam"
            maxlength="40"
            placeholder="请输入简略信息"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '申请人',
            grp: 'ledgrp',
            rol: 'apl',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '原始信用证开证行',
            grp: 'ledgrp',
            rol: 'iss',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '受益人',
            grp: 'ledgrp',
            rol: 'ben',
          }"
          :disabled="true"
          :enRef="true"
          :enNam="true"
        ></c-ptsmsg>
      </c-col>
      <c-col :span="24">
        <el-form-item label="" prop="lttp.letp0.cnftxt">
          <c-input
            v-model="model.lttp.letp0.cnftxt"
            style="width: 100%"
            placeholder="请选择信用证类型"
            disabled
          >
          </c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <c-col :span="23" style="height: 24px; margin-left: 9px">
      <el-form-item
        class="formItemLabel"
        label="利用上面的信息开立可转让的背对背信用证"
        label-width="248px"
      >
      </el-form-item>
    </c-col>
    <c-col :span="24" style="margin:0 0 10px 0px">
      <c-istream-table
        :list="model.lttp.leltb2b.litb2bstm.rows || []"
        :columns="columns"
      ></c-istream-table>
    </c-col>
    <!-- 底部 -->
    <!-- left -->
    <c-col :span="12" style="padding-right: 20px;">
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="此笔转让证的金额" prop="ltdgrp.cbs.max.cur">
            <c-select
              v-model="model.ltdgrp.cbs.max.cur"
              style="width: 100%"
              placeholder="请选择此笔转让证的金额"
              disabled
              :code="codes.curtxt1"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="ltdgrp.cbs.opn1.amt">
            <c-input
              v-model="model.ltdgrp.cbs.opn1.amt"
              placeholder="请输入"
              class="m-input-currency"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
          <el-form-item label="已经转让的总额" prop="lttp.totamt">
            <c-input
              v-model="model.lttp.totamt"
              style="width: 100%"
              placeholder="请选择已经转让的总额"
              class="m-input-currency"
              disabled
            >
            </c-input>
          </el-form-item>
        </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="12" style="padding-left: 20px;">
      <c-col :span="24">
        <el-form-item label="装运日期" prop="ltdgrp.rec.shpdat">
          <c-date-picker
            type="date"
            v-model="model.ltdgrp.rec.shpdat"
            style="width: 100%"
            placeholder="请选择装运日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="有效期" prop="ltdgrp.rec.expdat">
          <c-date-picker
            type="date"
            v-model="model.ltdgrp.rec.expdat"
            style="width: 100%"
            placeholder="请选择有效期"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>
    </c-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Lttopn/Event";
import Ptsmsg from "~/views/Public/Ptsmsg";

export default {
  components: { "c-ptsmsg": Ptsmsg },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      columns: [
        '2 1 "类型" 145',
        '4 2 "信用证编号" 150',
        '7 3 "币种" 140',
        '8 4 "余额" 150 2 8 1 7',
        '5 5 "装运日期" 150 4 7 1',
        '6 6 "到期" 150 4 7 1',
        '3 7 "名称" 150',
        '9 8 "Info" 150 5 6:1 0 I',
      ],
      data: [],
    };
  },
  methods: { ...Event },
  created: function () {},
};
</script>
<style>
.formItemLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
}
</style>