diff --git a/src/pages/manage/list/business/deposit.vue b/src/pages/manage/list/business/deposit.vue index afa0fc9..8d7d5d6 100644 --- a/src/pages/manage/list/business/deposit.vue +++ b/src/pages/manage/list/business/deposit.vue @@ -74,6 +74,7 @@ import { mapState } from 'vuex' import { checkHanzi, checkName, ismoney, rateListen, myValidate } from '@/utils/utilFunction.js' import { vercustomer, verrate } from '@/utils/verify.js' +import { addOperation, getOperation } from '@/api/http'; export default { name: 'index', components:{}, @@ -119,6 +120,20 @@ export default { second:[// 二级卡数组 ], + myTable: { + 241: { + prop: 'customerName', + type: '3' + }, + 240: { + prop: 'username', + type: '3' + }, + 244: { + prop: 'depositNum', + type: '3' + } + } } }, created() { @@ -126,15 +141,70 @@ export default { }, mounted() { this.$refs.username.focus() + this.getFormData() }, methods: { + getFormData(){ + let param= { + parentId: '0,5,27,225' + } + getOperation(param).then((data)=>{ + // console.log(data) + if(data.status == 200) { + var list = data.data.judgmentRuleReqs + for (var i = 0; i < list.length; i++) { + const { answerId, emptyTwo } = list[i] + if (answerId === '242') {this.form.currency = emptyTwo} + else if (answerId === '243') {this.form.currencyMark = emptyTwo} + else if (answerId === '245') {this.form.interestRate = emptyTwo;} + else if (answerId === '246') {this.form.abstract = emptyTwo} + else { + this.form[this.myTable[answerId].prop] = emptyTwo + } + } + } + }).catch((error)=>{ + }) + }, submitForm() { + let projectId = sessionStorage.getItem('projectId') + let startTime = sessionStorage.getItem('startTime') this.$refs.form.validate(myValidate(() => { // 验证通过逻辑写在这 - this.$message({ - message: '验证成功', - center: true - }); + this.visible = true; + let formList = []; + const parentId = '0,5,27,225' + if(this.form.currency){ + formList.push({ "answerId":'242', "emptyOne": "19", "emptyTwo": this.form.currency, "operationIds": parentId + ',242', "type": "1" })//客户号 + } + if(this.form.currencyMark){ + formList.push({ "answerId":'243', "emptyOne": "7", "emptyTwo": this.form.currencyMark, "operationIds": parentId + ',243', "type": "3" })//统计代码 + } + if(this.form.interestRate){ + formList.push( {"answerId":'245',"emptyOne": "5", "emptyTwo": this.form.interestRate, "operationIds": parentId + ",245", "type": "3"})//外汇核准号 + } + if(this.form.abstract){ + formList.push( {"answerId":'246',"emptyOne": "5", "emptyTwo": this.form.abstract, "operationIds": parentId + ",246", "type": "3"})//外汇证号 + } + let tmpIndex = 100; + for(const key in this.myTable) { + const { prop, type } = this.myTable[key] + formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type }) + } + let params= { + parentId, + lcJudgmentRuleReq:formList, + projectId:+projectId, + startTime:startTime, + } + addOperation(params).then((data)=>{ + this.$message({ + message: '提交成功', + type: 'success' + }); + }).catch((error)=>{ + }) + }, this.$refs)); }, ismoney: ismoney, diff --git a/src/pages/manage/list/business/transfer.vue b/src/pages/manage/list/business/transfer.vue index 18767be..825bf7f 100644 --- a/src/pages/manage/list/business/transfer.vue +++ b/src/pages/manage/list/business/transfer.vue @@ -165,6 +165,56 @@ export default { second:[// 二级卡数组 ], + myTable: { + // transoutNum: '', // 转出账号 + // certificateNum: '', // 凭证号码 + // customerName: '', // 客户姓名 + // transinNum: '', // 转入账号 + // transinName: '', // 转入户名 + // money: '', // 金额 + 247: { + prop: 'username', + type: '3' + }, + 248: { + prop: 'customerName', + type: '3' + }, + 249: { + prop: 'voucherNum', + type: '3' + }, + 254: { + prop: 'money', + type: '3' + } + }, + myTable2: { + 250: { + prop: 'issueDate', + type: '3' + }, + 251: { + prop: 'currency', + type: '3' + }, + 252: { + prop: 'currencyMark', + type: '3' + }, + 255: { + prop: 'payWay', + type: '3' + }, + 253: { + prop: 'certificateType', + type: '3' + }, + 256: { + prop: 'abstract', + type: '3' + } + } } }, created() { @@ -174,13 +224,67 @@ export default { this.$refs.transoutNum.focus() }, methods: { + getFormData(){ + let param= { + parentId: '0,5,27,226' + } + getOperation(param).then((data)=>{ + // console.log(data) + if(data.status == 200) { + var list = data.data.judgmentRuleReqs + for (var i = 0; i < list.length; i++) { + const { answerId, emptyTwo } = list[i] + if (answerId === '242') {this.form.currency = emptyTwo} + else if (answerId === '243') {this.form.currencyMark = emptyTwo} + else if (answerId === '245') {this.form.interestRate = emptyTwo;} + else if (answerId === '246') {this.form.abstract = emptyTwo} + else { + this.form[this.myTable[answerId].prop] = emptyTwo + } + } + } + }).catch((error)=>{ + }) + }, submitForm() { + let projectId = sessionStorage.getItem('projectId') + let startTime = sessionStorage.getItem('startTime') this.$refs.form.validate(myValidate(() => { // 验证通过逻辑写在这 - this.$message({ - message: '验证成功', - center: true - }); + this.visible = true; + let formList = []; + const parentId = '0,5,27,225' + if(this.form.currency){ + formList.push({ "answerId":'242', "emptyOne": "19", "emptyTwo": this.form.currency, "operationIds": parentId + ',242', "type": "1" })//客户号 + } + if(this.form.currencyMark){ + formList.push({ "answerId":'243', "emptyOne": "7", "emptyTwo": this.form.currencyMark, "operationIds": parentId + ',243', "type": "3" })//统计代码 + } + if(this.form.interestRate){ + formList.push( {"answerId":'245',"emptyOne": "5", "emptyTwo": this.form.interestRate, "operationIds": parentId + ",245", "type": "3"})//外汇核准号 + } + if(this.form.abstract){ + formList.push( {"answerId":'246',"emptyOne": "5", "emptyTwo": this.form.abstract, "operationIds": parentId + ",246", "type": "3"})//外汇证号 + } + let tmpIndex = 100; + for(const key in this.myTable) { + const { prop, type } = this.myTable[key] + formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type }) + } + let params= { + parentId, + lcJudgmentRuleReq:formList, + projectId:+projectId, + startTime:startTime, + } + addOperation(params).then((data)=>{ + this.$message({ + message: '提交成功', + type: 'success' + }); + }).catch((error)=>{ + }) + }, this.$refs)); }, ismoney: ismoney, diff --git a/src/pages/manage/list/business/withdrawal.vue b/src/pages/manage/list/business/withdrawal.vue index d86bdfd..007bf2b 100644 --- a/src/pages/manage/list/business/withdrawal.vue +++ b/src/pages/manage/list/business/withdrawal.vue @@ -90,8 +90,9 @@