<template>
  <div class="eibs-tab">
<!-- ==============================左 ===============================-->
    <el-col :span="11">
        <c-col :span="24">
        <el-form-item label="Available with" prop="lidgrp.rec.avbwth">
            <c-select 
            v-model="model.lidgrp.rec.avbwth" 
            style="width:100%"
             placeholder="请选择Available with"
             :code="codes.avbwth"
             >
              </c-select>
        </el-form-item>
       </c-col>
       <c-col :span="24">
        <el-form-item label="External Key of Address" prop="lidgrp.avb.pts.extkey">
           <c-fullbox>
            <c-input  
            v-model="model.lidgrp.avb.pts.extkey" 
            maxlength="16"  
            placeholder="请输入External Key of Address"
            disabled
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin: 0 10px 0 10px; padding: 0 12px"
                size="small"
                type="primary"
                @click=""
              >
                <span style="font-family: '宋体'; font-weight: bold">i</span>
              </c-button>
              <c-button
                style="margin: 0 0"
                size="small"
                type="primary"
                @click=""
              >
                获取
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
       </c-col>
       <!-- <c-col :span="24">
        <el-form-item label="名称" prop="lidgrp.avb.namelc">
            <c-input type="textarea" v-model="model.lidgrp.avb.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col> -->
                  
       <c-col :span="24">
        <el-form-item label="Address Block" prop="lidgrp.avb.pts.adrblk">
            <c-input 
            :rows="3"
            type="textarea" v-model="model.lidgrp.avb.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
        <!-- <c-col :span="24">
        <el-form-item label="Chinese address" prop="lidgrp.avb.dbfadrblkcn">
            <c-input 
            :rows="3"
            type="textarea" v-model="model.lidgrp.avb.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>  -->
       <!-- <c-col :span="24">
        <el-form-item label="地址" prop="lidgrp.avb.adrelc">
            <c-input type="textarea" v-model="model.lidgrp.avb.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col> -->
       <!-- <c-col :span="24">
        <el-form-item label="Available in" prop="lidgrp.blk.avbwthtxt">
            <c-input type="textarea" v-model="model.lidgrp.blk.avbwthtxt" maxlength="35" show-word-limit placeholder="请输入Available in" ></c-input>
        </el-form-item>
        </c-col> -->
         <c-col :span="24">
        <el-form-item label="Available by" prop="lidgrp.rec.avbby">
            <c-select 
            v-model="model.lidgrp.rec.avbby" 
            style="width:100%" 
            placeholder="请选择Available by"
            :code="codes.avbby"
            >
              </c-select>
        </el-form-item>
       </c-col> 
       <c-col :span="24">
        <el-form-item label="Deferred Payment Details" prop="lidgrp.blk.defdet">
            <c-input 
            :disabled="this.flag1"
            type="textarea" v-model="model.lidgrp.blk.defdet" maxlength="35" show-word-limit placeholder="请输入Deferred Payment Details" ></c-input>
        </el-form-item>
        </c-col>  

        <c-col :span="24">
        <el-form-item label="Drafts at" prop="lidgrp.blk.dftat">
            <c-input 
            type="textarea" 
            v-model="model.lidgrp.blk.dftat" 
            maxlength="35" 
            show-word-limit 
            placeholder="请输入Drafts at" 
            :disabled="this.flag2"
            ></c-input>
        </el-form-item>
        </c-col>
        <c-col :span="24">
        <el-form-item label="Drawee" prop="lidgrp.drw.pts.extkey">
            <c-fullbox>
            <c-input  
            v-model="model.lidgrp.drw.pts.extkey" 
            maxlength="16"  
            placeholder="请输入External Key of Address"
            @keyup.enter.native="showGridPromptDialog('lidgrp.drw.pts.extkey')"
            :disabled="this.flag2"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin: 0 10px 0 10px; padding: 0 12px"
                size="small"
                type="primary"
                @click=""
              >
                <span style="font-family: '宋体'; font-weight: bold">i</span>
              </c-button>
              <c-button
                style="margin: 0 0"
                size="small"
                type="primary"
                :disabled="this.flag2"
                @click=""
              >
                获取
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
       </c-col> 
         <!-- <c-col :span="24">
        <el-form-item label="名称" prop="lidgrp.drw.namelc">
            <c-input type="textarea" v-model="model.lidgrp.drw.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col> -->
                  
       <c-col :span="24">
        <el-form-item label="Address Block" prop="lidgrp.drw.pts.adrblk">
            <c-input type="textarea" v-model="model.lidgrp.drw.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <!-- <c-col :span="24">
        <el-form-item label="Chinese address" prop="lidgrp.drw.dbfadrblkcn">
            <c-input type="textarea" v-model="model.lidgrp.drw.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col> -->
                  
       
                  
       <!-- <c-col :span="24">
        <el-form-item label="地址" prop="lidgrp.drw.adrelc">
            <c-input type="textarea" v-model="model.lidgrp.drw.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col> -->
        <c-col :span="24">
        <el-form-item label="Dispatch from" prop="lidgrp.rec.shpfro">
            <c-input  v-model="model.lidgrp.rec.shpfro" maxlength="65"  placeholder="请输入Dispatch from"></c-input>
        </el-form-item>
       </c-col> 
       <c-col :span="24">
        <el-form-item label="Air-/Port of Departure" prop="lidgrp.rec.porloa">
            <c-input  v-model="model.lidgrp.rec.porloa" maxlength="65"  placeholder="请输入Air-/Port of Departure"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="24">
        <el-form-item label="Air-/Port of Destination" prop="lidgrp.rec.pordis">
            <c-input  v-model="model.lidgrp.rec.pordis" maxlength="65"  placeholder="请输入Air-/Port of Destination"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="24">
        <el-form-item label="Final Destination" prop="lidgrp.rec.shpto">
            <c-input  v-model="model.lidgrp.rec.shpto" maxlength="65"  placeholder="请输入Final Destination"></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="24">
        <el-form-item label="Shipment Period" prop="lidgrp.blk.shpper">
            <c-input type="textarea" v-model="model.lidgrp.blk.shpper" maxlength="65" show-word-limit placeholder="请输入Shipment Period" ></c-input>
        </el-form-item>
        </c-col>      
    </el-col>
                                               
