<template>
    <c-content class="eibs-tab" :height="200">
        <div class="infTopBtn">
            <c-button size="small" type="primary">toSearch</c-button>
            <el-button-group>
                <c-button size="small" type="primary" icon="el-icon-arrow-left" disabled></c-button>
                <c-button size="small" type="primary" icon="el-icon-arrow-right" disabled></c-button>
            </el-button-group>
            <c-button size="small" type="primary">Print</c-button>
            <c-button size="small" type="primary" disabled>Use</c-button>
            <c-button size="small" type="primary" disabled>Loginfo</c-button>
            <c-button size="small" type="primary">Exit</c-button>
        </div>

        <c-row class="infrow" style="margin-top:50px;">
            <c-col :span="11" :offset="1">
                <c-row>
                   <!-- 1st Advising Bank Ref. -->
                    <c-col :span="24">
                        <c-ptap
                            :model="model"
                            :argadr="{
                                title: '第一通知行',
                                grp: 'ledgrp',
                                rol: 'adv',
                            }"
                            @onSeainf="onSeainf"
                            @onAplpDet="onAdvpDet"
                        >
                        </c-ptap>
                    </c-col>
                    <c-col :span="24">
                        <c-ptap
                            :model="model"
                            :argadr="{
                                title: '第二通知行',
                                grp: 'ledgrp',
                                rol: 'a2b',
                            }"
                           
                            @onSeainf="onSeainf"
                            @onAplpDet="onA2bpDet"
                        >
                        </c-ptap>
                    </c-col>
                    <!-- Confirm. Instruct -->
                    <c-col :span="24">
                        <el-form-item label="第二通知行确认指令" prop="ledgrp.rec.cnfins">
                            <c-select 
                                v-model="model.ledgrp.rec.cnfins" 
                                style="width:100%" 
                                placeholder="第二通知行确认指令"
                            >
                            </c-select>
                        </el-form-item>
                    </c-col>
                </c-row>
            </c-col>
            <c-col :span="11" :offset="1">
                <c-row>
                    <!-- Applicant's Bank Ref.-->
                    <c-col :span="24">
                        <c-ptap
                            :model="model"
                            :argadr="{
                                title: '申请人银行',
                                grp: 'ledgrp',
                                rol: 'apb',
                            }"
                            @onSeainf="onSeainf"
                            @onAplpDet="onApbpDet"
                        >
                        </c-ptap>
                    </c-col>

                    <!-- Send Directly -->
                    <c-col :span="12">
                        <c-checkbox v-model="model.ledgrp.rec.aplbnkdirsnd">Send Directly to Applicant's Bank</c-checkbox>
                    </c-col>
                    <!-- Reimbursement Bank  偿付行-->
                    <c-col :span="24">
                        <c-ptap
                            :model="model"
                            :argadr="{
                                title: '偿付银行',
                                grp: 'ledgrp',
                                rol: 'rmb',
                            }"
                            @onSeainf="onSeainf"
                            @onAplpDet="onRmbpDet"
                        >
                        </c-ptap>
                    </c-col>
                    <!--  Confirmation Bank 保兑行 -->
                    <c-col :span="24">
                        <c-ptap
                            :model="model"
                            :argadr="{
                                title: '保兑行',
                                grp: 'ledgrp',
                                rol: 'con',
                            }"
                            @onSeainf="onSeainf"
                            @onAplpDet="onConpDet"
                        >
                        </c-ptap>
                    </c-col>
                </c-row>
            </c-col>
        </c-row> 
        
        <c-edit-table :model="model" v-bind="ptsaddg">
           <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                    <el-button
                        size="mini"
                        @click="handleEdit(scope.$index, scope.row)"
                        type="primary"
                        >详情
                        </el-button>
                    </template>
            </el-table-column>
        </c-edit-table>                        
    </c-content>
</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Infled/Event"
import Ptap from "~/views/Public/Ptap";

export default {
    inject: ['root'],
    components: { "c-ptap": Ptap },
    props:["model","codes"],
    mixins: [CommonProcess],
    data(){
        return {
            ptsaddg: {
                columns: [
                {
                    title: "角色",
                    width: "120px",
                    dataIndex: "rol",
                    show: "select",
                },
                {
                    title: "机构实体",
                    width: "180px",
                    dataIndex: "ptyextkey",
                    show: "input",
                },
                {
                    title: "名称",
                    width: "300px",
                    dataIndex: "nam",
                },
                {
                    title: "参考地址",
                    width: "300px",
                    dataIndex: "ref",
                },
                ],
                urls: "recpan.ptsaddp.ptsaddg",
                },
            };
        },
    methods:{
        ...Event,
        handleEdit() {
            console.log("1111测试");
        },
    },
    created:function(){

    }
}
</script>
<style>

</style>
