default.js 3.83 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
import event from "../event/index";
import Api from "~/service/Api";

export default {
	mixins: [event],
	methods: {
		changeZhqtyp(isInit) {
      if (this.isInDisplay || !isInit) {
        return;
      }
			if (!this.model.dnfmod.zhqtyp) {
				this.model.dnfmod.pridsp = '';
				this.model.dnfmod.zhruzh = '';
				this.model.dnfmod.intdsp = '';
				this.model.dnfmod.lxzyzh = '';
			} else if (this.model.dnfmod.zhqtyp != 'B') {
				this.model.dnfmod.tizamt = '';
			} 
			if (this.model.dnfmod.zhqtyp == 'B') {
				if (Number(this.model.dnfmod.zhqucs) != 0) {
					this.model.dnfmod.zhqtyp = '';
					this.$message.error("该定期保证金账户已经办理过一次部分提支,不能再次办理,请选择“存款销户”");
				}
				if (!this.model.dnfmod.qicuje) {
					this.$message.warning("起存金额为空,请点Get获取!");
				}
			}
		},
		changeCcvtyp(isInit) {
      if (this.isInDisplay || !isInit) {
        return;
      }
			if (!this.model.dnfmod.ccvtyp) {
				this.model.dnfmod.zhqtyp = '';
        this.model.dnfmod.tizamt = '';
        this.model.dnfmod.zhqucs = '';
        this.model.dnfmod.qicuje = '';
        this.model.dnfmod.qixirq = '';
        this.model.dnfmod.zhhuye = '';
        this.model.dnfmod.yewudh = '';	
        this.model.dnfmod.intdsp = '';
        this.model.dnfmod.lxzyzh = '';
        this.model.dnfmod.zhruzh = '';
        this.model.dnfmod.pridsp = '';
			} else if (this.model.dnfmod.ccvtyp != 'C') {
				this.model.dnfmod.zhqtyp = '';
				this.model.dnfmod.tizamt = '';
        this.changeZhqtyp(isInit);
        this.model.liaccv.gleflg ='Y';
			}
			if (this.model.dnfmod.ccvtyp == 'C') {
				if (!this.model.dnfmod.zhqucs) {
					this.onDnfencGet();
				}
				if (this.model.dnfmod.jiluzt == '1') {
					this.$message.error("当前账号已经在核心销户,国结不允许进行操作!");
					this.model.dnfmod.ccvtyp = '';
        }
        this.model.liaccv.gleflg ='N';
			}
		},
		changeTizamt(isInit) {
      if (this.isInDisplay || !isInit) {
        return;
      }
			if (!this.model.dnfmod.tizamt) {
				this.model.dnfmod.tizamt = '0.00';
				return;
			}
			var tizamt = Number(this.model.dnfmod.tizamt);
			var sum = Number(this.model.dnfmod.zhhuye) - Number(this.model.dnfmod.qicuje);
			if (tizamt > 0 && tizamt > sum) {
				this.model.dnfmod.tizamt = '0.00';
				this.$message.error('金额输入有误!错误原因:部分提支金额<=(账户余额-起存金额)');
			}
    },
    defaultDnfDataList() {
      let dataList = [];
      if (this.model.dnfmod.kehzwm !== '') {
          dataList.push(this.transTableData(this.model.dnfmod));
      }
      this.$set(this.codes, 'tableDataList', dataList);
    },
    defaultDnfOperationList(){
      let dflg;
      let len = this.model.dnfmod.kehuzh.trim().length;
      if (len == 17) {
        dflg = this.model.dnfmod.kehuzh.slice(6, 8)
      }
      if (len == 21) {
        dflg = this.model.dnfmod.kehuzh.slice(10, 12)
      }
      if (this.model.dnfmod.kehuzh.slice(0, 3) == "ZMQ" || this.model.dnfmod.kehuzh.slice(0, 3) == "NRA") {
        dflg = this.model.dnfmod.kehuzh.slice(9, 11)
      }
      let operationsList = [];
      switch (dflg) {
        case "81":
          operationsList.push({
            label: "保证金账户冻结",
            value: "A"
          });
          operationsList.push({
            label: "保证金账户解冻",
            value: "B"
          });
          operationsList.push({
            label: "定期转活期",
            value: "C"
          });
          break;
        default:
          operationsList.push({
            label: "保证金账户冻结",
            value: "A"
          });
          operationsList.push({
            label: "保证金账户解冻",
            value: "B"
          });
      }
      this.$set(this.codes, 'operationsList', operationsList);
    }
	},
}
//你可以添加自动default处理