|
|
|
@ -1,79 +1,145 @@ |
|
|
|
|
// 整存整取 > 取款 |
|
|
|
|
<template> |
|
|
|
|
<div class="body"> |
|
|
|
|
<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="凭证号码" prop="voucherNumber"> |
|
|
|
|
<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="凭证号码" |
|
|
|
|
prop="voucherNumber"> |
|
|
|
|
<!-- <div v-if='!cardNumberJudge' class="idCard" @click="popUp('刷卡器')"> |
|
|
|
|
<p>请刷卡</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input @blur="getDataBlur" ref="voucherNumber" disabled :value="form.voucherNumber" @input="(val) => inputListen(val, form, 'voucherNumber')"></el-input> |
|
|
|
|
</div> --> |
|
|
|
|
<el-input @blur="getDataBlur" ref="voucherNumber" :value="form.voucherNumber" @input="(val) => inputListen(val, form, 'voucherNumber')"></el-input> |
|
|
|
|
<el-input @blur="getDataBlur" |
|
|
|
|
ref="voucherNumber" |
|
|
|
|
:value="form.voucherNumber" |
|
|
|
|
@input="(val) => inputListen(val, form, 'voucherNumber')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<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-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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="定存编号" prop="depositNumber"> |
|
|
|
|
<el-input ref="depositNumber" disabled :value="form.depositNumber" @input="(val) => checkHanzi(val, form, 'depositNumber')"></el-input> |
|
|
|
|
<el-form-item label="定存编号" |
|
|
|
|
prop="depositNumber"> |
|
|
|
|
<el-input ref="depositNumber" |
|
|
|
|
disabled |
|
|
|
|
:value="form.depositNumber" |
|
|
|
|
@input="(val) => checkHanzi(val, form, 'depositNumber')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取方式" prop="withdrawWay"> |
|
|
|
|
<el-radio-group v-model.trim="form.withdrawWay" ref="withdrawWay"> |
|
|
|
|
<el-form-item label="支取方式" |
|
|
|
|
prop="withdrawWay"> |
|
|
|
|
<el-radio-group v-model.trim="form.withdrawWay" |
|
|
|
|
ref="withdrawWay"> |
|
|
|
|
<el-radio :label="125">部分支取</el-radio> |
|
|
|
|
<el-radio :label="126">全部支取并销户</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取类别" prop="withdrawType"> |
|
|
|
|
<el-select v-model.trim="form.withdrawType" placeholder="请选择" ref="withdrawType"> |
|
|
|
|
<el-option label="现金" :value="124"> </el-option> |
|
|
|
|
<el-form-item label="支取类别" |
|
|
|
|
prop="withdrawType"> |
|
|
|
|
<el-select v-model.trim="form.withdrawType" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref="withdrawType"> |
|
|
|
|
<el-option label="现金" |
|
|
|
|
:value="124"> </el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</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-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="客户姓名" prop="customerName"> |
|
|
|
|
<el-input :value="form.customerName" disabled @input="(val) => checkName(val, form, 'customerName')" ref="customerName"></el-input> |
|
|
|
|
<el-col :span="10" |
|
|
|
|
:offset="1"> |
|
|
|
|
<el-form-item label="客户姓名" |
|
|
|
|
prop="customerName"> |
|
|
|
|
<el-input :value="form.customerName" |
|
|
|
|
disabled |
|
|
|
|
@input="(val) => checkName(val, form, 'customerName')" |
|
|
|
|
ref="customerName"></el-input> |
|
|
|
|
</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" :key="item.itemId"> </el-option> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="本金" prop="capital"> |
|
|
|
|
<el-input :value="form.capital" disabled @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input> |
|
|
|
|
<el-form-item label="本金" |
|
|
|
|
prop="capital"> |
|
|
|
|
<el-input :value="form.capital" |
|
|
|
|
disabled |
|
|
|
|
@input="val => ismoney(val, form, 'capital')" |
|
|
|
|
ref="capital"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支取金额" prop="withdrawAmount"> |
|
|
|
|
<el-input ref="withdrawAmount" :value="form.withdrawAmount" :disabled="capitalDisabled" @input="val => getMoneyJudge(val)"></el-input> |
|
|
|
|
<el-form-item label="支取金额" |
|
|
|
|
prop="withdrawAmount"> |
|
|
|
|
<el-input ref="withdrawAmount" |
|
|
|
|
:value="form.withdrawAmount" |
|
|
|
|
:disabled="capitalDisabled" |
|
|
|
|
@input="val => getMoneyJudge(val)"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="利息" prop="interest"> |
|
|
|
|
<el-input :value="form.interest" disabled @input="(val) => rateListen(val, form, 'interest')" ref="interest"></el-input> |
|
|
|
|
<el-form-item label="利息" |
|
|
|
|
prop="interest"> |
|
|
|
|
<el-input :value="form.interest" |
|
|
|
|
disabled |
|
|
|
|
@input="(val) => rateListen(val, form, 'interest')" |
|
|
|
|
ref="interest"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="新凭证号码" prop="newVoucherNumber" v-show="form.withdrawWay===125"> |
|
|
|
|
<el-input :value="form.newVoucherNumber" @input="(val) => inputListen(val, form, 'newVoucherNumber')" ref="newVoucherNumber"></el-input> |
|
|
|
|
<el-form-item label="新凭证号码" |
|
|
|
|
prop="newVoucherNumber" |
|
|
|
|
v-show="form.withdrawWay===125"> |
|
|
|
|
<el-input :value="form.newVoucherNumber" |
|
|
|
|
@input="(val) => inputListen(val, form, 'newVoucherNumber')" |
|
|
|
|
ref="newVoucherNumber"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button @click="submitIt" type="primary" class="submitBtn" v-throttle>提交</el-button> |
|
|
|
|
<my-dialog :moduleName="moduleName" v-if="visible" :visible.sync="visible" :showForm="form" :formName="formName" @submitIt="submitForm2" /> |
|
|
|
|
<el-button @click="submitIt" |
|
|
|
|
type="primary" |
|
|
|
|
class="submitBtn" |
|
|
|
|
v-throttle>提交</el-button> |
|
|
|
|
<my-dialog :moduleName="moduleName" |
|
|
|
|
v-if="visible" |
|
|
|
|
:visible.sync="visible" |
|
|
|
|
:showForm="form" |
|
|
|
|
:formName="formName" |
|
|
|
|
@submitIt="submitForm2" /> |
|
|
|
|
</div> |
|
|
|
|
<!-- <need-before v-else :moduleName='needBefore' :unNeed="unNeed" /> --> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2, rateListen, inputListen,messageCard, messagePassword} from '@/utils/utilFunction.js'; |
|
|
|
|
import { myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2, rateListen, inputListen, messageCard, messagePassword } from '@/utils/utilFunction.js'; |
|
|
|
|
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' |
|
|
|
|
|
|
|
|
|
const moduleName = 'timeDeposit/withdrawal' |
|
|
|
@ -81,28 +147,28 @@ import { mapMutations, mapGetters } from 'vuex' |
|
|
|
|
import NeedBefore from '@/components/needBefore' |
|
|
|
|
import MyDialog from '@/components/dialog' |
|
|
|
|
import TipsBefore from '@/mixins/tipsBefore' |
|
|
|
|
export default{ |
|
|
|
|
name:'', |
|
|
|
|
props:{}, |
|
|
|
|
mixins: [ TipsBefore ], |
|
|
|
|
export default { |
|
|
|
|
name: '', |
|
|
|
|
props: {}, |
|
|
|
|
mixins: [TipsBefore], |
|
|
|
|
components: { |
|
|
|
|
NeedBefore, |
|
|
|
|
MyDialog |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
created () { |
|
|
|
|
|
|
|
|
|
if(this.form.depositNumber) { |
|
|
|
|
if (this.form.depositNumber) { |
|
|
|
|
this.form.depositNumber = '0912' |
|
|
|
|
} |
|
|
|
|
if(sessionStorage.getItem('nomtimeDepositWithdrawalPassword')) { |
|
|
|
|
if (sessionStorage.getItem('nomtimeDepositWithdrawalPassword')) { |
|
|
|
|
this.form.drawPassword = sessionStorage.getItem('nomtimeDepositWithdrawalPassword') |
|
|
|
|
} |
|
|
|
|
const { withdrawWay } = this.dataFlow |
|
|
|
|
if(withdrawWay === 126) { |
|
|
|
|
if (withdrawWay === 126) { |
|
|
|
|
this.form.interest = '15.00' |
|
|
|
|
// this.rules.withdrawAmount[0].required = false |
|
|
|
|
|
|
|
|
|
if(sessionStorage.getItem('nomtimeDepositWithdrawal2')) { |
|
|
|
|
if (sessionStorage.getItem('nomtimeDepositWithdrawal2')) { |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
const { userName, currency, goldLogo, interest, depositNumber, capital, withdrawType, voucherNumber } = this.dataFlow |
|
|
|
|
this.form.voucherNumber = voucherNumber |
|
|
|
@ -117,10 +183,10 @@ export default{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.form.interest = 0.00 |
|
|
|
|
|
|
|
|
|
if(sessionStorage.getItem('nomtimeDepositWithdrawal1')) { |
|
|
|
|
if (sessionStorage.getItem('nomtimeDepositWithdrawal1')) { |
|
|
|
|
this.cardNumberJudge = true |
|
|
|
|
const { userName, currency, goldLogo, interest, depositNumber, capital, withdrawType, voucherNumber } = this.dataFlow |
|
|
|
|
this.form.voucherNumber = voucherNumber |
|
|
|
@ -134,27 +200,27 @@ export default{ |
|
|
|
|
// this.form.withdrawWay = withdrawWay |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(!this.form.withdrawWay) { |
|
|
|
|
if (!this.form.withdrawWay) { |
|
|
|
|
this.form.withdrawWay = 125 |
|
|
|
|
} |
|
|
|
|
this.getFormData() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
data(){ |
|
|
|
|
data () { |
|
|
|
|
const withdrawAmountValidator = (rule, value, cb) => { |
|
|
|
|
const maxMoney = Number(this.form.capital) + Number(this.form.interest) |
|
|
|
|
if(Number(value) > maxMoney) { |
|
|
|
|
if (Number(value) > maxMoney) { |
|
|
|
|
cb(new Error('支取金额不应超过本金与利息之和')) |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
cb() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return{ |
|
|
|
|
return { |
|
|
|
|
moduleName: 'timeDeposit/withdrawal', |
|
|
|
|
visible: false, |
|
|
|
|
capitalDisabled: false, // 支取金额是否可以手动输入 |
|
|
|
|
cardNumberJudge: false, |
|
|
|
|
form:{ |
|
|
|
|
form: { |
|
|
|
|
// 必填项 |
|
|
|
|
drawPassword: '', // 凭证密码 |
|
|
|
|
cardNumber: '', // 凭证号码 |
|
|
|
@ -180,7 +246,7 @@ export default{ |
|
|
|
|
// withdrawType: '现金', // 支取类别 |
|
|
|
|
// withdrawWay: '密码', // 支取方式 |
|
|
|
|
}, |
|
|
|
|
formName:{ |
|
|
|
|
formName: { |
|
|
|
|
// 必填项 |
|
|
|
|
drawPassword: '凭证密码', // |
|
|
|
|
cardNumber: '凭证号码', // |
|
|
|
@ -311,7 +377,7 @@ export default{ |
|
|
|
|
submited: 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
...mapMutations({ |
|
|
|
@ -321,25 +387,25 @@ export default{ |
|
|
|
|
setPopId: 'system/setPopId', |
|
|
|
|
setTipsOperate: 'system/setTipsOperate' |
|
|
|
|
}), |
|
|
|
|
getMoneyJudge(val) { |
|
|
|
|
getMoneyJudge (val) { |
|
|
|
|
// 检查空格 |
|
|
|
|
const tmpCheck = val.substr(val.length-1, 1); |
|
|
|
|
const tmpCheck = val.substr(val.length - 1, 1); |
|
|
|
|
// 去掉空格 |
|
|
|
|
if(tmpCheck === ' ') { |
|
|
|
|
if (tmpCheck === ' ') { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 限制最长为15 |
|
|
|
|
if(val.length === 15) { |
|
|
|
|
if (val.length === 15) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// const reg = /([1-9]\d{0,9}|0)(\.\d{1,2})?$/ // 不用保留 |
|
|
|
|
const reg2 = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; // 保留小数点后两位 |
|
|
|
|
if (reg2.test(Number(val)) || val==='') { |
|
|
|
|
if (reg2.test(Number(val)) || val === '') { |
|
|
|
|
this.form.withdrawAmount = val |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getDataBlur() { |
|
|
|
|
if(!this.form.voucherNumber) { |
|
|
|
|
getDataBlur () { |
|
|
|
|
if (!this.form.voucherNumber) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// 客户姓名、币种、钞汇标识、定存编号(0912)、本金(开户时存的业务中的金额)、支取类别(现金)、支取方式(密码) |
|
|
|
@ -350,28 +416,28 @@ export default{ |
|
|
|
|
this.form.goldLogo = goldLogo |
|
|
|
|
// this.form.interest = interest |
|
|
|
|
this.form.depositNumber = depositNumber |
|
|
|
|
this.form.capital = money || 0 |
|
|
|
|
this.form.capital = money || 1000000 |
|
|
|
|
this.form.withdrawType = withdrawType |
|
|
|
|
// this.form.withdrawAmount = Number(this.form.interest) + Number(this.form.capital) |
|
|
|
|
}, |
|
|
|
|
getFormData(){ |
|
|
|
|
getFormData () { |
|
|
|
|
const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,58,120' |
|
|
|
|
const cards = { |
|
|
|
|
// 144: 'nomtimeDepositWithdrawal1', |
|
|
|
|
// 154: 'nomtimeDepositWithdrawalPassword' |
|
|
|
|
} |
|
|
|
|
const callback = () => { |
|
|
|
|
if(this.form.depositNumber) { |
|
|
|
|
if (this.form.depositNumber) { |
|
|
|
|
this.form.depositNumber = '0912' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
autoPlay2(parentId, this.form, this.myTable2, this.myTable, cards, callback) |
|
|
|
|
}, |
|
|
|
|
popUp(text) { |
|
|
|
|
popUp (text) { |
|
|
|
|
const { withdrawWay } = this.dataFlow |
|
|
|
|
if(withdrawWay === 126) { |
|
|
|
|
if (withdrawWay === 126) { |
|
|
|
|
this.setPopId('144,2') |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.setPopId('144,1') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -381,7 +447,7 @@ export default{ |
|
|
|
|
sessionStorage.setItem('computerPath', this.$route.fullPath) |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
popUp2(text) { |
|
|
|
|
popUp2 (text) { |
|
|
|
|
// this.$store.commit('system/changePop',{show:true,text, id: '154'}) |
|
|
|
|
// if(this.isNeedBefore) { |
|
|
|
|
// this.setPopId('154') |
|
|
|
@ -399,13 +465,13 @@ export default{ |
|
|
|
|
sessionStorage.setItem('computerPath', this.$route.fullPath) |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
submitIt() { |
|
|
|
|
submitIt () { |
|
|
|
|
// if(!this.form.voucherNumber) { |
|
|
|
|
// messageCard() |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
if (this.submited) return this.$message.error('已提交!') |
|
|
|
|
if(!this.form.drawPassword) { |
|
|
|
|
if (!this.form.drawPassword) { |
|
|
|
|
messagePassword() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -414,7 +480,7 @@ export default{ |
|
|
|
|
this.visible = true; |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
submitForm2() { |
|
|
|
|
submitForm2 () { |
|
|
|
|
// let nomtimeDepositWithdrawal1 = sessionStorage.getItem('nomtimeDepositWithdrawal1') |
|
|
|
|
// let nomtimeDepositWithdrawalPassword = sessionStorage.getItem('nomtimeDepositWithdrawalPassword') |
|
|
|
|
const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,58,120' |
|
|
|
@ -448,10 +514,10 @@ export default{ |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
'form.withdrawWay': { |
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
handler (newVal, oldVal) { |
|
|
|
|
// 这里的数据流withdrawWay纯粹用来判断,因为业务四和五就这个不一样 |
|
|
|
|
// const { withdrawWay } = this.dataFlow |
|
|
|
|
if(newVal === 126) { |
|
|
|
|
if (newVal === 126) { |
|
|
|
|
|
|
|
|
|
this.capitalDisabled = true |
|
|
|
|
this.form.interest = '15.00' |
|
|
|
@ -461,11 +527,11 @@ export default{ |
|
|
|
|
//this.rules.withdrawAmount[0].required = false |
|
|
|
|
// 计算金额 最后处理 |
|
|
|
|
this.form.withdrawAmount = Number(this.form.interest) + Number(this.form.capital) |
|
|
|
|
}else { |
|
|
|
|
if(sessionStorage.getItem('newVoucherNumber')) { |
|
|
|
|
} else { |
|
|
|
|
if (sessionStorage.getItem('newVoucherNumber')) { |
|
|
|
|
this.form.newVoucherNumber = sessionStorage.getItem('newVoucherNumber') |
|
|
|
|
} |
|
|
|
|
if(oldVal === 126) { |
|
|
|
|
if (oldVal === 126) { |
|
|
|
|
this.form.withdrawAmount = '' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|