default.js 1.65 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
import commonFunctions from '../../../../mixin/commonFunctions.js';

export default {
    mixins: [commonFunctions],
    methods: {
        defaultRule() {
            //注销原因
            if (this.model.nidgrp.rec.purcan !== 'RN') {
                this.model.newref = ""
            }
            if (this.model.nidgrp.rec.purcan !== "RR") {
                this.model.mtabut.clsflgp = "X";
                this.model.nidgrp.rec.clsdat = new Date();
                this.model.autflg = ""
            } else {
							// 主动注销选取RR,减少金额默认是保函余额
							  if(!this.model.spt || this.model.spt.sta != 'INC'){
									this.model.nidgrp.rec.redamt = this.model.nidgrp.cbs.opn1.amt
								}
                if (this.model.nidgrp.rec.redamt === this.model.nidgrp.cbs.opn1.amt) {
                    this.model.mtabut.clsflgp = "X";
                    this.model.nidgrp.rec.clsdat = new Date();
                } else {
                    this.model.mtabut.clsflgp = "";
                    this.model.nidgrp.rec.clsdat = "";
                }
            }
            
            //国外扣费币种
            if (this.model.nidgrp.rec.redcur === "") {
                this.model.nidgrp.rec.redcur = this.model.nidgrp.cbs.opn1.cur;
            }
            //未偿付币种
            if (this.model.nidgrp.rec.outcur === "") {
                this.model.nidgrp.rec.outcur = this.model.nidgrp.cbs.opn1.cur;
            }
            //收费金额
            if (this.model.swiadd.chacur === "") {
                this.model.swiadd.chacur = this.model.nidgrp.cbs.opn1.cur;
            }
				},
    }
}
//你可以添加自动default处理