20240205
luoJunYong.123 3 years ago
parent 2063528db7
commit d4c1a43b7d
  1. 3
      src/pages/manage/list/ImportantCash/controlCash/cashOut.vue
  2. 70
      src/pages/manage/list/ImportantCash/controlCash3/index.vue
  3. 118
      src/pages/manage/list/acceptanceDraft/invoice.vue
  4. 121
      src/pages/manage/list/cityWide/cityWideIn.vue
  5. 108
      src/pages/manage/list/cityWide/cityWideOut.vue
  6. 71
      src/pages/manage/list/client/consumerClient.vue
  7. 84
      src/pages/manage/list/client/corporateClient.vue
  8. 0
      src/pages/manage/list/client/test.vue
  9. 41
      src/pages/manage/list/dayEnd/branchDayEnd.vue
  10. 41
      src/pages/manage/list/dayEnd/tellerCash.vue
  11. 33
      src/pages/manage/list/dayEnd/tellerCertificate.vue
  12. 89
      src/pages/manage/list/personal/callDeposits/accountClosed.vue
  13. 100
      src/pages/manage/list/personal/callDeposits/openAccount.vue
  14. 35
      src/pages/manage/list/personal/currentAccount/accountCancellation.vue
  15. 51
      src/pages/manage/list/personal/currentAccount/deposit.vue
  16. 82
      src/pages/manage/list/personal/currentAccount/openAccount.vue
  17. 29
      src/pages/manage/list/personal/currentAccount/settle.vue
  18. 63
      src/pages/manage/list/personal/currentAccount/transferAccounts.vue
  19. 53
      src/pages/manage/list/personal/currentAccount/withdrawal.vue
  20. 127
      src/pages/manage/list/personal/timeDeposit/deposit.vue
  21. 85
      src/pages/manage/list/personal/timeDeposit/openAccount.vue
  22. 79
      src/pages/manage/list/personal/timeDeposit/withdrawal.vue
  23. 90
      src/pages/manage/list/personal/usefulPhrases/accountClosed.vue
  24. 60
      src/pages/manage/list/personal/usefulPhrases/continueDeposit.vue
  25. 103
      src/pages/manage/list/personal/usefulPhrases/openAccount.vue
  26. 48
      src/pages/manage/list/servicesAccount/passwordChange.vue
  27. 42
      src/pages/manage/list/servicesAccount/passwordLost.vue
  28. 39
      src/pages/manage/list/servicesAccount/relieveLost.vue
  29. 29
      src/utils/utilFunction.js
  30. 26
      src/utils/verify.js

@ -42,6 +42,7 @@
<el-table-column <el-table-column
label="数量" label="数量"
align="center" align="center"
width="140"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="myFlex"> <div class="myFlex">
@ -53,6 +54,7 @@
<el-table-column <el-table-column
label="金额" label="金额"
align="center" align="center"
width="140"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="myFlex"> <div class="myFlex">
@ -86,6 +88,7 @@
<el-table-column <el-table-column
label="数量" label="数量"
align="center" align="center"
width="140"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="myFlex"> <div class="myFlex">

@ -10,39 +10,39 @@
</div> </div>
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="账号" required> <el-form-item label="账号" prop="username">
<el-input :value="form.username" @input="val => checkHanzi(val, form, 'username')" ref="username"></el-input> <el-input :value="form.username" @input="val => checkHanzi(val, form, 'username')" ref="username"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="凭证类型"> <el-form-item label="凭证类型" prop="voucherType">
<el-select v-model="form.voucherType" placeholder="请选择"> <el-select v-model="form.voucherType" placeholder="请选择" ref="voucherType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证起始号" required> <el-form-item label="凭证起始号" prop="voucherStartType">
<el-input :value="form.voucherStartType" @input="val => checkHanzi(val, form, 'voucherStartType')" ref="voucherStartType"></el-input> <el-input :value="form.voucherStartType" @input="val => checkHanzi(val, form, 'voucherStartType')" ref="voucherStartType"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收费类型"> <el-form-item label="收费类型" prop="chargeType">
<el-select v-model="form.chargeType" placeholder="请选择"> <el-select v-model="form.chargeType" placeholder="请选择" ref="chargeType">
<el-option label="现金" value="现金"> </el-option> <el-option label="现金" value="现金"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手续费"> <el-form-item label="手续费" prop="serviceCharge">
<el-input disabled v-model="form.serviceCharge"></el-input> <el-input disabled :value="form.serviceCharge" @input="(val) => ismoney(val, form, 'serviceCharge')" ref="serviceCharge"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户名称"> <el-form-item label="客户名称" prop="customerName">
<el-input disabled v-model="form.customerName" ></el-input> <el-input disabled :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')" ref="customerName" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="数量"> <el-form-item label="数量" prop="number">
<el-input disabled :value="form.number" @input="val => inputListen(val, form, 'number')" ></el-input> <el-input disabled :value="form.number" @input="val => inputListen(val, form, 'number')" ref="number" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工本费"> <el-form-item label="工本费" prop="cost">
<el-input disabled :value="form.cost" @input="val => ismoney(val, form, 'cost')" ></el-input> <el-input disabled :value="form.cost" @input="val => ismoney(val, form, 'cost')" ref="cost" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="摘要"> <el-form-item label="摘要" prop="abstract">
<el-input disabled v-model="form.abstract" ></el-input> <el-input disabled v-model="form.abstract" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -54,7 +54,7 @@
</template> </template>
<script> <script>
import { checkRequired, ismoney, checkHanzi, inputListen } from '@/utils/utilFunction.js' import { myValidate, ismoney, checkHanzi, inputListen } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -74,10 +74,23 @@ export default {
number: '', // number: '', //
cost: '', // cost: '', //
abstract: '' // abstract: '' //
},
rules: {
username: [
{
required: true,
message: '请输入账号',
trigger: 'blur'
}
],
voucherStartType: [
{
required: true,
message: '请输入凭证起始号',
trigger: 'blur'
}
]
} }
} }
}, },
created() { created() {
@ -88,16 +101,13 @@ export default {
}, },
methods: { methods: {
submitIt() { submitIt() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
username: '账号', // //
voucherStartType: '凭证起始号', // this.$message({
} message: '验证成功',
const judgeRef = checkRequired(this.form, requiredField) center: true
if(judgeRef === '') { });
console.log('submit success') }, this.$refs));
}else {
this.$refs[judgeRef].focus();
}
}, },
checkHanzi: checkHanzi, checkHanzi: checkHanzi,
inputListen: inputListen, inputListen: inputListen,

