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

      <c-col :span="24">
        <c-col :span="20">
          <el-form-item
            label="单据参考号"
            prop="bfdgrp.rec.ownref"
            style="width: 100%"
          >
            <c-input
              v-model="model.bfdgrp.rec.ownref"
              maxlength="16"
              placeholder="请输入单据参考号"
              style="width: 95%"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <!-- <c-col :span="1" style="text-align: right"> -->
        <c-col :span="1">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 10px 0 0; padding: 0 12px"
            size="small"
            type="primary"
            @click="onSeainf"
          >
            <span
              style="font-size: 15px; font-family: '宋体'; font-weight: bold"
              >i</span
            >
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <c-col :span="2" :offset="1" style="text-align: right">
          <!-- <el-form-item label="" label-width="5px"> -->
          <c-button
            style="margin: 0 0"
            size="small"
            type="primary"
            :disabled="this.flag"
            @click="onDetpButgetref"
          >
            获取
          </c-button>
          <!-- </el-form-item> -->
        </c-col>
        <!-- </c-col> -->
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="单据金额" prop="bfdgrp.cbs.max.cur">
            <c-input
              v-model="model.bfdgrp.cbs.max.cur"
              maxlength="3"
              placeholder="请输入单据金额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="bfdgrp.cbs.max.amt">
            <c-input
              v-model="model.bfdgrp.cbs.max.amt"
              placeholder="请输入Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="单据余额" prop="bfdgrp.cbs.opn1.cur">
            <c-input
              v-model="model.bfdgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="请输入单据余额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="bfdgrp.cbs.opn1.amt">
            <c-input
              v-model="model.bfdgrp.cbs.opn1.amt"
              placeholder="请输入Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="单据类型" prop="bfdgrp.rec.doctypcod">
          <c-select
            v-model="model.bfdgrp.rec.doctypcod"
            style="width: 100%"
            placeholder="请输入单据类型"
            disabled
          >
            <el-option
              v-for="item in codes.doctypcod"
              :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="远期单据到期日" prop="bfdgrp.rec.matdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.matdat"
            style="width: 100%"
            placeholder="请选择远期单据到期日"
            value-format="yyyy-MM-dd"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="到单日期" prop="bfdgrp.rec.rcvdat">
            <c-date-picker
              type="date"
              v-model="model.bfdgrp.rec.rcvdat"
              style="width: 100%"
              placeholder="请选择到单日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="提示日期" prop="bfdgrp.rec.predat">
            <c-date-picker
              type="date"
              v-model="model.bfdgrp.rec.predat"
              style="width: 100%"
              placeholder="请选择提示日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="单据状态" prop="bfdgrp.rec.docsta">
          <c-select
            v-model="model.bfdgrp.rec.docsta"
            style="width: 100%"
            placeholder="请输入单据状态"
            disabled
          >
            <el-option
              v-for="item in codes.docsta"
              :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">
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="信用证余额" prop="dedgrp.cbs.opn1.cur">
            <c-input
              v-model="model.dedgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="请输入信用证余额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" label-width="5px" prop="dedgrp.cbs.opn1.amt">
            <c-input
              v-model="model.dedgrp.cbs.opn1.amt"
              placeholder="请输入Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="摘要" prop="bfdgrp.rec.nam">
          <c-input
            v-model="model.bfdgrp.rec.nam"
            maxlength="40"
            placeholder="请输入摘要"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '交单人',
            grp: 'bfdgrp',
            rol: 'prb',
          }"
          :disabled="true"
        ></c-ptsmsg>
      </c-col>
      <!-- <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '开证行',
            grp: 'bfdgrp',
            rol: 'iss',
          }"
          :disabled="true"
        ></c-ptsmsg>
      </c-col> -->
      <c-col :span="24">
        <el-form-item label="开证行编号" prop="dedgrp.rec.kzref">
          <c-input
            v-model="model.dedgrp.rec.kzref"
            maxlength="16"
            placeholder="'请输入开证行编号'"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="开证行名称" prop="bfdgrp.iss.pts.nam">
          <c-input
            v-model="model.bfdgrp.iss.pts.nam"
            maxlength="40"
            placeholder="'请输入开证行名称'"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-ptsmsg
          :model="model"
          :argadr="{
            title: '申请人',
            grp: 'bfdgrp',
            rol: 'apl',
          }"
          :disabled="true"
        ></c-ptsmsg>
      </c-col>
    </c-col>
    <c-col :span="24">
      <el-form-item style="margin-left: 0px">
        <el-divider />
      </el-form-item>
    </c-col>

    <!-- next part -->
    <c-col :span="24" style="height: 24px; margin-top: -10px">
      <el-form-item :label="model.bftp.docgrdm.docdsclab" class="messageLabel">
        <c-button style="float: right" @click="addTableValue" type="primary"
          >新增单据</c-button
        >
      </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>
    <c-col :span="24" style="margin-bottom: 30px">
      <el-form-item label="" prop="bftp.docgrdm.docgrd" style="margin-left:-150px;">
        <c-table
        height="200px"
        style="text-align: center"
        :list="this.model.bftp.docgrdm.docgrd || []"
        :paginationShow="false"
        :border="true"
      >
        <el-table-column label="1st" width="auto">
          <template slot-scope="scope">
            <c-input v-model="scope.row.cmail1"
        @change="prsdoc"></c-input>
          </template>
        </el-table-column>
        <el-table-column label="2nd" width="auto">
          <template slot-scope="scope">
            <c-input v-model="scope.row.cmail2" @change="prsdoc"></c-input>
          </template>
        </el-table-column>
        <el-table-column label="Document" prop="docnam" width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.docnam}} -->
            <c-select
              style="width: 100%"
              placeholder="请选择"
              v-model="scope.row.docnam"
            >
              <el-option
                v-for="item in codeTable"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="170px" fixed="right">
          <template slot-scope="scope">
            <c-button @click="deleteTable(scope.$index)" type="primary"
              >删除</c-button
            >
          </template>
        </el-table-column>
      </c-table>
      </el-form-item>
    </c-col>

    <c-col :span="24">
      <c-col :span="12">
        <el-form-item label="收单日期" prop="bfdgrp.rec.rcvdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.rcvdat"
            style="width: 100%"
            placeholder="请选择收单日期"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item label="装运日期" prop="bfdgrp.rec.shpdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.shpdat"
            style="width: 100%"
            placeholder="请选择装运日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-col :span="12">
        <el-form-item label="寄单日期" prop="bfdgrp.rec.predat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.predat"
            style="width: 100%"
            placeholder="请选择代付日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item label="到期日期" prop="bfdgrp.rec.matdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.matdat"
            style="width: 100%"
            placeholder="请选择到期日期"
            :disabled="model.bfdgrp.rec.matdat!=''||model.bfdgrp.rec.doctypcod === 'P'"
          ></c-date-picker>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- left -->
    <c-col :span="12">
      <c-col :span="24">
        <el-form-item label="付款人" prop="bfdgrp.rec.payrol">
          <c-select
            v-model="model.bfdgrp.rec.payrol"
            style="width: 100%"
            placeholder="请选择付款人"
            disabled
          >
            <el-option
              v-for="item in codes.payrol"
              :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="BIC" prop="bfdgrp.oth.pts.extkey">
          <c-input
            v-model="model.bfdgrp.oth.pts.extkey"
            maxlength="16"
            placeholder="请输入External Key of Address"
            @keyup.enter.native="showGridPromptDialog('bfdgrp.oth.pts.extkey')"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-ptapdome
        :disabledBankno="true"
        :disabledJigomc="true"
        :disabledDizhii="true"
        :model="model"
        :argadr="{
          title: '',
          rol: 'oth',
          grp: 'bfdgrp',
        }"
      ></c-ptapdome>
    </c-col>

    <!-- right -->
    <c-col :span="12">
      <c-col :span="24">
        <el-form-item label="交单人" prop="bfdgrp.rec.docprbrol">
          <c-select
            v-model="model.bfdgrp.rec.docprbrol"
            style="width: 100%"
            placeholder="请选择交单人"
            disabled
          >
            <el-option
              v-for="item in codes.docprbrol"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '',
            grp: 'bfdgrp',
            rol: 'prb',
          }"
          :noRef="true"
          :disabled="true"
          :isAdrblk="false"
          @onSeainf="onSeainf"
          @onAplpDet="onBenpDet"
        >
        </c-ptap>
      </c-col>
    </c-col>

    <c-col :span="20">
      <el-form-item label="远期单据到期时间" prop="bfdgrp.blk.matper">
        <c-input
          type="textarea"
          v-model="model.bfdgrp.blk.matper"
          maxlength="65"
          show-word-limit
          placeholder="请输入远期单据到期时间"
          :disabled="model.bfdgrp.blk.matper!=''||model.bfdgrp.rec.doctypcod === 'P'"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="3" style="float: right">
      <c-checkbox v-model="model.ameadrflg" disabled
        >Ammendment Ben. Address</c-checkbox
      >
    </c-col>

    <!-- <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="bftp.dedget.sdamod.dadsnd">
            <c-input  v-model="model.bftp.dedget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="参考号" prop="dedgrp.rec.ownref">
            <c-input  v-model="model.dedgrp.rec.ownref" maxlength="16"  placeholder="请输入参考号"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="bftp.dedget.sdamod.seainf">
            <c-input  v-model="model.bftp.dedget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Currency" prop="dedgrp.cbs.opn1.cur">
            <c-input  v-model="model.dedgrp.cbs.opn1.cur" maxlength="3"  placeholder="请输入Currency"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Balance" prop="dedgrp.cbs.opn1.amt">
            <c-input  v-model="model.dedgrp.cbs.opn1.amt"  placeholder="请输入Balance"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="bftp.recget.sdamod.dadsnd">
            <c-input  v-model="model.bftp.recget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据参考号" prop="bfdgrp.rec.ownref">
            <c-input  v-model="model.bfdgrp.rec.ownref" maxlength="16"  placeholder="请输入单据参考号"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="bftp.recget.sdamod.seainf">
            <c-input  v-model="model.bftp.recget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Externally Displayed Name to Identify the Contract" prop="bfdgrp.rec.nam">
            <c-input  v-model="model.bfdgrp.rec.nam" maxlength="40"  placeholder="请输入Externally Displayed Name to Identify the Contract"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据金额" prop="bfdgrp.cbs.max.cur">
            <c-select v-model="model.bfdgrp.cbs.max.cur" style="width:100%" placeholder="请选择单据金额">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="单据金额" prop="bfdgrp.cbs.max.amt">
            <c-input  v-model="model.bfdgrp.cbs.max.amt"  placeholder="请输入单据金额"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="交单人" prop="bfdgrp.prb.pts.ref">
            <c-input  v-model="model.bfdgrp.prb.pts.ref" maxlength="16"  placeholder="请输入交单人"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据余额" prop="bfdgrp.cbs.opn1.cur">
            <c-input  v-model="model.bfdgrp.cbs.opn1.cur" maxlength="3"  placeholder="请输入单据余额"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Balance" prop="bfdgrp.cbs.opn1.amt">
            <c-input  v-model="model.bfdgrp.cbs.opn1.amt"  placeholder="请输入Balance"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Name of Party" prop="bfdgrp.prb.pts.nam">
            <c-input  v-model="model.bfdgrp.prb.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="信用证编号" prop="dedgrp.rec.kzref">
            <c-input  v-model="model.dedgrp.rec.kzref" maxlength="35"  placeholder="请输入信用证编号"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="开证行" prop="bfdgrp.iss.pts.ref">
            <c-input  v-model="model.bfdgrp.iss.pts.ref" maxlength="16"  placeholder="请输入开证行"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据类型" prop="bfdgrp.rec.doctypcod">
            <c-select v-model="model.bfdgrp.rec.doctypcod" style="width:100%" placeholder="请选择单据类型">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="远期单据到期日" prop="bfdgrp.iss.pts.nam">
            <c-input  v-model="model.bfdgrp.iss.pts.nam" maxlength="40"  placeholder="请输入远期单据到期日"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="到期日" prop="bfdgrp.rec.matdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.matdat" style="width:100%"  placeholder="请选择到期日"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="收单日期" prop="bfdgrp.rec.rcvdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.rcvdat" style="width:100%"  placeholder="请选择收单日期"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="寄单日期" prop="bfdgrp.rec.predat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.predat" style="width:100%"  placeholder="请选择寄单日期"></c-date-picker>
        </el-form-item>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="申请人" prop="bfdgrp.apl.pts.ref">
            <c-input  v-model="model.bfdgrp.apl.pts.ref" maxlength="16"  placeholder="请输入申请人"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="单据状态" prop="bfdgrp.rec.docsta">
            <c-input  v-model="model.bfdgrp.rec.docsta" maxlength="40"  placeholder="请输入单据状态"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Name of Party" prop="bfdgrp.apl.pts.nam">
            <c-input  v-model="model.bfdgrp.apl.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Payer" prop="bfdgrp.rec.payrol">
            <c-select v-model="model.bfdgrp.rec.payrol" style="width:100%" placeholder="请选择Payer">
              </c-select>
        </el-form-item>
       </c-col>
                                   
	<c-col :span="12">
	    <span  v-text="model.bftp.docgrdm.docdsclab"   data-path=".bftp.docgrdm.docdsclab" > </span>
	</c-col>
                  
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="bfdgrp.oth.pts.extkey">
            <c-input  v-model="model.bfdgrp.oth.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="Number of bank" prop="bfdgrp.oth.pts.bankno">
            <c-input  v-model="model.bfdgrp.oth.pts.bankno" maxlength="20"  placeholder="请输入Number of bank"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="联行名称  电证用" prop="bfdgrp.oth.pts.jigomc">
            <c-input type="textarea" v-model="model.bfdgrp.oth.pts.jigomc" maxlength="35" show-word-limit placeholder="请输入联行名称  电证用" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="地址  电证用" prop="bfdgrp.oth.pts.dizhii">
            <c-input type="textarea" v-model="model.bfdgrp.oth.pts.dizhii" maxlength="35" show-word-limit placeholder="请输入地址  电证用" ></c-input>
        </el-form-item>
        </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Presented by" prop="bfdgrp.rec.docprbrol">
            <c-select v-model="model.bfdgrp.rec.docprbrol" style="width:100%" placeholder="请选择Presented by">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="bftp.prbp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.bftp.prbp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="bfdgrp.prb.pts.extkey">
            <c-input  v-model="model.bfdgrp.prb.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="bftp.prbp.ptsget.sdamod.seainf">
            <c-input  v-model="model.bftp.prbp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onPrbpDet">
            Details
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="名称" prop="bfdgrp.prb.namelc">
            <c-input type="textarea" v-model="model.bfdgrp.prb.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Address Block" prop="bfdgrp.prb.pts.adrblk">
            <c-input type="textarea" v-model="model.bfdgrp.prb.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Chinese address" prop="bfdgrp.prb.dbfadrblkcn">
            <c-input type="textarea" v-model="model.bfdgrp.prb.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="收单日期" prop="bfdgrp.rec.rcvdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.rcvdat" style="width:100%"  placeholder="请选择收单日期"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="装运日期" prop="bfdgrp.rec.shpdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.shpdat" style="width:100%"  placeholder="请选择装运日期"></c-date-picker>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="地址" prop="bfdgrp.prb.adrelc">
            <c-input type="textarea" v-model="model.bfdgrp.prb.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="寄单日期" prop="bfdgrp.rec.predat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.predat" style="width:100%"  placeholder="请选择寄单日期"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="到期日" prop="bfdgrp.rec.matdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.matdat" style="width:100%"  placeholder="请选择到期日"></c-date-picker>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="远期单据到期时间" prop="bfdgrp.blk.matper">
            <c-input type="textarea" v-model="model.bfdgrp.blk.matper" maxlength="65" show-word-limit placeholder="请输入远期单据到期时间" ></c-input>
        </el-form-item>
        </c-col>
                                   
       <c-col :span="12">
	    <c-checkbox v-model="model.ameadrflg">Ammendment Ben. or Iss. Address</c-checkbox>
       </c-col> -->
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Bftsnd/Event";
import Ptsmsg from "~/views/Public/Ptsmsg";
import PtapDome from "~/views/Public/PtapDome";
import Ptap from "~/views/Public/Ptap";
import Utils from "~/utils";

