<template>
    <c-row class="eibs-tab">
        <!-- ====================顶部==================== -->
        <c-col :span="6" style="margin-left:9px">
            <el-form-item label="参考号" label-width="50px">
                <c-input
                    v-model="model.setmod.ref"
                    maxlength="16"
                    :readonly="true"
                    placeholder="请输入our reference"
                ></c-input>
            </el-form-item>
        </c-col>
        <c-col :span="4">
            <el-form-item label="结算金额" label-width="100px">
                <c-input
                    v-model="model.setmod.doccur"
                    style="width: 100%"
                    placeholder="CNY"
                    :readonly="true"
                    
                ></c-input>
            </el-form-item>
        </c-col>

        <c-col :span="6">
            <el-form-item label="" label-width="7px">
                <c-input
                    v-model="model.setmod.docamt"
                    :readonly="true"
                    placeholder="请输入document amount"
                ></c-input>
            </el-form-item>
        </c-col>

        <c-col :span="5">
            <el-form-item label="类型" label-width="100px">
                <c-select
                    v-model="model.setmod.dspflg"
                    disabled
                    style="width: 100%"
                    placeholder="请选择Type of settlement"
                >
                    <el-option
                        v-for="item in codes.dspflg"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
                </c-select>
            </el-form-item>
        </c-col>
        <c-col :span="2" style="text-align:right">
            <!-- <el-form-item label="" label-width="20px"> -->
                <c-button style="margin-right:10px" size="small" type="primary" @click="onSetmodDet">
                    详情
                </c-button>
            <!-- </el-form-item> -->
        </c-col>

        <!--
        <c-col :span="12">
        <el-form-item label="自贸区账号">
            <c-input  v-model="model.setmod.zmqacc" maxlength="20"  placeholder="请输入自贸区账号"></c-input>
        </el-form-item>
       </c-col>    
       <c-col :span="6" style="text-align:center">
	    <c-checkbox v-model="model.setmod.xreflg">Recalculate Rates</c-checkbox>
       </c-col> 
       -->
       <c-col :span="23" style="margin-left:9px;height:25px">
           <el-divider></el-divider>
       </c-col>
        <!-- ==============中部表格===================== -->

        <c-col :span="23" style="height:24px;margin-left:9px">
            <el-form-item
                class="formItemLabel"
                label="Foreign Commission/Charges:"
                label-width="300px"
            >
            </el-form-item>
        </c-col>
        
        <c-col :span="23" style="margin-left:9px">
            <c-table
                style="text-align: center"
                :list="model.setmod.setfog.setfol"
                :paginationShow="false"
                :border="true"
            >
                <el-table-column label="Payer" prop="ptydbt" width="101px">
                    <template slot-scope="scope">
                        <c-select v-model="scope.row.ptydbt">
                            <el-option
                                        v-for="item in codes.ptydbt"
                                        :key="item.value"
                                        :label="item.value"
                                        :value="item.value"
                                    >
                                        <span style="float: left">{{ item.label }}</span>
                                    </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Payee" width="101px">
                    <template slot-scope="scope">
                        <c-select v-model="scope.row.payee">
                            <el-option
                                v-for="item in codes.payee"
                                :key="item.value"
                                :label="item.value"
                                :value="item.value"
                            >
                            <span style="float: left">{{ item.label }}</span>
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Source" prop="src" width="70px">
                </el-table-column>
                <el-table-column label="Disp" prop="dsp" width="76px">
                </el-table-column>
                <el-table-column
                    label="Text for Payer"
                    prop="txtdbt"
                    width="auto"
                >
                </el-table-column>
                <el-table-column
                    label="Text for Payee"
                    prop="txtpay"
                    width="auto"
                >
                </el-table-column>
                <el-table-column label="Currency" prop="cur" width="93px">
                    <template slot-scope="scope">
                        <c-select v-model="scope.row.cur">
                            <el-option
                                v-for="item in codes.cur"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            >
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Amount" prop="amt" width="150px">
                </el-table-column>
                <el-table-column label="" prop="det" width="80px" fixed="right">
                    <template slot-scope="scope" slot="header">
                        <c-button
                            circle
                            style="padding:4px"
                            class="el-icon-plus"
                            size="mini"
                            @click="addRow(scope)"
                        >
                        </c-button>
                        <c-button
                            style="padding:4px"
                            circle
                            class="el-icon-minus"
                            size="mini"
                            @click="removeRow(scope)"
                        >
                        </c-button>
                    </template>
                    <template slot-scope="scoped">
                        <c-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            @click="detail1(scoped.$index, scoped.row)"
                            >详情</c-button
                        >
                    </template>
                </el-table-column>
            </c-table>
        </c-col>
        <c-col>
            <el-dialog :visible.sync="dialogVisible" center>
                <c-col>
                    <el-form :model="dialog" label-width="200px">
                        <c-col :span="16" >
                            <el-form-item label="收款人">
                                <c-select v-model="dialog.payee" style="width: 100%">
                                    <el-option
                                        v-for="item in codes.payee"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </c-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="收款人摘要">
                                <c-input v-model="dialog.txtpay" style="width: 100%"/>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="付款人">
                                <c-select v-model="dialog.ptydbt" style="width: 100%">
                                    <el-option
                                        v-for="item in codes.ptydbt"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    >
                                    </el-option>
                                </c-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="付款人摘要">
                                <c-input v-model="dialog.txtdbp" style="width: 100%"/>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <c-col :span="18">
                                <el-form-item label="费用">
                                    <c-select v-model="dialog.cur" style="width: 100%">
                                        <el-option
                                            v-for="item in codes.cur"
                                            :key="item.value"
                                            :labelF="item.label"
                                            :value="item.value"
                                        />
                                    </c-select>
                                </el-form-item>
                            </c-col>
                            <c-col :span="6">
                                <el-form-item label="" label-width="20px">
                                    <c-input v-model="dialog.amt" style="width: 100%"/>
                                </el-form-item>
                            </c-col>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item>
                                <c-checkbox v-model="dialog.forflg">CG00005</c-checkbox>
                            </el-form-item>
                        </c-col>
                    </el-form>
                </c-col>
                <span slot="footer" class="dialog-footer">
                    <c-button type="primary" @click="saveDialog">确 定</c-button>
                    <c-button @click="dialogVisible = false">取 消</c-button>
                </span>
            </el-dialog>
        </c-col>
        <!--=================== Own Commission/Charges:================== -->
        <c-col :span="23" style="margin-left:9px;height:24px;margin-top:25px">
            <el-form-item class="formItemLabel" label="Own Commission/Charges:" label-width="200px"> </el-form-item>
        </c-col>
        <c-col :span="23" style="margin-left:9px">
            <c-table
                style="text-align: center"
                :list="model.setmod.setfeg.setfel"
                :paginationShow="false"
                :border="true"
            >
                <el-table-column label="Role" width="101px">
                    <template #default="scope">
                        <c-select v-model="scope.row.rol">
                            <el-option
                                v-for="item in codes.setfelRol"
                                :key="item.value"
                                :label="item.value"
                                :value="item.value"
                            >
                            <span style="float: left">{{ item.label }}</span>
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Code" prop="feecod" width="101px">
                </el-table-column>
                <el-table-column label="Source" prop="src" width="70px">
                </el-table-column>
                <el-table-column label="Disp" prop="dsp" width="76px">
                    <template #default="scope">
                        <c-select v-model="scope.row.dsp" @change="dispDefault(scope.$index+1)">
                            <el-option
                                v-for="item in codes.setfeldsp"
                                :key="item.value"
                                :label="item.value"
                                :value="item.value"
                            >
                            <span style="float: left">{{ item.label }}</span>
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Units" prop="unt" width="70px">
                </el-table-column>
                <el-table-column
                    label="Long Fee Text"
                    prop="feetxtinf"
                    width="auto"
                >
                </el-table-column>
                <el-table-column label="Currency" prop="cur" width="100px">
                </el-table-column>
                <el-table-column
                    label="Original Amount"
                    prop="ogiamt"
                    width="150px"
                >
                </el-table-column>
                <el-table-column label="Fee Amount" prop="amt" width="150px">
                </el-table-column>
                <el-table-column label="" prop="det" width="80px" fixed="right">
                     <template slot-scope="scope" slot="header">
                        <c-button
                            circle
                            style="padding:4px"
                            class="el-icon-plus"
                            size="mini"
                            @click="addRow(scope)"
                        >
                        </c-button>
                        <c-button
                            style="padding:4px"
                            circle
                            class="el-icon-minus"
                            size="mini"
                            @click="removeRow(scope)"
                        >
                        </c-button>
                    </template>
                    <template slot-scope="scoped">
                        <c-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            @click="detail2(scoped.$index, scoped.row)"
                            >详情</c-button
                        >
                    </template>
                </el-table-column>
            </c-table>
        </c-col>
        <setpan-dialog ref="setpanDialog" :model="model" :idx="index" :codes="codes"/>
        <c-col :span="23" style="margin-left:9px;height:24px;margin-top:25px">
            <el-form-item class="formItemLabel" label="Settlement:" label-width="200px">
            </el-form-item>
        </c-col>
        <c-col :span="23" style="margin-left: 9px">
            <c-table
                style="text-align: center"
                :list="model.setmod.setglg.setgll"
                :paginationShow="false"
                :border="true"
            >
                <el-table-column label="Mod" prop="modflg" width="46px">
                </el-table-column>
                <el-table-column label="Role" prop="rol" width="55px">
                </el-table-column>
                <el-table-column label="in" prop="acccur" width="101px">
                    <template slot-scope="scope">
                        <c-select v-model="scope.row.acccur">
                            <el-option
                                v-for="item in codes.acccur"
                                :key="item.value"
                                :label="item.value"
                                :value="item.value"
                            >
                            <span style="float: left">{{ item.label }}</span>
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column
                    label="Amount Paid"
                    prop="fmtaccamt"
                    width="120px"
                >
                </el-table-column>
                <el-table-column label="Disp." width="101px">
                    <template #default="scope">
                        <c-select v-model="scope.row.dsp">
                            <el-option
                                v-for="item in codes.setglldsp"
                                :key="item.value"
                                :label="item.value"
                                :value="item.value"
                            >
                            <span style="float: left">{{ item.value }}</span>
                            <span style="float: left;margin-left:20px">{{ item.label }}</span>
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="Account" prop="act" width="auto">
                    <template slot-scope="scope">
                        <c-select v-model="scope.row.act">
                            <el-option
                                v-for="item in scope.act"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            >
                            </el-option>
                        </c-select>
                    </template>
                </el-table-column>
                <el-table-column label="C" prop="debcdtflg" width="45px">
                </el-table-column>
                <el-table-column label="Curr." prop="cur" width="55px">
                </el-table-column>
                <el-table-column
                    label="Original Amount"
                    prop="fmtamt"
                    width="150px"
                >
                </el-table-column>
                <el-table-column label="Rate" prop="rat" width="120px">
                </el-table-column>
                <el-table-column label="操作" width="135px" fixed="right"> 
                    <template slot-scope="scoped">
                        <c-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            >Get</c-button
                        >
                        <c-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            @click="handleDetail(scoped.$index, scoped.row)"
                            >详情</c-button
                        >
                    </template>
                </el-table-column>
                <!-- <el-table-column label="" width="80px">
                    <template>
                        <c-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            >详情</c-button
                        >
                    </template> </el-table-column> -->
            </c-table>
        </c-col>

        <!-- <c-col :span="12" style="margin-bottom: 10px;">
            <span v-text="model.setmod.retmsg" data-path=".setmod.retmsg">
            </span>
        </c-col> -->

        <!-- <c-col :span="12" style="margin-bottom: 10px;">
            <span v-text="model.setmod.zmqacclab" data-path=".setmod.zmqacclab">
            </span>
        </c-col> -->

        <!-- <c-col :span="12" style="margin-bottom: 10px;">
            <span
                v-text="model.setmod.setglg.labdspflg"
                data-path=".setmod.setglg.labdspflg"
            >
            </span>
        </c-col> -->
        <template>
            <el-dialog
                ref="detpDialog"
                :visible.sync="detpDialogVisible"
                width="70%"
                center
            >
            <el-form label-width="100px" :model="dialog3">
                <c-row>

                <c-col :span="24" style="height:24px">
                    <el-form-item label="基础信息" class="messageLabel">
                    </el-form-item>
                </c-col>
                <c-col :span="24" style="height: 0px;margin-top:-5px">
                    <el-divider></el-divider>
                </c-col> 
                <c-col :span="24">
                    &nbsp;
                </c-col>
                <c-col :span="12">
                    <el-form-item label="rollab"  >
                        <c-input  v-model="dialog3.rollab" maxlength="3"  placeholder="请输入rollab"></c-input>
                    </el-form-item>
	            </c-col> 
                
                <c-col :span="12">
                    <el-form-item label="role"   >
                        <c-input  v-model="dialog3.rol" maxlength="3"  placeholder="请输入role"></c-input>
                    </el-form-item>
                </c-col>
                <!-- <c-col :span="12">
                    <c-checkbox v-model="dialog3.act3flg">第三方还款</c-checkbox>
                </c-col>
                            
                <c-col :span="12">
                    <c-button size="small" type="primary"  @click="onMtdbutButapy">
                        确定
                    </c-button>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Drag  Drop Sender" prop="setgll.actp.ptsget.sdamod.dadsnd">
                        <c-input  v-model="dialog3.actp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
                    </el-form-item>
                </c-col> -->
                                            
                <c-col :span="12">
                    <el-form-item label="Disposition" prop="setgll.dsp"   >
                        <c-select v-model="dialog3.dsp" style="width:100%" placeholder="请选择Disposition">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="External" prop="setgll.setgrp.act.pts.extkey"  >
                        <c-input  v-model="dialog3.setgrp.act.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="seainf"  >
                        <c-col :span="18">
                            <c-input v-model="dialog3.actp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
                        </c-col>
                        <c-col :span="6" style="text-align: right">
                            <c-button size="small" type="primary" @click="onActpDet">
                                Details
                            </c-button>
                        </c-col>
                    </el-form-item>    
                </c-col>
                                            
                <!-- <c-col :span="12">
                    <el-form-item label="核心业务代号"  >
                        <c-input  v-model="dialog3.acccode" maxlength="4"  placeholder="请输入核心业务代号"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <c-button size="small" type="primary"  @click="onSetgllDetget">
                        Get
                    </c-button>
                </c-col> -->
                                            
                <c-col :span="12">
                    <el-form-item label="账号"  >
                        <c-select v-model="dialog3.act" style="width:100%" placeholder="请选择账号">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <!-- <c-col :span="12">
                    <el-form-item label="Name of Party"  >
                        <c-input  v-model="dialog3.setgrp.act.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
                    </el-form-item>
                </c-col> -->
                <c-col :span="24">
                    <c-col :span="12">
                        <el-form-item label="科目代码"  >
                            <c-select v-model="dialog3.cur" style="width:100%" placeholder="请选择科目代码">
                            </c-select>
                        </el-form-item>
                    </c-col>
                                                
                    <c-col :span="12">
                        <el-form-item label="value date"  >
                            <c-date-picker type="date"  v-model="dialog3.valdat" style="width:100%"  placeholder="请选择value date"></c-date-picker>
                        </el-form-item>
                    </c-col>
                </c-col>                            
                
                            
                <!-- <c-col :span="12">
                    <el-form-item label="Search type"  >
                        <c-select v-model="dialog3.actpriflg" style="width:100%" placeholder="请选择Search type">
                        </c-select>
                    </el-form-item>
                </c-col> -->
                <c-col :span="24">
                    <el-form-item label="原始金额">
                        <c-col :span="8">
                            <c-select v-model="dialog3.acttrmtyp" style="width:100%" placeholder="请选择原始金额">
                            </c-select>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="" label-width="5%">
                                <c-input  v-model="dialog3.fmtamt"  placeholder="请输入原始金额"></c-input>
                            </el-form-item>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="" label-width="5%">
                                <c-select v-model="dialog3.modflg" style="width:100%" placeholder="请选择Modified">
                                </c-select>
                            </el-form-item>
                        </c-col>
                    </el-form-item>
                </c-col>            
                
                <c-col :span="24">
                    <el-form-item label="实际金额">
                        <c-col :span="8">
                            <el-form-item label="" label-width="0">
                                <c-select v-model="dialog3.acccur" style="width:100%" placeholder="请选择Amount handled">
                                </c-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="" label-width="5%">
                                <c-input  v-model="dialog3.fmtaccamt"  placeholder="请输入实际金额"></c-input>
                            </el-form-item>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="" label-width="5%">
                                <c-input  v-model="dialog3.debcdtflg" maxlength="1"  placeholder="请输入Debit/Credit"></c-input>
                            </el-form-item>
                        </c-col>
                    </el-form-item>
                </c-col>

                <!-- ---------------------- -->
                <c-col :span="23" style="height:24px">
                    <el-form-item label="Cross信息" class="messageLabel">
                    </el-form-item>
                </c-col>
                <c-col :span="23" style="height: 0px;margin-top:-5px">
                    <el-divider></el-divider>
                </c-col>
                <c-col :span="24">
                    &nbsp;
                </c-col>

                <c-col :span="24">
                    <el-form-item label="Cross Rate">
                        <c-col :span="6">
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <span>Rate Type</span>
                                </el-form-item>                          
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input v-model="rattyp"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input v-model="dcbrattyp"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input v-model="scbrattyp"></c-input>
                                </el-form-item>
                            </c-col>
                        </c-col>
                        <c-col :span="6">
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <span>Calculate Rate</span>
                                </el-form-item>    
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input  v-model="dialog3.rat"  placeholder="请输入rate used"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input  v-model="dialog3.dcbextrat"  placeholder="请输入Selling Rate"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input  v-model="dialog3.scbextrat"  placeholder="请输入Buying Rate"></c-input>
                                </el-form-item>
                            </c-col>
                        </c-col>
                        <c-col :span="6">
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <span>From Date</span>
                                </el-form-item>  
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    &nbsp;
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input  v-model="dialog3.xrtdatcur"  placeholder="请输入xrtdatcur"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="" label-width="20%">
                                    <c-input  v-model="dialog3.xrtdatacc"  placeholder="请输入xrtdatacc"></c-input>
                                </el-form-item>
                            </c-col>
                        </c-col>
                        <c-col :span="6">
                            <c-col :span="24">
                                <el-form-item label="牌价时间">
                                    <c-input v-model="dialog3.xrttim" placeholder="请输入牌价时间"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="卖价" prop="setgll.midrat">
                                    <c-input  v-model="dialog3.selrat"  placeholder="请输入卖价"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="中间价" prop="setgll.midrat">
                                    <c-input  v-model="dialog3.midrat"  placeholder="请输入中间价"></c-input>
                                </el-form-item>
                            </c-col>
                            <c-col :span="24">
                                <el-form-item label="买价" prop="setgll.midrat">
                                    <c-input  v-model="dialog3.buyrat"  placeholder="请输入买价"></c-input>
                                </el-form-item>
                            </c-col>
                        </c-col>
                    </el-form-item>
                </c-col>

                <!-- <div>
                <c-col :span="12">
                    <el-form-item label="pre rate type" prop="setgll.selrattyp">
                        <c-select v-model="dialog3.selrattyp" style="width:100%" placeholder="请选择pre rate type">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Sel" prop="setgll.preselrat">
                        <c-input  v-model="dialog3.preselrat"  placeholder="请输入Sel"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <span  v-text="dialog3.selpct"   data-path=".setgll.selpct" > </span>
                </c-col>
                                            
                <c-col :span="12">
                    <el-form-item label="Amount handled" prop="setgll.fmtacccpramt">
                        <c-input  v-model="dialog3.fmtacccpramt"  placeholder="请输入Amount handled"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <el-form-item label="Pre rate type" prop="setgll.buyrattyp">
                        <c-select v-model="dialog3.buyrattyp" style="width:100%" placeholder="请选择Pre rate type">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Buy" prop="setgll.prebuyrat">
                        <c-input  v-model="dialog3.prebuyrat"  placeholder="请输入Buy"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <span  v-text="dialog3.buypct"   data-path=".setgll.buypct" > </span>
                </c-col>
                                                                                                
                <c-col :span="12">
                    <el-form-item label="From Date" prop="setgll.xrttim">
                        <c-input  v-model="dialog3.xrttim" maxlength="20"  placeholder="请输入From Date"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <span  v-text="dialog3.ratcurlab"   data-path=".setgll.ratcurlab" > </span>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Codetable of supported rate types  M-iddle, B-uying, S-elling, I-nput" prop="setgll.rattyp">
                        <c-select v-model="dialog3.rattyp" style="width:100%" placeholder="请选择Codetable of supported rate types  M-iddle, B-uying, S-elling, I-nput">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="rate used" prop="setgll.rat">
                        <c-input  v-model="dialog3.rat"  placeholder="请输入rate used"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Selling Rate" prop="setgll.selrat">
                        <c-input  v-model="dialog3.selrat"  placeholder="请输入Selling Rate"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <span  v-text="dialog3.dcbratlab"   data-path=".setgll.dcbratlab" > </span>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Document Cur to Base RATe TYPe" prop="setgll.dcbrattyp">
                        <c-select v-model="dialog3.dcbrattyp" style="width:100%" placeholder="请选择Document Cur to Base RATe TYPe">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Document Cur to Base EXTernal RATe" prop="setgll.dcbextrat">
                        <c-input  v-model="dialog3.dcbextrat"  placeholder="请输入Document Cur to Base EXTernal RATe"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Begin-Date of XRT-Rate of CUR" prop="setgll.xrtdatcur">
                        <c-date-picker type="date"  v-model="dialog3.xrtdatcur" style="width:100%"  placeholder="请选择Begin-Date of XRT-Rate of CUR"></c-date-picker>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="" prop="setgll.xrtgetdcb.sdamod.seainf">
                        <c-input  v-model="dialog3.xrtgetdcb.sdamod.seainf"  placeholder="请输入"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <el-form-item label="Middle Rate" prop="setgll.midrat">
                        <c-input  v-model="dialog3.midrat"  placeholder="请输入Middle Rate"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <span  v-text="dialog3.scbratlab"   data-path=".setgll.scbratlab" > </span>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Settle Cur to Base RATe TYPe" prop="setgll.scbrattyp">
                        <c-select v-model="dialog3.scbrattyp" style="width:100%" placeholder="请选择Settle Cur to Base RATe TYPe">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Settle Cur to Base EXTernal RATe" prop="setgll.scbextrat">
                        <c-input  v-model="dialog3.scbextrat"  placeholder="请输入Settle Cur to Base EXTernal RATe"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Begin-Date of XRT-Rate of ACCCUR" prop="setgll.xrtdatacc">
                        <c-date-picker type="date"  v-model="dialog3.xrtdatacc" style="width:100%"  placeholder="请选择Begin-Date of XRT-Rate of ACCCUR"></c-date-picker>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="" prop="setgll.xrtgetscb.sdamod.seainf">
                        <c-input  v-model="dialog3.xrtgetscb.sdamod.seainf"  placeholder="请输入"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Buying Rate" prop="setgll.buyrat">
                        <c-input  v-model="dialog3.buyrat"  placeholder="请输入Buying Rate"></c-input>
                    </el-form-item>
                </c-col>
                </div> -->

                <!-- ---------------------- -->
                <c-col :span="23" style="height:24px">
                    <el-form-item label="交易信息" class="messageLabel">
                    </el-form-item>
                </c-col>
                <c-col :span="23" style="height: 0px;margin-top:-5px">
                    <el-divider></el-divider>
                </c-col>
                <c-col :span="24">
                    &nbsp;
                </c-col>

                <c-col :span="12">
                    <c-col :span="24">
                        <el-form-item label="交易主体" prop="setgll.trnman">
                            <c-select v-model="dialog3.trnman" style="width:100%" placeholder="请选择交易主体">
                            </c-select>
                        </el-form-item>
                    </c-col>
                    <c-col :span="24">
                        <el-form-item label="TRADE OUT" prop="setgll.trdout">
                            <c-select v-model="dialog3.trdout" style="width:100%" placeholder="请选择TRADE OUT">
                            </c-select>
                        </el-form-item>
                    </c-col>
                                
                    <c-col :span="24">
                        <el-form-item label="TRADE IN" prop="setgll.trdint">
                            <c-select v-model="dialog3.trdint" style="width:100%" placeholder="请选择TRADE IN">
                            </c-select>
                        </el-form-item>
                    </c-col>    
                </c-col>
                
                <c-col :span="12">
                    <c-col :span="24">
                        <el-form-item label="TXT" prop="setgll.txt">
                            <c-input type="textarea" v-model="dialog3.txt" maxlength="100" show-word-limit placeholder="请输入TXT" ></c-input>
                        </el-form-item>
                    </c-col>
                    <c-col :span="24">
                        <el-form-item label="TXT1" prop="setgll.txt1">
                            <c-input type="textarea" v-model="dialog3.txt1" maxlength="100" show-word-limit placeholder="请输入TXT1" ></c-input>
                        </el-form-item>
                    </c-col>
                </c-col>
                
                                                                 
                <!-- <c-col :span="12">
                    <c-checkbox v-model="dialog3.modifyflg">Modify flg</c-checkbox>
                </c-col> -->
                            
                
                                            
                

                <!-- ---------------------- -->
                <c-col :span="23" style="height:24px">
                    <el-form-item label="交易详情" class="messageLabel">
                    </el-form-item>
                </c-col>
                <c-col :span="23" style="height: 0px;margin-top:-5px">
                    <el-divider></el-divider>
                </c-col>
                <c-col :span="24">
                    &nbsp;
                </c-col>              
                                                                
                <c-col :span="12">
                    <el-form-item label="交易性质" >
                        <c-col :span="20">
                            <c-input  v-model="dialog3.trntyp" maxlength="6"  placeholder="请输入交易性质"></c-input>
                        </c-col>
                        <c-col :span="4" style="text-align:right">
                            <c-button size="small" type="primary" icon="el-icon-search" @click="onSetgllCodsel">
                            </c-button>
                        </c-col>
                    </el-form-item>
                </c-col>
    
                <c-col :span="12">
                    <el-form-item label="国别代码" prop="setgll.ctycod">
                        <c-col :span="20">
                            <c-input  v-model="dialog3.ctycod" maxlength="3"  placeholder="请输入国别代码"></c-input>
                        </c-col>
                        <c-col :span="4" style="text-align:right">
                            <c-button size="small" type="primary" icon="el-icon-search" @click="onSetgllCtysel">
                            </c-button>
                        </c-col>
                    </el-form-item>
                </c-col>
                <!-- <c-col :span="12">
                    <el-form-item label="Which MT to beneficiary institution" prop="setgll.sftmt">
                        <c-select v-model="dialog3.sftmt" style="width:100%" placeholder="请选择Which MT to beneficiary institution">
                        </c-select>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="Direct payment one message" prop="setgll.dirindflg">
                        <c-select v-model="dialog3.dirindflg" style="width:100%" placeholder="请选择Direct payment one message">
                        </c-select>
                    </el-form-item>
                </c-col> -->
                                            
                                            
                <c-col :span="12">
                    <el-form-item label="对方名称" prop="setgll.oppnam">
                        <c-input  v-model="dialog3.oppnam" maxlength="100"  placeholder="请输入对方名称"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="国内地区代码" prop="setgll.discod">
                        <c-input  v-model="dialog3.discod" maxlength="6"  placeholder="请输入国内地区代码"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <el-form-item label="对方账号" prop="setgll.oppacc">
                        <c-input  v-model="dialog3.oppacc" maxlength="35"  placeholder="请输入对方账号"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <c-col :span="12">
                    <el-form-item label="虚拟号账号" prop="setgll.xzhacc">
                        <c-input  v-model="dialog3.xzhacc" maxlength="40"  placeholder="请输入虚拟号账号"></c-input>
                    </el-form-item>
                </c-col>
                                            
                <!-- <c-col :span="12">
                    <c-button size="small" type="primary"  @click="onMtdbutButcan">
                        取消
                    </c-button>
                </c-col> -->
                            
                <c-col :span="12">
                    <el-form-item label="对方银行代码" prop="setgll.oppbnk">
                        <c-input  v-model="dialog3.oppbnk" maxlength="14"  placeholder="请输入对方银行代码"></c-input>
                    </el-form-item>
                </c-col>
                            
                <c-col :span="12">
                    <el-form-item label="虚拟号名称" prop="setgll.xzhnam">
                        <c-input  v-model="dialog3.xzhnam" maxlength="50"  placeholder="请输入虚拟号名称"></c-input>
                    </el-form-item>
                </c-col>
                  </c-row>
            </el-form>
            </el-dialog>
        </template>

    </c-row>
