|
|
|
@ -1,8 +1,7 @@ |
|
|
|
|
<!-- 外汇业务-购汇 --> |
|
|
|
|
<template> |
|
|
|
|
<div class="body"> |
|
|
|
|
<el-row :gutter="20" |
|
|
|
|
style="margin: 0"> |
|
|
|
|
<el-row :gutter="20" style="margin: 0"> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<p class="text"> |
|
|
|
|
<span>购汇人姓名:</span> |
|
|
|
@ -17,96 +16,56 @@ |
|
|
|
|
剩余 等值49,200.00美元 |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
<el-form ref="form" |
|
|
|
|
:rules="rules" |
|
|
|
|
:model="form" |
|
|
|
|
label-width="120px"> |
|
|
|
|
<el-col :span="10" |
|
|
|
|
:offset="1"> |
|
|
|
|
<el-form-item label="凭证号码" |
|
|
|
|
required> |
|
|
|
|
<div v-if='!cardNumberJudge' |
|
|
|
|
class="idCard" |
|
|
|
|
@click="popUp('刷卡器')"> |
|
|
|
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px"> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="凭证号码" required> |
|
|
|
|
<div v-if='!cardNumberJudge' class="idCard" @click="popUp1('刷卡器')"> |
|
|
|
|
<p>请刷卡</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input ref="cardNumber" |
|
|
|
|
disabled |
|
|
|
|
:value="form.cardNumber" |
|
|
|
|
@input="(val) => inputListen(val, form, 'cardNumber')"></el-input> |
|
|
|
|
<el-input maxlength="20" ref="voucherNumber" disabled :value="form.voucherNumber" |
|
|
|
|
@input="(val) => inputListen(val, form, 'voucherNumber')"></el-input> |
|
|
|
|
<p style="color: #8f8f8f;">可用余额:人民币 3,200,000.00</p> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="钞汇" |
|
|
|
|
prop="goldLogo"> |
|
|
|
|
<el-select v-model.trim="form.goldLogo" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref="goldLogo"> |
|
|
|
|
<el-option v-for="item in getSelectList.goldLogoSelectList" |
|
|
|
|
:label="item.options" |
|
|
|
|
:value="item.itemId" |
|
|
|
|
<el-form-item label="钞汇" prop="goldLogo"> |
|
|
|
|
<el-select v-model.trim="form.goldLogo" placeholder="请选择" ref="goldLogo"> |
|
|
|
|
<el-option v-for="item in getSelectList.goldLogoSelectList" :label="item.options" :value="item.itemId" |
|
|
|
|
:key="item.itemId"> </el-option> |
|
|
|
|
<!-- <el-option label="钞户" value="钞户"> </el-option> --> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="购汇用途" |
|
|
|
|
prop="drawWay"> |
|
|
|
|
<el-select v-model.trim="form.drawWay" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref="drawWay"> |
|
|
|
|
<el-option label="密码" |
|
|
|
|
:value="18"> </el-option> |
|
|
|
|
<el-form-item label="购汇用途" prop="drawWay"> |
|
|
|
|
<el-select v-model.trim="form.drawWay" placeholder="请选择" ref="drawWay"> |
|
|
|
|
<el-option label="密码" :value="18"> </el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10" |
|
|
|
|
:offset="1"> |
|
|
|
|
<el-form-item label="币种" |
|
|
|
|
prop="currency"> |
|
|
|
|
<el-select v-model.trim="form.currency" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref="currency"> |
|
|
|
|
<el-option v-for="item in getSelectList.currencySelectList" |
|
|
|
|
:label="item.options" |
|
|
|
|
:value="item.itemId" |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="币种" prop="currency"> |
|
|
|
|
<el-select v-model.trim="form.currency" placeholder="请选择" ref="currency"> |
|
|
|
|
<el-option v-for="item in getSelectList.currencySelectList" :label="item.options" :value="item.itemId" |
|
|
|
|
:key="item.itemId"> </el-option> |
|
|
|
|
<!-- <el-option value="CNY人民币">CNY人民币</el-option> --> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="外汇金额" |
|
|
|
|
prop="money"> |
|
|
|
|
<el-input :value="form.money" |
|
|
|
|
maxlength="15" |
|
|
|
|
@input="val => ismoney(val, form, 'money')"></el-input> |
|
|
|
|
<el-form-item label="外汇金额" prop="money"> |
|
|
|
|
<el-input :value="form.money" maxlength="15" @input="val => ismoney(val, form, 'money')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取密码" |
|
|
|
|
required> |
|
|
|
|
<div v-if='!form.drawPassword' |
|
|
|
|
class="idCard" |
|
|
|
|
@click="popUp2('密码器')"> |
|
|
|
|
<el-form-item label="支取密码" required> |
|
|
|
|
<div v-if='!form.drawPassword' class="idCard" @click="popUp2('密码器')"> |
|
|
|
|
<p>请输入密码</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else |
|
|
|
|
@click="popUp2('密码器')"> |
|
|
|
|
<el-input :value="form.drawPassword" |
|
|
|
|
ref="drawPassword" |
|
|
|
|
type="password"></el-input> |
|
|
|
|
<div v-else @click="popUp2('密码器')"> |
|
|
|
|
<el-input :value="form.drawPassword" ref="drawPassword" type="password"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button @click="submitForm" |
|
|
|
|
type="primary" |
|
|
|
|
class="submitBtn" |
|
|
|
|
v-throttle>提交</el-button> |
|
|
|
|
<my-dialog :moduleName="moduleName" |
|
|
|
|
v-if="visible" |
|
|
|
|
:visible.sync="visible" |
|
|
|
|
:showForm="form" |
|
|
|
|
:formName="formName" |
|
|
|
|
@submitIt="submitForm2" |
|
|
|
|
:needAuth="needAuth" /> |
|
|
|
|
<el-button @click="submitForm" type="primary" class="submitBtn" v-throttle>提交</el-button> |
|
|
|
|
<my-dialog :moduleName="moduleName" v-if="visible" :visible.sync="visible" :showForm="form" :formName="formName" |
|
|
|
|
@submitIt="submitForm2" :needAuth="needAuth" /> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- <need-before v-else :moduleName='needBefore' :unNeed="unNeed" /> --> |
|
|
|
@ -114,7 +73,7 @@ |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' |
|
|
|
|
import { myValidate, ismoney, checkName, checkHanzi, messagePassword } from '@/utils/utilFunction.js' |
|
|
|
|
import { myValidate, ismoney, checkName, checkHanzi, messagePassword, messageCard, inputListen } from '@/utils/utilFunction.js' |
|
|
|
|
import { addOperation, getOperation } from '@/api/http'; |
|
|
|
|
import { mapMutations, mapGetters } from 'vuex' |
|
|
|
|
import TipsBefore from '@/mixins/tipsBefore' |
|
|
|
@ -133,60 +92,46 @@ export default { |
|
|
|
|
NeedBefore |
|
|
|
|
}, |
|
|
|
|
created () { |
|
|
|
|
if (sessionStorage.getItem('nomCurrentWithdrawalPassword')) { |
|
|
|
|
this.form.drawPassword = sessionStorage.getItem('nomCurrentWithdrawalPassword') |
|
|
|
|
if (sessionStorage.getItem('nomUsefulPhrasesOpenCard')) { |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
const { voucherNumber } = this.dataFlow |
|
|
|
|
this.form.voucherNumber = voucherNumber |
|
|
|
|
} |
|
|
|
|
if (sessionStorage.getItem('nomUsefulPhrasesOpenPassword')) { |
|
|
|
|
this.form.drawPassword = sessionStorage.getItem('nomUsefulPhrasesOpenPassword') |
|
|
|
|
} |
|
|
|
|
// if(this.isNeedBefore) { |
|
|
|
|
// if(sessionStorage.getItem('nomCurrentWithdrawalCard')) { |
|
|
|
|
// this.cardNumberJudge = true |
|
|
|
|
// this.form.cardNumber = this.dataFlow.voucherNumber || '159753' |
|
|
|
|
// } |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
if (sessionStorage.getItem('nomCurrentWithdrawalCard')) { |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
const { currency, userName, goldLogo, serviceCharge, drawWay, voucherNumber } = this.dataFlow |
|
|
|
|
const { currency, goldLogo, drawWay, voucherNumber } = this.dataFlow |
|
|
|
|
this.form.currency = currency |
|
|
|
|
this.form.userName = userName |
|
|
|
|
this.form.goldLogo = goldLogo |
|
|
|
|
this.form.serviceCharge = serviceCharge |
|
|
|
|
this.form.drawWay = drawWay |
|
|
|
|
this.form.cardNumber = voucherNumber |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getFormData() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
moduleName: 'currentAccount/withdrawal', |
|
|
|
|
moduleName: 'foreignExchange/puchasing', |
|
|
|
|
visible: false, |
|
|
|
|
cardNumberJudge: false, |
|
|
|
|
form: { |
|
|
|
|
cardNumber: '', |
|
|
|
|
drawPassword: '', |
|
|
|
|
voucherNumber: '', // 凭证号码 |
|
|
|
|
currency: '', |
|
|
|
|
money: '', |
|
|
|
|
userName: '', |
|
|
|
|
goldLogo: '', |
|
|
|
|
serviceCharge: '', |
|
|
|
|
money: '', |
|
|
|
|
drawWay: '', |
|
|
|
|
remark: '', |
|
|
|
|
drawPassword: '', |
|
|
|
|
}, |
|
|
|
|
formName: { |
|
|
|
|
cardNumber: '卡号', |
|
|
|
|
drawPassword: '支取密码', |
|
|
|
|
voucherNumber: '凭证号码', |
|
|
|
|
currency: '币种', |
|
|
|
|
money: '金额', |
|
|
|
|
userName: '客户姓名', |
|
|
|
|
goldLogo: '钞汇标识', |
|
|
|
|
serviceCharge: '手续费', |
|
|
|
|
drawWay: '支取方式', |
|
|
|
|
remark: '摘要', |
|
|
|
|
goldLogo: '钞汇', |
|
|
|
|
money: '外汇金额', |
|
|
|
|
drawWay: '购汇用途', |
|
|
|
|
drawPassword: '支取密码', |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
userName: vercustomer, |
|
|
|
|
currency: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
@ -208,13 +153,6 @@ export default { |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
serviceCharge: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入手续费', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
money: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
@ -247,36 +185,31 @@ export default { |
|
|
|
|
for (var i = 0; i < list.length; i++) { |
|
|
|
|
if (list[i].answerId == '85') { |
|
|
|
|
// sessionStorage.setItem('nomCurrentWithdrawalCard', list[i].emptyTwo) |
|
|
|
|
this.form.cardNumber = list[i].emptyTwo |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
} //卡号 |
|
|
|
|
else if (list[i].answerId == '86') { this.form.userName = list[i].emptyTwo } //客户姓名 |
|
|
|
|
else if (list[i].answerId == '87') { this.form.currency = +list[i].emptyTwo } //币种 |
|
|
|
|
else if (list[i].answerId == '88') { this.form.goldLogo = +list[i].emptyTwo } //钞汇标识 |
|
|
|
|
else if (list[i].answerId == '89') { this.form.money = list[i].emptyTwo } //金额 |
|
|
|
|
else if (list[i].answerId == '90') { this.form.drawWay = +list[i].emptyTwo } //支取方式 |
|
|
|
|
// if (list[i].answerId == '91') {sessionStorage.setItem('nomCurrentWithdrawalPassword', list[i].emptyTwo)} //支取密码 |
|
|
|
|
else if (list[i].answerId == '91') { |
|
|
|
|
console.log(91) |
|
|
|
|
if (sessionStorage.getItem('nomCurrentWithdrawalPassword')) { |
|
|
|
|
this.form.drawPassword = sessionStorage.getItem('nomCurrentWithdrawalPassword') |
|
|
|
|
} else { |
|
|
|
|
this.form.drawPassword = list[i].emptyTwo |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (list[i].answerId == '92') { this.form.serviceCharge = list[i].emptyTwo } //手续费 |
|
|
|
|
else if (list[i].answerId == '93') { this.form.remark = list[i].emptyTwo } //摘要 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('fffs') |
|
|
|
|
|
|
|
|
|
console.log('issue') |
|
|
|
|
console.log(sessionStorage.getItem('nomCurrentWithdrawalPassword')) |
|
|
|
|
}).catch((error) => { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
submitForm () { |
|
|
|
|
if (this.submited) return this.$message.error('已提交!') |
|
|
|
|
if (!this.form.voucherNumber) { |
|
|
|
|
messageCard('请填写凭证号码') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.drawPassword) { |
|
|
|
|
messagePassword() |
|
|
|
|
return |
|
|
|
@ -295,19 +228,15 @@ export default { |
|
|
|
|
let formList = []; |
|
|
|
|
// 验证通过逻辑写在这 |
|
|
|
|
// if (nomCurrentWithdrawalCards && nomCurrentWithdrawalCards.length > 0 && nomCurrentWithdrawalPasswords){ |
|
|
|
|
if (this.cardNumberJudge && this.form.cardNumber) { |
|
|
|
|
if (this.cardNumberJudge) { |
|
|
|
|
// formList.push({"answerId":85,"emptyOne": "", "emptyTwo": nomCurrentWithdrawalCards, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,26,57,64,85","type": ""})// 卡号 |
|
|
|
|
formList.push({ "answerId": 85, "emptyOne": "", "emptyTwo": this.form.cardNumber, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,85", "type": "" }) |
|
|
|
|
// formList.push({"answerId":91,"emptyOne": "", "emptyTwo": nomCurrentWithdrawalPassword, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,26,57,64,91","type": ""}) |
|
|
|
|
formList.push({ "answerId": 91, "emptyOne": "17", "emptyTwo": this.form.drawPassword, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,91", "type": "3" }) |
|
|
|
|
if (this.form.currency) { formList.push({ "answerId": '87', "emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,87", "type": "1" }) }//币种 |
|
|
|
|
if (this.form.money) { formList.push({ "answerId": '89', "emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,89", "type": "3" }) }//金额 |
|
|
|
|
if (this.form.remark) { formList.push({ "answerId": '93', "emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,93", "type": "3" }) }//摘要 |
|
|
|
|
formList.push( |
|
|
|
|
{ "answerId": '86', "emptyOne": "7", "emptyTwo": this.form.userName, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,86", "type": "3" },//客户姓名 |
|
|
|
|
{ "answerId": '88', "emptyOne": "9", "emptyTwo": this.form.goldLogo, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,88", "type": "1" },//钞汇标识 |
|
|
|
|
{ "answerId": '90', "emptyOne": "13", "emptyTwo": this.form.drawWay, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,90", "type": "1" },//支取方式 |
|
|
|
|
{ "answerId": '92', "emptyOne": "46", "emptyTwo": this.form.serviceCharge, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,26,57,64,92", "type": "3" },//手续费 |
|
|
|
|
// {"answerId":91,"emptyOne": "", "emptyTwo": "", "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,26,57,64,91","type": ""}// 密码框 |
|
|
|
|
) |
|
|
|
|
console.log(formList) |
|
|
|
@ -336,21 +265,22 @@ export default { |
|
|
|
|
this.setTipsOperate('有必填项未填~'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
popUp (text) { |
|
|
|
|
popUp1 (text) { |
|
|
|
|
this.setTipsOperate('请刷银行卡'); |
|
|
|
|
this.setPopId('64') |
|
|
|
|
this.setPopId('166') |
|
|
|
|
sessionStorage.setItem('computerPath', this.$route.fullPath) |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
popUp2 (text) { |
|
|
|
|
this.setTipsOperate('请在密码器输入密码'); |
|
|
|
|
this.setPopId('64,2') |
|
|
|
|
this.setPopId('167') |
|
|
|
|
sessionStorage.setItem('computerPath', this.$route.fullPath) |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
ismoney: ismoney, |
|
|
|
|
checkName: checkName, |
|
|
|
|
checkHanzi: checkHanzi |
|
|
|
|
ismoney, |
|
|
|
|
checkName, |
|
|
|
|
checkHanzi, |
|
|
|
|
inputListen, |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
@ -370,6 +300,7 @@ export default { |
|
|
|
|
.wrap .body { |
|
|
|
|
margin-top: 0; |
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
.idCard { |
|
|
|
|
border-radius: 5px; |
|
|
|
|
background: #cfddff; |
|
|
|
@ -380,13 +311,16 @@ export default { |
|
|
|
|
color: #6191ff; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.texts { |
|
|
|
|
margin: 30px 0 30px 80px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
color: #666; |
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
line-height: 1.6; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
span { |
|
|
|
|
display: inline-block; |
|
|
|
|
width: 90px; |
|
|
|
|