20240205
luoJunYong.123 3 years ago
parent e725ccbd18
commit 2da8aa4240
  1. 5
      src/components/checkPhoto/index.vue
  2. 3
      src/components/selectBusiness/index.vue
  3. 32
      src/mixins/saveData/index.js
  4. 46
      src/mixins/tipsBefore/index.js
  5. 134
      src/pages/counter/list/index.vue
  6. 12
      src/pages/manage/list/personal/timeDeposit/openAccount.vue
  7. 76
      src/store/modules/system.js
  8. 23
      src/utils/utilFunction.js
  9. 248
      test.js

@ -183,6 +183,11 @@
<h3 class="text-xl" style="left: 590px;top: 135px;">{{ dataFlow.transMoney }}</h3>
</template>
<template v-else-if="imgSrcId==428" >
<h3 class="text-lg" style="left: 730px;top: 35px;">86223429</h3>
</template>
<!-- 这里就是要展示的图片 dia-header让它可以带动整个组件被拖拽 因为这里的v-drag会去搜这个组件内的dia-header -->
<img :src="imgSrc" class="imgPop imgIndex min-w-full dia-header shadow-2xl" :alt="imgSrcName" :title="imgSrcName" ref="showPage">

@ -162,7 +162,8 @@ export default {
},
watch: {
showBusiness(newVal) {
if(!newVal) {
console.log('what')
if(newVal) {
this.takeCheck = this.businessKey
}
}

@ -1,32 +0,0 @@
export const saveData = {
// 通过混入的方式可以保存数据 由于混入函数的created是先于引入混入的组件的created执行的,所以可以先拿到上次推出时的数据直接先一步渲染。
// 其实这个函数我写再tipsBefore里了 不过有些页面是不需要依赖前一个页面的,所以区分开了。
created() {
if(sessionStorage.getItem(this.moduleName)) {
const getBeforeData = JSON.parse(sessionStorage.getItem(this.moduleName))
for(const key in getBeforeData) {
this.form[key] = Number(getBeforeData[key])? Number(getBeforeData[key]): getBeforeData[key]
}
}
},
methods: {
// 清空这个组件所保存的数据
clearSaveData() {
sessionStorage.removeItem(this.moduleName)
}
},
// 销毁组件之前将该组件中的数据保存起来
beforeDestroy() {
let tmpForm = {}
for(const key in this.form) {
if(this.form[key] !== '') {
tmpForm[key] = this.form[key]
}
}
sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm))
}
}