@ -8,27 +8,27 @@
</div> </div>
<div class="body"> <div class="body">
<el-row :gutter="20"> <el-row :gutter="20">
<el-form ref="form" :model="form" label-width="140px"> <el-form ref="form" :model="form" label-width="140px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="出票人账号" required> <el-form-item label="出票人账号" prop="accountNumber">
<el-input :value="form.accountNumber" @input="val => checkHanzi(val, form, 'accountNumber')" ref="accountNumber"></el-input> <el-input :value="form.accountNumber" @input="val => checkHanzi(val, form, 'accountNumber')" ref="accountNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出票人名称"> <el-form-item label="出票人名称" prop="accountName">
<el-input v-model="form.accountName"></el-input> <el-input :value="form.accountName" @input="val => checkHanzi(val, form, 'accountName')" ref="accountName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收款人账号" required> <el-form-item label="收款人账号" prop="collectionNumber">
<el-input :value="form.collectionNumber" @input="val => checkHanzi(val, form, 'collectionNumber')" ref="collectionNumber"></el-input> <el-input :value="form.collectionNumber" @input="val => checkHanzi(val, form, 'collectionNumber')" ref="collectionNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收款人名称"> <el-form-item label="收款人名称" prop="collectionName">
<el-input v-model="form.collectionName"></el-input> <el-input :value="form.collectionName" @input="val => checkHanzi(val, form, 'collectionName')" ref="collectionName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种"> <el-form-item label="币种" prop="currencyType">
<el-input disabled v-model="form.currencyType"></el-input> <el-input disabled v-model="form.currencyType" ref="currencyType"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="汇票号码" required> <el-form-item label="汇票号码" prop="moneyOrderNumber">
<el-input :value="form.moneyOrderNumber" @input="val => checkHanzi(val, form, 'moneyOrderNumber')" ref="moneyOrderNumber"></el-input> <el-input :value="form.moneyOrderNumber" @input="val => checkHanzi(val, form, 'moneyOrderNumber')" ref="moneyOrderNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="到期日期" required> <el-form-item label="到期日期" prop="expireDate">
<el-date-picker <el-date-picker
v-model="form.expireDate" v-model="form.expireDate"
type="date" type="date"
@ -36,43 +36,44 @@
ref="expireDate"> ref="expireDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="汇划费金额"> <el-form-item label="汇划费金额" prop="moneyOrderMoney">
<el-input :value="form.moneyOrderMoney" @input="val => ismoney(val, form, 'moneyOrderMoney')"></el-input> <el-input :value="form.moneyOrderMoney" @input="val => ismoney(val, form, 'moneyOrderMoney')" ref="moneyOrderMoney"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="出票人行名"> <el-form-item label="出票人行名" prop="accountTradeName">
<el-input v-model="form.accountTradeName"></el-input> <el-input :value="form.accountTradeName" @input="val => checkHanzi(val, form, 'accountTradeName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出票行地址"> <el-form-item label="出票行地址" prop="tradeAddress">
<el-input v-model="form.tradeAddress"></el-input> <el-input v-model="form.tradeAddress" ref="tradeAddress"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收款人行名"> <el-form-item label="收款人行名" prop="collectionTradeName">
<el-input v-model="form.collectionTradeName"></el-input> <el-input :value="form.collectionTradeName" @input="val => checkHanzi(val, form, 'collectionTradeName')" ref="collectionTradeName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="票据类型"> <el-form-item label="票据类型" prop="billType">
<el-select v-model="form.billType" placeholder="请选择"> <el-select v-model="form.billType" placeholder="请选择" ref="billType">
<el-option value="银行承兑汇票">银行承兑汇票</el-option> <el-option value="银行承兑汇票">银行承兑汇票</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="金额" required> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出票日期"> <el-form-item label="出票日期" prop="drawBillDate">
<el-date-picker <el-date-picker
v-model="form.drawBillDate" v-model="form.drawBillDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期"
ref="drawBillDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="是否转让"> <el-form-item label="是否转让" prop="isTransfer">
<el-select v-model="form.isTransfer" placeholder="请选择"> <el-select v-model="form.isTransfer" placeholder="请选择" ref="isTransfer">
<el-option value="是"></el-option> <el-option value="是"></el-option>
<el-option value="否"></el-option> <el-option value="否"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手续费金额"> <el-form-item label="手续费金额" prop="serviceCharge">
<el-input :value="form.serviceCharge" @input="val => ismoney(val, form, 'serviceCharge')"></el-input> <el-input :value="form.serviceCharge" @input="val => ismoney(val, form, 'serviceCharge')" ref="serviceCharge"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -116,8 +117,8 @@
</template> </template>
<script> <script>
import { vername, vermob } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { checkRequired, ismoney, checkHanzi } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -144,6 +145,43 @@ export default {
isTransfer: '否', // isTransfer: '否', //
serviceCharge: '' // serviceCharge: '' //
}, },
rules: {
accountNumber: [
{
required: true,
message: '请输入出票人账号',
trigger: 'blur'
}
],
collectionNumber: [
{
required: true,
message: '请输入收款人账号',
trigger: 'blur'
}
],
moneyOrderNumber: [
{
required: true,
message: '请输入汇票号码',
trigger: 'blur'
}
],
expireDate: [
{
required: true,
message: '请选择到期日期',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
]
}
} }
}, },
mounted() { mounted() {
@ -152,19 +190,13 @@ export default {
methods: { methods: {
// //
submitForm(){ submitForm(){
const requiredField = { this.$refs.form.validate(myValidate(() => {
accountNumber: '出票人账号', // //
collectionNumber: '收款人账号', // this.$message({
moneyOrderNumber: '汇票号码', // message: '验证成功',
expireDate: '到期日期', // center: true
money: '金额', // });
} }, this.$refs));
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus()
}
}, },
ismoney: ismoney, ismoney: ismoney,
checkHanzi: checkHanzi checkHanzi: checkHanzi

@ -10,57 +10,58 @@
<!-- 存款 --> <!-- 存款 -->
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="150px"> <el-form ref="form" :model="form" label-width="150px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="本行收款账号" required> <el-form-item label="本行收款账号" prop="shroffAccountNumber">
<el-input :value="form.shroffAccountNumber" @input="val => checkHanzi(val, form, 'shroffAccountNumber')" ref="shroffAccountNumber"></el-input> <el-input :value="form.shroffAccountNumber" @input="val => checkHanzi(val, form, 'shroffAccountNumber')" ref="shroffAccountNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金额" required> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提入日期"> <el-form-item label="提入日期" prop="insertDate">
<el-date-picker <el-date-picker
v-model="form.insertDate" v-model="form.insertDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期"
ref="insertDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="他行收款户名"> <el-form-item label="他行收款户名" prop="otherAccountUsername">
<el-input :value="form.otherAccountUsername" @input="val => checkHanzi(val, form, 'otherAccountUsername')"></el-input> <el-input :value="form.otherAccountUsername" @input="val => checkHanzi(val, form, 'otherAccountUsername')" ref="otherAccountUsername"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="交换行号"> <el-form-item label="交换行号" prop="exchangeNumber">
<el-input :value="form.exchangeNumber" @input="val => checkHanzi(val, form, 'exchangeNumber')"></el-input> <el-input :value="form.exchangeNumber" @input="val => checkHanzi(val, form, 'exchangeNumber')" ref="exchangeNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="报单号"> <el-form-item label="报单号" prop="customsNumber">
<el-input :value="form.customsNumber" @input="val => checkHanzi(val, form, 'customsNumber')"></el-input> <el-input :value="form.customsNumber" @input="val => checkHanzi(val, form, 'customsNumber')" ref="customsNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收款户名" required> <el-form-item label="收款户名" prop="accountUsername">
<el-input v-model="form.accountUsername" ref="accountUsername"></el-input> <el-input :value="form.accountUsername" @input="val => checkHanzi(val, form, 'accountUsername')" ref="accountUsername"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="币种"> <el-form-item label="币种" prop="currency">
<el-input v-model="form.currency"></el-input> <el-input :value="form.currency" @input="val => checkHanzi(val, form, 'currency')" ref="currency"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提出场次"> <el-form-item label="提出场次" prop="proposeTime">
<el-input :value="form.proposeTime" @input="val => inputListen(val, form, 'proposeTime')"></el-input> <el-input :value="form.proposeTime" @input="val => inputListen(val, form, 'proposeTime')" ref="proposeTime"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="票据类型" required> <el-form-item label="票据类型" prop="billType">
<el-select v-model="form.billTyoe" placeholder="请选择" ref="billTyoe"> <el-select v-model="form.billType" placeholder="请选择" ref="billType">
<el-option label="银行本票" value="银行本票"> </el-option> <el-option label="银行本票" value="银行本票"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="他行收款账号" required> <el-form-item label="他行收款账号" prop="otherAccountNumber">
<el-input :value="form.otherAccountNumber" @input="val => checkHanzi(val, form, 'otherAccountNumber')" ref="otherAccountNumber"></el-input> <el-input :value="form.otherAccountNumber" @input="val => checkHanzi(val, form, 'otherAccountNumber')" ref="otherAccountNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" prop="voucherNumber">
<el-input :value="form.voucherNumber" @input="val => checkHanzi(val, form, 'voucherNumber')" ref="voucherNumber"></el-input> <el-input :value="form.voucherNumber" @input="val => checkHanzi(val, form, 'voucherNumber')" ref="voucherNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="交换行名"> <el-form-item label="交换行名" prop="exchangeName">
<el-input v-model="form.exchangeName"></el-input> <el-input :value="form.exchangeName" @input="val => checkHanzi(val, form, 'exchangeName')" ref="exchangeName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="摘要"> <el-form-item label="摘要" prop="abstract">
<el-input v-model="form.abstract"></el-input> <el-input v-model="form.abstract" ref="abstract"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -93,7 +94,7 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney, inputListen, checkHanzi } from '@/utils/utilFunction.js' import { myValidate, ismoney, inputListen, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -105,7 +106,7 @@ export default {
shroffAccountNumber: '', // shroffAccountNumber: '', //
money: '', // money: '', //
accountUsername: '', // accountUsername: '', //
billTyoe: '银行本票', // billType: '银行本票', //
otherAccountNumber: '', // otherAccountNumber: '', //
voucherNumber: '', // voucherNumber: '', //
// //
@ -118,6 +119,50 @@ export default {
customsNumber: '', // customsNumber: '', //
exchangeName: '' // exchangeName: '' //
}, },
rules: {
shroffAccountNumber: [
{
required: true,
message: '请输入本行收款账号',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
],
accountUsername: [
{
required: true,
message: '请输入收款户名',
trigger: 'blur'
}
],
billType: [
{
required: true,
message: '请选择票据类型',
trigger: 'blur'
}
],
otherAccountNumber: [
{
required: true,
message: '请输入他行收款账号',
trigger: 'blur'
}
],
voucherNumber: [
{
required: true,
message: '请输入凭证号码',
trigger: 'blur'
}
]
},
visible:false visible:false
} }
}, },
@ -129,21 +174,13 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
shroffAccountNumber: '本行收款账号', // //
money: '金额', // this.$message({
accountUsername: '收款户名', // message: '验证成功',
billTyoe: '票据类型', // center: true
otherAccountNumber: '他行收款账号', // });
voucherNumber: '凭证号码', // }, this.$refs));
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney, ismoney: ismoney,
inputListen: inputListen, inputListen: inputListen,

@ -10,55 +10,57 @@
<!-- 存款 --> <!-- 存款 -->
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="150px"> <el-form ref="form" :model="form" label-width="150px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="本行收款账号" required> <el-form-item label="本行收款账号" prop="shroffAccountNumber">
<el-input :value="form.shroffAccountNumber" @input="val => checkHanzi(val, form, 'shroffAccountNumber')" ref="shroffAccountNumber"></el-input> <el-input :value="form.shroffAccountNumber" @input="val => checkHanzi(val, form, 'shroffAccountNumber')" ref="shroffAccountNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金额" required> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提出日期"> <el-form-item label="提出日期" prop="proposeDate">
<el-date-picker <el-date-picker
v-model="form.proposeDate" v-model="form.proposeDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期"
ref="proposeDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="他行收款户名"> <el-form-item label="他行收款户名" prop="otherAccountUsername">
<el-input :value="form.otherAccountUsername" @input="val => checkHanzi(val, form, 'otherAccountUsername')"></el-input> <el-input :value="form.otherAccountUsername" @input="val => checkHanzi(val, form, 'otherAccountUsername')" ref="otherAccountUsername"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出票日期"> <el-form-item label="出票日期" prop="drawBillDate">
<el-date-picker <el-date-picker
v-model="form.drawBillDate" v-model="form.drawBillDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期"
ref="drawBillDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="本行收款户名" required> <el-form-item label="本行收款户名" prop="shroffAccountUsername">
<el-input :value="form.shroffAccountUsername" @input="val => checkHanzi(val, form, 'shroffAccountUsername')" ref="shroffAccountUsername"></el-input> <el-input :value="form.shroffAccountUsername" @input="val => checkHanzi(val, form, 'shroffAccountUsername')" ref="shroffAccountUsername"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="币种"> <el-form-item label="币种" prop="currency">
<el-input v-model="form.currency"></el-input> <el-input :value="form.currency" @input="(val) => checkHanzi(val, form, 'currency')" ref="currency"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提出场次"> <el-form-item label="提出场次" prop="proposeTime">
<el-input :value="form.proposeTime" @input="val => inputListen(val, form, 'proposeTime')"></el-input> <el-input :value="form.proposeTime" @input="val => inputListen(val, form, 'proposeTime')" ref="proposeTime"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="票据类型" required> <el-form-item label="票据类型" prop="billTyoe">
<el-select v-model="form.billTyoe" placeholder="请选择" ref="billTyoe"> <el-select v-model="form.billTyoe" placeholder="请选择" ref="billTyoe">
<el-option label="银行本票" value="银行本票"> </el-option> <el-option label="银行本票" value="银行本票"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="他行收款账号" required> <el-form-item label="他行收款账号" prop="otherAccountNumber">
<el-input :value="form.otherAccountNumber" @input="val => checkHanzi(val, form, 'otherAccountNumber')" ref="otherAccountNumber"></el-input> <el-input :value="form.otherAccountNumber" @input="val => checkHanzi(val, form, 'otherAccountNumber')" ref="otherAccountNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" prop="voucherNumber">
<el-input :value="form.voucherNumber" @input="val => checkHanzi(val, form, 'voucherNumber')" ref="voucherNumber"></el-input> <el-input :value="form.voucherNumber" @input="val => checkHanzi(val, form, 'voucherNumber')" ref="voucherNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="摘要"> <el-form-item label="摘要" prop="abstract">
<el-input v-model="form.abstract"></el-input> <el-input v-model="form.abstract" ref="abstract"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -91,7 +93,7 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney, inputListen, checkHanzi } from '@/utils/utilFunction.js' import { myValidate, ismoney, inputListen, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -114,6 +116,50 @@ export default {
drawBillDate: '', // drawBillDate: '', //
abstract: '', // abstract: '', //
}, },
rules: {
shroffAccountNumber: [
{
required: true,
message: '请输入本行收款账号',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
],
shroffAccountUsername: [
{
required: true,
message: '请输入本行收款户名',
trigger: 'blur'
}
],
billTyoe: [
{
required: true,
message: '请选择票据类型',
trigger: 'blur'
}
],
otherAccountNumber: [
{
required: true,
message: '请输入他行收款账号',
trigger: 'blur'
}
],
voucherNumber: [
{
required: true,
message: '请输入凭证号码',
trigger: 'blur'
}
],
},
visible:false visible:false
} }
}, },
@ -125,21 +171,13 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
shroffAccountNumber: '本行收款账号', // //
money: '金额', // this.$message({
shroffAccountUsername: '本行收款户名', // message: '验证成功',
billTyoe: '票据类型', // center: true
otherAccountNumber: '他行收款账号', // });
voucherNumber: '凭证号码', // }, this.$refs));
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney, ismoney: ismoney,
inputListen: inputListen, inputListen: inputListen,

