|
|
|
@ -115,6 +115,7 @@ |
|
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
import { myValidate, ismoney, checkName, checkHanzi } from '@/utils/utilFunction.js' |
|
|
|
|
import { vercustomer, verrate } from '@/utils/verify.js' |
|
|
|
|
import { addOperation, getOperation } from '@/api/http'; |
|
|
|
|
export default { |
|
|
|
|
name: 'index', |
|
|
|
|
components:{}, |
|
|
|
@ -207,21 +208,153 @@ export default { |
|
|
|
|
second:[// 二级卡数组 |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
myTable: { |
|
|
|
|
229: { |
|
|
|
|
prop: 'customerName', |
|
|
|
|
type: '3' |
|
|
|
|
}, |
|
|
|
|
231: { |
|
|
|
|
prop: 'accountNature', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
230: { |
|
|
|
|
prop: 'accountType', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
232: { |
|
|
|
|
prop: 'accountManagement', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
233: { |
|
|
|
|
prop: 'currencyType', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
234: { |
|
|
|
|
prop: 'currencyMark', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
235: { |
|
|
|
|
prop: 'calculateWay', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
236: { |
|
|
|
|
prop: 'outAccountWay', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
237: { |
|
|
|
|
prop: 'withdrawingWay', |
|
|
|
|
type: '1' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
|
|
|
|
|
this.$refs.customerNumber.focus() |
|
|
|
|
this.getFormData() // 暂时无缓存,先不用 |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getFormData(){ |
|
|
|
|
let param= { |
|
|
|
|
parentId: '0,5,27,224' |
|
|
|
|
} |
|
|
|
|
getOperation(param).then((data)=>{ |
|
|
|
|
// console.log(data) |
|
|
|
|
if(data.status == 200) { |
|
|
|
|
var list = data.data.judgmentRuleReqs |
|
|
|
|
console.log(list) |
|
|
|
|
for (var i = 0; i < list.length; i++) { |
|
|
|
|
console.log(i) |
|
|
|
|
const { answerId, emptyTwo } = list[i] |
|
|
|
|
if (answerId === '238') {this.form.customerName = emptyTwo} |
|
|
|
|
else if (answerId === '228') {this.form.customerNumber = emptyTwo} |
|
|
|
|
else if (answerId === '84') {this.form.foreignCurrencyCertificate = emptyTwo} |
|
|
|
|
else if (answerId === '228') {this.form.clientNumber = emptyTwo} |
|
|
|
|
else if (answerId === '239') {this.form.foreignCurrencyBumber = 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.visible = true; |
|
|
|
|
let formList = []; |
|
|
|
|
const parentId = '0,5,27,224' |
|
|
|
|
if(this.form.customerNumber){ |
|
|
|
|
formList.push({ "answerId":'228', "emptyOne": "19", "emptyTwo": this.form.customerNumber, "operationIds": parentId + ',228', "type": "3" })//客户号 |
|
|
|
|
} |
|
|
|
|
if(this.form.clientNumber){ |
|
|
|
|
formList.push({ "answerId":'238', "emptyOne": "7", "emptyTwo": this.form.clientNumber, "operationIds": parentId + ',238', "type": "3" })//统计代码 |
|
|
|
|
} |
|
|
|
|
if(this.form.foreignCurrencyBumber){ |
|
|
|
|
formList.push( {"answerId":'239',"emptyOne": "5", "emptyTwo": this.form.foreignCurrencyBumber, "operationIds": parentId + ",239", "type": "3"})//外汇核准号 |
|
|
|
|
} |
|
|
|
|
// if(this.form.foreignCurrencyCertificate){ |
|
|
|
|
// formList.push( {"answerId":'84',"emptyOne": "5", "emptyTwo": this.form.remark, "operationIds": "0,5,26,57,63,84", "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: '验证成功', |
|
|
|
|
center: true |
|
|
|
|
message: '提交成功', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 以下暂时无缓存 |
|
|
|
|
// let nomBusinessDepositCard = sessionStorage.getItem('nomBusinessDepositCard') |
|
|
|
|
// let nomBusinessDepositCards = JSON.parse(nomBusinessDepositCard); |
|
|
|
|
// if (nomBusinessDepositCards && nomBusinessDepositCards.length > 0){ |
|
|
|
|
// // for (var i=0;i<nomBusinessDepositCards.length;i++){ |
|
|
|
|
// // formList.push({"answerId":nomBusinessDepositCards[i].id,"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,26,57,63,78,"+nomBusinessDepositCards[i].id,"type": ""})// 卡号 |
|
|
|
|
// // } |
|
|
|
|
// if(this.form.customerNumber){ |
|
|
|
|
// formList.push({ "answerId":'228', "emptyOne": "19", "emptyTwo": this.form.customerNumber, "operationIds": "0,5,26,57,63,80", "type": "1" })//币种 |
|
|
|
|
// } |
|
|
|
|
// if(this.form.money){ |
|
|
|
|
// formList.push({ "answerId":'82', "emptyOne": "7", "emptyTwo": this.form.money, "operationIds": "0,5,26,57,63,82", "type": "3" })//金额 |
|
|
|
|
// } |
|
|
|
|
// if(this.form.remark){ |
|
|
|
|
// formList.push( {"answerId":'84',"emptyOne": "5", "emptyTwo": this.form.remark, "operationIds": "0,5,26,57,63,84", "type": "3"})//摘要 |
|
|
|
|
// } |
|
|
|
|
// formList.push( |
|
|
|
|
// { "answerId":'79', "emptyOne": "3", "emptyTwo": this.form.userName, "operationIds": "0,5,26,57,63,79", "type": "3" },//客户姓名 |
|
|
|
|
// { "answerId":'81', "emptyOne": "4", "emptyTwo": this.form.goldLogo, "operationIds": "0,5,26,57,63,81", "type": "1" },//钞汇标识 |
|
|
|
|
// {"answerId":'83',"emptyOne": "2", "emptyTwo": this.form.annualInterest, "operationIds": "0,5,26,57,63,83", "type": "3"},//年利率 |
|
|
|
|
// ); |
|
|
|
|
// let params= { |
|
|
|
|
// parentId:'0,5,27,224', |
|
|
|
|
// lcJudgmentRuleReq:formList, |
|
|
|
|
// projectId:+projectId, |
|
|
|
|
// startTime:startTime, |
|
|
|
|
// } |
|
|
|
|
// addOperation(params).then((data)=>{ |
|
|
|
|
// this.$message({ |
|
|
|
|
// message: '提交成功', |
|
|
|
|
// type: 'success' |
|
|
|
|
// }); |
|
|
|
|
// }).catch((error)=>{ |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
checkHanzi: checkHanzi, |
|
|
|
|