20240205
luoJunYong.123 3 years ago
parent d4c1a43b7d
commit 6bf7a239a5
  1. 9
      src/pages/manage/index/index.vue
  2. 68
      src/pages/manage/list/business/deposit.vue
  3. 131
      src/pages/manage/list/business/openAccount.vue
  4. 96
      src/pages/manage/list/business/transfer.vue
  5. 81
      src/pages/manage/list/business/withdrawal.vue
  6. 8
      src/pages/manage/list/client/consumerClient.vue
  7. 7
      src/pages/manage/list/client/corporateClient.vue
  8. 7
      src/pages/manage/list/personal/currentAccount/accountCancellation.vue
  9. 10
      src/pages/manage/list/personal/currentAccount/deposit.vue
  10. 23
      src/pages/manage/list/personal/currentAccount/transferAccounts.vue
  11. 8
      src/pages/manage/list/personal/currentAccount/withdrawal.vue
  12. 8
      src/pages/manage/navbar/index.vue
  13. 26
      src/utils/utilFunction.js
  14. 7
      src/utils/verify.js

@ -134,6 +134,15 @@ export default {
/deep/ .is-error input { /deep/ .is-error input {
border-color: #f40!important;; border-color: #f40!important;;
} }
/deep/ .text-xl p {
font-size: 18px!important;
}
/deep/ .el-form-item .el-form-item__label {
font-size: 18px!important;
}
/deep/ .el-menu-item {
font-size: 18px;
}
// /deep/ .el-form-item__error { // /deep/ .el-form-item__error {
// top: 105%; // top: 105%;
// left: auto; // left: auto;

@ -10,35 +10,35 @@
<!-- 存款 --> <!-- 存款 -->
<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="username">
<el-input v-model="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="币种" 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="depositNum">
<el-input :value="form.depositNum" @input="val => ismoney(val, form, 'depositNum')" ref="depositNum"></el-input> <el-input :value="form.depositNum" @input="val => ismoney(val, form, 'depositNum')" ref="depositNum"></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" :rules="rules.customerName">
<el-input v-model="form.customerName" ref="customerName"></el-input> <el-input :value="form.customerName" @input="(val) => checkName(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 v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select 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 prop="interestRate" :rules="rules.interestRate"> <el-form-item label="利率(%)" prop="interestRate">
<el-input v-model="form.interestRate" ref="interestRate"></el-input> <el-input :value="form.interestRate" @input="(val) => rateListen(val, form, 'interestRate')" ref="interestRate"></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"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -72,8 +72,8 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { checkHanzi, checkName, ismoney, rateListen, myValidate } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { vercustomer, verrate } from '@/utils/verify.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -92,8 +92,22 @@ export default {
abstract: '', // abstract: '', //
}, },
rules: { rules: {
customerName: vername, customerName: vercustomer,
interestRate: verrate interestRate: verrate,
username: [
{
required: true,
message: '请输入账号',
trigger: 'blur'
}
],
depositNum: [
{
required: true,
message: '请输入存款金额',
trigger: 'blur'
}
]
}, },
second:[// second:[//
@ -115,20 +129,18 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
username: '账号', // this.$message({
depositNum: '存款金额', // 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,
rateListen: rateListen,
checkName: checkName,
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -10,12 +10,12 @@
<!-- 开户 --> <!-- 开户 -->
<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="客户号" prop="customerNumber">
<el-input v-model="form.customerNumber" ref="customerNumber"></el-input> <el-input :value="form.customerNumber" @input="(val) => checkHanzi(val, form, 'customerNumber')" ref="customerNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="账户类型" required> <el-form-item label="账户类型" prop="accountType">
<el-select v-model="form.accountType" placeholder="请选择" ref="accountType"> <el-select v-model="form.accountType" placeholder="请选择" ref="accountType">
<el-option label="结算户" value="结算户"> </el-option> <el-option label="结算户" value="结算户"> </el-option>
<el-option label="活期保障金户" value="活期保障金户"> </el-option> <el-option label="活期保障金户" value="活期保障金户"> </el-option>
@ -23,7 +23,7 @@
<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="accountManagement">
<el-select v-model="form.accountManagement" placeholder="请选择" ref="accountManagement"> <el-select v-model="form.accountManagement" placeholder="请选择" ref="accountManagement">
<el-option label="工业存款" value="工业存款"> </el-option> <el-option label="工业存款" value="工业存款"> </el-option>
<el-option label="商业存款" value="商业存款"> </el-option> <el-option label="商业存款" value="商业存款"> </el-option>
@ -31,30 +31,30 @@
<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="currencyMark">
<el-select v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select 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="outAccountWay">
<el-select v-model="form.outAccountWay" placeholder="请选择" ref="outAccountWay"> <el-select v-model="form.outAccountWay" placeholder="请选择" ref="outAccountWay">
<el-option label="按月" value="按月"> </el-option> <el-option label="按月" value="按月"> </el-option>
<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"></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="外汇证号"> <el-form-item label="外汇证号" prop="foreignCurrencyCertificate">
<el-input v-model="form.foreignCurrencyCertificate"></el-input> <el-input :value="form.foreignCurrencyCertificate" @input="(val) => checkHanzi(val, form, 'foreignCurrencyCertificate')" ref="foreignCurrencyCertificate"></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 :value="form.customerName" @input="(val) => checkName(val, form, 'customerName')" ref="customerName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="账户性质" required> <el-form-item label="账户性质" prop="accountNature">
<el-select v-model="form.accountNature" placeholder="请选择" ref="accountNature"> <el-select v-model="form.accountNature" placeholder="请选择" ref="accountNature">
<el-option label="基本户" value="基本户"> </el-option> <el-option label="基本户" value="基本户"> </el-option>
<el-option label="一般户" value="一般户"> </el-option> <el-option label="一般户" value="一般户"> </el-option>
@ -62,25 +62,25 @@
<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="currencyType">
<el-select disabled v-model="form.currencyType" placeholder="请选择" ref="currencyType"> <el-select v-model="form.currencyType" placeholder="请选择" ref="currencyType">
<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="calculateWay">
<el-select v-model="form.calculateWay" placeholder="请选择" ref="calculateWay"> <el-select v-model="form.calculateWay" placeholder="请选择" ref="calculateWay">
<el-option label="季度" value="季度"> </el-option> <el-option label="季度" value="季度"> </el-option>
<el-option label="半年" value="半年"> </el-option> <el-option label="半年" value="半年"> </el-option>
<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="withdrawingWay">
<el-select v-model="form.withdrawingWay" placeholder="请选择" ref="withdrawingWay"> <el-select 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="外汇核准号"> <el-form-item label="外汇核准号" prop="foreignCurrencyBumber">
<el-input v-model="form.foreignCurrencyBumber"></el-input> <el-input :value="form.foreignCurrencyBumber" @input="(val) => checkName(val, form, 'foreignCurrencyBumber')" ref="foreignCurrencyBumber"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -113,8 +113,8 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, ismoney, checkName, checkHanzi } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { vercustomer, verrate } from '@/utils/verify.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -139,7 +139,63 @@ export default {
foreignCurrencyCertificate: '' // foreignCurrencyCertificate: '' //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
accountNature: [
{
required: true,
message: '请选择账户性质',
trigger: 'blur'
}
],
accountType: [
{
required: true,
message: '请选择账户类型',
trigger: 'blur'
}
],
accountManagement: [
{
required: true,
message: '请选择账户科目',
trigger: 'blur'
}
],
currencyType: [
{
required: true,
message: '请选择币种',
trigger: 'blur'
}
],
currencyMark: [
{
required: true,
message: '请选择钞汇标识',
trigger: 'blur'
}
],
calculateWay: [
{
required: true,
message: '请选择计息方式',
trigger: 'blur'
}
],
outAccountWay: [
{
required: true,
message: '请选择出账页标志',
trigger: 'blur'
}
],
withdrawingWay: [
{
required: true,
message: '请选择支取方式',
trigger: 'blur'
}
]
}, },
second:[// second:[//
@ -160,25 +216,16 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
accountNature: '账户性质', // this.$message({
accountType: '账户类型', // message: '验证成功',
accountManagement: '账户科目', // center: true
currencyType: '币种', // });
currencyMark: '钞汇标识', // }, this.$refs));
calculateWay: '计息方式', // },
outAccountWay: '出账页标志', // checkHanzi: checkHanzi,
withdrawingWay: '支取方式', // checkName: checkName
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}
} }
}; };
</script> </script>