@ -11,7 +11,7 @@
<el-form ref="form" :model="form" label-width="140px" :rules="rules"> <el-form ref="form" :model="form" label-width="140px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型">
<el-select v-model="form.idType" disabled placeholder="请选择"> <el-select v-model="form.idType" disabled placeholder="请选择" ref="idType">
<el-option <el-option
v-for="(item,index) in papers" v-for="(item,index) in papers"
:key="index" :key="index"
@ -32,7 +32,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="通讯地址"> <el-form-item label="通讯地址">
<el-input :value="form.mailbox" @input="val => mailBoxListen(val, form, 'mailbox')" maxlength="40"></el-input> <el-input :value="form.mailbox" @input="val => mailBoxListen(val, form, 'mailbox')" maxlength="40" ref="mailbox"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
@ -53,7 +53,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="民族"> <el-form-item label="民族">
<el-select v-model="form.nationality" placeholder="请选择"> <el-select v-model="form.nationality" placeholder="请选择" ref="nationality">
<el-option <el-option
v-for="(item,index) in nations" v-for="(item,index) in nations"
:key="index" :key="index"
@ -108,8 +108,8 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { vername, vermob } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { phoneListen, mailBoxListen, checkRequired } from '@/utils/utilFunction.js' import { phoneListen, mailBoxListen, checkRequired, myValidate } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -126,26 +126,22 @@ export default {
phone:'',// phone:'',//
}, },
rules: { rules: {
userName: [ userName: vercustomer ,
{
required: true,
message: '请输入客户姓名',
trigger: 'blur'
},
...vername
],
phone: [ phone: [
{ {
required: true, required: true,
message: '请输入联系电话', message: '请输入联系电话',
trigger: 'blur' trigger: 'blur'
}, },
...vermob {
pattern: mobPattern,
message: '联系电话格式有误'
}
], ],
birthday: [ birthday: [
{ {
required: true, required: true,
message: '请输入出生日期', message: '请选择出生日期',
trigger: 'blur' trigger: 'blur'
} }
], ],
@ -179,19 +175,9 @@ export default {
}, },
// //
submitForm(){ submitForm(){
this.$refs.form.validate((valid, obj) => { let formExternalData = sessionStorage.getItem('formExternalData')
console.log(valid) let consumerClientDragList = JSON.parse(formExternalData);
console.log(obj) this.$refs.form.validate(myValidate(() => {
let tmpObj = {};
for(const key in obj) {
console.log(key)
tmpObj = {
key: obj[key]
}
return;
}
console.log(tmpObj)
if (valid) {
this.visible = true; this.visible = true;
let formList = []; let formList = [];
if(this.form.nationality){ if(this.form.nationality){
@ -218,33 +204,7 @@ export default {
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,47", "type": ""} {"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,47", "type": ""}
); );
sessionStorage.setItem('ruleReqs', JSON.stringify(formList)) sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
} else { }, this.$refs));
//
let tmpObj = {};
for(const key in obj) {
tmpObj = {
[key]: obj[key]
}
return;
}
console.log(tmpObj)
// const requiredField = {
// // idNumber:'',
// userName:'',
// sex:'',
// birthday:'',
// phone:''
// }
// const judgeRef = checkRequired(this.form, requiredField)
// if(judgeRef !== '') {
// this.$refs[judgeRef].focus();
// }
}
});
return false
let formExternalData = sessionStorage.getItem('formExternalData')
let consumerClientDragList = JSON.parse(formExternalData);
//
// if(this.form.idNumber && this.form.idNumber.userName && this.form.idNumber.sex && this.form.idNumber.birthday && this.form.idNumber.phone) { // if(this.form.idNumber && this.form.idNumber.userName && this.form.idNumber.sex && this.form.idNumber.birthday && this.form.idNumber.phone) {
// this.visible = true; // this.visible = true;
// let formList = []; // let formList = [];
@ -276,6 +236,7 @@ export default {
// this.$message.error('~'); // this.$message.error('~');
// } // }
}, },
popSure(){ popSure(){
this.success&&(this.visible = false) this.success&&(this.visible = false)
this.authorization&&(this.success=true) this.authorization&&(this.success=true)

@ -7,42 +7,42 @@
<p>公司客户信息建立</p> <p>公司客户信息建立</p>
</div> </div>
<div class="body"> <div class="body">
<el-form ref="form" :model="form" label-width="140px"> <el-form ref="form" :model="form" label-width="140px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型">
<el-select v-model="form.documentType" placeholder="请选择"> <el-select v-model="form.documentType" placeholder="请选择" ref="documentType">
<el-option label="统一社会信用代码证" value="统一社会信用代码证"></el-option> <el-option label="统一社会信用代码证" value="统一社会信用代码证"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="公司名称" required> <el-form-item label="公司名称" prop="companyName">
<el-input v-model="form.companyName" ref="companyName"></el-input> <el-input :value="form.companyName" @input="(val) => checkHanzi(val, form, 'companyName')" ref="companyName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="注册资本"> <el-form-item label="注册资本">
<el-input v-model="form.registeredCapital"></el-input> <el-input v-model="form.registeredCapital" ref="registeredCapital"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="法人证件号码" required> <el-form-item label="法人证件号码" required>
<div class="idCard" @click="popUp"> <div class="idCard" @click="popUp">
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" :rules="rules.phone" required> <el-form-item label="联系电话" :rules="rules.phone" prop="phone">
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> <el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="代码证号" required> <el-form-item label="代码证号" prop="codeNumber">
<el-input v-model="form.codeNumber" ref="codeNumber"></el-input> <el-input :value="form.codeNumber" @input="(val) => checkHanzi(val, form, 'codeNumber')" ref="codeNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="公司地址"> <el-form-item label="公司地址">
<el-input v-model="form.companyAddress"></el-input> <el-input v-model="form.companyAddress" ref="companyAddress"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="法人证件类型" required> <el-form-item label="法人证件类型" prop="certificateType">
<el-select v-model="form.certificateType" placeholder="请选择" ref="certificateType"> <el-select v-model="form.certificateType" placeholder="请选择" ref="certificateType">
<el-option label="身份证" value="身份证"></el-option> <el-option label="身份证" value="身份证"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="法人姓名" :rules="rules.name"> <el-form-item label="法人姓名" prop="name">
<el-input v-model="form.name"></el-input> <el-input :value="form.name" @input="(val) => checkHanzi(val, form, 'name')" ref="name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -87,8 +87,8 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { vername, vermob } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { phoneListen, checkRequired } from '@/utils/utilFunction.js' import { phoneListen, checkRequired, myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -108,8 +108,35 @@ export default {
certificateType: '' certificateType: ''
}, },
rules: { rules: {
phone: vermob, companyName: [
name: vername {
required: true,
message: '请输入公司名称',
trigger: 'blur'
}
],
phone: [{
pattern: mobPattern,
message: '联系电话格式有误'
}],
name: [{
pattern: namePattern,
message: '法人姓名格式有误'
}],
codeNumber: [
{
required: true,
message: '请输入代码证号',
trigger: 'blur'
}
],
certificateType: [
{
required: true,
message: '请输入法人证件类型',
trigger: 'blur'
}
]
}, },
visible:false, visible:false,
@ -119,7 +146,7 @@ export default {
console.clear() console.clear()
}, },
mounted() { mounted() {
this.$refs.companyName.focus() this.$refs.codeNumber.focus()
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
@ -132,20 +159,17 @@ export default {
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
companyName: '公司名称', //
codeNumber: '代码证号', this.visible = true;
certificateType: '法人证件类型', this.$message({
phone: '联系电话', message: '验证成功',
} center: true
const judgeRef = checkRequired(this.form, requiredField) });
if(judgeRef === '') { }, this.$refs));
this.visible = true
}else {
this.$refs[judgeRef].focus();
}
}, },
phoneListen: phoneListen phoneListen: phoneListen,
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -9,11 +9,11 @@
<!-- 存款 --> <!-- 存款 -->
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px" label-position="right"> <el-form ref="form" :model="form" label-width="120px" label-position="right" :rules="rules">
<el-form-item label="主管柜员号" required> <el-form-item label="主管柜员号" prop="username">
<el-input placeholder="请输入账号" :value="form.username" @input="val => checkHanzi(val, form, 'username')" ref="username"></el-input> <el-input placeholder="请输入账号" :value="form.username" @input="val => checkHanzi(val, form, 'username')" ref="username"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="登录密码" required> <el-form-item label="登录密码" prop="password">
<el-input placeholder="请输入密码" type="password" :value="form.password" @input="val => checkHanzi(val, form, 'password')" ref="password"></el-input> <el-input placeholder="请输入密码" type="password" :value="form.password" @input="val => checkHanzi(val, form, 'password')" ref="password"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -25,7 +25,7 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, checkHanzi } from '@/utils/utilFunction.js' import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -35,6 +35,22 @@ export default {
form:{ form:{
username: '', username: '',
password: '' password: ''
},
rules: {
username: [
{
required: true,
message: '请输入主管柜员号',
trigger: 'blur'
}
],
password: [
{
required: true,
message: '请输入登录密码',
trigger: 'blur'
}
]
} }
} }
}, },
@ -46,16 +62,13 @@ export default {
}, },
methods: { methods: {
submitIt() { submitIt() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
username: '主管柜员号', //
password: '登录密码' this.$message({
} message: '验证成功',
const judgeRef = checkRequired(this.form, requiredField) center: true
if(judgeRef === '') { });
console.log('submit success') }, this.$refs));
}else {
this.$refs[judgeRef].focus();
}
}, },
checkHanzi: checkHanzi checkHanzi: checkHanzi
} }

