Frep.vue 11.8 KB
<template>
	<div class="eibs-tab">
		<!-- ======================= 左边 ========================= -->
		<c-col :span="12" style="padding-right: 20px">
			<c-col :span="24">
				<el-form-item label="保函编号" prop="nidgrp.rec.ownref" style="width: 100%">
					<c-fullbox>
						<c-input v-model="model.nidgrp.rec.ownref" maxlength="8" placeholder="请输入" disabled></c-input>
						<template slot="footer">
							<c-button v-model="model.gctp0.gidget.sdamod.seainf" style="margin: 0 0 0 10px; padding: 0 12px" size="small" type="primary">
								<i class="el-icon-info"></i>
							</c-button>
						</template>
					</c-fullbox>
				</el-form-item>
			</c-col>

			<c-col :span="24">
				<el-form-item label="索赔编号" prop="ncdgrp.rec.ownref" style="width: 100%">
					<c-fullbox>
						<c-input v-model="model.ncdgrp.rec.ownref" maxlength="8" placeholder="请输入" disabled></c-input>
						<template slot="footer">
							<c-button v-model="model.gctp0.recget.sdamod.seainf" style="margin: 0 0 0 10px; padding: 0 12px" size="small" type="primary">
								<i class="el-icon-info"></i>
							</c-button>
						</template>
					</c-fullbox>
				</el-form-item>
			</c-col>

			<c-col :span="24">
				<c-col :span="13">
					<el-form-item label="索赔金额" prop="ncdgrp.cbs.max.cur" previewLabel="索赔金额币种">
						<c-select v-model="model.ncdgrp.cbs.max.cur" style="width: 100%" disabled placeholder="请输入" dbCode="curtxt"></c-select>
					</el-form-item>
				</c-col>
				<c-col :span="11">
					<el-form-item previewLabel="索赔金额" label-width="5px" prop="ncdgrp.cbs.max.amt">
						<c-input-currency disabled :currency="model.ncdgrp.cbs.max.cur" v-model="model.ncdgrp.cbs.max.amt" placeholder="请输入"></c-input-currency>
					</el-form-item>
				</c-col>

			</c-col>
			<c-col :span="24">
				<c-col :span="13">
					<el-form-item label="保函余额" prop="ncdgrp.cbs.opn1.cur" previewLabel="保函余额币种">
						<c-select v-model="model.ncdgrp.cbs.opn1.cur" placeholder="" style="width: 100%" disabled dbCode="curtxt">
						</c-select>
					</el-form-item>
				</c-col>

				<c-col :span="11">
					<el-form-item previewLabel="保函余额" label-width="5px" prop="ncdgrp.cbs.opn1.amt">
						<c-input-currency :currency="model.ncdgrp.cbs.opn1.cur" v-model="model.ncdgrp.cbs.opn1.amt" placeholder="请输入" disabled></c-input-currency>
					</el-form-item>
				</c-col>
			</c-col>
			<c-col :span="24">
				<el-form-item label="保函种类" prop="nidgrp.rec.gartyp">
					<c-select disabled v-model="model.nidgrp.rec.gartyp" style="width: 100%" placeholder="请选择保函种类" dbCode="typgar">
					</c-select>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="索赔效期" prop="ncdgrp.rec.clmdat">
					<c-date-picker type="date" disabled v-model="model.ncdgrp.rec.clmdat" style="width: 100%" placeholder="请选择日期">
					</c-date-picker>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="报文类型" prop="fremsg.sndmt">
					<c-select 
          v-model="model.fremsg.sndmt" 
          style="width: 100%" 
          placeholder="请输入报文类型" 
          @change="sndmtChange"
          dbCode="sndmte"
					sort="SRT"
          :filterKey="['99','92','95','96','30','59','AVN','SAN','AME','AOC']"
          >
					</c-select>
				</el-form-item>
			</c-col>

			<c-col :span="24">
				<el-form-item label="发报类型" prop="fremsg.fulmt" :required="['99','59'].includes(this.model.fremsg.sndmt)">
					<c-select 
          :disabled="!['99','59'].includes(this.model.fremsg.sndmt)" 
					@change="fulmtChange"
          v-model="model.fremsg.fulmt" 
          style="width: 100%"
					dbCode="fulmt"
					:filterKey="fulmtFilterKey"
					placeholder="请选择发报类型">
					</c-select>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="报文标题" prop="fremsg.prttitle">
					<c-mul-row-input :disabled="model.fremsg.sndmt != '99'" :autosize="{ minRows: 1, maxRows: 1}" :charmod="2" :cols="35" :rows="1" placeholder="请选择报文标题" v-model="model.fremsg.prttitle">
					</c-mul-row-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="关联报文" prop="fremsg.relmt" :required="['92', '95', '96'].includes(this.model.fremsg.sndmt)">
					<c-select  
          :disabled="!['92', '95', '96'].includes(this.model.fremsg.sndmt)" 
          v-model="model.fremsg.relmt"
          style="width: 100%" 
          dbCode="relmt"
          :filterKey="['103','202','700','701','705','707','710','711','720','721','730','732','734','740','742','747','750','752','754','756','760','767','768','769','790','791','792','795','796','798','799','999']"
          placeholder="请选择关联报文">
          
					</c-select>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<c-col :span="13">
					<el-form-item label="发报日期"  prop="fremsg.reldat" :required="['92', '95', '96', '30'].includes(this.model.fremsg.sndmt)">
						<c-date-picker type="date" :disabled="!['92', '95', '96', '30'].includes(this.model.fremsg.sndmt)"
						  v-model="model.fremsg.reldat" style="width: 100%" placeholder="请选择发报日期">
						</c-date-picker>
					</el-form-item>
				</c-col>
				<c-col :span="11">
					<el-form-item label="" label-width="5px" prop="fremsg.reldir">
						<c-select 
            :disabled="!['95','96'].includes(this.model.fremsg.sndmt)"
            v-model="model.fremsg.reldir" 
            placeholder="请输入"
            dbCode="reldir"
						style="width: 100%"></c-select>
					</el-form-item>
				</c-col>
			</c-col>

			<c-col :span="24">
				<el-form-item :label="tag20" prop="fremsg.tag20ref" v-if="['799','499','759'].includes(this.model.fremsg.fulmt)">
					<c-input 
          v-model="model.fremsg.tag20ref"
					style="width: 100%" 
          placeholder="">
					</c-input>
				</el-form-item>
			</c-col>

			<c-col :span="24">
				<el-form-item label="详细说明" prop="fremsg.strinf" v-if="model.fremsg.sndmt!='59'">
						<c-mul-row-input 
              :disabled="!['99','92','95','96','AVN','AOC'].includes(this.model.fremsg.sndmt)"
							:isEn="false" 
						  :isRequired="['99','92','95','96','AOC'].includes(this.model.fremsg.sndmt)"
							:autosize="{ minRows: 7, maxRows: 12}" 
							:charmod="2" 
							:cols="50" 
							:rows="999" 
							placeholder="" 
							v-model="model.fremsg.strinf">
						</c-mul-row-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="" v-if="model.fremsg.sndmt!='59'">
					<c-checkbox 
          v-model="model.fremsg.flg" 
          true-label="X" 
          false-label=""  
          @change="setStrinf"  
          customModifykey="fremsg.flg" 
          class="checkbox-left" 
          :disabled="!['99','92','95','96','AVN','AOC'].includes(this.model.fremsg.sndmt)"
          >发送确认保函真实性电文</c-checkbox>
				</el-form-item>
			</c-col>
		</c-col>
		<!-- ======================右边====================== -->
		<c-col :span="12" style="padding-left: 20px">
			<c-col :span="24">
				<el-form-item label="保函效期" prop="nidgrp.rec.expdat">
					<c-date-picker type="date" disabled v-model="model.nidgrp.rec.expdat" style="width: 100%" placeholder="请选择">
					</c-date-picker>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<c-col :span="13">
					<el-form-item label="保函担保金额" prop="nidgrp.cbs.opn1.cur">
						<c-select v-model="model.nidgrp.cbs.opn1.cur" placeholder="" style="width: 100%" disabled dbCode="curtxt">
						</c-select>
					</el-form-item>
				</c-col>

				<c-col :span="11">
					<el-form-item label-width="5px" prop="nidgrp.cbs.opn1.amt">
						<c-input-currency :currency="model.nidgrp.cbs.opn1.cur" v-model="model.nidgrp.cbs.opn1.amt" placeholder="请输入金额" disabled></c-input-currency>
					</el-form-item>
				</c-col>
			</c-col>

			<c-col :span="24">
				<el-form-item label="申请人" prop="ncdgrp.apl.pts.ref">
					<c-input v-model="model.ncdgrp.apl.pts.ref" maxlength="40" placeholder="请输入申请人" disabled></c-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="" prop="ncdgrp.apl.pts.cnnam">
					<c-input v-model="model.ncdgrp.apl.pts.cnnam" type="textarea" :rows="2" placeholder="请输入申请人" disabled></c-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="受益人" prop="ncdgrp.ben.pts.ref">
					<c-input v-model="model.ncdgrp.ben.pts.ref" maxlength="40" placeholder="请输入受益人" disabled></c-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="" prop="ncdgrp.ben.pts.cnnam">
					<c-input v-model="model.ncdgrp.ben.pts.cnnam" type="textarea" :rows="2" placeholder="请输入受益人" disabled></c-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item label="收报行" prop="fremsg.msgrol">
					<c-select 
					v-model="model.fremsg.msgrol" 
					style="width: 100%" 
					placeholder="请选择收报行" 
					@clear="othClear('othmsg')"
					@change="changeMsgrol($event,'othmsg','OTHMSG')"
					dbCode="ROLALL" 
					:isShowKeyAndLabel="true"
					:filterKey="changeMsgrolSet">
					</c-select>
				</el-form-item>
			</c-col>
      <c-col :span="24">
        <c-ptap 
					:model="model" 
					:noRef="true"
					:editExtLabel="true"
					:isAdrblk="false"
					:haveAdrLabel="false"
					:requiredExtkey="true" 
					chooseLanguage="CN"
					:isFieldLabelVisible="false"
					:isLable='false'
          :disabled="model.fremsg.msgrol != 'OTH'"
					:disabledExtkey="model.fremsg.msgrol != 'OTH'"
					:argadr="{title: '', grp: 'fremsg', rol: 'othmsg'}" ptytyp="B" >
				</c-ptap>
      </c-col>

			<c-col :span="24">
				<el-form-item label="抄送" prop="fremsg.ccrol">
					<c-select 
					v-model="model.fremsg.ccrol" 
					style="width: 100%" 
					placeholder="请选择抄送" 
					@clear="othClear('othcc')"
					@change="changeMsgrol($event,'othcc','OTHCC')"
					dbCode="ROLALL" 
					:isShowKeyAndLabel="true"
					:filterKey="model.fremsg.msgrolSet">
					</c-select>
				</el-form-item>
			</c-col>
      <c-col :span="24">
				<c-ptap 
					:model="model" 
					:noRef="true"
					:editExtLabel="true"
					:isFieldLabelVisible="false"
					:isAdrblk="false"
					:haveAdrLabel="false"
					:isLable='false'
          :disabled="model.fremsg.ccrol != 'OTH'"
					:disabledExtkey="model.fremsg.ccrol != 'OTH'"
					:argadr="{title: '', grp: 'fremsg', rol: 'othcc'}" ptytyp="B" >
				</c-ptap>
      </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 {
    };
  },
  computed: {
    tag20(){
      if (this.model.fremsg.fulmt == '799') {
        return 'MT799 Tag20';
      }
      if(this.model.fremsg.fulmt == '499'){
        return 'MT499 Tag20';
      }
      if(this.model.fremsg.fulmt == '759'){
        return 'MT759 Tag20';
      }
		},
		
		fulmtFilterKey(){
			let filterKey = [];
			if (this.model.fremsg.sndmt === '99'){
				filterKey = ['199','299','799'];
			}else if(this.model.fremsg.sndmt === '59'){
				filterKey = ['199','299','759'];
			}else{
				filterKey = [];
			}
			return filterKey;
		},
		
		changeMsgrolSet(){
			if (this.model.fremsg.msgrolSet == undefined || this.model.fremsg.msgrolSet.length == 0) {
				return;
			}
			let filterKey = ['AAA'];
			switch (this.model.fremsg.sndmt) {
				case "95":
				case "96":
					for (let item of this.model.fremsg.msgrolSet) {
					  if ((this.model.ncdgrp[item.toLowerCase()] && this.model.ncdgrp[item.toLowerCase()].ptytyp === "B") || item == "OTH") {
							filterKey.push(item);
						}
					}
					break;
				default:
					filterKey = this.model.fremsg.msgrolSet;
					break;
			}
			return filterKey;
		},
  },
  methods: {},
  mounted() {
  }
};
</script>
<style>
</style>