@ -10,15 +10,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="2"> <el-col :span="10" :offset="2">
<el-form-item label="转出账号"> <el-form-item label="转出账号" prop="transoutNum">
<el-input v-model="form.transoutNum" ref="transoutNum"></el-input> <el-input :value="form.transoutNum" @input="(val) => checkHanzi(val, form, 'transoutNum')" ref="transoutNum"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="凭证号码" required> <el-form-item label="凭证号码" prop="certificateNum">
<el-input v-model="form.certificateNum" ref="certificateNum"></el-input> <el-input :value="form.certificateNum" @input="(val) => checkHanzi(val, form, 'certificateNum')" ref="certificateNum"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="签发日期" required> <el-form-item label="签发日期" prop="signDate">
<el-date-picker <el-date-picker
v-model="signDate" v-model="signDate"
type="date" type="date"
@ -26,24 +26,24 @@
ref="signDate"> ref="signDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select 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="transinNum">
<el-input v-model="form.transinNum" ref="transinNum"></el-input> <el-input :value="form.transinNum" @input="(val) => checkHanzi(val, form, 'transinNum')" ref="transinNum"></el-input>
</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')"></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 :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="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-option label="一般户" value="一般户"> </el-option> <el-option label="一般户" value="一般户"> </el-option>
@ -51,22 +51,22 @@
<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="currencyType">
<el-select v-model="form.currencyType" placeholder="请选择" ref="currencyType"> <el-select v-model="form.currencyType" placeholder="请选择" ref="currencyType">
<el-option label="季度" value="季度"> </el-option> <el-option label="季度" value="季度"> </el-option>
<el-option label="半年" value="半年"> </el-option> <el-option label="半年" value="半年"> </el-option>
<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="payWay">
<el-select v-model="form.payWay" placeholder="请选择" ref="payWay"> <el-select v-model="form.payWay" placeholder="请选择" ref="payWay">
<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="transinName">
<el-input v-model="form.transinName"></el-input> <el-input :value="form.transinName" @input="(val) => checkHanzi(val, form, 'transinName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="摘要"> <el-form-item label="摘要" prop="abstract">
<el-input v-model="form.abstract" disabled></el-input> <el-input v-model="form.abstract" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -100,8 +100,8 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, ismoney, checkHanzi, checkName } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { vercustomer } from '@/utils/verify.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -125,7 +125,35 @@ export default {
abstract: '', // abstract: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
transoutNum: [
{
required: true,
message: '请输入转出账号',
trigger: 'blur'
}
],
certificateNum: [
{
required: true,
message: '请输入凭证号码',
trigger: 'blur'
}
],
transinNum: [
{
required: true,
message: '请输入转入账号',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
],
}, },
second:[// second:[//
@ -147,23 +175,17 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
transoutNum: '转出账号', // //
certificateNum: '凭证号码', // this.$message({
customerName: '客户姓名', // message: '验证成功',
transinNum: '转入账号', // center: true
transinName: '转入户名', // });
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,
checkName: checkName
} }
}; };
</script> </script>

