default.js 4.11 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
import commonFunctions from '~/mixin/commonFunctions.js';
import Utils from "~/utils";
import Pts from '~/components/business/commonModel/Pts';

export default {
	mixins: [commonFunctions],
	methods: {
		calcName() {
			this.model.ncdgrp.rec.nam = this.model.ncdgrp.cbs.max.cur + " " + this.model.ncdgrp.cbs.max.amt + " " + this.model.ncdgrp.apl.pts.nam;
			this.model.ncdgrp.rec.nam = this.model.ncdgrp.rec.nam.slice(0, 40);
		},
		//初始化调用
		getRolList() {
			//------------docprbrolList-------------------
			let docprbrolList = []
			if (this.model.nidgrp.ben.pts.ptainr != "") {
				var benobj = new Object();
				benobj.label = "受益人(BEN)";
				benobj.value = this.model.nidgrp.ben.pts.rol;
				docprbrolList.push(benobj);
			}
			if (this.model.nidgrp.atb.pts.ptainr != "") {
				var atbobj = new Object();
				atbobj.label = "1st Adv. thr. Bank(ATB)";
				atbobj.value = this.model.nidgrp.atb.pts.rol;
				docprbrolList.push(atbobj);
			}
			if (this.model.nidgrp.at2.pts.ptainr != "") {
				var at2obj = new Object();
				at2obj.label = "1st Adv. thr. Bank(AT2)";
				at2obj.value = this.model.nidgrp.at2.pts.rol;
				docprbrolList.push(at2obj);
			}

			if (this.model.nidgrp.iss.pts.ptainr != ""&&this.model.nidgrp.rec.hndtyp=="OC") {
				var issobj = new Object();
				issobj.label = "转开行(ISS)";
				issobj.value = this.model.nidgrp.iss.pts.rol;
				docprbrolList.push(issobj);
			}
			var prbobj = new Object();
			prbobj.label = "交单行(PRB)";
			prbobj.value = "PRB";
			docprbrolList.push(prbobj);
			this.$set(this.codes, 'docprbrolList', docprbrolList)
			if(this.model.ncdgrp.rec.docprbrol ==""){
				if (this.model.nidgrp.iss.pts.ptainr != ""&&this.model.nidgrp.rec.hndtyp=="OC") {
					this.model.ncdgrp.rec.docprbrol = "ISS";
				}
				else if (this.model.nidgrp.adv.pts.ptainr != "") {
					this.model.ncdgrp.rec.docprbrol = "ADV";
				}
				else if (this.model.nidgrp.atb.pts.ptainr != "") {
					this.model.ncdgrp.rec.docprbrol = "ATB";
				}
				else if (this.model.nidgrp.ben.pts.ptainr != "") {
					this.model.ncdgrp.rec.docprbrol = "BEN";
				}
				this.calcPrb();
			}
			
			//------------payrolList-------------------
			//----BEN 、ATB、AT2、OWN 、ADV除外---
			let payrolList = []
			if (this.model.nidgrp.apl.pts.ptainr != "") {
				var aplobj = new Object();
				aplobj.label = "申请人(APL)";
				aplobj.value = this.model.nidgrp.apl.pts.rol;
				payrolList.push(aplobj);
			}
			if (this.model.nidgrp.iss.pts.ptainr != "") {
				var issobj = new Object();
				issobj.label = "反担保行(ISS)";
				issobj.value = this.model.nidgrp.iss.pts.rol;
				payrolList.push(issobj);
			}
			var othobj = new Object();
			othobj.label = "其他赔付人(OTH)";
			othobj.value = "OTH";
			payrolList.push(othobj);
			this.$set(this.codes, 'payrolList', payrolList)
			if(this.model.ncdgrp.rec.payrol ==""){
				if (this.model.nidgrp.iss.pts.ptainr != "") {
					this.model.ncdgrp.rec.payrol = "ISS";
				}
				else if (this.model.nidgrp.ada.pts.ptainr != "") {
					this.model.ncdgrp.rec.payrol = "ADA";
				}
				else if (this.model.nidgrp.apl.pts.ptainr != "") {
					this.model.ncdgrp.rec.payrol = "APL";
				}
				this.calcOth();
			}
			

		},
		changeExtPay(){
			if(!this.model.extpay){
				this.model.ncdgrp.rec.newexpdat = "";
			}
			let hasModify = !this.model.modifySet || (this.model.modifySet && !this.model.modifySet.includes('nxtflg'))
			if(hasModify){
				if(this.model.extpay){
					this.model.nxtflg = 'FP';
				}else{
					this.model.nxtflg = 'SN';
				}
			}
		},
		setNxtflg(){
			if(this.model.extpay=='X'){
				this.model.nxtflg="FP";
			}
			else{
				this.model.nxtflg="SN";
			}
		},
		setNewexpdat(){
			if(this.model.extpay!='X'){
				this.model.ncdgrp.rec.newexpdat="";
			}
		},
		ncdgrpBenRefBlur(){
			if(this.model.ncdgrp.rec.docprbrol == "BEN"){
				this.model.ncdgrp.prb.pts.ref=this.model.ncdgrp.ben.pts.ref;
			}
		},
		ncdgrpPrbRefBlur(){
			if(this.model.ncdgrp.rec.docprbrol == "BEN"){
				this.model.ncdgrp.ben.pts.ref=this.model.ncdgrp.prb.pts.ref;
			}
		},
		setActtyp(){
			if(this.model.szflg!="1"){
				this.model.acttyp = "";
			}
		},
		setIfnxtflg(){
			this.ifnxtflg="X";
		},
	},
}