<!-- ==============================右 ===============================-->
    <el-col :span="11" :offset="1">
        <!-- <c-col :span="24">
        <el-form-item label="Presentation Period" prop="lidgrp.blk.preper">
            <c-input type="textarea" v-model="model.lidgrp.blk.preper" maxlength="35" show-word-limit placeholder="请输入Presentation Period" ></c-input>
        </el-form-item>
        </c-col> -->

        <c-col :span="24">
        <el-form-item label="Days of presentation period" prop="lidgrp.rec.prepers18">
            <c-input disabled v-model="model.lidgrp.rec.prepers18"  placeholder="请输入Days of presentation period"></c-input>
        </el-form-item>
       </c-col>
       <c-col :span="24">
        <el-form-item label="Presentation period text" prop="lidgrp.rec.prepertxts18">
            <c-input disabled v-model="model.lidgrp.rec.prepertxts18" maxlength="35"  placeholder="请输入Presentation period text"></c-input>
        </el-form-item>
       </c-col>
       <!-- <c-col :span="12">
	    <c-checkbox v-model="model.lidgrp.blk.preperflg">Presentation Period modified</c-checkbox>
       </c-col> -->
        <c-col :span="24">
        <el-form-item label=" Details of Charges" prop="lidgrp.blk.feetxt">
            <c-input type="textarea" v-model="model.lidgrp.blk.feetxt" maxlength="35" show-word-limit placeholder="请输入Additional Details to Code for Charges" ></c-input>
        </el-form-item>
        </c-col>
        <c-col :span="24">
        <el-form-item label="Charges Condition" prop="lidgrp.rec.chato">
            <c-select v-model="model.lidgrp.rec.chato" style="width:100%" 
            placeholder="请选择Drafts at"
            :code="codes.chadet"
            >
              </c-select>
        </el-form-item>
       </c-col>
        <c-col :span="24">
        <el-form-item label="Country Or region Code" prop="lidgrp.rec.stacty">
            <c-select v-model="model.lidgrp.rec.stacty" style="width:100%" placeholder="请选择Country Code Risk Country"
            :code="codes.stacty"
            >
              </c-select>
        </el-form-item>
       </c-col>
       <c-col :span="24">
        <el-form-item label="Mixed Payment Details" prop="lidgrp.blk.mixdet">
            <c-input 
            :disabled="this.flag3"
            type="textarea" v-model="model.lidgrp.blk.mixdet" maxlength="35" show-word-limit placeholder="请输入Mixed Payment Details" ></c-input>
        </el-form-item>
        </c-col>
         <c-col :span="24">
        <el-form-item label="Maximum tenor in days" prop="lidgrp.rec.tenmaxday">
            <c-input disabled v-model="model.lidgrp.rec.tenmaxday"  placeholder="请输入Maximum tenor in days"></c-input>
        </el-form-item>
       </c-col>
    </el-col>   
                                                    
       
                  
       
                  
       <!-- <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onPreperButtxmsel">
            ...
        </c-button>
       </c-col> -->
                  
       <!-- <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="litp.avbp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.litp.avbp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col> -->
                  
       
       <!-- <c-col :span="12">
        <el-form-item label="" prop="litp.avbp.ptsget.sdamod.seainf">
            <c-input  v-model="model.litp.avbp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onAvbpDet">
            Details
        </c-button>
       </c-col> -->
                  
       
                  
      
                  
       
                  
       
                  
<!--        
                  
       
                                   
      
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onChariaButtxmsel">
            ...
        </c-button>
       </c-col>
                                    -->
      
                  
	<!-- <c-col :span="12">
	    <span  v-text="model.litp.defdetlab"   data-path=".litp.defdetlab" > </span>
	</c-col> -->
                  
       
                                                    
      
                                   
      
                                   
       
                  
       <!-- <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="litp.drwp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.litp.drwp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col> -->
                                   
       
                  
       <!-- <c-col :span="12">
        <el-form-item label="" prop="litp.drwp.ptsget.sdamod.seainf">
            <c-input  v-model="model.litp.drwp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onDrwpDet">
            Details
        </c-button>
       </c-col> -->
  
  </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Litame/Event"

export default {
    inject: ['root'],
    props:["model","codes"],
    mixins: [commonProcess],
    data(){
        return {
        flag1:true,
        flag2:true,
        flag3:true,
        }
    },
    methods:{...Event},
    created:function(){

    },
    watch:{
        "model.lidgrp.rec.avbby": {
            immediate:true,
            handler(val,oldVal){
                if (val=="D") {
                    this.flag1=false
                    this.flag2=true
                    this.flag3=true
                }
                if(val=="N"){
                    this.flag1=false
                    this.flag2=false
                    this.flag3=true
                }
                if (val=="P") {
                    this.flag1=true
                    this.flag2=false
                    this.flag3=true
                }
                if (val=="M") {
                    this.flag1=true
                    this.flag2=true
                    this.flag3=false
                }
                if (val=="A") {
                    this.flag1=true
                    this.flag2=false
                    this.flag3=true
                }
            },  
        },
    },
}
</script>
<style>

</style>
