index.js 1.57 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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import BigNumber from "bignumber.js";
export default {
	mixins: [commonFunctions],
	methods: {
		    // 获取地区机构号
        async getOwnExtkeyCondition() {
          const loading = this.loading();
          let res = await Api.post('/business/nitopnRule/getOwnExtkeyCondition');
          loading.close();
          if (res.respCode === SUCCESS) {
            this.ownExtkeyList = res.data;
          }
				},
				chCfaflg(val){
					if (val == '3') {
            this.model.cfagit.dclflg = 'X'
            if(this.model.cfagit.recgrp.dcl == null || this.model.cfagit.recgrp.dcl.length == 0) {
              var a = [{
              exguarancode: "",
              actiontype: "",
              wabachandate: "",
              basere: "",
              remark: "",
              actiondesc: "",
              acp: "",
              }];
              this.model.cfagit.recgrp.dcl = a;
              }
            this.model.cfagit.recgrp.dcl[0].wabachandate = this.model.chgdat
            let obj = this.model.gidgrp || this.model.nidgrp
            this.model.cfagit.recgrp.dcl[0].basere = BigNumber.sum(obj.cbs.max.amt).plus(new BigNumber(this.model.chgamt))
            this.model.cfagit.recgrp.dcl[0].exguarancode = this.model.cfagit.recgrp.bas.exguarancode || ''
            this.model.cfagit.recgrp.dcl[0].actiontype = this.model.cfagit.recgrp.bas.actiontype || ''
            this.model.cfagit.recgrp.dcl[0].acp = "X"
					} else {
          this.model.cfagit.dclflg = ''
          }
				}
	},
}