export default {
  components: { "c-ptsmsg": Ptsmsg, "c-ptapdome": PtapDome, "c-ptap": Ptap },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      TableValue: [
        {
          id: 0,
          cmail1: "",
          cmail2: "",
          docnam: "",
          serialNum: "",
          tableName: "",
          tcddoc: "",
        },
      ],
      newValue: {
        id: 0,
        cmail1: "",
        cmail2: "",
        docnam: "",
        serialNum: "",
        tableName: "",
        tcddoc: "",
      },
      codeTable: [
        { label: "增值税发票", value: "1" },
        { label: "发票", value: "2" },
        { label: "装箱单", value: "3" },
        { label: "空运单", value: "4" },
        { label: "海运提单", value: "5" },
        { label: "铁路运单", value: "6" },
        { label: "货物收据", value: "7" },
        { label: "邮政收据", value: "8" },
      ],
    };
  },
  computed: {
    flag() {
      return this.model.mtabut.coninf.usr.extkey == "";
    },
  },
  methods: {
    ...Event,
    addTableValue(index) {
      var newTableValue = Object.assign({}, this.newValue);
      const serial=Utils.generateUUID();
      newTableValue.serialNum=serial;
      // this.model.bftp.docgrdm.docgrd.push(newTableValue);
      this.model.bftp.docgrdm.docgrd.splice(index-1,0,newTableValue);
    },
    deleteTable(index) {
      this.model.bftp.docgrdm.docgrd.splice(index, 1);
      // for (let i = 0; i < this.TableValue.length; i++) {
      //   if (this.TableValue[i].id == row.id) {
      //     this.TableValue.splice(i, 1);
      //     break;
      //   }
      // }
    },//表格输入传入数据库
    async prsdoc() {
        let rtnmsg = await this.executeDefault("bfdgrp.blk.prsdoc")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.updateModel(rtnmsg.data);

        } else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },

  },
  created: function () {},
};
</script>
<style>
.messageLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
  font-size: 12px;
}
</style>
