<template>
  <div class="eibs-tab">
    <!-- ====================左边======================= -->
    <c-col :span="11">
      <c-col :span="24">
        <el-form-item label="Reference" prop="bcdgrp.rec.ownref">
          <c-fullbox>
            <c-input
              v-model="model.bcdgrp.rec.ownref"
              maxlength="16"
              placeholder="Reference"
              disabled
            ></c-input>
            <template slot="footer">
              <c-button
                size="small"
                style="margin-left: 10px; padding: 0 10px"
                type="primary"
              >
                <span style="font-family: '宋体'; font-weight: bold">i</span>
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="18">
        <el-form-item label="Responsible User" prop="bctp.usr.extkey">
          <c-fullbox>
            <c-input
              v-model="model.bctp.usr.extkey"
              style="width: 100%"
              maxlength="8"
              disabled
              placeholder="请输入Responsible User"
            ></c-input>
            <template slot="footer">
              <c-button
                size="small"
                style="margin-left: 10px; padding: 0 10px"
                type="primary"
              >
                <span style="font-family: '宋体'; font-weight: bold">i</span>
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="6">
       <c-checkbox
       v-model="model.bcdgrp.rec.dftgarflg"
       style="margin-left:5px"
       >Draft to be Guaranteed</c-checkbox> 
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Document Amount" prop="bcdgrp.cbs.max.cur">
            <c-select
              v-model="model.bcdgrp.cbs.max.cur"
              style="width: 100%"
              placeholder="CUR"
              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="12">
          <el-form-item
            label=""
            style="text-align: left"
            label-width="20px"
            prop="bcdgrp.cbs.max.amt"
          >
            <c-input-currency
            disabled
              v-model="model.bcdgrp.cbs.max.amt"
              placeholder="请输入Document Amount"
            ></c-input-currency>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Open Amount" prop="bcdgrp.cbs.opn1.cur">
            <c-select
              disabled
              v-model="model.bcdgrp.cbs.opn1.cur"
              style="width: 100%"
              placeholder="CUR"
            >
              <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="12">
          <el-form-item
            label=""
            style="text-align: left"
            label-width="20px"
            prop="bcdgrp.cbs.opn1.amt"
          >
            <c-input-currency
              disabled
              v-model="model.bcdgrp.cbs.opn1.amt"
              placeholder="请输入Open Amount"
            ></c-input-currency>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Docs received on" prop="bcdgrp.rec.rcvdat">
          <c-date-picker
          disabled
            type="date"
            v-model="model.bcdgrp.rec.rcvdat"
            style="width: 100%"
            placeholder="Docs received on"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Date of Remittance Lt." prop="bcdgrp.rec.predat">
          <c-date-picker
          disabled
            type="date"
            v-model="model.bcdgrp.rec.predat"
            style="width: 100%"
            placeholder="Date of Remittance Lt."
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Advised on" prop="bcdgrp.rec.advdat">
          <c-date-picker
          disabled
            type="date"
            v-model="model.bcdgrp.rec.advdat"
            style="width: 100%"
            placeholder="Advised on"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Collection Condition" prop="bcdgrp.rec.doctypcod">
          <c-select
          disabled
          :code="codes.doctypcod"
            v-model="model.bcdgrp.rec.doctypcod"
            style="width: 100%"
            placeholder="请选择Collection Condition"
          >
            <el-option
              v-for="item in codes.doctyp"
              :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="Maturity Date" prop="bcdgrp.rec.matdat">
          <c-date-picker
          disabled
            type="date"
            v-model="model.bcdgrp.rec.matdat"
            style="width: 100%"
            placeholder="Maturity Date"
          ></c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="发票类型" prop="bcdgrp.rec.invtyp">
          <c-select
            :code="codes.invtyp"
            v-model="model.bcdgrp.rec.invtyp"
            style="width: 100%"
            placeholder="请选择发票类型"
          >
            <el-option
              v-for="item in codes.invtyp"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="Tenor Specification" prop="bcdgrp.rec.matpercnt">
            <c-input
            disabled
              v-model="model.bcdgrp.rec.matpercnt"
              placeholder="Tenor Specification"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="12">
          <el-form-item
            label=""
            
            label-width="20px"
            prop="bcdgrp.rec.matpertyp"
          >
            <c-select
            disabled
              v-model="model.bcdgrp.rec.matpertyp"
              style="width: 100%"
              placeholder="Days/Months or Years for Maturity Period"
            >
              <el-option
                v-for="item in codes.matper"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Tenor Starting from" prop="bcdgrp.rec.matperbeg">
          <c-select
          disabled
            v-model="model.bcdgrp.rec.matperbeg"
            style="width: 100%"
            placeholder="请选择Tenor Starting from"
          >
            <el-option
              v-for="item in codes.matbeg"
              :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="Maturity Text" prop="bcdgrp.blk.bcgdet">
          <c-input
            type="textarea"
            disabled
            :rows="4"
            v-model="model.bcdgrp.blk.bcgdet"
            maxlength="45"
            show-word-limit
            placeholder="请输入Maturity Text"
          ></c-input>
        </el-form-item>
      </c-col>
      <c-col :span="24">
         <c-checkbox 
         disabled
         style="margin: 0px 0 10px 150px;"
         v-model="model.bcdgrp.blk.bcgdetflg"
            >Maturit Text modified</c-checkbox
          >
        <!-- <c-col :span="11">
          <c-checkbox v-model="model.bcdgrp.rec.resflg"
            >Reserved Contract</c-checkbox
          >
        </c-col>
        <c-col :span="11">
          <c-checkbox v-model="model.bcdgrp.rec.dftgarflg"
            >Draft to be Guaranteed</c-checkbox
          >
        </c-col>
      </c-col>
      <c-col :span="24">
        <c-checkbox v-model="model.bcdgrp.rec.oridre"
          >Send Original Documents to Drawee</c-checkbox
        >
      </c-col>
      <c-col :span="24">
        <c-checkbox v-model="model.bcdgrp.blk.bcgdetflg"
          >BC Tenor Details modified</c-checkbox
        > -->
      </c-col>
      <c-docpre 
      :model="model" 
      :argadr="{
        path:'bcdgrp.blk.docpre',
        grp: 'bctp',
        code:'docpre'
      }"></c-docpre>
    </c-col>
    <!-- ====================右边======================= -->
    <c-col :span="11" :offset="1">
      <c-col :span="24">
        <el-form-item label="Name" prop="bcdgrp.rec.nam">
          <c-input
            v-model="model.bcdgrp.rec.nam"
            maxlength="40"
            placeholder="Name"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
      <c-ptap
        :model="model"
        :argadr="{ title: 'Drawee ', grp: 'bcdgrp', rol: 'dre' }"
        :disabled="true"
        
      >
      </c-ptap>

      <c-ptap
        :model="model"
        :argadr="{ title: 'Remitting Bank ', grp: 'bcdgrp', rol: 'rmi' }"
        :disabled="true"
        
      >
      </c-ptap>

      <c-ptap
        :model="model"
        :argadr="{ title: 'Drawer ', grp: 'bcdgrp', rol: 'drr' }"
        :disabled="true"
        
      >
      </c-ptap>

      <c-col :span="24">
        <el-form-item label="Country or region Code" prop="bcdgrp.rec.stacty">
          <c-select
            v-model="model.bcdgrp.rec.stacty"
            style="width: 100%"
            placeholder="请选择Country or region Code"
          >
            <el-option
              v-for="item in codes.ctytxt"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>

      <!--<c-col :span="24">
                <span v-text="model.bctp.sblx" data-path=".bctp.sblx"> </span>
            </c-col>-->

      <!--<c-col :span="24">
                <span v-text="model.bctp.acttyplab" data-path=".bctp.acttyplab"> </span>
            </c-col>-->

      <!-- <c-col :span="24">
        <el-form-item label="款项去向" prop="bctp.acttyp">
          <c-select
            v-model="model.bctp.acttyp"
            style="width: 100%"
            placeholder="款项去向"
          >
            <el-option
              v-for="item in acttyp"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </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/Bctame/Event";
import Ptap from "~/views/Public/Ptap";
import Docpre from "~/views/Public/Docpre";

export default {
  components: { 
    "c-ptap": Ptap,
    "c-docpre": Docpre,
    },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      acttyp: [
        { value: "(JW)", label: "境外" },
        { value: "(JN)", label: "境内非居民" },
      ],
      ptsaddg: {
        columns: [
          {
            title: "1st",
            width: "40px",
            dataIndex: "cmail1",
            show: "input",
          },
          {
            title: "2nd",
            width: "40px",
            dataIndex: "cmail2",
            show: "input",
          },
          {
            title: "Documnet",
            width: "120px",
            dataIndex: "document",
            show: "select",
          },
        ],
        urls: "bctp.docgrdm.docgrd",
      },
    };
  },
  methods: {
    ...Event,
  },
  created: function () {},
};
</script>
<style></style>
