<template>
    <div class="eibs-tab">
        <!-- ===========Left=========== -->
        <c-col :span="12">
            <!-- <c-col :span="24">
                <el-form-item
                    label="Drag  Drop Sender"
                    prop="gctp.gidget.sdamod.dadsnd"
                >
                    <c-input
                        v-model="model.gctp.gidget.sdamod.dadsnd"
                        placeholder="请输入Drag  Drop Sender"
                    ></c-input>
                </el-form-item>
            </c-col> -->

            <c-col :span="24">
                <el-form-item label="Guarantee" prop="gidgrp.rec.ownref">
                    <c-fullbox>
                        <c-input
                            v-model="model.gidgrp.rec.ownref"
                            maxlength="16"
                            placeholder="请输入Guarantee"
                            disabled
                        ></c-input>
                        <template slot="footer">
                            <c-button
                                style="margin: 0 10px 0 10px; padding: 0 12px"
                                size="small"
                                type="primary"
                            >
                                <span
                                    style="
                                        font-family: '宋体';
                                        font-weight: bold;
                                    "
                                    >i</span
                                >
                            </c-button>
                            <c-button size="small" type="primary" disabled>
                                Validity
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>
                <!-- <c-col>
                    <el-form-item label="Validity" prop="gidgrp.rec.expdat">
                        <c-date-picker
                            type="date"
                            v-model="model.gidgrp.rec.expdat"
                            style="width: 100%"
                            placeholder="请选择Valid until"
                        ></c-date-picker>
                    </el-form-item>
                </c-col> -->
            </c-col>

            <c-col :span="24">
                <el-form-item label="Claim Number" prop="gcdgrp.rec.ownref">
                    <c-fullbox>
                        <c-input
                            v-model="model.gcdgrp.rec.ownref"
                            maxlength="16"
                            placeholder="请输入Claim Number"
                            disabled
                        ></c-input>
                        <template slot="footer">
                            <c-button
                                style="margin: 0 10px 0 10px; padding: 0 12px"
                                size="small"
                                type="primary"
                            >
                                <span
                                    style="
                                        font-family: '宋体';
                                        font-weight: bold;
                                    "
                                    >i</span
                                >
                            </c-button>
                            <c-button size="small" type="primary" disabled>
                                Get ref.
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Amount Claimed" prop="gcdgrp.cbs.max.cur">
                    <c-col :span="18">
                        <c-col :span="10">
                            <c-input
                                v-model="model.gcdgrp.cbs.max.cur"
                                maxlength="3"
                                placeholder="请输入Amount Claimed"
                                disabled
                            ></c-input>
                        </c-col>
                        <c-col :span="13" style="margin-left: 5px">
                            <c-input
                                v-model="model.gcdgrp.cbs.max.amt"
                                placeholder="请输入Balance"
                                disabled
                            ></c-input>
                        </c-col>
                    </c-col>
                    <c-col :span="6" style="text-align: right">
                        <c-checkbox v-model="model.gctp.adaflg" disabled
                            >Add. Amount</c-checkbox
                        >
                    </c-col>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Open Amount" prop="gcdgrp.cbs.opn1.cur">
                    <c-col :span="18">
                        <c-col :span="10">
                            <c-select
                                v-model="model.gcdgrp.cbs.opn1.cur"
                                style="width: 100%"
                                placeholder="请选择Currency"
                                disabled
                            >
                                <el-option
                                    v-for="item in codes.cur"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                >
                                </el-option>
                            </c-select>
                        </c-col>
                        <c-col :span="13" style="margin-left: 5px">
                            <c-input
                                v-model="model.gcdgrp.cbs.opn1.amt"
                                placeholder="请输入信用证最大金额"
                                disabled
                            ></c-input>
                        </c-col>
                    </c-col>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item
                    label="Type of Undertaking"
                    prop="gidgrp.rec.gartyp"
                >
                    <c-select
                        v-model="model.gidgrp.rec.gartyp"
                        style="width: 100%"
                        placeholder="请选择Type of Undertaking"
                        disabled
                    >
                        <el-option
                            v-for="item in codes.typgar"
                            :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="LIAFLDLAB" prop="gctp.lialab">
                    <c-input
                        v-model="model.gctp.lialab"
                        maxlength="40"
                        placeholder="请输入Name of Party"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Date of Claim" prop="gcdgrp.rec.clmdat">
                    <c-date-picker
                        type="date"
                        v-model="model.gcdgrp.rec.clmdat"
                        style="width: 100%"
                        placeholder="请选择Date of Claim"
                        disabled
                    ></c-date-picker>
                </el-form-item>
            </c-col>
        </c-col>

        <!-- ===========Right=========== -->
        <c-col :span="12">
            <c-col :span="24">
                <c-col :span="13">
                    <el-form-item
                        label="Open Amount"
                        prop="gidgrp.cbs.opn1.cur"
                    >
                        <c-select
                            v-model="model.gidgrp.cbs.opn1.cur"
                            style="width: 100%"
                            placeholder="请选择Currency"
                            disabled
                        >
                            <el-option
                                v-for="item in codes.cur"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            >
                            </el-option>
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="11">
                    <el-form-item
                        label=""
                        label-width="5px"
                        prop="gidgrp.cbs.opn1.amt"
                    >
                        <c-input
                            v-model="model.gidgrp.cbs.opn1.amt"
                            placeholder="请输入信用证最大金额"
                            disabled
                        ></c-input>
                    </el-form-item>
                </c-col>
                <!-- 
                <c-col :span="12">
                    <el-form-item
                        label="Open Amount"
                        prop="gcdgrp.cbs.opn1.cur"
                    >
                        <c-input
                            v-model="model.gcdgrp.cbs.opn1.cur"
                            maxlength="3"
                            placeholder="请输入Open Amount"
                        ></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="Balance" prop="gcdgrp.cbs.opn1.amt">
                        <c-input
                            v-model="model.gcdgrp.cbs.opn1.amt"
                            placeholder="请输入Balance"
                        ></c-input>
                    </el-form-item>
                </c-col> -->
            </c-col>

            <c-col :span="24">
                <el-form-item label="Name" prop="gcdgrp.rec.nam">
                    <c-input
                        v-model="model.gcdgrp.rec.nam"
                        maxlength="40"
                        placeholder="请输入Externally Displayed Name to Identify the Contract"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item
                    label="Applicant    Ref."
                    prop="gcdgrp.apl.pts.ref"
                >
                    <c-input
                        v-model="model.gcdgrp.apl.pts.ref"
                        maxlength="16"
                        placeholder="请输入Applicant"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="gcdgrp.apl.pts.nam">
                    <c-input
                        v-model="model.gcdgrp.apl.pts.nam"
                        maxlength="40"
                        placeholder="请输入Name of Party"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item
                    label="Beneficiary    Ref."
                    prop="gcdgrp.ben.pts.ref"
                >
                    <c-input
                        v-model="model.gcdgrp.ben.pts.ref"
                        maxlength="16"
                        placeholder="请输入Beneficiary"
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="gcdgrp.ben.pts.nam">
                    <c-input
                        v-model="model.gcdgrp.ben.pts.nam"
                        maxlength="40"
                        placeholder="请输入Name of Party"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>
        </c-col>

        <c-col :span="24" style="height: 0px">
            <el-divider></el-divider>
        </c-col>

        <!-- ===========Left=========== -->
        <c-col :span="12" style="margin-top: 15px">
            <c-col :span="24">
                <el-form-item label="Amount Claimed" prop="gcdgrp.cbs.max.cur">
                    <c-col :span="18">
                        <c-col :span="10">
                            <c-input
                                v-model="model.gcdgrp.cbs.max.cur"
                                placeholder="请输入"
                                disabled
                            ></c-input>
                        </c-col>
                        <c-col :span="13" style="margin-left: 5px">
                            <c-input
                                v-model="model.gcdgrp.cbs.max.amt"
                                placeholder="请输入Balance"
                                disabled
                            ></c-input>
                        </c-col>
                    </c-col>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item
                    label="Drawn Add. Amount"
                    prop="gcdgrp.cbs.opn2.cur"
                >
                    <c-col :span="18">
                        <c-col :span="10">
                            <c-input
                                v-model="model.gcdgrp.cbs.opn2.cur"
                                placeholder="请输入"
                                disabled
                            ></c-input>
                        </c-col>
                        <c-col :span="13" style="margin-left: 5px">
                            <c-input
                                v-model="model.gcdgrp.cbs.max2.amt"
                                placeholder="请输入Balance"
                                disabled
                            ></c-input>
                        </c-col>
                    </c-col>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Presented by" prop="gcdgrp.rec.docprbrol">
                    <c-select
                        v-model="model.gcdgrp.rec.docprbrol"
                        style="width: 100%"
                        placeholder="请选择Presented by"
                        disabled
                    >
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Reference" prop="gcdgrp.prb.pts.ref">
                    <c-input
                        v-model="model.gcdgrp.prb.pts.ref"
                        maxlength="16"
                        placeholder="请输入Reference"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="">
                    <c-checkbox v-model="cannowflg"
                        >Payment under Cancelation of Guarantee</c-checkbox
                    >
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="">
                    <c-checkbox v-model="clsflg">Close Flag</c-checkbox>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="">
                    <c-checkbox v-model="frepayflg"
                        >free of payment flag</c-checkbox
                    >
                </el-form-item>
            </c-col>
        </c-col>
        <!-- ===========Right=========== -->
        <c-col :span="12" style="margin-top: 15px">
            <c-col :span="24">
                <c-fullbox>
                    <el-form-item
                        label="External Key of Address"
                        prop="gcdgrp.prb.pts.extkey"
                    >
                        <c-input
                            v-model="model.gcdgrp.prb.pts.extkey"
                            maxlength="14"
                            placeholder="请输入External Key of Address"
                            disabled
                        ></c-input>
                    </el-form-item>
                    <template slot="footer">
                        <c-button
                            style="margin: 0 10px 0 10px; padding: 0 12px"
                            size="small"
                            type="primary"
                            icon="el-icon-search"
                        >
                        </c-button>

                        <c-button
                            style="margin: 0 0"
                            size="small"
                            type="primary"
                            disabled
                        >
                            Temp.
                        </c-button>
                    </template>
                </c-fullbox>
            </c-col>
            <c-col :span="24">
                <el-form-item label="">
                    <c-input
                        type="textarea"
                        :rows="4"
                        v-model="model.gcdgrp.prb.pts.adrblk"
                        maxlength="16"
                        placeholder="请输入External Key of Address"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>
            <!-- <c-col :span="24">
                <el-form-item label="">
                    <c-input
                        v-model="model.gcdgrp.prb.adrelc"
                        maxlength="16"
                        placeholder="请输入External Key of Address"
                    ></c-input>
                </el-form-item>
            </c-col> -->

            <c-col :span="24">
                <el-form-item label="Payer" prop="gcdgrp.rec.payrol">
                    <c-select
                        v-model="model.gcdgrp.rec.payrol"
                        style="width: 100%"
                        placeholder="请选择Payer"
                        disabled
                    >
                        <el-option
                            v-for="item in codes.rolall"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        >
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <c-fullbox>
                    <el-form-item
                        label="External Key of Address"
                        prop="gcdgrp.oth.pts.extkey"
                    >
                        <c-input
                            v-model="model.gcdgrp.oth.pts.extkey"
                            maxlength="14"
                            placeholder="请输入External Key of Address"
                            disabled
                        ></c-input>
                    </el-form-item>
                    <template slot="footer">
                        <c-button
                            style="margin: 0 10px 0 10px; padding: 0 12px"
                            size="small"
                            type="primary"
                            icon="el-icon-search"
                        >
                        </c-button>

                        <c-button
                            style="margin: 0 0"
                            size="small"
                            type="primary"
                            disabled
                        >
                            Details.
                        </c-button>
                    </template>
                </c-fullbox>
            </c-col>
            <c-col :span="24">
                <el-form-item label="">
                    <c-input
                        type="textarea"
                        :rows="4"
                        v-model="model.gcdgrp.oth.pts.adrblk"
                        maxlength="16"
                        placeholder="请输入External Key of Address"
                        disabled
                    ></c-input>
                </el-form-item>
            </c-col>
            <!-- <c-col :span="24">
                <el-form-item label="">
                    <c-input
                        v-model="model.gcdgrp.oth.adrelc"
                        maxlength="16"
                        placeholder="请输入External Key of Address"
                    ></c-input>
                </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/Getset/Event";

export default {
    inject: ["root"],
    props: ["model", "codes"],
    mixins: [commonProcess],
    data() {
        return {};
    },
    methods: { ...Event },
    computed: {
        cannowflg: {
            get() {
                return this.model.gcdgrp.rec.cannowflg != "0";
            },
            set(val) {
                this.model.gcdgrp.rec.cannowflg = val ? "X" : "0";
            },
        },
        clsflg: {
            get() {
                return this.model.mtabut.clsflg != "";
            },
            set(val) {
                this.model.mtabut.clsflg = val ? "C" : "";
            },
        },
        frepayflg: {
            get() {
                return this.model.gcdgrp.rec.frepayflg != "";
            },
            set(val) {
                this.model.gcdgrp.rec.frepayflg = val ? "X" : "";
            },
        },
    },
    created: function () {},
};
</script>
<style>
</style>