@ -8,15 +8,15 @@
<!-- 存款 --> <!-- 存款 -->
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="日期" required> <el-form-item label="日期" prop="date">
<el-date-picker type="date" placeholder="选择日期" v-model="form.date" style="width: 100%;"></el-date-picker> <el-date-picker type="date" placeholder="选择日期" v-model.trim="form.date" style="width: 100%;" ref="date"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="柜员号" required> <el-form-item label="柜员号" prop="counterNumber">
<el-input v-model="form.counterNumber"></el-input> <el-input :value="form.counterNumber" @input="(val) => checkHanzi(val, form, 'counterNumber')" ref="counterNumber"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="20" :offset="2"> <!-- <el-col :span="20" :offset="2">
@ -55,7 +55,7 @@
</el-form> </el-form>
</el-row> </el-row>
<el-button @click="visible = true" type="primary" class="submitBtn">提交</el-button> <el-button @click="submitForm" type="primary" class="submitBtn">提交</el-button>
</div> </div>
</div> </div>
@ -63,6 +63,7 @@
<script> <script>
import { tableRowClassName, headerCellStyle } from '@/assets/js/myConfig' import { tableRowClassName, headerCellStyle } from '@/assets/js/myConfig'
import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -74,6 +75,22 @@ export default {
date: '', date: '',
counterNumber: '' counterNumber: ''
}, },
rules: {
date: [
{
required: true,
message: '请输入日期',
trigger: 'blur'
}
],
counterNumber: [
{
required: true,
message: '请输入柜员号',
trigger: 'blur'
}
]
},
tableData: [ tableData: [
{ {
currency: '人民币', currency: '人民币',
@ -113,7 +130,17 @@ export default {
}, },
methods: { methods: {
tableRowClassName: tableRowClassName submitForm() {
this.$refs.form.validate(myValidate(() => {
//
this.$message({
message: '验证成功',
center: true
});
}, this.$refs));
},
tableRowClassName: tableRowClassName,
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -16,7 +16,7 @@
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="柜员号" required> <el-form-item label="柜员号" required>
<el-input v-model="form.counterNumber"></el-input> <el-input :value="form.counterNumber" @input="(val) => checkHanzi(val, form, 'counterNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="20" :offset="2"> <!-- <el-col :span="20" :offset="2">
@ -65,7 +65,7 @@
</el-form> </el-form>
</el-row> </el-row>
<el-button @click="visible = true" type="primary" class="submitBtn">提交</el-button> <el-button @click="submitForm" type="primary" class="submitBtn">提交</el-button>
</div> </div>
</div> </div>
@ -73,6 +73,7 @@
<script> <script>
import { tableRowClassName, headerCellStyle } from '@/assets/js/myConfig' import { tableRowClassName, headerCellStyle } from '@/assets/js/myConfig'
import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -84,6 +85,22 @@ export default {
date: '', date: '',
counterNumber: '' counterNumber: ''
}, },
rules: {
date: [
{
required: true,
message: '请输入日期',
trigger: 'blur'
}
],
counterNumber: [
{
required: true,
message: '请输入柜员号',
trigger: 'blur'
}
]
},
tableData: [ tableData: [
{ {
certificateName: '身份证', certificateName: '身份证',
@ -103,7 +120,17 @@ export default {
inputListen(val, row) { inputListen(val, row) {
row.cashBoxNum = Number(val.replace(/\D+/, '')) row.cashBoxNum = Number(val.replace(/\D+/, ''))
}, },
tableRowClassName: tableRowClassName submitForm() {
this.$refs.form.validate(myValidate(() => {
//
this.$message({
message: '验证成功',
center: true
});
}, this.$refs));
},
tableRowClassName: tableRowClassName,
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -2,31 +2,31 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select disabled v-model="form.x" placeholder="请选择"> <el-select disabled v-model="form.certificateType" placeholder="请选择" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" prop="depositNumber">
<el-select disabled v-model="form.depositNumber" placeholder="请选择" ref="depositNumber"> <el-select disabled v-model="form.depositNumber" placeholder="请选择" ref="depositNumber">
<el-option label="存单" value="存单"> </el-option> <el-option label="存单" value="存单"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择" ref="currency"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="定存编号"> <el-form-item label="定存编号" prop="depositNumber">
<el-input v-model="form.depositNumber"></el-input> <el-input v-model="form.depositNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利率(%)" prop="interestRate" :rules="rules.interestRate"> <el-form-item label="利率(%)" prop="interestRate">
<el-input v-model="form.interestRate"></el-input> <el-input :value="form.interestRate" @input="(val) => checkHanzi(val, form, 'interestRate')" ref="interestRate"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利息"> <el-form-item label="利息" prop="interest">
<el-input :value="form.interest" @input="val => ismoney(val, form, 'interest')"></el-input> <el-input :value="form.interest" @input="val => ismoney(val, form, 'interest')" ref="interest"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="起息日期" required> <el-form-item label="起息日期" required>
<div class="idCard" @click="popUp('密码器')"> <div class="idCard" @click="popUp('密码器')">
@ -41,26 +41,26 @@
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" prop="clientName" :rules="rules.clientName"> <el-form-item label="客户姓名" prop="clientName">
<el-input v-model="form.clientName" ref="clientName"></el-input> <el-input :value="form.clientName" @input="(val) => checkHanzi(val, form, 'clientName')" ref="clientName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识"> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="本金"> <el-form-item label="本金" prop="capital">
<el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ></el-input> <el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="存期"> <el-form-item label="存期" prop="depositDate">
<el-select disabled v-model="form.depositDate" placeholder="请选择"> <el-select disabled v-model="form.depositDate" placeholder="请选择" ref="depositDate">
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
<el-option label="3年" value="3年"> </el-option> <el-option label="3年" value="3年"> </el-option>
<el-option label="5年" value="5年"> </el-option> <el-option label="5年" value="5年"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="总金额"> <el-form-item label="总金额" prop="totalMoney">
<el-input :value="form.totalMoney" @input="val => ismoney(val, form, 'totalMoney')" ></el-input> <el-input :value="form.totalMoney" @input="val => ismoney(val, form, 'totalMoney')" ref="totalMoney" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取密码" required> <el-form-item label="支取密码" required>
<div class="idCard" @click="popUp('输入器')"> <div class="idCard" @click="popUp('输入器')">
@ -83,8 +83,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { ratePattern, vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -103,10 +103,30 @@ export default{
depositDate: '', // depositDate: '', //
interest: '', // interest: '', //
totalMoney: '', // totalMoney: '', //
certificateType: '', //
}, },
rules: { rules: {
clientName: vername, clientName: vercustomer,
interestRate: verrate currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
depositNumber: [
{
required: true,
message: '请选择凭证号码',
trigger: 'blur'
}
],
interestRate: [
{
pattern: ratePattern,
message: '利率格式有误'
}
]
}, },
} }
}, },
@ -118,19 +138,16 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
depositNumber: '凭证号码', // //
currency: '币种', // this.$message({
} message: '验证成功',
const judgeRef = checkRequired(this.form, requiredField) center: true
if(judgeRef === '') { });
console.log('submit success') }, this.$refs));
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,32 +2,32 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select disabled v-model="form.x" placeholder="请选择"> <el-select disabled v-model="form.certificateType" placeholder="请选择" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户号"> <el-form-item label="客户号" prop="clientNumber">
<el-input v-model="form.clientNumber" ref="clientNumber"></el-input> <el-input :value="form.clientNumber" @input="(val) => checkHanzi(val, form, 'clientNumber')" ref="clientNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择" ref="currency"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证类型" required> <el-form-item label="凭证类型" prop="voucherType">
<el-select disabled v-model="form.voucherType" placeholder="请选择" ref="voucherType"> <el-select disabled v-model="form.voucherType" placeholder="请选择" ref="voucherType">
<el-option label="存单" value="存单"> </el-option> <el-option label="存单" value="存单"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="通知类型" required> <el-form-item label="通知类型" prop="noticeType">
<el-select disabled v-model="form.noticeType" placeholder="请选择" ref="noticeType"> <el-select disabled v-model="form.noticeType" placeholder="请选择" ref="noticeType">
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="金额" required> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -37,10 +37,10 @@
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" required prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')" ref="customerName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
@ -50,7 +50,7 @@
<p>请填凭证号码</p> <p>请填凭证号码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="存款类别" required> <el-form-item label="存款类别" prop="depositType">
<el-select disabled v-model="form.depositType" placeholder="请选择" ref="depositType"> <el-select disabled v-model="form.depositType" placeholder="请选择" ref="depositType">
<el-option label="现金" value="现金"> </el-option> <el-option label="现金" value="现金"> </el-option>
</el-select> </el-select>
@ -68,8 +68,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -91,7 +91,49 @@ export default{
clientNumber: '' // clientNumber: '' //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
voucherType: [
{
required: true,
message: '请选择凭证类型',
trigger: 'blur'
}
],
currencyMark: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
noticeType: [
{
required: true,
message: '请选择通知类型',
trigger: 'blur'
}
],
depositType: [
{
required: true,
message: '请选择存款类别',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
],
}, },
} }
}, },
@ -103,24 +145,16 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
currencyMark: '钞户', // message: '验证成功',
voucherType: '存单', // center: true
monthDeposit: '', // });
depositTerm: '', // }, this.$refs));
extendDepositTarget: '', //
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="卡号" required> <el-form-item label="卡号" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -21,8 +21,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="userName" :rules="rules.userName"> <el-form-item label="客户姓名" prop="userName">
<el-input v-model="form.userName" ref="userName"></el-input> <el-input ref="userName" :value="form.userName" @input="(val) => checkHanzi(val, form, 'userName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="证件号码" required> <el-form-item label="证件号码" required>
<div class="idCard" @click="popUp('身份证扫描器')"> <div class="idCard" @click="popUp('身份证扫描器')">
@ -36,7 +36,8 @@
</div> </div>
</template> </template>
<script> <script>
import { vername } from '@/utils/verify.js' import { vercustomer } from '@/utils/verify.js'
import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -47,7 +48,7 @@ export default{
userName:'', userName:'',
}, },
rules: { rules: {
userName: vername userName: vercustomer
} }
} }
}, },
@ -62,7 +63,8 @@ export default{
submitForm(){ submitForm(){
let ruleReqs = sessionStorage.getItem('ruleReqs') let ruleReqs = sessionStorage.getItem('ruleReqs')
let formList = JSON.parse(ruleReqs); let formList = JSON.parse(ruleReqs);
if(this.form.chargeWay){ this.$refs.form.validate(myValidate(() => {
//
if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}// if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
if (this.form.idType){formList.push({"emptyOne": "8", "emptyTwo": this.form.idType, "operationIds": "26,57,64,87","type": "3"})}// if (this.form.idType){formList.push({"emptyOne": "8", "emptyTwo": this.form.idType, "operationIds": "26,57,64,87","type": "3"})}//
// formList.push( // formList.push(
@ -73,13 +75,26 @@ export default{
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}); });
}else{ }, this.$refs));
this.$message.error('有必填项未填哦~'); // if(this.form.chargeWay){
} // if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
// if (this.form.idType){formList.push({"emptyOne": "8", "emptyTwo": this.form.idType, "operationIds": "26,57,64,87","type": "3"})}//
// // formList.push(
// // {"emptyOne": "7", "emptyTwo": this.form.chargeWay, "operationIds": "26,57,64,86", "type": "3"},//
// // )
// sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
// this.$message({
// message: '',
// type: 'success'
// });
// }else{
// this.$message.error('~');
// }
}, },
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
} },
checkHanzi: checkHanzi
}, },
} }
</script> </script>

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="卡号"> <el-form-item label="卡号">
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -10,30 +10,30 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="币种"> <el-form-item label="币种">
<el-select v-model="form.currency" placeholder="请选择"> <el-select v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CNY人民币" value="CNY人民币"> </el-option> <el-option label="CNY人民币" value="CNY人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="金额"> <el-form-item label="金额">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" required :rules="rules.username"> <el-form-item label="客户姓名" prop="userName">
<el-input v-model="form.userName" ref="userName"></el-input> <el-input v-model="form.userName" ref="userName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select v-model="form.goldLogo" ref="goldLogo" placeholder="请选择"> <el-select v-model="form.goldLogo" ref="goldLogo" placeholder="请选择">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="年利率" required :rules="rules.annualInterest"> <el-form-item label="年利率" prop="annualInterest">
<el-input v-model="form.annualInterest" ref="annualInterest"></el-input> <el-input v-model="form.annualInterest" ref="annualInterest"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="21" :offset="1"> <el-col :span="21" :offset="1">
<el-form-item label="摘要"> <el-form-item label="摘要">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark"></el-input> <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark" ref="remark"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -43,8 +43,8 @@
</template> </template>
<script> <script>
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import { vername, verrate } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { ismoney, checkRequired } from '@/utils/utilFunction.js' import { ismoney, myValidate } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -59,8 +59,24 @@ export default{
remark:'', remark:'',
}, },
rules: { rules: {
username: vername, userName: vercustomer ,
annualInterest: verrate goldLogo: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
annualInterest: [
{
required: true,
message: '请输入年利率',
trigger: 'blur'
},{
pattern: ratePattern,
message: '年利率格式有误'
}
]
}, },
} }
}, },
@ -75,13 +91,8 @@ export default{
submitForm(){ submitForm(){
let ruleReqs = sessionStorage.getItem('ruleReqs') let ruleReqs = sessionStorage.getItem('ruleReqs')
let formList = JSON.parse(ruleReqs); let formList = JSON.parse(ruleReqs);
const requiredField = { this.$refs.form.validate(myValidate(() => {
username: '客户姓名', //
goldLogo: '钞汇标识',
annualInterest: '年利率'
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
this.$emit("setDepositFinish"); this.$emit("setDepositFinish");
if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,63,80","type": "3"})}// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,63,80","type": "3"})}//
if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,63,82", "type": "3"})}// if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,63,82", "type": "3"})}//
@ -96,9 +107,7 @@ export default{
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}); });
}else { }, this.$refs));
this.$refs[judgeRef].focus();
}
// if(this.form.userName && this.form.goldLogo && this.form.annualInterest){ // if(this.form.userName && this.form.goldLogo && this.form.annualInterest){
// this.$emit("setDepositFinish"); // this.$emit("setDepositFinish");
// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,63,80","type": "3"})}// // if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,63,80","type": "3"})}//

