default.js 2.53 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
import commonFunctions from '~/mixin/commonFunctions.js';
import Api from '~/service/Api';
export default {
	mixins: [commonFunctions],
	methods: {

		// 获取开立方式
		async getHndtypData() {
			let data = {
				dbcode: 'hndtyp',
				transName: 'NITOPN'
			}
			const loading = this.loading();
			let res = await Api.post('/business/nitopnRule/getHndtypData', data);
			loading.close();
			if (res.respCode === SUCCESS) {
				this.$set(this.codes, 'hndtypList', res.data)
			}
		},

		// 获取客户经理信息
		async getResponsibleUser() {
			const loading = this.loading();
			let res = await Api.post('/business/nitopnRule/getResponseiblePeople');
			loading.close();
			if (res.respCode === SUCCESS) {
				this.model.nitp.usr.extkey = res.data;
			}
		},
		// 初始化备份保函文本字段
		getGtxgidtxtMark () {
			this.$set(this.codes, 'gtxgidtxtMark', this.model.nidgrp.blk.gidtxt)
		},

		// 需用户确认有条件显示
		async judgementNeedCustomerButtonShow() {
			let trninr;
			if(this.$route.query.businessInr){
				trninr = this.$route.query.businessInr
			}else{
				trninr = ''
			}
			let type;
			if(this.$route.query.businessType){
				type = this.$route.query.businessType
			}else{
				type = ''
			}
			let data = {
				extkey: this.$store.state.UserContext.currentOrg.departmentNumber,
				trninr: trninr,
				type: type
			}
			const loading = this.loading();
			let res = await Api.post('/business/nitopnRule/judgementNeedCustomerButtonShow', data);
			loading.close();
			if (res.respCode === SUCCESS) {
				this.$set(this.codes, 'buttonShow', res.data);
			}
		},

		//保函文本格式
		async onGtxinr() {
			if (!this.model.nidgrp.rec.gtxinr) {
				if (this.model.nidgrp.rec.gartyp == "1") {
					this.model.nidgrp.rec.gtxinr = "<NILTXT>";
				} else {
					this.model.nidgrp.rec.gtxinr = "";
				}
			}
			let data = {
				gartyp: this.model.nidgrp.rec.gartyp,
				hndtyp: this.model.nidgrp.rec.hndtyp,
				gtxinr: this.model.nidgrp.rec.gtxinr,
				giduil: this.model.nidgrp.rec.giduil,
				segtyp: this.model.nidgrp.rec.segtyp,
				objextkey: this.$store.state.UserContext.currentOrg.departmentNumber,
				trntyp: 'GNBH',
				fromflg: '',
				objinr: this.model.trnmod.swiadd.objinr || "",
				msgtyp: ""
			}
			const loading = this.loading();
			let res = await Api.post('/business/gitopn/defaultGidgrpRecGtxinrN1000FromGtx', data);
			loading.close();
			if (res.respCode === SUCCESS) {
				if (res.data && res.data.length > 0) {
					this.$set(this.codes, 'atxinrList', res.data)
				}
			}
		},
	},
}
//你可以添加自动default处理