index.js 1.42 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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import Utils from "~/utils/index";
import BigNumber from 'bignumber.js';
export default {
	mixins: [commonFunctions],
	methods: {
		// rmbrol角色改变,则将相应的角色的值赋值给偿付信息的rmbrmb角色
		rmbrolChange(){

			switch (this.model.rmbclm.rmbrol) {
			  case "ADV":
				Utils.copyValueFromVoData(this.model.rmbclm.rmbrmb.pts, this.model.ledgrp.adv.pts);
				break;
			  case "AVB":
				Utils.copyValueFromVoData(this.model.rmbclm.rmbrmb.pts, this.model.ledgrp.avb.pts);
				break;
			  case "ISS":
				Utils.copyValueFromVoData(this.model.rmbclm.rmbrmb.pts, this.model.ledgrp.iss.pts);
				break;
			  case "CON":
				Utils.copyValueFromVoData(this.model.rmbclm.rmbrmb.pts, this.model.ledgrp.con.pts);
				break;
			  case "RMB":
				Utils.copyValueFromVoData(this.model.rmbclm.rmbrmb.pts, this.model.ledgrp.rmb.pts);
				break;
			  case "OTH":
				this.model.rmbclm.rmbrmb.pts = new Pts().data;
				break;
	  
			}
	  
			if(this.model.rmbclm.rmbrmb.pts.ptainr!=''){
			  this.model.rmbclm.rmbrmb.pts.rol = "RMBRMB";
			}
    },

    changeUtlamt2(){
      this.model.aamset.utlamt = new BigNumber(this.model.setmod.docamt).minus(new BigNumber(this.model.aamset.utlamt2))
    },
    changeUtlamt(){
      this.model.aamset.utlamt2 = new BigNumber(this.model.setmod.docamt).minus(new BigNumber(this.model.aamset.utlamt))
    }
		
	}
}