@ -2,23 +2,23 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-form-item label="客户号"> <el-form-item label="客户号">
<el-input v-model="form.userNumber"></el-input> <el-input :value="form.userNumber" @input="(val) => checkHanzi(val, form, 'userNumber')" ref="userNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种" required > <el-form-item label="币种" prop="currency" >
<el-select v-model="form.currency" @focus="getSubjectInfoData('8')" placeholder="请选择"> <el-select v-model="form.currency" @focus="getSubjectInfoData('8')" placeholder="请选择" ref="currency">
<el-option v-for="item in currencySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in currencySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" required prop="userName" :rules="rules.username"> <el-form-item label="客户姓名" prop="userName">
<el-input v-model="form.userName"></el-input> <el-input :value="form.userName" @input="(val) => checkHanzi(val, form, 'userName')" ref="userName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select v-model="form.goldLogo" @focus="getSubjectInfoData('9')" placeholder="请选择"> <el-select v-model="form.goldLogo" @focus="getSubjectInfoData('9')" placeholder="请选择" ref="goldLogo">
<el-option v-for="item in goldLogoSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in goldLogoSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -27,27 +27,27 @@
</el-row> </el-row>
<div class="add"> <div class="add">
<el-row :gutter="20" style="margin: 0;z-index:9"> <el-row :gutter="20" style="margin: 0;z-index:9">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form1" :model="form" label-width="120px">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-form-item label="账户性质"> <el-form-item label="账户性质">
<el-select v-model="form.accountQuality" @focus="getSubjectInfoData('10')" placeholder="请选择"> <el-select v-model="form.accountQuality" @focus="getSubjectInfoData('10')" placeholder="请选择" ref="accountQuality">
<el-option v-for="item in accountQualitySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in accountQualitySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="账户类型" required> <el-form-item label="账户类型" prop="accountType">
<el-select v-model="form.accountType" @focus="getSubjectInfoData('12')" placeholder="请选择"> <el-select v-model="form.accountType" @focus="getSubjectInfoData('12')" placeholder="请选择" ref="accountType">
<el-option v-for="item in accountTypeSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in accountTypeSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="支取方式" required> <el-form-item label="支取方式" prop="drawWay">
<el-select v-model="form.drawWay" @focus="getSubjectInfoData('13')" placeholder="请选择"> <el-select v-model="form.drawWay" @focus="getSubjectInfoData('13')" placeholder="请选择" ref="drawWay">
<el-option v-for="item in drawWaySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in drawWaySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="凭证类型" required> <el-form-item label="凭证类型" prop="voucherType">
<el-select v-model="form.voucherType" @focus="getSubjectInfoData('11')" placeholder="请选择"> <el-select v-model="form.voucherType" @focus="getSubjectInfoData('11')" placeholder="请选择" ref="voucherType">
<el-option v-for="item in voucherTypeSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in voucherTypeSelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -69,7 +69,7 @@
<!-- 二级证件,最多三张逻辑上一张二级为填完信息不可添加第三张 v-for="(item,index) in second" :key="index" --> <!-- 二级证件,最多三张逻辑上一张二级为填完信息不可添加第三张 v-for="(item,index) in second" :key="index" -->
<div class="add" v-if="formTwo"> <div class="add" v-if="formTwo">
<el-row :gutter="20" style="margin: 0;z-index:9"> <el-row :gutter="20" style="margin: 0;z-index:9">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form2" :model="form" label-width="120px">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-form-item label="账户性质"> <el-form-item label="账户性质">
<el-select v-model="form.accountQualitysTwo" @focus="getSubjectInfoData('10')" placeholder="请选择"> <el-select v-model="form.accountQualitysTwo" @focus="getSubjectInfoData('10')" placeholder="请选择">
@ -110,7 +110,7 @@
</div> </div>
<div class="add" v-if="formThree"> <div class="add" v-if="formThree">
<el-row :gutter="20" style="margin: 0;z-index:9"> <el-row :gutter="20" style="margin: 0;z-index:9">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form3" :model="form" label-width="120px">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-form-item label="账户性质"> <el-form-item label="账户性质">
<el-select v-model="form.accountQualitysThree" @focus="getSubjectInfoData('10')" placeholder="请选择"> <el-select v-model="form.accountQualitysThree" @focus="getSubjectInfoData('10')" placeholder="请选择">
@ -175,7 +175,8 @@
<script> <script>
import {getSubjectInfo,addOperation,getOperation} from "@/api/http.js"; import {getSubjectInfo,addOperation,getOperation} from "@/api/http.js";
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import { vername, vermob } from '@/utils/verify.js' import { vercustomer } from '@/utils/verify.js'
import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default { export default {
data(){ data(){
return{ return{
@ -198,7 +199,42 @@ export default {
voucherTypesThree: '', voucherTypesThree: '',
}, },
rules: { rules: {
username: vername userName: vercustomer ,
currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
goldLogo: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
accountType: [
{
required: true,
message: '请输入账户类型',
trigger: 'blur'
}
],
voucherType: [
{
required: true,
message: '请输入凭证类型',
trigger: 'blur'
}
],
drawWay: [
{
required: true,
message: '请输入支取方式',
trigger: 'blur'
}
]
}, },
second:[],// second:[],//
options:[], options:[],
@ -219,7 +255,7 @@ export default {
}, },
mounted(){ mounted(){
this.aaa() this.aaa()
this.$refs.userNumber.focus()
}, },
methods:{ methods:{
...mapMutations({ ...mapMutations({
@ -335,7 +371,10 @@ export default {
}, },
// //
formSubmit(){ formSubmit(){
this.$refs.form.validate(myValidate(() => {
//
this.visible = true this.visible = true
}, this.$refs));
}, },
// //
popSure(){ popSure(){
@ -489,6 +528,7 @@ export default {
popUpsThree(){ popUpsThree(){
this.$store.commit('system/changePop',{show:true,text:'密码器',id:'62,3'}) this.$store.commit('system/changePop',{show:true,text:'密码器',id:'62,3'})
}, },
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="卡号" required> <el-form-item label="卡号" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -38,7 +38,7 @@
<el-form-item label="利息"> <el-form-item label="利息">
<el-input v-model="form.interest" disabled></el-input> <el-input v-model="form.interest" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取方式" required> <el-form-item label="支取方式" prop="chargeWay">
<el-select v-model="form.chargeWay" placeholder="请选择" ref="chargeWay"> <el-select v-model="form.chargeWay" placeholder="请选择" ref="chargeWay">
<el-option label="现金" value="现金"> </el-option> <el-option label="现金" value="现金"> </el-option>
</el-select> </el-select>
@ -55,8 +55,8 @@
</div> </div>
</template> </template>
<script> <script>
import { vername } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { ismoney, checkRequired } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -73,7 +73,14 @@ export default{
remark:'', remark:'',
}, },
rules: { rules: {
userName: vername userName: vercustomer ,
chargeWay: [
{
required: true,
message: '请选择支取方式',
trigger: 'blur'
}
]
} }
} }
}, },
@ -88,11 +95,9 @@ export default{
submitForm(){ submitForm(){
let ruleReqs = sessionStorage.getItem('ruleReqs') let ruleReqs = sessionStorage.getItem('ruleReqs')
let formList = JSON.parse(ruleReqs); let formList = JSON.parse(ruleReqs);
const requiredField = {
chargeWay: '支取方式' this.$refs.form.validate(myValidate(() => {
} //
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}// if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
if (this.form.goldLogo){formList.push({"emptyOne": "8", "emptyTwo": this.form.goldLogo, "operationIds": "26,57,64,87","type": "3"})}// if (this.form.goldLogo){formList.push({"emptyOne": "8", "emptyTwo": this.form.goldLogo, "operationIds": "26,57,64,87","type": "3"})}//
if (this.form.money){formList.push({"emptyOne": "8", "emptyTwo": this.form.money, "operationIds": "26,57,64,87","type": "3"})}// if (this.form.money){formList.push({"emptyOne": "8", "emptyTwo": this.form.money, "operationIds": "26,57,64,87","type": "3"})}//
@ -108,9 +113,7 @@ export default{
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}); });
}else { }, this.$refs));
this.$refs[judgeRef].focus();
}
// if(this.form.chargeWay){ // if(this.form.chargeWay){
// if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}// // if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
// if (this.form.goldLogo){formList.push({"emptyOne": "8", "emptyTwo": this.form.goldLogo, "operationIds": "26,57,64,87","type": "3"})}// // if (this.form.goldLogo){formList.push({"emptyOne": "8", "emptyTwo": this.form.goldLogo, "operationIds": "26,57,64,87","type": "3"})}//

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="转出卡号" required> <el-form-item label="转出卡号" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -14,10 +14,10 @@
<el-option label="CNY人民币" value="CNY人民币"> </el-option> <el-option label="CNY人民币" value="CNY人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="金额" required> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收款卡号" required> <el-form-item label="收款卡号" prop="shroffAccount">
<el-input v-model="form.shroffAccount" ref="shroffAccount"></el-input> <el-input v-model="form.shroffAccount" ref="shroffAccount"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -25,7 +25,7 @@
<el-form-item label="客户姓名" prop="username" :rules="rules.userName"> <el-form-item label="客户姓名" prop="username" :rules="rules.userName">
<el-input v-model="form.userName" disabled></el-input> <el-input v-model="form.userName" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select disabled v-model="form.goldLogo" placeholder="请选择" ref="goldLogo"> <el-select disabled v-model="form.goldLogo" placeholder="请选择" ref="goldLogo">
<el-option label="钞户" value="钞户" ref="goldLogo"> </el-option> <el-option label="钞户" value="钞户" ref="goldLogo"> </el-option>
</el-select> </el-select>
@ -35,7 +35,7 @@
<p>请输入密码</p> <p>请输入密码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="收款人名称" required prop="payeeName" :rules="rules.payeeName" > <el-form-item label="收款人名称" prop="payeeName" :rules="rules.payeeName" >
<el-input v-model="form.payeeName" ref="payeeName"></el-input> <el-input v-model="form.payeeName" ref="payeeName"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -50,8 +50,8 @@
</div> </div>
</template> </template>
<script> <script>
import { vername } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -67,8 +67,39 @@ export default{
remark:'', remark:'',
}, },
rules: { rules: {
userName: vername, userName: vercustomer ,
payeeName:vername payeeName: [
{
pattern: namePattern,
message: '收款人名称格式有误'
},
{
required: true,
message: '请输入收款人名称',
trigger: 'blur'
}
],
goldLogo: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
payeeName: [
{
required: true,
message: '请输入收款卡号',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
],
} }
} }
}, },
@ -80,14 +111,8 @@ export default{
submitForm(){ submitForm(){
let ruleReqs = sessionStorage.getItem('ruleReqs') let ruleReqs = sessionStorage.getItem('ruleReqs')
let formList = JSON.parse(ruleReqs); let formList = JSON.parse(ruleReqs);
const requiredField = { this.$refs.form.validate(myValidate(() => {
goldLogo: '客户姓名', //
money: '金额',
shroffAccount: '收款卡号',
payeeName: '收款人名称'
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}// if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}//
if (this.form.remark){formList.push({"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "26,57,64,93", "type": "3"})}// if (this.form.remark){formList.push({"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "26,57,64,93", "type": "3"})}//
@ -102,9 +127,7 @@ export default{
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}); });
}else { }, this.$refs));
this.$refs[judgeRef].focus();
}
// if(this.form.goldLogo && this.form.money && this.form.shroffAccount && this.form.payeeName){ // if(this.form.goldLogo && this.form.money && this.form.shroffAccount && this.form.payeeName){
// if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}// // if (this.form.userName){formList.push({"emptyOne": "16", "emptyTwo": this.form.userName, "operationIds": "26,57,64,93", "type": "3"})}//
// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}// // if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}//

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px" @click.native="depositFinishJudge"> <el-form ref="form" :rules="rules" :model="form" label-width="120px" @click.native="depositFinishJudge">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="卡号" required> <el-form-item label="卡号" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -24,26 +24,26 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" required :rules="rules.userName"> <el-form-item label="客户姓名" prop="userName">
<el-input v-model="form.userName" ref="userName"></el-input> <el-input v-model="form.userName" ref="userName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select v-model="form.goldLogo" placeholder="请选择" ref="goldLogo"> <el-select v-model="form.goldLogo" placeholder="请选择" ref="goldLogo">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="支取方式" required> <el-form-item label="支取方式" prop="chargeWay">
<el-select v-model="form.chargeWay" placeholder="请选择" ref="chargeWay"> <el-select v-model="form.chargeWay" placeholder="请选择" ref="chargeWay">
<el-option label="密码" value="密码"> </el-option> <el-option label="密码" value="密码"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手续费" required> <el-form-item label="手续费" prop="serviceCharge">
<el-input :value="form.serviceCharge" @input="val => ismoney(val, form, 'serviceCharge')" ref="serviceCharge"></el-input> <el-input :value="form.serviceCharge" @input="val => ismoney(val, form, 'serviceCharge')" ref="serviceCharge"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="21" :offset="1"> <el-col :span="21" :offset="1">
<el-form-item label="摘要"> <el-form-item label="摘要">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark"></el-input> <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark" ref="remark"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -52,8 +52,8 @@
</div> </div>
</template> </template>
<script> <script>
import { vername } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{ props:{
@ -71,7 +71,28 @@ export default{
remark:'', remark:'',
}, },
rules: { rules: {
userName: vername userName: vercustomer ,
goldLogo: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
chargeWay: [
{
required: true,
message: '请选择支取方式',
trigger: 'blur'
}
],
serviceCharge: [
{
required: true,
message: '请输入手续费',
trigger: 'blur'
}
]
} }
} }
}, },
@ -90,14 +111,8 @@ export default{
submitForm(){ submitForm(){
let ruleReqs = sessionStorage.getItem('ruleReqs') let ruleReqs = sessionStorage.getItem('ruleReqs')
let formList = JSON.parse(ruleReqs); let formList = JSON.parse(ruleReqs);
const requiredField = { this.$refs.form.validate(myValidate(() => {
userName: '客户姓名', //
goldLogo: '钞汇标识',
chargeWay: '支取方式',
serviceCharge: '手续费'
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}//
if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,64,89", "type": "3"})}// if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,64,89", "type": "3"})}//
if (this.form.remark){formList.push({"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "26,57,64,93", "type": "3"})}// if (this.form.remark){formList.push({"emptyOne": "16", "emptyTwo": this.form.remark, "operationIds": "26,57,64,93", "type": "3"})}//
@ -112,9 +127,7 @@ export default{
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}); });
}else { }, this.$refs));
this.$refs[judgeRef].focus();
}
// if(this.form.userName && this.form.goldLogo && this.form.chargeWay && this.form.serviceCharge){ // if(this.form.userName && this.form.goldLogo && this.form.chargeWay && this.form.serviceCharge){
// if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}// // if (this.form.currency){formList.push({"emptyOne": "8", "emptyTwo": this.form.currency, "operationIds": "26,57,64,87","type": "3"})}//
// if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,64,89", "type": "3"})}// // if (this.form.money){formList.push({"emptyOne": "14", "emptyTwo": this.form.money, "operationIds": "26,57,64,89", "type": "3"})}//

