<template>
  <div class="eibs">
    <c-col :span="24">
      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">31C</c-col>
        <c-col :span="23" class="fieldName">
          <c-col :span="14">
            <el-form-item label="Requested Date of Issue" label-width="200px" prop="oldgidgrp.rec.opndatc">
              <c-date-picker placeholder="请选择请求开证日期" disabled style="width:100%" type="date" v-model="model.oldgidgrp.rec.opndatc">
              </c-date-picker>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">22D</c-col>
        <c-col :span="23" class="fieldName">
          <c-col :span="14">
            <el-form-item label="Form of Undertaking" label-width="200px" prop="oldgidgrp.rec.legfrmc">
              <c-select :filterKey="['DGAR','STBY']" dbCode="legfrm" placeholder="请选择保函形式" style="width:100%" v-model="model.oldgidgrp.rec.legfrmc" disabled>
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">40C</c-col>
        <c-col :span="23">
          <c-col :span="24">
            <c-col :span="14" class="fieldName">
              <el-form-item :label="$t('gitopn.主保函适用规则')" label-width="200px" prop="oldgidgrp.blk.apprulc">
                <c-select :filterKey="['URDG','URCG','NONE','OTHR','ISPR']" dbCode="apprul" isShowKeyAndLabel placeholder="请选择主保函适用规则" style="width:100%" v-model="model.oldgidgrp.blk.apprulc" disabled>
                </c-select>
              </el-form-item>
            </c-col>
          </c-col>
          <c-col :span="24">
            <c-col :span="14" class="fieldName">
              <el-form-item label-width="200px" prop="oldgidgrp.blk.apprultxtc">
                <c-input disabled maxlength="35" style="width:100%" placeholder="请输入主保函适用规则" v-model="model.oldgidgrp.blk.apprultxtc"></c-input>
              </el-form-item>
            </c-col>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">22K</c-col>
        <c-col :span="23">
          <c-col :span="24">
            <c-col :span="14" class="fieldName">
              <el-form-item label="Type of Undertaking" label-width="200px" prop="oldgidgrp.rec.gartypc">
                <c-select :filterKey="['APAY','PAYM','PERF','TEND','WARR']" dbCode="gartyc" placeholder="请选择保函类型 " style="width:100%" v-model="model.oldgidgrp.rec.gartypc" disabled>
                </c-select>
              </el-form-item>
            </c-col>
          </c-col>
          <c-col :span="24">
            <c-col :span="14" class="fieldName" v-if="model.oldgidgrp.rec.gartypc == 'OTHER'">
              <el-form-item label-width="200px" prop="oldgidgrp.rec.gartyptxtc">
                <c-input disabled placeholder="请输入保函类型 " v-model="model.oldgidgrp.blk.gartyptxtc">
                </c-input>
              </el-form-item>
            </c-col>
          </c-col>
          <c-col :span="24">
            <c-col :span="14" class="fieldName">
              <el-form-item :label="$t('gitopn.保函文本格式')" prop="oldgidgrp.rec.gtxinrc" label-width="200px">
                <c-select v-model="model.oldgidgrp.rec.gtxinrc" placeholder="请选择保函文本格式" style="width:100%" disabled>
                  <el-option v-for="item in model.atxinrcList" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">23B</c-col>
        <c-col :span="23" class="fieldName">
          <c-col :span="14">
            <el-form-item label="Expiry Type" label-width="200px" prop="oldgidgrp.rec.exptyp">
              <c-select dbCode="exptyp" placeholder="请选择到期类型" style="width:100%" isShowKeyAndLabel v-model="model.oldgidgrp.rec.exptyp" disabled>
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">31E</c-col>
        <c-col :span="23" class="fieldName">
          <c-col :span="14">
            <el-form-item label="Date of Expiry" label-width="200px" prop="oldgidgrp.rec.expdat">
              <c-date-picker disabled placeholder="请选择保函效期" style="width: 100%" type="date" v-model="model.oldgidgrp.rec.expdat">
              </c-date-picker>
            </el-form-item>
          </c-col>
          <c-col :span="4">
            <c-checkbox disabled class="checkbox-left" false-label="" style="margin: 0 0 0 10px" true-label="X" v-model="model.oldgidgrp.rec.expflg">
              效期敞口
            </c-checkbox>
          </c-col>
        </c-col>
      </c-col>

      <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
        <c-col :span="1" class="field">35G</c-col>
        <c-col :span="23">
          <c-col :span="14" class="fieldName">
            <el-form-item label="Expiry Condition/Event" label-width="200px" prop="oldgidgrp.blk.exptxt" v-if="model.gitp.exptxtmodflg != 'X'">
              <c-mul-row-input :autosize="{ minRows: 4, maxRows: 4}" :cols="65" :rows="12" :charmod="2" disabled placeholder="请输入到期条件" v-model="model.oldgidgrp.blk.exptxt">
              </c-mul-row-input>
            </el-form-item>
            <el-form-item label="Expiry Condition/Event" label-width="200px" prop="oldgidgrp.blk.atxexptxt" v-if="model.gitp.exptxtmodflg == 'X'">
              <c-mul-row-input :autosize="{ minRows: 4, maxRows: 4}" :cols="65" :rows="12" :charmod="2" placeholder="请输入到期条件" v-model="model.oldgidgrp.blk.atxexptxt" disabled>
              </c-mul-row-input>
            </el-form-item>
          </c-col>
          <c-col :span="5" class="fieldName">
            <c-checkbox disabled class="checkbox-left" false-label="" style="margin: 0 0 0 10px" true-label="X" v-model="model.gitp.exptxtmodflg" v-if="model.oldgidgrp.rec.hndtyp == 'OT'">手工修改
            </c-checkbox>
          </c-col>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">50</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName">
          <el-form-item label="Applicant" label-width="200px" style="margin-bottom: 0;" prop="gidgrp.apc.pts.extkey">
            <el-form-item label-width="0" style="margin-bottom: 10px;">
              <c-ptap :argadr="{title: $t('gitopn.申请人'), grp: 'oldgidgrp', rol: 'apc'}" :model="model" bchinr='00000047' :isFieldLabelVisible="false" ptytyp="C" isDisabled disabled :disabledRef="true" :disabledExtkey="true">
              </c-ptap>
            </el-form-item>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">52a</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName">
          <el-form-item label="Issuer" label-width="200px" style="margin-bottom: 0;">
            <el-form-item label-width="0" style="margin-bottom: 10px;">
              <c-ptap :argadr="{title: $t('gitopn.开证行'), grp: 'oldgidgrp', rol: 'iss'}" :isFieldLabelVisible="false" :model="model" bchinr='00000036' ptytyp="B" isDisabled disabled :disabledRef="true" :disabledExtkey="true">
              </c-ptap>
            </el-form-item>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">59</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName">
          <el-form-item label="Beneficiary" label-width="200px" style="margin-bottom: 0;" prop="gidgrp.bec.pts.extkey">
            <el-form-item label-width="0" style="margin-bottom: 10px;">
              <c-ptap :argadr="{title: $t('gitopn.国际受益人'), grp: 'oldgidgrp', rol: 'bec'}" :haveAdrLabel="true" :isAdrblk="false" :isFieldLabelVisible="false" :model="model" bchinr='00000047' ptytyp="F,C" isDisabled disabled :disabledRef="true" :disabledExtkey="true">
              </c-ptap>
            </el-form-item>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">32B</c-col>
      <c-col :span="23">
        <c-col :span="14">
          <c-col :span="14" class="fieldName">
            <el-form-item label="Undertaking Amount" label-width="200px" prop="oldgidgrp.cbs.mac.cur">
              <c-select dbCode="curtxt" placeholder="请选择保函币种" sort="SRT" style="width:100%" disabled v-model="model.oldgidgrp.cbs.mac.cur">
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="10" class="fieldName">
            <el-form-item label-width="5px" prop="oldgidgrp.cbs.mac.amt">
              <c-input-currency @keyup.enter.native="$event.target.blur()" placeholder="请输入保函金额" style="width:100%" disabled v-model="model.oldgidgrp.cbs.mac.amt"></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;" v-if="model.oldgidgrp.rec.legfrmc == 'STBY'">
      <c-col :span="1" class="field">41a</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName">
          <el-form-item label="Available With..." label-width="200px" style="margin-bottom: 0;">
            <el-form-item label-width="0" style="margin-bottom: 10px;">
              <c-ptap :argadr="{title:$t('gitopn.可用银行'), grp: 'oldgidgrp', rol: 'avc'}" :isAdrVisible="false" :isFieldLabelVisible="false" :model="model" bchinr='00000047' ptytyp="B" isDisabled disabled :disabledRef="true" :disabledExtkey="true">
              </c-ptap>
            </el-form-item>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">71D</c-col>
      <c-col :span="23" class="fieldName">
        <c-col :span="14">
          <el-form-item label="Charges" label-width="200px" prop="oldgidgrp.blk.feetxtc">
            <c-mul-row-input :autosize="{ minRows: 4, maxRows: 4}" :cols="35" :charmod="3" :rows="6" placeholder="请输入收费代码的附加详情" style="width:100%" v-model="model.oldgidgrp.blk.feetxtc" disabled>
            </c-mul-row-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">45C</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName over">
          <el-form-item label="Document and Presentation Instructions" label-width="200px" prop="oldgidgrp.blk.atxpreperc" v-if="model.gitp.prepercmodflg === 'X'">
            <c-mul-row-input :autosize="{ minRows: 2, maxRows: 6}" :cols="65" :rows="100" :charmod="3" placeholder="请输入交单指示" v-model="model.oldgidgrp.blk.atxpreperc" disabled></c-mul-row-input>
          </el-form-item>
          <el-form-item label="Document and Presentation Instructions" label-width="200px" prop="oldgidgrp.blk.preperc" v-else>
            <c-mul-row-input :autosize="{ minRows: 2, maxRows: 6}" :cols="65" :rows="100"  disabled placeholder="请输入交单指示" v-model="model.oldgidgrp.blk.preperc"></c-mul-row-input>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <c-checkbox false-label="" style="margin: 0 0 0 10px" true-label="X" v-model="model.gitp.prepercmodflg" disabled v-if="model.oldgidgrp.rec.hndtyp == 'OT'">手工修改</c-checkbox>
        </c-col>
      </c-col>
    </c-col>

		<c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
			<c-col :span="1" class="field">44J</c-col>
			<c-col :span="23" class="fieldName">
				<c-col :span="24">
					<c-col :span="14">
						<c-col :span="12">
							<el-form-item label="Governing Law" label-width="200px" prop="oldgidgrp.rec.jurlawc">
								<c-select :filterKey="['CN', 'HK', 'GB']" dbCode="ctytxt" disabled placeholder="请选择适用法律" style="width: 100%" v-model="model.oldgidgrp.rec.jurlawc">
								</c-select>
							</el-form-item>
						</c-col>
						<c-col :span="12">
							<el-form-item label-width="5px" prop="oldgidgrp.rec.jurlawtxtc">
								<c-input disabled maxlength="35" placeholder="请输入适用法律" style="width:100%" v-model="model.oldgidgrp.rec.jurlawtxtc">
								</c-input>
							</el-form-item>
						</c-col>
					</c-col>
				</c-col>
				<c-col :span="24">
					<c-col :span="14">
						<el-form-item :label="$t('gitopn.仲裁地')" label-width="200px" prop="oldgidgrp.rec.jurplcc">
							<c-input disabled maxlength="65" placeholder="请输入仲裁地" v-model="model.oldgidgrp.rec.jurplcc"></c-input>
						</el-form-item>
					</c-col>
				</c-col>
			</c-col>
		</c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">48B</c-col>
      <c-col :span="23" class="fieldName">
        <c-col :span="14">
          <el-form-item label="Demand Indicator" label-width="200px" prop="oldgidgrp.rec.demandc">
            <c-select dbCode="demand" placeholder="请选择索赔方式 " style="width:100%" v-model="model.oldgidgrp.rec.demandc" disabled>
            </c-select>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">45L</c-col>
      <c-col :span="23">
        <c-col :span="14" class="fieldName">
          <el-form-item label="Underlying Transaction Details" label-width="200px" prop="oldgidgrp.blk.atxcovgodsrvc">
            <c-mul-row-input :autosize="{ minRows: 4, maxRows: 4}" :charmod="3" :cols="65" :rows="50" placeholder="请输入Underly. Transact. Det." v-model="model.oldgidgrp.blk.atxcovgodsrvc" disabled>
            </c-mul-row-input>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <c-checkbox class="checkbox-left" false-label="" style="margin: 0 0 0 10px" true-label="X" v-model="model.gitp.covgodsrvcmodflg" disabled v-if="model.oldgidgrp.rec.hndtyp == 'OT'">
            手工修改
          </c-checkbox>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
      <c-col :span="1" class="field">24E</c-col>
      <c-col :span="23">
        <c-col :span="24">
          <c-col :span="14" class="fieldName">
            <el-form-item label="Delivery of Local Undertaking" label-width="200px" prop="oldgidgrp.rec.deloric">
              <c-select dbCode="DELORI" placeholder="请选择保函文本交付" style="width: 100%" v-model="model.oldgidgrp.rec.deloric" isShowKeyAndLabel disabled>
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24">
          <c-col :span="14">
            <el-form-item label-width="200px" prop="oldgidgrp.rec.deloritxtc">
              <c-input disabled maxlength="35" placeholder="请输入保函文本交付" v-model="model.oldgidgrp.rec.deloritxtc"></c-input>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>
    </c-col>

		<c-col :span="24" style="padding-left: 20px;padding-right: 20px;">
			<c-col :span="1" class="field">24G</c-col>
			<c-col :span="23">
				<c-col :span="24">
					<c-col :span="14" class="fieldName">
						<el-form-item label="Delivery To/Collection By" label-width="200px" prop="oldgidgrp.rec.deltoc">
							<c-select :filterKey="deltoFilterKey" dbCode="delto" disabled placeholder="请选择交付收款人" style="width: 100%" v-model="model.oldgidgrp.rec.deltoc">
							</c-select>
						</el-form-item>
					</c-col>
				</c-col>
				<c-col :span="24">
					<c-col :span="14">
						<el-form-item label-width="200px" prop="oldgidgrp.blk.deltoadrc">
							<c-mul-row-input :autosize="{ minRows: 4, maxRows: 4}" :charmod="3" :cols="65" :rows="12" disabled placeholder="请输入交付地址" style="width:100%" v-model="model.oldgidgrp.blk.deltoadrc"></c-mul-row-input>
						</el-form-item>
					</c-col>
				</c-col>
			</c-col>
		</c-col>
	</div>
</template>
<script>
import event from "../event";
import Default from "../model/default";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event, Default],
  data() {
    return {};
  },
  methods: {},
  computed: {
    deltoFilterKey() {
      let filterKey = ["OTHR"];
      if (
        this.model.oldgidgrp.ben.pts.adrblk != null &&
        this.model.oldgidgrp.ben.pts.adrblk != ""
      ) {
        filterKey.push("BENE");
      }
      return filterKey;
    }
  },
  created: function() {}
};
</script>
<style lang="less" scoped>
.field {
  text-align: left;
  line-height: 32px;
  width: 40px;
}

.fieldName {
  /deep/ .el-form-item--small .el-form-item__label {
    width: 200px !important;
    justify-content: flex-start;
  }

  /deep/ .el-date-editor.el-input {
    width: 90%;
  }

  /deep/ .el-select {
    width: 90%;
  }
}

.over {
  /deep/ .el-form-item--small .el-form-item__label {
    text-align: left;
  }
}
</style>