@ -10,35 +10,35 @@
<!-- 开户 --> <!-- 开户 -->
<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="账号" prop="username">
<el-input v-model="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="voucherNum">
<el-input v-model="form.voucherNum"></el-input> <el-input :value="form.voucherNum" @input="(val) => checkHanzi(val, form, 'voucherNum')" ref="voucherNum"></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="certificateType">
<el-select disabled v-model="form.certificateType" placeholder="请选择" ref="certificateType"> <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="payWay">
<el-select v-model="form.payWay" placeholder="请选择" ref="payWay"> <el-select v-model="form.payWay" placeholder="请选择" ref="payWay">
<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="客户姓名" prop="customerName">
<el-input v-model="form.customerName" ref="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="签发日期" prop="issueDate">
<el-date-picker <el-date-picker
v-model="issueDate" v-model="issueDate"
type="date" type="date"
@ -46,18 +46,18 @@
ref="issueDate"> ref="issueDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" required> <el-form-item label="钞汇标识" prop="currencyMark">
<el-select v-model="form.currencyMark" placeholder="请选择" ref="currencyMark"> <el-select 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="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>
<el-col :span="21" :offset="1"> <el-col :span="21" :offset="1" prop='textarea'>
<el-form-item label="摘要"> <el-form-item label="摘要">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.abstract"></el-input> <el-input type="textarea" :rows="3" placeholder="请输入内容" ref="abstract" v-model="form.abstract"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -90,8 +90,8 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { checkRequired, ismoney } from '@/utils/utilFunction.js' import { myValidate, ismoney, checkName, checkHanzi } from '@/utils/utilFunction.js'
import { vername, verrate } from '@/utils/verify.js' import { vercustomer, verrate } from '@/utils/verify.js'
export default { export default {
name: 'index', name: 'index',
components:{}, components:{},
@ -113,7 +113,28 @@ export default {
abstract: '', // abstract: '', //
}, },
rules: { rules: {
customerName: vername customerName: vercustomer,
username: [
{
required: true,
message: '请输入账号',
trigger: 'blur'
}
],
voucherNum: [
{
required: true,
message: '请输入凭证号码',
trigger: 'blur'
}
],
money: [
{
required: true,
message: '请输入金额',
trigger: 'blur'
}
]
}, },
second:[// second:[//
@ -135,24 +156,18 @@ export default {
}, },
methods: { methods: {
submitForm() { submitForm() {
const requiredField = { this.$refs.form.validate(myValidate(() => {
customerName: '客户姓名', // //
currency: '币种', // this.$message({
currencyMark: '钞汇标识', // message: '验证成功',
voucherType: '凭证类型', // center: true
// voucherNumber: '', // });
// paymentCode: '', // }, this.$refs));
customerManage: '客户经理', //
}
const judgeRef = checkRequired(this.form, requiredField)
if(judgeRef === '') {
console.log('submit success')
}else {
this.$refs[judgeRef].focus();
}
}, },
ismoney: ismoney ismoney: ismoney,
checkName: checkName,
checkHanzi: checkHanzi
} }
}; };
</script> </script>

@ -21,7 +21,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" prop="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) => checkName(val, form, 'userName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出生日期" prop="birthday"> <el-form-item label="出生日期" prop="birthday">
<el-date-picker <el-date-picker
@ -109,7 +109,7 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { phoneListen, mailBoxListen, checkRequired, myValidate } from '@/utils/utilFunction.js' import { phoneListen, mailBoxListen, checkRequired, myValidate, checkName } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -259,7 +259,8 @@ export default {
} }
}, },
phoneListen: phoneListen, phoneListen: phoneListen,
mailBoxListen: mailBoxListen mailBoxListen: mailBoxListen,
checkName: checkName
} }
// watch: { // watch: {
// 'form.phone'(newVal) { // 'form.phone'(newVal) {
@ -270,6 +271,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap{
width: 100%; width: 100%;
display: flex; display: flex;

@ -42,7 +42,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="法人姓名" prop="name"> <el-form-item label="法人姓名" prop="name">
<el-input :value="form.name" @input="(val) => checkHanzi(val, form, 'name')" ref="name"></el-input> <el-input :value="form.name" @input="(val) => checkName(val, form, 'name')" ref="name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -88,7 +88,7 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { phoneListen, checkRequired, myValidate, checkHanzi } from '@/utils/utilFunction.js' import { phoneListen, checkRequired, myValidate, checkHanzi, checkName } from '@/utils/utilFunction.js'
export default { export default {
name: 'index', name: 'index',
@ -169,7 +169,8 @@ export default {
}, this.$refs)); }, this.$refs));
}, },
phoneListen: phoneListen, phoneListen: phoneListen,
checkHanzi: checkHanzi checkHanzi: checkHanzi,
checkName: checkName
} }
}; };
</script> </script>