@ -2,46 +2,46 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" required>
<div class="idCard" @click="popUp('输入器')"> <div class="idCard" @click="popUp('输入器')">
<p>请输入凭证号</p> <p>请输入凭证号</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="金额"> <el-form-item label="金额" prop="money">
<el-input :value="form.money" @input="val => ismoney(val, form, 'money')"></el-input> <el-input :value="form.money" @input="val => ismoney(val, form, 'money')" ref="money"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利率(%)" prop="interestRate" :rules="rules.interestRate"> <el-form-item label="利率(%)" prop="interestRate">
<el-input v-model="form.interestRate"></el-input> <el-input v-model="form.interestRate" ref="interestRate"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取方式"> <el-form-item label="支取方式" prop="withdrawingWay">
<el-select disabled v-model="form.withdrawingWay" placeholder="请选择"> <el-select disabled v-model="form.withdrawingWay" placeholder="请选择" ref="withdrawingWay">
<el-option label="密码" value="密码"> </el-option> <el-option label="密码" value="密码"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="存款类别" required> <el-form-item label="存款类别" required prop="certificateDeposit">
<el-select disabled v-model="form.certificateDeposit" placeholder="请选择" ref="certificateDeposit"> <el-select disabled v-model="form.certificateDeposit" placeholder="请选择" ref="certificateDeposit">
<el-option label="现金" value="现金"> </el-option> <el-option label="现金" value="现金"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" required prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" required prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="存期" required> <el-form-item label="存期" prop="depositTerm">
<el-select disabled v-model="form.depositTerm" placeholder="请选择"> <el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm">
<el-option label="3个月" value="3个月"> </el-option> <el-option label="3个月" value="3个月"> </el-option>
<el-option label="6个月" value="6个月"> </el-option> <el-option label="6个月" value="6个月"> </el-option>
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
@ -50,22 +50,24 @@
<el-option label="五年" value="五年"> </el-option> <el-option label="五年" value="五年"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="续存" required> <el-form-item label="续存" prop="extendPeriod">
<el-radio v-model="form.extendPeriod" label="1" ref="extendPeriod">备选项1</el-radio> <el-radio-group v-model="form.extendPeriod" ref="extendPeriod">
<el-radio v-model="form.extendPeriod" label="2">备选项2</el-radio> <el-radio :label="3">备选项1</el-radio>
<el-radio :label="6">备选项2</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="支取密码" required> <el-form-item label="支取密码" required>
<div class="idCard" @click="popUp('输入器')"> <div class="idCard" @click="popUp('输入器')">
<p>请输入密码</p> <p>请输入密码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="起息日" prop="valueDate" required> <el-form-item label="起息日" prop="valueDate">
<el-input v-model="form.valueDate" ref="valueDate" ></el-input> <el-input ref="valueDate" :value="form.valueDate" @input="(val) => checkHanzi(val, form, 'valueDate')" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="21" :offset="1"> <el-col :span="21" :offset="1">
<el-form-item label="摘要"> <el-form-item label="摘要" prop="textarea">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.abstract"></el-input> <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.abstract" ref="textarea"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -74,9 +76,8 @@
</div> </div>
</template> </template>
<script> <script>
import { EventBus } from "@/utils/event-bus.js"; import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -89,7 +90,7 @@ export default{
currency: 'CYC人民币', // currency: 'CYC人民币', //
currencyMark: '钞户', // currencyMark: '钞户', //
depositTerm: '3个月', // depositTerm: '3个月', //
extendPeriod: '备选项1', // extendPeriod: '', //
certificateDeposit: '现金', // certificateDeposit: '现金', //
valueDate: '', // valueDate: '', //
// voucherNumber: '', // // voucherNumber: '', //
@ -101,8 +102,51 @@ export default{
abstract: '' // abstract: '' //
}, },
rules: { rules: {
customerName: vername, customerName: vercustomer ,
interestRate: verrate, currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
currencyMark: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
depositTerm: [
{
required: true,
message: '请选择存期',
trigger: 'blur'
}
],
certificateDeposit: [
{
required: true,
message: '请选择存款类别',
trigger: 'blur'
}
],
extendPeriod: [
{
required: true,
message: '请选择续存',
trigger: 'blur'
}
],
interestRate: [{
required: true,
message: '请输入利率',
trigger: 'blur'
},
{
pattern: ratePattern,
message: '利率格式有误'
}],
valueDate: { valueDate: {
required: true, required: true,
message: '请输入起息日' message: '请输入起息日'
@ -118,24 +162,17 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
currencyMark: '钞汇标识', // message: '验证成功',
depositTerm: '存期', // center: true
extendPeriod: '续存', // });
certificateDeposit: '存款类别', // }, this.$refs));
valueDate: '起息日', //
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('...')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,7 +2,7 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型">
<el-select disabled v-model="form.certificateType" placeholder="请选择"> <el-select disabled v-model="form.certificateType" placeholder="请选择">
@ -10,15 +10,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户号"> <el-form-item label="客户号">
<el-input v-model="form.clientNumber" ref="clientNumber"></el-input> <el-input ref="clientNumber" :value="form.clientNumber" @input="(val) => checkHanzi(val, form, 'clientNumber')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证类型" required> <el-form-item label="凭证类型" prop="voucherType">
<el-select disabled v-model="form.voucherType" placeholder="请选择"> <el-select disabled v-model="form.voucherType" placeholder="请选择" ref="voucherType">
<el-option label="存单" value="存单"> </el-option> <el-option label="存单" value="存单"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -34,11 +34,11 @@
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" required prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -47,8 +47,8 @@
<p>请填凭证号码</p> <p>请填凭证号码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" required prop="customerManage" :rules="rules.customerManage"> <el-form-item label="客户经理" prop="customerManage">
<el-input v-model="form.customerManage" ref="customerManage"></el-input> <el-input ref="customerManage" :value="form.customerManage" @input="(val) => checkHanzi(val, form, 'customerManage')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -58,8 +58,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired } from '@/utils/utilFunction.js' import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
import { vername } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -80,8 +80,35 @@ export default{
clientNumber: '' // clientNumber: '' //
}, },
rules: { rules: {
customerName: vername, customerName: vercustomer ,
customerManage: vername customerManage: [{
required: true,
message: '请输入客户经理名称',
trigger: 'blur'
},
{
pattern: namePattern,
message: '客户经理名称格式有误'
}
],
currency: [{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
currencyMark: [{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
voucherType: [{
required: true,
message: '请选择凭证类型',
trigger: 'blur'
}
],
} }
} }
}, },
@ -90,23 +117,15 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
currencyMark: '钞汇标识', // message: '验证成功',
voucherType: '凭证类型', // center: true
// voucherNumber: '', // });
// paymentCode: '', // }, this.$refs));
customerManage: '客户经理', // },
} checkHanzi: checkHanzi
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}
}, },
mounted() { mounted() {
this.$refs.clientNumber.focus() this.$refs.clientNumber.focus()

@ -2,26 +2,26 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
<p>请填凭证号码</p> <p>请填凭证号码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="币种"> <el-form-item label="币种" prop="currencyType">
<el-select disabled v-model="form.x" placeholder="请选择"> <el-select disabled v-model="form.currencyType" placeholder="请选择" ref="currencyType">
<el-option label="CNY人民币" value="CNY人民币"> </el-option> <el-option label="CNY人民币" value="CNY人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="定存编号"> <el-form-item label="定存编号" prop="depositNumber">
<el-input v-model="form.depositNumber" ref="depositNumber"></el-input> <el-input ref="depositNumber" :value="form.depositNumber" @input="(val) => checkHanzi(val, form, 'depositNumber')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取金额" required> <el-form-item label="支取金额" prop="withdrawAmount">
<el-input :value="form.withdrawAmount" @input="val => ismoney(val, form, 'withdrawAmount')" ref="withdrawAmount"></el-input> <el-input :value="form.withdrawAmount" @input="val => ismoney(val, form, 'withdrawAmount')" ref="withdrawAmount"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利息(%)" required prop="interest" :rules="rules.interest"> <el-form-item label="利息(%)" prop="interest">
<el-input v-model="form.interest" ref="interest"></el-input> <el-input :value="form.interest" @input="(val) => checkHanzi(val, form, 'interest')" ref="interest"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取密码" required> <el-form-item label="支取密码" required>
<div class="idCard" @click="popUp('刷卡器')"> <div class="idCard" @click="popUp('刷卡器')">
@ -30,25 +30,27 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" disabled></el-input> <el-input :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')" disabled ref="customerName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="本金" required> <el-form-item label="本金" prop="capital">
<el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input> <el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取类别" required> <el-form-item label="支取类别" prop="withdrawType">
<el-select disabled v-model="form.withdrawType" placeholder="请选择" ref="withdrawType"> <el-select disabled v-model="form.withdrawType" placeholder="请选择" ref="withdrawType">
<el-option label="现金" value="现金"> </el-option> <el-option label="现金" value="现金"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="支取方式" required> <el-form-item label="支取方式" prop="withdrawWay">
<el-radio v-model="form.withdrawWay" label="1" ref="withdrawWay">部分支取</el-radio> <el-radio-group v-model="form.withdrawWay" ref="withdrawWay">
<el-radio v-model="form.withdrawWay" label="2">全部支取</el-radio> <el-radio :label="3">部分支取</el-radio>
<el-radio :label="6">全部支取</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -58,8 +60,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -72,14 +74,25 @@ export default{
interest: '', // interest: '', //
withdrawAmount: '', // withdrawAmount: '', //
withdrawType: '现金', // withdrawType: '现金', //
withdrawWay: '部分支取', // withdrawWay: '', //
// //
customerName: '', // customerName: '', //
depositNumber: '', // depositNumber: '', //
currencyType: '', //
}, },
rules: { rules: {
customerName: vername, customerName: vercustomer,
interest: verrate interest: [
{
required: true,
message: '请输入利息',
trigger: 'blur'
},
{
pattern: ratePattern,
message: '利息格式有误'
}
]
} }
} }
}, },
@ -91,22 +104,16 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitIt() { submitIt() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
currencyMark: '钞汇标识', // //
capital: '本金', // this.$message({
interest: '利息', // message: '验证成功',
withdrawAmount: '支取金额', // center: true
withdrawType: '支取类别', // });
withdrawWay: '支取方式', // }, this.$refs));
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,31 +2,31 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select disabled v-model="form.certificateType" placeholder="请选择"> <el-select disabled v-model="form.certificateType" placeholder="请选择" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" prop="voucherNumber">
<el-select disabled v-model="form.voucherNumber" placeholder="请选择" ref="voucherNumber"> <el-select disabled v-model="form.voucherNumber" placeholder="请选择" ref="voucherNumber">
<el-option label="存单" value="存单"> </el-option> <el-option label="存单" value="存单"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择" ref="currency"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="定存编号"> <el-form-item label="定存编号" prop="depositNumber">
<el-input v-model="form.depositNumber"></el-input> <el-input :value="form.depositNumber" @input="(val) => checkHanzi(val, form, 'depositNumber')" ref="depositNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利率(%)" prop="interestRate" :rules="rules.interestRate"> <el-form-item label="利率(%)" prop="interestRate">
<el-input v-model="form.interestRate"></el-input> <el-input :value="form.interestRate" @input="(val) => checkHanzi(val, form, 'interestRate')" ref="interestRate"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="利息"> <el-form-item label="利息" prop="interest">
<el-input v-model="form.interest"></el-input> <el-input :value="form.interest" @input="(val) => checkHanzi(val, form, 'interest')" ref="interest"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="起息日期" required> <el-form-item label="起息日期" required>
<div class="idCard" @click="popUp('密码器')"> <div class="idCard" @click="popUp('密码器')">
@ -41,26 +41,26 @@
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识"> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="本金"> <el-form-item label="本金" prop="capital">
<el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ></el-input> <el-input :value="form.capital" @input="val => ismoney(val, form, 'capital')" ref="capital" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="存期"> <el-form-item label="存期" prop="depositTerm">
<el-select disabled v-model="form.depositTerm" placeholder="请选择"> <el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm">
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
<el-option label="3年" value="3年"> </el-option> <el-option label="3年" value="3年"> </el-option>
<el-option label="5年" value="5年"> </el-option> <el-option label="5年" value="5年"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="总金额"> <el-form-item label="总金额" prop="totalMoney">
<el-input :value="form.totalMoney" @input="val => ismoney(val, form, 'totalMoney')" ></el-input> <el-input :value="form.totalMoney" @input="val => ismoney(val, form, 'totalMoney')" ref="totalMoney" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取密码" required> <el-form-item label="支取密码" required>
<div class="idCard" @click="popUp('输入器')"> <div class="idCard" @click="popUp('输入器')">
@ -83,8 +83,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -106,8 +106,27 @@ export default{
totalMoney: '', // totalMoney: '', //
}, },
rules: { rules: {
customerName: vername, customerName: vercustomer,
interestRate: verrate currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
voucherNumber: [
{
required: true,
message: '请选择凭证号码',
trigger: 'blur'
}
],
interestRate: [
{
pattern: ratePattern,
message: '利率格式有误'
}
]
}, },
} }
}, },
@ -119,19 +138,16 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
currency: '币种', // //
voucherNumber: '凭证号码 ', // this.$message({
} message: '验证成功',
const judgeRef = checkRequired(this.form, requiredField) center: true
if(judgeRef === '') { });
console.log('submit success') }, this.$refs));
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,35 +2,35 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" required>
<div class="idCard" @click="popUp('输入器')"> <div class="idCard" @click="popUp('输入器')">
<p>请输入凭证号</p> <p>请输入凭证号</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="定存编号"> <el-form-item label="定存编号" prop="depositNumber">
<el-input v-model="form.depositNumber"></el-input> <el-input :value="form.depositNumber" @input="(val) => checkHanzi(val, form, 'depositNumber')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识"> <el-form-item label="钞汇标识" prop="moneyTarget">
<el-select disabled v-model="form.moneyTarget" placeholder="请选择"> <el-select disabled v-model="form.moneyTarget" placeholder="请选择">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="月存金额"> <el-form-item label="月存金额" prop="monthDeposit">
<el-input :value="form.monthDeposit" @input="val => ismoney(val, form, 'monthDeposit')"></el-input> <el-input :value="form.monthDeposit" @input="val => ismoney(val, form, 'monthDeposit')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" required prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择" ref="currency"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="存期" required> <el-form-item label="存期" prop="depositTerm">
<el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm"> <el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm">
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
<el-option label="3年" value="3年"> </el-option> <el-option label="3年" value="3年"> </el-option>
@ -49,8 +49,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { vername } from '@/utils/verify.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -68,7 +68,22 @@ export default{
monthDeposit: '' // monthDeposit: '' //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
depositTerm: [
{
required: true,
message: '请选择存期',
trigger: 'blur'
}
]
} }
} }
}, },
@ -80,19 +95,16 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
depositTerm: '存期', // message: '验证成功',
} center: true
const judgeRef = checkRequired(this.form, requiredField) });
if(judgeRef === '') { }, this.$refs));
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -2,22 +2,22 @@
<template> <template>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select disabled v-model="form.x" placeholder="请选择"> <el-select disabled v-model="form.certificateType" placeholder="请选择" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户号"> <el-form-item label="客户号" prop="clientNumber">
<el-input v-model="form.clientNumber" ref="clientNumber"></el-input> <el-input ref="clientNumber" :value="form.clientNumber" @input="(val) => checkHanzi(val, form, 'clientNumber')" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="币种" required> <el-form-item label="币种" prop="currency">
<el-select disabled v-model="form.currency" placeholder="请选择" ref="currency"> <el-select disabled v-model="form.currency" placeholder="请选择" ref="currency">
<el-option label="CYN人民币" value="CYN人民币"> </el-option> <el-option label="CYN人民币" value="CYN人民币"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="凭证类型" required> <el-form-item label="凭证类型" prop="voucherType">
<el-select disabled v-model="form.voucherType" placeholder="请选择" ref="voucherType"> <el-select disabled v-model="form.voucherType" placeholder="请选择" ref="voucherType">
<el-option label="存单" value="存单"> </el-option> <el-option label="存单" value="存单"> </el-option>
</el-select> </el-select>
@ -27,7 +27,7 @@
<p>请输入密码</p> <p>请输入密码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="存期" required> <el-form-item label="存期" prop="depositTerm">
<el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm"> <el-select disabled v-model="form.depositTerm" placeholder="请选择" ref="depositTerm">
<el-option label="1年" value="1年"> </el-option> <el-option label="1年" value="1年"> </el-option>
<el-option label="3年" value="3年"> </el-option> <el-option label="3年" value="3年"> </el-option>
@ -41,10 +41,10 @@
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" required prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select disabled v-model="form.currencyMark" placeholder="请选择" ref="currencyMark">
<el-option label="钞户" value="钞户"> </el-option> <el-option label="钞户" value="钞户"> </el-option>
</el-select> </el-select>
@ -54,10 +54,10 @@
<p>请填凭证号码</p> <p>请填凭证号码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="月存金额" required> <el-form-item label="月存金额" prop="monthDeposit">
<el-input :value="form.monthDeposit" @input="val => ismoney(val, form, 'monthDeposit')" ref="monthDeposit" ></el-input> <el-input :value="form.monthDeposit" @input="val => ismoney(val, form, 'monthDeposit')" ref="monthDeposit" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="续存标识" required> <el-form-item label="续存标识" prop="extendDepositTarget">
<el-select disabled v-model="form.extendDepositTarget" placeholder="请选择" ref="extendDepositTarget"> <el-select disabled v-model="form.extendDepositTarget" placeholder="请选择" ref="extendDepositTarget">
<el-option label="不续存" value="不续存"> </el-option> <el-option label="不续存" value="不续存"> </el-option>
<el-option label="续存1年" value="续存1年"> </el-option> <el-option label="续存1年" value="续存1年"> </el-option>
@ -73,8 +73,8 @@
</div> </div>
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -93,10 +93,53 @@ export default{
// voucherNumber: '', // // voucherNumber: '', //
// paymentCode: '', // // paymentCode: '', //
// //
clientNumber: '' // clientNumber: '', //
certificateType: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
currency: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
currencyMark: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
voucherType: [
{
required: true,
message: '请选择凭证类型',
trigger: 'blur'
}
],
monthDeposit: [
{
required: true,
message: '请输入月存金额',
trigger: 'blur'
}
],
depositTerm: [
{
required: true,
message: '请选择存期',
trigger: 'blur'
}
],
extendDepositTarget: [
{
required: true,
message: '请选择续存标识',
trigger: 'blur'
}
],
} }
} }
}, },
@ -109,24 +152,16 @@ export default{
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
currencyMark: '钞汇标识', // message: '验证成功',
voucherType: '凭证类型', // center: true
monthDeposit: '月存金额', // });
depositTerm: '存期', // }, this.$refs));
extendDepositTarget: '续存标识', //
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi
} }
} }
</script> </script>

