limpBlEvent.js 2.15 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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import operationFunc from '../../../../mixin/operationFunc';
import Utils from '~/utils';
export default {
  mixins: [commonFunctions, operationFunc],
  methods: {
		async	serach(){
			const loading = this.loading('正在匹配历史额度数据');
			let params = {
				limAddVo:this.model
			};

			let rtnmsg = await Api.post(`/business/inflsb/iniLimadd`, params);
			if (rtnmsg.respCode === SUCCESS) {
				if (rtnmsg.data) {
					Utils.copyValueFromVoData(this.model, rtnmsg.data.limAddVo);
				}
			}
			loading.close();
		},
		//占用
		async	use(){

			const loading = this.loading('正在额度占用');
			let params = {
				limAddVo:this.model
			};

			let rtnmsg = await Api.post(`/business/inflsb/limadd`, params);
			if (rtnmsg.respCode === SUCCESS) {
				if (rtnmsg.data) {
					Utils.copyValueFromVoData(this.model, rtnmsg.data.limAddVo);
				
            this.$notify({
              title: "成功",
              message: "占用成功",
              type: "success",
            });
          
				}
			}
			loading.close();

		},
		//抹账
		async	wipe(){
			const loading = this.loading('正在额度抹账');
			let params = {
				limAddVo:this.model
			};

			let rtnmsg = await Api.post(`/business/inflsb/limrps`, params);
			if (rtnmsg.respCode === SUCCESS) {
				if (rtnmsg.data) {
					Utils.copyValueFromVoData(this.model, rtnmsg.data.limAddVo);
				
            this.$notify({
              title: "成功",
              message: "抹账成功",
              type: "success",
            });
          
				}
			}
			loading.close();
		},
		//释放
		async	release(){

			const loading = this.loading('正在额度释放');
			let params = {
				limAddVo:this.model
			};

			let rtnmsg = await Api.post(`/business/inflsb/limrls`, params);
			if (rtnmsg.respCode === SUCCESS) {
				if (rtnmsg.data) {
					Utils.copyValueFromVoData(this.model, rtnmsg.data.limAddVo);
				
            this.$notify({
              title: "成功",
              message: "额度释放成功",
              type: "success",
            });
          
				}
			}
			loading.close();
		},
	}
};