default.js 4.58 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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160

/**
* Nitpcr Default规则
*/
import Api from "~/service/Api";
import Utils from "~/utils/index"
import Pts from '~/components/business/commonModel/Pts';

export default {
	methods: {
		//初始化调用
		getRolList() {
			let docprbrolList =[]
			//------------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 = "2nd Adv. thr. Bank(AT2)";
				at2obj.value = this.model.nidgrp.at2.pts.rol;
				docprbrolList.push(at2obj);
			}
			if (this.model.nidgrp.adv.pts.ptainr != "") {
				var advobj = new Object();
				advobj.label = "通知行(ADV)";
				advobj.value = this.model.nidgrp.adv.pts.rol;
				docprbrolList.push(advobj);
			}
			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 、ISS、ATB、AT2、OWN 除外---
			// if (this.model.nidgrp.ada.pts.ptainr != "") {
			// 	var adaobj = new Object();
			// 	adaobj.label = "Adv.Bank APL Side(ADA)";
			// 	adaobj.value = this.model.nidgrp.ada.pts.rol;
			// 	payrolList.push(adaobj);
			// }
			// if (this.model.nidgrp.adv.pts.ptainr != "") {
			// 	var advobj2 = new Object();
			// 	advobj2.label = "通知行(ADV)";
			// 	advobj2.value = this.model.nidgrp.adv.pts.rol;
			// 	payrolList.push(advobj2);
			// }
			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 != ""&&this.model.nidgrp.rec.hndtyp=="OT") {
				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.nidgrp.rec.hndtyp=="OT") {
					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();
			}
			

		},

		// ncdgrp.rec.demstat
		clearPresentdet() {
			if (this.model.ncdgrp.rec.demstat != "INCP") {
				this.model.ncdgrp.blk.presentdet = "";
			}
		},
		setGcthdr(){
			if(this.model.nidgrp.cbs.max2.amt=="0"&&this.model.nidgrp.cbs.opn2.amt=="0"){
				this.model.nctp.gcthdr=false;
			}
			else{
				this.model.nctp.gcthdr=true;
			}
		},
		setNxtflg(){
			if(this.model.extpay==true){
				this.model.nxtflg="FP";
			}
			else{
				this.model.nxtflg="SN";
			}
		},
		setNewexpdat(){
			if(this.model.extpay!=true){
				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;
			}
		},
		ncdgrpbenChange(){
			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";
		},
	}
}