|
|
|
@ -1,13 +1,16 @@ |
|
|
|
|
/* 个人业务>活期业务>存款 */ |
|
|
|
|
<template> |
|
|
|
|
<div class="body"> |
|
|
|
|
<div class="body" v-if="!needBefore"> |
|
|
|
|
<el-row :gutter="20" style="margin: 0"> |
|
|
|
|
<el-form ref="form" :model="form" label-width="120px" :rules="rules"> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="卡号"> |
|
|
|
|
<div class="idCard" @click="popUp('刷卡器')"> |
|
|
|
|
<div class="idCard" @click="popUp('刷卡器')" v-if="!form.idCardNumber"> |
|
|
|
|
<p>请刷卡</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input ref="idCardNumber" :value="form.idCardNumber" disabled></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="币种" prop="currency"> |
|
|
|
|
<el-select v-model="form.currency" placeholder="请选择" ref="currency"> |
|
|
|
@ -39,26 +42,49 @@ |
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button @click="submitForm" type="primary" class="submitBtn">提交</el-button> |
|
|
|
|
</div> |
|
|
|
|
<my-dialog v-if="visible" :visible.sync="visible" :showForm="form" :formName="formName" @submitIt="submitForm2" /> |
|
|
|
|
</div> |
|
|
|
|
<need-before v-else :moduleName='needBefore'> |
|
|
|
|
</need-before> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<script> // currentAccount/deposit |
|
|
|
|
import { mapMutations } from 'vuex' |
|
|
|
|
import { mapMutations, mapGetters } from 'vuex' |
|
|
|
|
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' |
|
|
|
|
import { ismoney, myValidate, checkName, rateListen } from '@/utils/utilFunction.js' |
|
|
|
|
import { addOperation, getOperation } from '@/api/http'; |
|
|
|
|
|
|
|
|
|
import NeedBefore from '@/components/needBefore' |
|
|
|
|
import MyDialog from '@/components/dialog' |
|
|
|
|
const moduleName = 'currentAccount/deposit' |
|
|
|
|
export default{ |
|
|
|
|
name:'', |
|
|
|
|
props:{}, |
|
|
|
|
components: { |
|
|
|
|
NeedBefore, |
|
|
|
|
MyDialog |
|
|
|
|
}, |
|
|
|
|
data(){ |
|
|
|
|
return{ |
|
|
|
|
visible: false, |
|
|
|
|
needBefore: '', |
|
|
|
|
form:{ |
|
|
|
|
currency:'', |
|
|
|
|
money:'', |
|
|
|
|
userName:'', |
|
|
|
|
goldLogo:'', |
|
|
|
|
annualInterest:'', |
|
|
|
|
annualInterest:'0.30%', |
|
|
|
|
remark:'', |
|
|
|
|
idCardNumber: '', // 银行卡号 |
|
|
|
|
}, |
|
|
|
|
formName: { |
|
|
|
|
currency:'币种', // |
|
|
|
|
money:'金额', // |
|
|
|
|
userName:'客户姓名', // |
|
|
|
|
goldLogo:'炒汇标识', // |
|
|
|
|
annualInterest:'年利率', // |
|
|
|
|
remark:'摘要', // |
|
|
|
|
idCardNumber: '银行卡号', // |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
userName: vercustomer , |
|
|
|
@ -83,8 +109,17 @@ export default{ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getFormData() |
|
|
|
|
this.$refs.userName.focus() |
|
|
|
|
if(!this.needBefore) { |
|
|
|
|
this.getFormData() |
|
|
|
|
this.$refs.userName.focus() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
if(this.needsModule(moduleName) === '') { |
|
|
|
|
}else { |
|
|
|
|
this.needBefore = this.needsModule(moduleName) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getFormData(){ |
|
|
|
@ -92,11 +127,9 @@ export default{ |
|
|
|
|
parentId: '285,287,5,26,57,63' |
|
|
|
|
} |
|
|
|
|
getOperation(param).then((data)=>{ |
|
|
|
|
console.log(data) |
|
|
|
|
if(data.status == 200) { |
|
|
|
|
var list = data.data.judgmentRuleReqs |
|
|
|
|
for (var i = 0; i < list.length; i++) { |
|
|
|
|
console.log(list[i].answerId) |
|
|
|
|
if (list[i].answerId == '78') {sessionStorage.setItem('nomBusinessDepositCard', list[i].emptyTwo)} //卡号 |
|
|
|
|
if (list[i].answerId == '79') {this.form.userName = list[i].emptyTwo} //客户姓名 |
|
|
|
|
if (list[i].answerId == '80') {this.form.currency = list[i].emptyTwo} //币种 |
|
|
|
@ -110,52 +143,56 @@ export default{ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
...mapMutations({ |
|
|
|
|
changeShowGoods: 'system/changeShowGoods' |
|
|
|
|
changeShowGoods: 'system/changeShowGoods', |
|
|
|
|
setDataFlow: 'system/setDataFlow', |
|
|
|
|
setNeedsModule: 'system/setNeedsModule' |
|
|
|
|
}), |
|
|
|
|
//提交表单 |
|
|
|
|
submitForm(){ |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
|
this.$refs.form.validate(myValidate(() => { |
|
|
|
|
// 验证通过逻辑写在这 |
|
|
|
|
this.visible = true; |
|
|
|
|
let formList = []; |
|
|
|
|
let nomBusinessDepositCard = sessionStorage.getItem('nomBusinessDepositCard') |
|
|
|
|
let nomBusinessDepositCards = nomBusinessDepositCard // JSON.parse(nomBusinessDepositCard); |
|
|
|
|
if (nomBusinessDepositCards && nomBusinessDepositCards.length > 0){ |
|
|
|
|
formList.push({"answerId":78,"emptyOne": "", "emptyTwo": nomBusinessDepositCards, "operationIds": "285,287,5,26,57,63,78","type": ""})// 卡号 |
|
|
|
|
if(this.form.currency){ |
|
|
|
|
formList.push({ "answerId":'80', "emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "285,287,5,26,57,63,80", "type": "1" })//币种 |
|
|
|
|
} |
|
|
|
|
if(this.form.money){ |
|
|
|
|
formList.push({ "answerId":'82', "emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "285,287,5,26,57,63,82", "type": "3" })//金额 |
|
|
|
|
} |
|
|
|
|
if(this.form.remark){ |
|
|
|
|
formList.push( {"answerId":'84',"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "285,287,5,26,57,63,84", "type": "3"})//摘要 |
|
|
|
|
} |
|
|
|
|
formList.push( |
|
|
|
|
{ "answerId":'79', "emptyOne": "7", "emptyTwo": this.form.userName, "operationIds": "285,287,5,26,57,63,79", "type": "3" },//客户姓名 |
|
|
|
|
{ "answerId":'81', "emptyOne": "9", "emptyTwo": this.form.goldLogo, "operationIds": "285,287,5,26,57,63,81", "type": "1" },//钞汇标识 |
|
|
|
|
{"answerId":'83',"emptyOne": "15", "emptyTwo": this.form.annualInterest, "operationIds": "285,287,5,26,57,63,83", "type": "3"},//年利率 |
|
|
|
|
); |
|
|
|
|
let params= { |
|
|
|
|
parentId:'285,287,5,26,57,63', |
|
|
|
|
lcJudgmentRuleReq:formList, |
|
|
|
|
projectId:+projectId, |
|
|
|
|
startTime:startTime, |
|
|
|
|
} |
|
|
|
|
addOperation(params).then((data)=>{ |
|
|
|
|
this.$message({ |
|
|
|
|
message: '提交成功', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('有必填项未填哦~'); |
|
|
|
|
} |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
submitForm2() { |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
|
let formList = []; |
|
|
|
|
let nomBusinessDepositCard = sessionStorage.getItem('nomBusinessDepositCard') |
|
|
|
|
let nomBusinessDepositCards = nomBusinessDepositCard // JSON.parse(nomBusinessDepositCard); |
|
|
|
|
if (nomBusinessDepositCards && nomBusinessDepositCards.length > 0){ |
|
|
|
|
formList.push({"answerId":78,"emptyOne": "", "emptyTwo": nomBusinessDepositCards, "operationIds": "285,287,5,26,57,63,78","type": ""})// 卡号 |
|
|
|
|
if(this.form.currency){ |
|
|
|
|
formList.push({ "answerId":'80', "emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "285,287,5,26,57,63,80", "type": "1" })//币种 |
|
|
|
|
} |
|
|
|
|
if(this.form.money){ |
|
|
|
|
formList.push({ "answerId":'82', "emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "285,287,5,26,57,63,82", "type": "3" })//金额 |
|
|
|
|
} |
|
|
|
|
if(this.form.remark){ |
|
|
|
|
formList.push( {"answerId":'84',"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "285,287,5,26,57,63,84", "type": "3"})//摘要 |
|
|
|
|
} |
|
|
|
|
formList.push( |
|
|
|
|
{ "answerId":'79', "emptyOne": "7", "emptyTwo": this.form.userName, "operationIds": "285,287,5,26,57,63,79", "type": "3" },//客户姓名 |
|
|
|
|
{ "answerId":'81', "emptyOne": "9", "emptyTwo": this.form.goldLogo, "operationIds": "285,287,5,26,57,63,81", "type": "1" },//钞汇标识 |
|
|
|
|
{"answerId":'83',"emptyOne": "15", "emptyTwo": this.form.annualInterest, "operationIds": "285,287,5,26,57,63,83", "type": "3"},//年利率 |
|
|
|
|
); |
|
|
|
|
let params= { |
|
|
|
|
parentId:'285,287,5,26,57,63', |
|
|
|
|
lcJudgmentRuleReq:formList, |
|
|
|
|
projectId:+projectId, |
|
|
|
|
startTime:startTime, |
|
|
|
|
} |
|
|
|
|
addOperation(params).then((data)=>{ |
|
|
|
|
this.$message({ |
|
|
|
|
message: '提交成功', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('有必填项未填哦~'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
popUp(text) { |
|
|
|
|
this.$store.commit('system/changePop',{show:true,text:'刷卡器',id:'63'}) |
|
|
|
|
}, |
|
|
|
@ -163,6 +200,24 @@ export default{ |
|
|
|
|
checkName: checkName, |
|
|
|
|
rateListen: rateListen |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
|
dataFlow: 'system/dataFlow', |
|
|
|
|
dataFlowCard: 'system/dataFlowCard', |
|
|
|
|
dataFlowPassword: 'system/dataFlowPassword', |
|
|
|
|
needsModule: 'system/needsModule', |
|
|
|
|
idCardNumber: 'system/idCardNumber' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
dataFlowCard(val) { |
|
|
|
|
const { userName, goldLogo, currency } = this.dataFlow |
|
|
|
|
this.form.userName = userName |
|
|
|
|
this.form.goldLogo = goldLogo // goldLogo // 13是什么鬼 |
|
|
|
|
this.form.currency = currency |
|
|
|
|
this.form.idCardNumber = this.idCardNumber |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang='scss' scoped> |
|
|
|
|