|
|
|
@ -1,12 +1,15 @@ |
|
|
|
|
// 整存整取 > 取款 |
|
|
|
|
<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="凭证号码" required> |
|
|
|
|
<div class="idCard" @click="popUp('身份证扫描仪')"> |
|
|
|
|
<p>请填凭证号码</p> |
|
|
|
|
<div v-if='!cardNumberJudge' class="idCard" @click="popUp2('刷卡器')"> |
|
|
|
|
<p>请刷卡</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input @blur="getDataBlur" ref="voucherNumber" :value="form.voucherNumber" @input="(val) => inputListen(val, form, 'voucherNumber')"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="币种" prop="currencyType"> |
|
|
|
@ -21,12 +24,15 @@ |
|
|
|
|
<el-input :value="form.withdrawAmount" @input="val => ismoney(val, form, 'withdrawAmount')" ref="withdrawAmount"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="利息(%)" prop="interest"> |
|
|
|
|
<el-input :value="form.interest" @input="(val) => checkHanzi(val, form, 'interest')" ref="interest"></el-input> |
|
|
|
|
<el-input :value="form.interest" @input="(val) => rateListen(val, form, 'interest')" ref="interest"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取密码" required> |
|
|
|
|
<div class="idCard" @click="popUp2('密码器')"> |
|
|
|
|
<div v-if='!form.drawPassword' class="idCard" @click="popUp('密码器')"> |
|
|
|
|
<p>请输入密码</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input :value="form.drawPassword" disabled ref="drawPassword" type="password"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
@ -34,7 +40,7 @@ |
|
|
|
|
<el-input :value="form.customerName" @input="(val) => checkName(val, form, 'customerName')" ref="customerName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="钞汇标识" prop="currencyMark"> |
|
|
|
|
<el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> |
|
|
|
|
<el-select v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> |
|
|
|
|
<el-option label="钞户" value="钞户"> </el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -42,7 +48,7 @@ |
|
|
|
|
<el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取类别" prop="withdrawType"> |
|
|
|
|
<el-select disabled v-model="form.withdrawType" placeholder="请选择" ref="withdrawType"> |
|
|
|
|
<el-select v-model="form.withdrawType" placeholder="请选择" ref="withdrawType"> |
|
|
|
|
<el-option label="现金" value="现金"> </el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -57,28 +63,79 @@ |
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button @click="submitIt" type="primary" class="submitBtn">提交</el-button> |
|
|
|
|
<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> |
|
|
|
|
import { myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2 } from '@/utils/utilFunction.js'; |
|
|
|
|
import { myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2, rateListen, inputListen } from '@/utils/utilFunction.js'; |
|
|
|
|
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' |
|
|
|
|
|
|
|
|
|
const moduleName = 'consumerClient' |
|
|
|
|
import { mapMutations, mapGetters } from 'vuex' |
|
|
|
|
import NeedBefore from '@/components/needBefore' |
|
|
|
|
import MyDialog from '@/components/dialog' |
|
|
|
|
export default{ |
|
|
|
|
name:'', |
|
|
|
|
props:{}, |
|
|
|
|
components: { |
|
|
|
|
NeedBefore, |
|
|
|
|
MyDialog |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
if(this.inMyWork(moduleName)) { |
|
|
|
|
if(this.needsModule(moduleName) === '') { |
|
|
|
|
}else { |
|
|
|
|
this.needBefore = this.needsModule(moduleName) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data(){ |
|
|
|
|
return{ |
|
|
|
|
visible: false, |
|
|
|
|
needBefore: '', |
|
|
|
|
cardNumberJudge: false, |
|
|
|
|
form:{ |
|
|
|
|
// 必填项 |
|
|
|
|
currencyMark: '钞户', // 钞汇标识 |
|
|
|
|
drawPassword: '', // 凭证密码 |
|
|
|
|
cardNumber: '', // 凭证号码 |
|
|
|
|
currencyMark: '', // 钞汇标识 |
|
|
|
|
capital: '', // 本金 |
|
|
|
|
interest: '', // 利息 |
|
|
|
|
withdrawAmount: '', // 支取金额 |
|
|
|
|
withdrawType: '现金', // 支取类别 |
|
|
|
|
withdrawType: '', // 支取类别 |
|
|
|
|
withdrawWay: '', // 支取方式 |
|
|
|
|
voucherNumber: '', // 凭证号码 |
|
|
|
|
// 非必填项 |
|
|
|
|
customerName: '', // 客户姓名 |
|
|
|
|
depositNumber: '', // 定存编号 |
|
|
|
|
currencyType: '', // 币种 |
|
|
|
|
|
|
|
|
|
// userName, 这是vuex里的 |
|
|
|
|
// currency:'CYC人民币', |
|
|
|
|
// goldLogo:'钞户', |
|
|
|
|
// interest: '0.00', |
|
|
|
|
// depositNubianmber: '0912', |
|
|
|
|
// capital: 100, // 不知道是多少 |
|
|
|
|
// withdrawType: '现金', // 支取类别 |
|
|
|
|
// withdrawWay: '密码', // 支取方式 |
|
|
|
|
}, |
|
|
|
|
formName:{ |
|
|
|
|
// 必填项 |
|
|
|
|
drawPassword: '凭证密码', // |
|
|
|
|
cardNumber: '凭证号码', // |
|
|
|
|
currencyMark: '钞汇标识', // |
|
|
|
|
capital: '本金', // |
|
|
|
|
interest: '利息', // |
|
|
|
|
withdrawAmount: '支取金额', // |
|
|
|
|
withdrawType: '支取类别', // |
|
|
|
|
withdrawWay: '支取方式', // |
|
|
|
|
voucherNumber: '凭证号码', // |
|
|
|
|
// 非必填项 |
|
|
|
|
customerName: '客户姓名', // |
|
|
|
|
depositNumber: '定存编号', // |
|
|
|
|
currencyType: '币种', // |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
customerName: vercustomer, |
|
|
|
@ -95,6 +152,11 @@ export default{ |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
myTable: { |
|
|
|
|
// voucherNumber |
|
|
|
|
144: { |
|
|
|
|
prop: 'voucherNumber', |
|
|
|
|
type: '3' |
|
|
|
|
}, |
|
|
|
|
146: { |
|
|
|
|
prop: 'currencyType',//币种 |
|
|
|
|
type: '1', |
|
|
|
@ -150,10 +212,30 @@ export default{ |
|
|
|
|
this.$refs.depositNumber.focus() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
...mapMutations({ |
|
|
|
|
changeShowGoods: 'system/changeShowGoods', |
|
|
|
|
setDataFlow: 'system/setDataFlow', |
|
|
|
|
setNeedsModule: 'system/setNeedsModule' |
|
|
|
|
}), |
|
|
|
|
getDataBlur() { |
|
|
|
|
// 客户姓名、币种、钞汇标识、定存编号(0912)、本金(开户时存的业务中的金额)、支取类别(现金)、支取方式(密码) |
|
|
|
|
if(this.form.voucherNumber) { |
|
|
|
|
const { userName, currency, goldLogo, interest, depositNumber, capital, withdrawType, withdrawWay } = this.dataFlow |
|
|
|
|
console.log(interest) |
|
|
|
|
this.form.customerName = userName |
|
|
|
|
this.form.currencyType = currency |
|
|
|
|
this.form.currencyMark = goldLogo |
|
|
|
|
this.form.interest = interest |
|
|
|
|
this.form.depositNumber = depositNumber |
|
|
|
|
this.form.capital = capital |
|
|
|
|
this.form.withdrawType = withdrawType |
|
|
|
|
this.form.withdrawWay = withdrawWay |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getFormData(){ |
|
|
|
|
const parentId = '285,287,5,26,58,120' |
|
|
|
|
const cards = { |
|
|
|
|
144: 'nomtimeDepositWithdrawal1', |
|
|
|
|
// 144: 'nomtimeDepositWithdrawal1', |
|
|
|
|
154: 'nomtimeDepositWithdrawalPassword' |
|
|
|
|
} |
|
|
|
|
autoPlay2(parentId, this.form, this.myTable2, this.myTable, cards) |
|
|
|
@ -165,27 +247,55 @@ export default{ |
|
|
|
|
this.$store.commit('system/changePop',{show:true,text, id: '154'}) |
|
|
|
|
}, |
|
|
|
|
submitIt() { |
|
|
|
|
let nomtimeDepositWithdrawal1 = sessionStorage.getItem('nomtimeDepositWithdrawal1') |
|
|
|
|
let nomtimeDepositWithdrawalPassword = sessionStorage.getItem('nomtimeDepositWithdrawalPassword') |
|
|
|
|
this.$refs.form.validate(myValidate(() => { |
|
|
|
|
// 验证通过逻辑写在这 |
|
|
|
|
this.visible = true; |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
submitForm2() { |
|
|
|
|
// let nomtimeDepositWithdrawal1 = sessionStorage.getItem('nomtimeDepositWithdrawal1') |
|
|
|
|
let nomtimeDepositWithdrawalPassword = sessionStorage.getItem('nomtimeDepositWithdrawalPassword') |
|
|
|
|
const parentId = '285,287,5,26,58,120' |
|
|
|
|
const cards = [ |
|
|
|
|
{ |
|
|
|
|
144: nomtimeDepositWithdrawal1 |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// 144: nomtimeDepositWithdrawal1 |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
154: nomtimeDepositWithdrawalPassword, |
|
|
|
|
"subjectId": 17, |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
autoPlay(parentId, this.form, this.myTable2, this.myTable, cards) |
|
|
|
|
}, this.$refs)); |
|
|
|
|
this.setNeedsModule(moduleName) |
|
|
|
|
}, |
|
|
|
|
ismoney: ismoney, |
|
|
|
|
checkHanzi: checkHanzi, |
|
|
|
|
checkName: checkName |
|
|
|
|
checkName: checkName, |
|
|
|
|
rateListen: rateListen, |
|
|
|
|
inputListen: inputListen |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
|
dataFlow: 'system/dataFlow', |
|
|
|
|
dataFlowCard: 'system/dataFlowCard', |
|
|
|
|
dataFlowId: 'system/dataFlowId', |
|
|
|
|
dataFlowPassword: 'system/dataFlowPassword', |
|
|
|
|
needsModule: 'system/needsModule', |
|
|
|
|
idCardNumber: 'system/idCardNumber', |
|
|
|
|
inMyWork: 'system/inMyWork', |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
dataFlowCard(newVal) { |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.voucherNumber.focus() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
dataFlowPassword(newVal) { |
|
|
|
|
this.form.drawPassword = '******' |
|
|
|
|
} |
|
|
|
|
// cardNumberJudge |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|