@ -22,7 +22,7 @@
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="userName"> <el-form-item label="客户姓名" prop="userName">
<el-input ref="userName" :value="form.userName" @input="(val) => checkHanzi(val, form, 'userName')"></el-input> <el-input ref="userName" :value="form.userName" @input="(val) => checkName(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('身份证扫描器')">
@ -37,7 +37,7 @@
</template> </template>
<script> <script>
import { vercustomer } from '@/utils/verify.js' import { vercustomer } from '@/utils/verify.js'
import { myValidate, checkHanzi } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, checkName } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -94,7 +94,8 @@ export default{
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
checkHanzi: checkHanzi checkHanzi: checkHanzi,
checkName: checkName
}, },
} }
</script> </script>

@ -20,7 +20,7 @@
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="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) => checkName(val, form, 'userName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" prop="goldLogo"> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select v-model="form.goldLogo" ref="goldLogo" placeholder="请选择"> <el-select v-model="form.goldLogo" ref="goldLogo" placeholder="请选择">
@ -28,7 +28,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="年利率" prop="annualInterest"> <el-form-item label="年利率" prop="annualInterest">
<el-input v-model="form.annualInterest" ref="annualInterest"></el-input> <el-input :value="form.annualInterest" @input="(val) => rateListen(val, 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">
@ -44,7 +44,7 @@
<script> <script>
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { ismoney, myValidate } from '@/utils/utilFunction.js' import { ismoney, myValidate, checkName, rateListen } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -130,7 +130,9 @@ export default{
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
ismoney: ismoney ismoney: ismoney,
checkName: checkName,
rateListen: rateListen
}, },
} }
</script> </script>