@ -7,17 +7,17 @@
</div> </div>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select v-model="form.certificateType" ref="certificateType"> <el-select v-model="form.certificateType" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" required :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input ref="customerName" :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="原支付密码" required> <el-form-item label="原支付密码" prop="payPassword">
<el-input type="password" v-model="form.payPassword" placeholder="请输入密码" ref="payPassword"></el-input> <el-input type="password" v-model="form.payPassword" placeholder="请输入密码" ref="payPassword"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -32,12 +32,12 @@
<p>请刷银行卡</p> <p>请刷银行卡</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="新支付密码"> <el-form-item label="新支付密码" prop="newPayPassword">
<el-input type="password" v-model="form.newPayPassword" placeholder="请输入密码" ref="newPayPassword"></el-input> <el-input type="password" v-model="form.newPayPassword" placeholder="请输入密码" ref="newPayPassword"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20" :offset="2"> <el-col :span="20" :offset="2">
<el-form-item label="通讯地址" label-width="85px"> <el-form-item label="通讯地址" label-width="85px" prop="maillingAddress">
<el-input v-model="form.maillingAddress" ref="maillingAddress"></el-input> <el-input v-model="form.maillingAddress" ref="maillingAddress"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,8 +69,8 @@
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -88,7 +88,14 @@ export default{
maillingAddress: '', // maillingAddress: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
payPassword: [
{
required: true,
message: '请输入原支付密码',
trigger: 'blur'
}
]
}, },
visible: false visible: false
} }
@ -101,18 +108,15 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
payPassword: '原支付密码', // this.$message({
} message: '验证成功',
const judgeRef = checkRequired(this.form, requiredField) center: true
if(judgeRef === '') { });
this.visible = true }, this.$refs));
}else { },
this.$refs[judgeRef].focus(); checkHanzi: checkHanzi
}
}
} }
} }
</script> </script>