</template>
<script>
// import Event from "~/model/Ditopn/Event";
import CommonProcess from "~/mixin/CommonProcess";
import SetpanDialog from "./SetpanDialog.vue";
import Api from "~/service/Api"
import Utils from "~/utils/index"

export default {
    inject: ['root'],
    components: { SetpanDialog },
    props: ["model", "codes"],
    mixins: [CommonProcess],
    data() {
        return {
            dialogVisible: false,
            dialog: {
                payee: "",
                ptydbt: "",
                txtpay: "",
                txtdbt: "",
                CG00005: "",
            },
            dialog2: {
                feetxtinf:"",
                feetxt:"",
            },
            index: 0,
            detpDialogVisible : false,
            rattyp:'',
            dcbrattyp:'',
            scbrattyp:'',
            dialog3:{
                setgrp:{
                    act:{
                        pts:{

                        }
                    }
                },
                actp:{
                    ptsget:{
                        sdamod:{

                        }
                    }
                },
            },
        };
    },
    methods: {
        //第一个表格
        addRow() {
            let newRow = { ...dialog };
            this.model.setmod.setfog.setfol.push(newRow);
        },
        removeRow() {
            this.model.setmod.setfog.setfol.pop();
        },
        saveDialog() {
            this.dialogVisible = false;
            this.model.setmod.setfog.setfol[this.index] = this.dialog;
        },
        // 第二个表格
        detail1(index, row) {
            this.executeDefault("setfel/det").then(res=>{
                this.dialogVisible = true;
                this.dialog = row;
                this.index = index;
            })
            
        },
        dispDefault(index){
            this.executeDefault(`setmod.setfeg.setfel(${index}).mac`).then(res=>{
                Utils.copyValueFromVO(this.model, res.data)
            })
            
        },
        // 第二个表格
        detail2(index, row) {
            const that = this;
            const rule = "setmod.setfeg.setfel("+(index+1)+").det";
            that.executeRule(rule).then(res=>{
                that.$refs.setpanDialog.visiable = true;
                that.$refs.setpanDialog.formData = Object.assign({}, that.model.setmod.setfeg.setfel[index]);
                that.index = index;
                that.dialog2 = row
            })
        },

        // 第三个表格
        async handleDetail(index, row) {
            const that = this;
            const rule = "setmod.setglg.setgll("+(index+1)+").det";
            let rtnmsg = await this.executeRule(rule)
            if (rtnmsg.respCode == SUCCESS) {
                that.$refs.detpDialog.visiable = true;
                this.detpDialogVisible = true;
                that.dialog3 = Object.assign({}, that.model.setmod.setglg.setgll[index]);
                that.index = index;
                that.rattyp = that.strCalCode(that.dialog3.rattyp, that.codes.ratetype);
                that.dcbrattyp = that.strCalCode(that.dialog3.dcbrattyp, that.codes.ratetype);
                that.scbrattyp = that.strCalCode(that.dialog3.scbrattyp, that.codes.ratetype);
            }
        },
        strCalCode(str, code){
            var result = '';
            for(let i = 0; i < code.length; i++){
                if(code[i].value === str){
                    result = code[i].label;
                    continue;
                }
            }
            if(result === ''){
                return str;
            }else{
                return result;
            }
        },
        onMtdbutButapy(){

        },
        onActpDet(){

        },
        onSetgllCodsel(){

        },
        onMtdbutButcan(){

        },
        onSetgllCtysel(){

        },
        onSetgllDetget(){

        },
        async onSetmodDet() {
            let rtnmsg = await this.executeRule("setmod.det")
            if (rtnmsg.respCode == SUCCESS) {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        },
    },
    created: function () {},
};
</script>
<style scoped>
.el-col >>> .el-divider--horizontal {
    margin-top: 10px;
}
.formItemLabel >>> .el-form-item__label{
    text-align: left;
    font-weight:bold;
}
.messageLabel >>> .el-form-item__label{
    text-align: left;
    font-weight:bold;
    font-size: 12px;
}
</style>