@ -18,12 +18,12 @@
<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="收款卡号" prop="shroffAccount"> <el-form-item label="收款卡号" prop="shroffAccount">
<el-input v-model="form.shroffAccount" ref="shroffAccount"></el-input> <el-input :value="form.shroffAccount" @input="(val) => checkHanzi(val, form, 'shroffAccount')" ref="shroffAccount"></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="客户姓名" prop="username" :rules="rules.userName"> <el-form-item label="客户姓名" prop="username">
<el-input v-model="form.userName" disabled></el-input> <el-input :value="form.userName" @input="(val) => checkName(val, form, 'userName')" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" prop="goldLogo"> <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">
@ -35,8 +35,8 @@
<p>请输入密码</p> <p>请输入密码</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="收款人名称" prop="payeeName" :rules="rules.payeeName" > <el-form-item label="收款人名称" prop="payeeName" >
<el-input v-model="form.payeeName" ref="payeeName"></el-input> <el-input :value="form.payeeName" @input="(val) => checkName(val, form, 'payeeName')" ref="payeeName"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="21" :offset="1"> <el-col :span="21" :offset="1">
@ -51,7 +51,7 @@
</template> </template>
<script> <script>
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { myValidate, checkHanzi, ismoney } from '@/utils/utilFunction.js' import { myValidate, checkHanzi, ismoney, checkName } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{}, props:{},
@ -86,13 +86,6 @@ export default{
trigger: 'blur' trigger: 'blur'
} }
], ],
payeeName: [
{
required: true,
message: '请输入收款卡号',
trigger: 'blur'
}
],
money: [ money: [
{ {
required: true, required: true,
@ -150,7 +143,9 @@ export default{
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
ismoney: ismoney ismoney: ismoney,
checkHanzi: checkHanzi,
checkName: checkName
}, },
} }
</script> </script>

@ -25,7 +25,7 @@
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-form-item label="客户姓名" prop="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) => checkName(val, form, 'userName')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="钞汇标识" prop="goldLogo"> <el-form-item label="钞汇标识" prop="goldLogo">
<el-select v-model="form.goldLogo" placeholder="请选择" ref="goldLogo"> <el-select v-model="form.goldLogo" placeholder="请选择" ref="goldLogo">
@ -53,7 +53,7 @@
</template> </template>
<script> <script>
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { myValidate, ismoney } from '@/utils/utilFunction.js' import { myValidate, ismoney, checkName, checkHanzi } from '@/utils/utilFunction.js'
export default{ export default{
name:'', name:'',
props:{ props:{
@ -150,7 +150,9 @@ export default{
popUp(text) { popUp(text) {
this.$store.commit('system/changePop',{show:true,text}) this.$store.commit('system/changePop',{show:true,text})
}, },
ismoney: ismoney ismoney: ismoney,
checkName: checkName,
checkHanzi: checkHanzi
}, },
} }
</script> </script>

@ -280,4 +280,12 @@ export default {
/deep/.el-menu{ /deep/.el-menu{
border: 0; border: 0;
} }
// menu
/deep/ .el-submenu__title span {
font-size: 18px;
}
/deep/.el-menu-item {
font-size: 18px!important;
}
</style> </style>

@ -23,6 +23,28 @@ const checkHanzi = function(val, form, prop) {
form[prop] = val; form[prop] = val;
} }
const checkName = function(val, form, prop) {
// 检查符号
const charReg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im;
// 检查空格
if(charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) {
return;
}
form[prop] = val;
}
// 监听年利率
const rateListen = function(val, form, prop) {
// 检查符号 允许%
const charReg = /[`~!@#$^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥……&*()——\-+={}|《》?:“”【】、;‘',。、]/im;
// 检查空格
if(charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) {
return;
}
form[prop] = val;
}
// 监听数字 // 监听数字
const inputListen = function(val, row, prop) { const inputListen = function(val, row, prop) {
// 检查空格 // 检查空格
@ -94,5 +116,7 @@ const myValidate = (callback, refs) => {
inputListen, inputListen,
ismoney, ismoney,
checkHanzi, checkHanzi,
myValidate myValidate,
checkName,
rateListen
} }

@ -38,8 +38,11 @@ const vername = [
] ]
const verrate = [ const verrate = [
{ {
// pattern: /\d{1,2}(\.\d{1,2})?/, // 带%的形式
// pattern: /^(([1-9]\\d{0,9})|0)(\\.\\d{1,2})?%$/, // /^(\d|[1-9]\d|100)(.\d{1,3})?%$/
// 不带%的形式
// /^(\d|[1-9]\d|100)(.\d{1,3})?$/
pattern: /^(\d|[1-9]\d|100)(.\d{1,3})?%$|^(\d|[1-9]\d|100)(.\d{1,3})?$/, pattern: /^(\d|[1-9]\d|100)(.\d{1,3})?%$|^(\d|[1-9]\d|100)(.\d{1,3})?$/,
message: '请输入正确的年利率' message: '请输入正确的年利率'
},{ },{

Loading…
Cancel
Save