@ -1,4 +1,4 @@
// 如果正在做的业务中,当前模块需要先完成前一个模块,那就会提示。
// 如果正在做的业务中,当前模块需要先完成前一个模块,那就会提示(需求变更,现在不用这个提示了,现在这个mixins的功能是保存系统录入中页面的数据。)
const obj = {
@ -32,42 +32,20 @@ export default {
}
},
created() {
// 将上次保存的这个模块的数据写上页面,因为上次退出时保存了这个模块的数据 因为现在不用拦截,所以我写在saveData函数里了
// 将上次保存的这个模块的数据写上页面,因为上次退出时保存了这个模块的数据(beforeDestroy)
if(sessionStorage.getItem(this.moduleName)) {
const getBeforeData = JSON.parse(sessionStorage.getItem(this.moduleName))
for(const key in getBeforeData) {
this.form[key] = Number(getBeforeData[key])? Number(getBeforeData[key]): getBeforeData[key]
}
}
// 如果所选业务需要
// 如果所选业务需要(需求变更,不用管这个了)
if(this.inMyWork(this.moduleName)) {
if(this.needsModule(this.moduleName)) {
this.isNeedBefore = true
this.needBefore = this.needsModule(this.moduleName)
// 因为依赖前一个项目,所以要提示
// this.tipsNefore = setInterval(() => {
// this.$message({
// type: 'info',
// message: '请先完成' + obj[this.needBefore] + '。',
// center: true
// });
// }, 3000)
}
// 这个业务是我们需要的,所以我们拿存的数据
// if(sessionStorage.getItem(this.moduleName)) {
// const getBeforeData = JSON.parse(sessionStorage.getItem(this.moduleName))
// for(const key in getBeforeData) {
// this.form[key] = Number(getBeforeData[key])? Number(getBeforeData[key]): getBeforeData[key]
// }
// }
}else {
this.isNeedBefore = true
this.unNeed = true
@ -97,24 +75,6 @@ export default {
// 系统录入当前页面关闭或离开的时候,保存当前模块的数据。回来的时候这些数据还在(业务需求)。
sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm))
// 之前做的是当前页面如果不是项目需要则不保存数据。
// if(!this.unNeed) {
// let tmpForm = {}
// for(const key in this.form) {
// if(this.form[key] !== '') {
// tmpForm[key] = this.form[key]
// }
// }
// sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm))
// }
// if(this.tipsNefore) {
// clearInterval(this.tipsNefore)
// this.tipsNefore = null
// }
},
computed: {
...mapGetters({

@ -3,7 +3,7 @@
<back-Button />
<!-- <img class="sth bg" v-lazy="lazyImg[2]" alt="" /> -->
<!-- <img class="sth guide" src="@/assets/img/guide.png" alt="" /> -->
<img class="sth man cp" v-lazy="lazyImg[0]" alt="" @click="changePeopleJudge"/>
<img class="sth man cp" v-lazy="lazyImg[0]" alt="" @click="changePeopleJudge" />
<img slot="reference" class="sth man cp" v-lazy="lazyImg[0]" alt="" ref="manPhoto" @click="changePeopleJudge"/>
@ -212,14 +212,6 @@
<!-- 动画开始 -->
<div v-if="popText==='密码器'" style="width:800px;padding-right:150px;padding-top:80px">
<el-form :model="passwordForm" :rules="passwordRules" ref="form" label-width="180px" key="passwordFormpasswordAgain" class="flex flex-col justify-center">
<!-- <el-form-item class="password-wrap" label="密码" prop="passwordAgain">
<el-input :class="{'password-input': !viewPassword1}" v-focus v-model.trim="passwordForm.passwordAgain" maxlength="6" onkeyup="{this.value=this.value.replace(/\D/g,'')}" autocomplete="new-password" auto-complete="new-password"></el-input>
<i class="view el-icon-view" @click="viewPassword1 = !viewPassword1"></i>
</el-form-item>
<el-form-item class="password-wrap" label="确认密码" prop="password2" key="passwordFormpassword2" v-if="needPasswordAgain">
<el-input :class="{'password-input': !viewPassword2}" v-model.trim="passwordForm.password2" maxlength="6" onkeyup="this.value=this.value.replace(/\D/g,'')" autocomplete="off" auto-complete="off"></el-input>
<i class="view el-icon-view" @click="viewPassword2 = !viewPassword2"></i>
</el-form-item> -->
<el-form-item class="password-wrap" label="密码" prop="passwordAgain">
<el-input v-focus v-model.trim="passwordForm.passwordAgain" maxlength="6" onkeyup="{this.value=this.value.replace(/\D/g,'')}" autocomplete="new-password" auto-complete="new-password" show-password></el-input>
</el-form-item>
@ -425,26 +417,6 @@
</div>
<!-- 图片查看器 -->
<!-- <el-dialog
custom-class="data-dia "
class="imgIndex"
:visible.sync="showImg"
width="850px"
>
<check-photo :imgSrc="imgSrc" :imgSrcId='imgSrcId' :imgSrcName="imgSrcName" class="dia-header">
<div class="absolute flex justify-end w-full flex-wrap" style="bottom:7vh; right: 4vw">
<seal-name v-for="item in isSeal(imgSrcId)" :key="item.id" :item="item">
</seal-name>
</div>
</check-photo>
</el-dialog> -->
<!-- <tip-dialog /> -->
<!-- 客户返还资料或签字的对话框 -->
<el-dialog
:show-close="false"
@ -500,7 +472,6 @@ import saveSystemModule from '@/mixins/saveSystemModule'
import CheckPhoto from '@/components/checkPhoto'
import { inputListen } from '@/utils/utilFunction.js'
import sealName from '@/components/sealName'
// import TipDialog from '@/components/tipDialog'
export default {
name: 'index',
@ -541,7 +512,6 @@ export default {
viewPassword2: false,
voucherCardGet: false,
voucherCardNumber: 0,
// 便
fit: 'scale-down',
controlGoodsDblClickFn: null,
@ -560,20 +530,6 @@ export default {
////////
// 西
magnifyData:{},
auditGoodsShelf:[
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13,
userName:'啧啧啧',
sex:'男',
nation:'汉',
dateBirthYear:'1994',
dateBirthMonth:'4',
dateBirthDay:'1',
address:'在山的那边海的那边',
idCardNo:'465852346854168479'},
{name:'开户申请书', src:require('@/assets/img/goods/khsqs.png'), id:14},
{name:'现金', src:require('@/assets/img/goods/cash-sm.png'), id:15},
{name:'身份证复印件', src:require('@/assets/img/idCard-copy-sm.png'), id:23},
],
// //
systemInputGoodsShelf:[
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13,
@ -590,34 +546,6 @@ export default {
{name:'银行卡', src:require('@/assets/img/goods/bankCard.png'), id:16,cardNub:'1865 3549 5675 5589'},
{name:'身份证复印件', src:require('@/assets/img/idCard-copy-sm.png'), id:23},
],
// // //
printoutGoodsShelf:[
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13,
userName:'啧啧啧',
sex:'男',
nation:'汉',
dateBirthYear:'1994',
dateBirthMonth:'4',
dateBirthDay:'1',
address:'奥斯卡巅峰计划拉水电费啥地方',
idCardNo:'465852346854168479'},
{name:'开户申请书', src:require('@/assets/img/goods/khsqs.png'), id:14},
{name:'现金', src:require('@/assets/img/goods/cash-sm.png'), id:15},
{name:'银行卡', src:require('@/assets/img/goods/bankCard.png'), id:16,cardNub:'1865 3549 5675 5589'},
{name:'存款凭条', src:require('@/assets/img/goods/ckpt.png'), id:17},
{name:'身份证复印件', src:require('@/assets/img/idCard-copy-sm.png'), id:23},
],
//
cashboxGoodsShelf:[
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13,
userName:'啧啧啧',
nation:'男',
dateBirth:'汉',
address:'奥斯卡巅峰计划拉水电费啥地方',
idCardNo:'465852346854168479'},
{name:'现金', src:require('@/assets/img/goods/cash-sm.png'), id:15},
{name:'身份证复印件', src:require('@/assets/img/idCard-copy-sm.png'), id:23},
],
// idv-key
cashboxGoodsShelf2: [
{name:'100元', src:require('@/assets/img/cash/100元.png'), id:15, num: ''},
@ -722,15 +650,6 @@ export default {
{name:'业务专用章',src:require('@/assets/img/seal/business.png'),id:'业务专用章'},
{name:'转讫章',src:require('@/assets/img/seal/Transfer.png'),id:'转讫章'},
],
// importanceArr:[/* */
// {name:'',src:require('@/assets/img/goods/bankCard.png'),id:16,cardNub:'1865 3549 5675 5589'},
// {name:'',src:require('@/assets/img/seal/paid.png'),id:428},
// {name:'',src:require('@/assets/img/seal/paid.png'),id:439},
// {name:'',src:require('@/assets/img/goods/xd-zzzp.png'),id:412},
// {name:'',src:require('@/assets/img/seal/paid.png'),id:30},
// {name:'',src:require('@/assets/img/goods/xjzp.png'),id:411},
// {name:'',src:require('@/assets/img/seal/paid.png'),id:429},
// ],
commonArr:[/* 普通凭证箱 */
{name:'存款凭条',src:require('@/assets/img/goods/ckpt.png'),id:17},
{name:'取款凭条',src:require('@/assets/img/goods/qkpt.png'),id:425},
@ -739,20 +658,6 @@ export default {
{name:'利息清单',src:require('@/assets/img/goods/lxqd.png'),id:427},
{name:'普通空白凭证',src:require('@/assets/img/goods/ptkbpz.png'),id:438},
],
// logos
// logosArr: [
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') },
// { src: require('@/assets/img/logos/.svg') }
// ],
// Logo,
finishPng: require('@/assets/img/finish.png'),
finishGoods: {
@ -868,7 +773,7 @@ export default {
}
},
// sealChecked
// sealChecked
sealCoverIt() {
return this.sealChecked.reduce((all, item) => {
const itemFind = this.sealArr.find(sealItem => sealItem.id === item)
@ -892,7 +797,7 @@ export default {
return this.cashboxGoodsShelf2.filter(item => item.num>0)
},
//
//
backMoneyTotal() {
return this.cashboxGoodsShelf2.reduce((total, item) => {
if(item.name.includes('元')) {
@ -1103,7 +1008,8 @@ export default {
}
for(let i=0;i<this.popArr.length; i++) {
if(this.popArr[i].name === getIt) {
this.$store.commit('system/changeGoods',{push:[this.popArr[i]]})
console.log('wokaio')
// this.$store.commit('system/changeGoods',{push:[this.popArr[i]]})
return
}
}
@ -1184,25 +1090,9 @@ export default {
that.$refs.cipherDiv.style.width = this.width + 'px';
that.$refs.cipherDiv.style.height = this.height + 'px';
}
// cipherDiv
//
this.$nextTick(() => {
// console.log('wokao')
// console.log(this.$refs.imgCheckDrag)
// new Sortable(this.$refs.imgCheckDrag, {
// animation: 150,
// group: {
// name:'shared',
// pull:'clone',//
// put:false//
// },
// })
})
// -
new Sortable(this.$refs.goods, {
@ -1689,7 +1579,7 @@ export default {
}
}
// v-drag
// v-drag
document.onmousemove = null
document.onmouseup = null
@ -1749,7 +1639,6 @@ export default {
if (this.$store.state.system.id == '33' && this.popText === '身份证扫描仪'){
this.nbm = 33
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomClientIdentity', JSON.stringify("getIt"))
}
@ -1757,7 +1646,6 @@ export default {
}else if (this.$store.state.system.id == '34' && this.popText === '身份证扫描仪' ){
this.nbm = 34
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('firmClientIdentity', JSON.stringify("getIt"))
}
@ -1765,7 +1653,6 @@ export default {
}else if (this.$store.state.system.id == '63' && this.popText === '刷卡器'){
this.nbm = 63
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomBusinessDepositCard', JSON.stringify("getIt"))
}
@ -1789,7 +1676,6 @@ export default {
}else if (this.$store.state.system.id == '65' && this.popText === '刷卡器'){
this.nbm = 65
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomCurrentTransferCard', JSON.stringify("getIt"))
}
@ -1802,7 +1688,6 @@ export default {
}else if (this.$store.state.system.id == '66' && this.popText === '刷卡器'){
this.nbm = 66
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomCurrentSettleCard', JSON.stringify("getIt"))
}
@ -1823,28 +1708,24 @@ export default {
this.showManage()
}else if (this.$store.state.system.id == '67,1' && this.popText === '刷卡器'){
this.nbm = 67
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomCurrentCancellCard1', JSON.stringify("getIt"))
}
this.showManage()
}else if (this.$store.state.system.id == '67,2' && this.popText === '身份证扫描仪'){
this.nbm = 67
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomCurrentCancellCard2', JSON.stringify("getIt"))
}
this.showManage()
}else if (this.$store.state.system.id == '33'){
this.nbm = 33
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('nomClientIdentity', JSON.stringify("getIt"))
}
this.showManage()
}else if (this.$store.state.system.id == '34'){
this.nbm = 34
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
sessionStorage.setItem('firmClientIdentity', JSON.stringify("getIt"))
}
@ -1890,7 +1771,6 @@ export default {
this.showManage()
}else if (this.$store.state.system.id == '62,2' && this.popText === '刷卡器'){
this.nbm = 62
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
if(this.receptionList[0].id == 563) {
@ -1908,7 +1788,6 @@ export default {
this.showManage()
}else if (this.$store.state.system.id == '62,3' && this.popText === '刷卡器'){
this.nbm = 62
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.receptionList.length >0){
if(this.receptionList[0].id == 563) {
sessionStorage.setItem('accountVoucherThree', JSON.stringify("getIt"))
@ -2307,7 +2186,6 @@ export default {
}).catch((error)=>{
})
}else{
// this.goodsShelfTotalData = this.auditGoodsShelf
}
//

@ -345,22 +345,10 @@ export default{
},
submitForm2() {
let nomtimeOpenAccount1 = sessionStorage.getItem('nomtimeOpenAccount1')
// let nomtimeOpenAccount2 = sessionStorage.getItem('nomtimeOpenAccount2')
// let nomtimeOpenAccountPassword = sessionStorage.getItem('nomtimeOpenAccountPassword')
const cards = [
{
key: '122,13'
}
// {
// 13: nomtimeOpenAccount1
// },
// // {
// // 128: nomtimeOpenAccount2
// // },
// {
// 129: nomtimeOpenAccountPassword,
// "subjectId": 17,
// }
]
const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,58,118'
autoPlay(parentId, this.form, this.myTable2, this.myTable, cards)

@ -233,7 +233,7 @@ const myInitState = {
'业务二': {
id: 490,
name: '个人活期转账取款销户',
data: [16, 13, 23, 426],
data: [16, 13, 23],
needs: [427, 425, 15],
isStamp: {
'付讫章': [425, 427],
@ -464,7 +464,7 @@ const myInitState = {
'业务七': {
id: 495,
name: '零存整取续存',
data: [ 16, 15, 23 ], // 银行卡、 现金
data: [ 13, 16, 15, 23 ], // 银行卡、 现金
needs: [ 17 ], // 存款凭条
isStamp: {
'收讫章': [ 17 ],
@ -536,11 +536,11 @@ const myInitState = {
depositNumber: '0816',
currency:12,
goldLogo:13,
capital: 100,
capital: 30000,
interestRate: 1.85,
depositTerm: 86,
interest: 1.6,
totalMoney: 101.6,
interest: 21,
totalMoney: 30021,
signDate: '2001-03-01',
voucherNumber
}
@ -1438,7 +1438,7 @@ export default {
'业务二': {
id: 490,
name: '个人活期转账取款销户',
data: [16, 13, 23, 426],
data: [16, 13, 23],
needs: [427, 425, 15],
isStamp: {
'付讫章': [425, 427],
@ -1669,7 +1669,7 @@ export default {
'业务七': {
id: 495,
name: '零存整取续存',
data: [ 16, 15, 23 ], // 银行卡、 现金
data: [ 13, 16, 15, 23 ], // 银行卡、 现金
needs: [ 17 ], // 存款凭条
isStamp: {
'收讫章': [ 17 ],
@ -1724,6 +1724,7 @@ export default {
peopleSign: [ ], // 客户签字
cultureIn: [], // 传票栏
sealBox: [], // 印章盒
currencyDetector: [], // 验钞机
printer: [], // 打印机
resource: [], // 资料
@ -1741,11 +1742,11 @@ export default {
depositNumber: '0816',
currency:12,
goldLogo:13,
capital: 100,
capital: 30000,
interestRate: 1.85,
depositTerm: 86,
interest: 1.6,
totalMoney: 101.6,
interest: 21,
totalMoney: 30021,
signDate: '2001-03-01',
voucherNumber
}
@ -2555,33 +2556,6 @@ export default {
},
// 初始化公共数据
allDataFlow: { ...allDataFlow },
goods:[// 物品栏的物品
{
name:'身份证',
src:require('@/assets/img/goods/idCard.png'),
id:'a'
},
{
name:'身份证复印件',
src:require('@/assets/img/idCard-copy-sm.png'),
id:'b'
},
{
name:'开户申请书',
src:require('@/assets/img/goods/khsqs.png'),
id:'c'
},
{
name:'现金',
src:require('@/assets/img/goods/cash-sm.png'),
id:'d'
},
// {
// name:'存款凭条',
// src:require('@/assets/img/goods/ckpt.png'),
// id:'e'
// },
],
},
mutations: {
// 设置tipDialog组件提示的信息。这个组件是根据UI设计的。
@ -2960,27 +2934,6 @@ export default {
state.showGoods = false;
}
},
// 改变物品栏中的物品
changeGoods:(state,obj)=>{/* 赋值/push/删除 */
if(obj.goods&&obj.goods.length>0){
state.goods = obj.goods
}else if(obj.push&&obj.push.length>0){
for(let j=0; j<obj.push.length; j++) {
let judge = true
for(let i=0; i<state.goods.length; i++) {
if(obj.push[j].name === state.goods[i].name) {
judge = false
break;
}
}
if(judge) {
state.goods.push(obj.push[j])
}
}
}else if(typeof(obj.splice)===Number ){
state.goods.splice(obj.splice,1)
}
},
// 物品栏的展开和关闭
changeShowGoods(state, judge) {
state.showGoods = judge
@ -3004,13 +2957,6 @@ export default {
// 获取页面中的下拉框的选项
getSelectList(state) {
return state.selectList
// currencySelectList: [],
// goldLogoSelectList: [],
// accountQualitySelectList: [],
// accountQualitySelectList: [],
// voucherTypeSelectList: [],
// accountTypeSelectList: [],
// accountTypeSelectList: []
},
popId(state) {
return state.popId

@ -154,15 +154,6 @@ const myValidate = (callback, refs) => {
center: true,
message
})
// this.$message({
// message,
// center: true,
// type: 'info'
// });
// Message.message(message + '', '提示', {
// type: 'info',
// confirmButtonText: message
// });
}
}
}
@ -184,20 +175,6 @@ const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => {
const { prop, type, subjectId='' } = myTable[key]
formList.push({ "answerId": key + '', "emptyOne": '' + subjectId, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, "type":type })
}
// for(let i=0; i<cards.length; i++ ) {
// let myKey = ''
// let tmpJson = null
// let subjectId = ''
// for(const key in cards[i]) {
// if(key!=='subjectId') {
// myKey = key
// tmpJson = JSON.stringify(cards[i][key])
// }else {
// subjectId = cards[i]['subjectId']
// }
// }
// formList.push({ "answerId": myKey + '', "emptyOne": '' + subjectId, "emptyTwo": tmpJson, "operationIds": parentId + ',' + myKey, "type":5 })
// }
for(let i=0; i<cards.length; i++ ) {
formList.push({ "answerId": '', "emptyOne": '', "emptyTwo": '', "operationIds": parentId + ',' + cards[i].key, "type":"" })
}

@ -1,176 +1,74 @@
const nameMap = {
sex: {
1: '男',
2: '女'
},
idType: {
82: '统一社会信用代码证',
83: '身份证'
},
certificateType: {
83: '身份证',
115: '转账支票',
116: '现金支票'
},
currency: {
12: 'CNY人民币'
},
goldLogo: {
13: '钞户'
},
accountQuality: {
14: '个人结算户',
101: '基本户',
102: '一般户',
103: '专用户',
104: '临时户'
},
accountQualitysTwo: {
14: '个人结算户',
101: '基本户',
102: '一般户',
103: '专用户',
104: '临时户'
},
accountQualitysThree: {
14: '个人结算户',
101: '基本户',
102: '一般户',
103: '专用户',
104: '临时户'
},
voucherType: {
15: 'IC卡',
115: '转账支票',
116: '现金支票',
123: '存单',
127: '银行'
},
accountType: {
16: '一类户',
17: '二类户',
97: '结算户',
98: '结算户',
99: '委托保障金户',
100: '资本临时户'
},
drawWay: {
18: '密码',
93: '现金',
94: '转账',
114: '印鉴',
125: '部分支取',
126: '全部支取并销户'
},
drawWayType: {
133: '现金'
},
accountQualitysTwo: {
14: '个人结算户',
101: '基本户',
102: '一般户',
103: '专用户',
104: '临时户'
},
voucherTypesTwo: {
15: 'IC卡',
115: '转账支票',
116: '现金支票',
123: '存单',
127: '银行'
},
voucherTypesThree: {
15: 'IC卡',
115: '转账支票',
116: '现金支票',
123: '存单',
127: '银行'
},
accountTypesTwo: {
16: '一类户',
17: '二类户',
97: '结算户',
98: '结算户',
99: '委托保障金户',
100: '资本临时户'
},
accountTypesThree: {
16: '一类户',
17: '二类户',
97: '结算户',
98: '结算户',
99: '委托保障金户',
100: '资本临时户'
},
data() {
var validateEveryData = (rule, value, callback) => {
// console.log("callback", callback);
// console.log("校验某一项的规则对象", rule);
// console.log("用户输入的值", value);
drawWaysTwo: {
18: '密码',
93: '现金',
94: '转账',
114: '印鉴',
125: '部分支取',
126: '全部支取并销户'
},
drawWaysThree: {
18: '密码',
93: '现金',
94: '转账',
114: '印鉴',
125: '部分支取',
126: '全部支取并销户'
},
chargeWay: {
13: '密码',
},
chargeWay: {
13: '密码',
135: '现金',
},
certificateDeposit: {
92: '现金'
},
extendPeriod: {
90: '不续存',
91: '续存'
},
depositTerm: {
84: '3个月',
85: '6个月',
86: '1年',
87: '2年',
88: '3年',
89: '5年'
},
withdrawWay: {
125: '部分支取',
126: '全部支取并销户'
},
extendDepositTarget: {
128: '不续存',
129: '续存1年',
130: '续存3年',
131: '续存5年'
},
noticeType: {
95: '1天',
96: '7天'
},
depositType: {
92: '现金'
},
accountManagement: {
105: '工业存款',
106: '商业存款',
107: '外贸存款',
108: '其他存款'
},
calculateWay: {
109: '季度',
110: '半年',
111: '1年'
},
outAccountWay: {
112: '按月',
113: '满页'
},
}
// 对输入框类型的校验
if (value) {
if ((value + "").length > 0) {
// 用于回显时候的校验,因为输入的时候是字符串类型的数字,但是回显的时候可能就是数字
callback(); // cb函数告知校验结果,必须要加
return;
}
}
// 对下拉框类型的校验
if (
(rule.itemType == "selectOne") |
(rule.itemType == "selectTwo") |
(rule.itemType == "selectThree")
) {
if (value) {
if ((value + "").length > 0) {
// 注意枚举值是数字类型的,所以这里要转换成为字符串类型的
callback();
return;
}
}
}
// 根据不同的类型给予不同的校验提示
switch (rule.itemType) {
case "text":
callback(new Error(rule.labelName + "不能为空")); // 文本类型的规则简单,就是得填写
break;
case "number":
callback(new Error(rule.labelName + "请按规则填写")); // 数字类型的规则比较繁多
break;
case "textarea":
callback(new Error(rule.labelName + "不能为空")); // 文本域类型的规则也简单,就是得填写
break;
case "selectOne":
callback(new Error("请选择" + rule.labelName)); // 下拉框类型一 得填写
break;
case "selectTwo":
callback(new Error("请选择" + rule.labelName)); // 下拉框类型二 得填写
break;
case "selectThree":
callback(new Error("请选择" + rule.labelName)); // 下拉框类型三 多选数组得填写
break;
case "dateRange":
callback(new Error("请选择" + rule.labelName + "范围")); // 下拉框类型三 多选数组得填写
break;
default:
break;
}
};
return {
// 此对象用于存储各个下拉框的数组数据值,其实也可以挂在vue的原型上,不过个人认为写在data中好些
selectTwoOptionsObj: {},
// 用于下拉框加载时的效果
loadingSelect: false,
// 绑定的数据
form: {},
// 校验规则
validateEveryData: validateEveryData,
};
},
作者水冗水孚
链接https://juejin.cn/post/7060322827148197895
来源稀土掘金
著作权归作者所有商业转载请联系作者获得授权非商业转载请注明出处
Loading…
Cancel
Save