@ -7,22 +7,22 @@
</div> </div>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="账号" required> <el-form-item label="账号" required>
<div class="idCard" @click="popUp('银行扫描器')"> <div class="idCard" @click="popUp('银行扫描器')">
<p>请刷银行卡</p> <p>请刷银行卡</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select v-model="form.certificateType"> <el-select v-model="form.certificateType" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName"></el-input> <el-input v-model="form.customerName" ref="customerName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="身份证" required> <el-form-item label="身份证" required>
<div class="idCard" @click="popUp('身份证扫描器')"> <div class="idCard" @click="popUp('身份证扫描器')">
@ -31,8 +31,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20" :offset="1"> <el-col :span="20" :offset="1">
<el-form-item label="备注"> <el-form-item label="备注" prop="textarea">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark"></el-input> <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.remark" ref="textarea"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -63,8 +63,8 @@
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -79,26 +79,28 @@ export default{
remark: '', // remark: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer
}, },
visible: false visible: false
} }
}, },
mounted() {
this.$refs.customerName.focus()
},
methods: { methods: {
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
} //
const judgeRef = checkRequired(this.form, requiredField) this.$message({
if(judgeRef === '') { message: '验证成功',
this.visible = true center: true
}else { });
this.$refs[judgeRef].focus(); }, this.$refs));
} },
checkHanzi: checkHanzi
}
} }
} }
</script> </script>

@ -7,15 +7,15 @@
</div> </div>
<div class="body"> <div class="body">
<el-row :gutter="20" style="margin: 0"> <el-row :gutter="20" style="margin: 0">
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="账号" required> <el-form-item label="账号" required>
<div class="idCard" @click="popUp('银行扫描器')"> <div class="idCard" @click="popUp('银行扫描器')">
<p>请刷银行卡</p> <p>请刷银行卡</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="证件类型"> <el-form-item label="证件类型" prop="certificateType">
<el-select v-model="form.certificateType"> <el-select v-model="form.certificateType" ref="certificateType">
<el-option label="身份证" value="身份证"> </el-option> <el-option label="身份证" value="身份证"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -26,16 +26,16 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="customerName" :rules="rules.customerName"> <el-form-item label="客户姓名" prop="customerName">
<el-input v-model="form.customerName"></el-input> <el-input :value="form.customerName" @input="(val) => checkHanzi(val, form, 'customerName')" ref="customerName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="身份证" required> <el-form-item label="身份证" required>
<div class="idCard" @click="popUp('身份证扫描器')"> <div class="idCard" @click="popUp('身份证扫描器')">
<p>请刷身份证</p> <p>请刷身份证</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input> <el-input v-model="form.remark" ref="remark"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -66,8 +66,8 @@
</template> </template>
<script> <script>
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { vercustomer } from '@/utils/verify.js'
import { vername, verrate } from '@/utils/verify.js' import { myValidate, checkHanzi } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -81,7 +81,7 @@ export default{
remark: '', // remark: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer
}, },
visible: false visible: false
} }
@ -92,13 +92,18 @@ export default{
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
} //
if(checkRequired(this.form, requiredField)) { this.$message({
this.visible = true message: '验证成功',
} center: true
});
} }, this.$refs));
},
checkHanzi: checkHanzi
},
mounted() {
this.$refs.customerName.focus()
} }
} }
</script> </script>

@ -1,4 +1,4 @@
import { MessageBox } from 'element-ui'; import { MessageBox, Message } from 'element-ui';
const phoneListen = function(val, form, prop) { const phoneListen = function(val, form, prop) {
if(/^[0-9]*$/.test(val)) { if(/^[0-9]*$/.test(val)) {
@ -63,11 +63,36 @@ const checkRequired = function(form, obj) {
return ''; return '';
} }
const myValidate = (callback, refs) => {
return (valid, obj) => {
if (valid) {
callback()
} else {
let tmpObj = {};
for(const key in obj) {
tmpObj = obj[key][0]
break;
}
const { message, field } = tmpObj
refs[field].focus();
Message.info({
center: true,
message
})
// Message.message(message + '', '提示', {
// type: 'info',
// confirmButtonText: message
// });
}
}
}
export { export {
phoneListen, phoneListen,
mailBoxListen, mailBoxListen,
checkRequired, checkRequired,
inputListen, inputListen,
ismoney, ismoney,
checkHanzi checkHanzi,
myValidate
} }

@ -3,10 +3,26 @@ const veren = /(^[a-zA-Z]+$)/
const vernum = /^[0-9]*$/ const vernum = /^[0-9]*$/
const verdou = /^[0-9]+(.[0-9]{1,3})?$/ const verdou = /^[0-9]+(.[0-9]{1,3})?$/
const vermail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/ const vermail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/
const mobPattern = /^1[3456789][0-9]{9}$/
const namePattern = /(^[A-Z][a-z]*(\s[A-Z][a-z]*)*$)|(^[\u4e00-\u9fa5]{2,4}$)/
const ratePattern = /^(\d|[1-9]\d|100)(.\d{1,3})?%$|^(\d|[1-9]\d|100)(.\d{1,3})?$/
const vercustomer = [
{
required: true,
message: '请输入客户姓名',
trigger: 'blur'
},
{
pattern: namePattern,
message: '客户姓名格式有误'
}
]
const vermob = [ const vermob = [
{ {
pattern: /^1[3456789][0-9]{9}$/, pattern: /^1[3456789][0-9]{9}$/,
message: '号码格式有误' message: '手机号格式有误'
}, { }, {
message: '请输入12位以下数字', message: '请输入12位以下数字',
max: 11 max: 11
@ -17,7 +33,7 @@ const vername = [
// pattern: /^[\u4e00-\u9fa5]{2,4}$/, // pattern: /^[\u4e00-\u9fa5]{2,4}$/,
// pattern: /^(?:[\u4e00-\u9fa5]+)(?:●[\u4e00-\u9fa5]+)*$|^[a-zA-Z0-9]+\s?[\.·\-()a-zA-Z]*[a-zA-Z]+$/, // pattern: /^(?:[\u4e00-\u9fa5]+)(?:●[\u4e00-\u9fa5]+)*$|^[a-zA-Z0-9]+\s?[\.·\-()a-zA-Z]*[a-zA-Z]+$/,
pattern: /(^[A-Z][a-z]*(\s[A-Z][a-z]*)*$)|(^[\u4e00-\u9fa5]{2,4}$)/, pattern: /(^[A-Z][a-z]*(\s[A-Z][a-z]*)*$)|(^[\u4e00-\u9fa5]{2,4}$)/,
message: '名字格式有误' message: '名字格式有误'
} }
] ]
const verrate = [ const verrate = [
@ -47,5 +63,9 @@ const requiremoney = [
vermail, vermail,
vermob, vermob,
vername, vername,
verrate verrate,
mobPattern,
namePattern,
ratePattern,
vercustomer
} }

Loading…
Cancel
Save