From 5e11ca199a9b456da588bdfc172792254e51626a Mon Sep 17 00:00:00 2001 From: "luoJunYong.123" Date: Mon, 21 Feb 2022 18:24:59 +0800 Subject: [PATCH] update --- src/api/api.js | 2 +- src/components/dialog/index.vue | 21 + src/mixins/saveData/index.js | 20 +- src/mixins/tipsBefore/index.js | 100 + src/pages/counter/list/index.vue | 21 +- src/pages/manage/index/index.vue | 11 +- src/pages/manage/list/business/deposit.vue | 21 +- .../manage/list/business/openAccount.vue | 26 +- src/pages/manage/list/business/transfer.vue | 19 +- src/pages/manage/list/business/withdrawal.vue | 23 +- .../manage/list/client/consumerClient.vue | 65 +- .../manage/list/client/corporateClient.vue | 55 +- .../personal/callDeposits/accountClosed.vue | 118 +- .../personal/callDeposits/callDeposits.vue | 2 + .../personal/callDeposits/openAccount.vue | 58 +- .../currentAccount/accountCancellation.vue | 70 +- .../list/personal/currentAccount/deposit.vue | 42 +- .../list/personal/currentAccount/index.vue | 1 + .../personal/currentAccount/openAccount.vue | 252 +- .../list/personal/currentAccount/settle.vue | 84 +- .../currentAccount/transferAccounts.vue | 72 +- .../personal/currentAccount/withdrawal.vue | 53 +- .../list/personal/timeDeposit/deposit.vue | 46 +- .../list/personal/timeDeposit/openAccount.vue | 55 +- .../list/personal/timeDeposit/withdrawal.vue | 108 +- .../personal/usefulPhrases/accountClosed.vue | 73 +- .../usefulPhrases/continueDeposit.vue | 49 +- .../personal/usefulPhrases/openAccount.vue | 64 +- .../list/servicesAccount/passwordChange.vue | 91 +- .../list/servicesAccount/passwordLost.vue | 61 +- .../list/servicesAccount/relieveLost.vue | 80 +- src/pages/manage/navbar/index.vue | 44 +- src/router/index.js | 7 + src/store/modules/system.js | 38 +- src/utils/utilFunction.js | 5 + test.js | 45898 ++++++++++------ 36 files changed, 31129 insertions(+), 16626 deletions(-) create mode 100644 src/mixins/tipsBefore/index.js diff --git a/src/api/api.js b/src/api/api.js index 26f950e..a064ffd 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -4,7 +4,7 @@ import router from '../router'; const service = axios.create({ // baseURL: "http://www.huorantech.cn:9000",//线上 // baseURL: "http://124.71.12.62:9000",//线上 - baseURL: "http://39.108.250.202:9000/", // 中台测试服 + baseURL: "http://39.108.250.202:9000/", // 中台测试服 // baseURL: "http://192.168.31.137:9000/", // 赓 // baseURL: "http://192.168.31.151:9000/", // 榕 // baseURL: "http://192.168.31.125:9000/", // 坤 diff --git a/src/components/dialog/index.vue b/src/components/dialog/index.vue index b465772..9f021bc 100644 --- a/src/components/dialog/index.vue +++ b/src/components/dialog/index.vue @@ -84,6 +84,20 @@ const nameMap = { 103: '专用户', 104: '临时户' }, + accountQualityTwo: { + 14: '个人结算户', + 101: '基本户', + 102: '一般户', + 103: '专用户', + 104: '临时户' + }, + accountQualityThree: { + 14: '个人结算户', + 101: '基本户', + 102: '一般户', + 103: '专用户', + 104: '临时户' + }, voucherType: { 15: 'IC卡', 115: '转账支票', @@ -124,6 +138,13 @@ const nameMap = { 123: '存单', 127: '银行' }, + voucherTypesThree: { + 15: 'IC卡', + 115: '转账支票', + 116: '现金支票', + 123: '存单', + 127: '银行' + }, accountTypeTwo: { 16: '一类户', 17: '二类户', diff --git a/src/mixins/saveData/index.js b/src/mixins/saveData/index.js index f41e213..adb965a 100644 --- a/src/mixins/saveData/index.js +++ b/src/mixins/saveData/index.js @@ -1,12 +1,24 @@ -export default { +export const saveData = { + 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]) { + if(this.form[key] !== '') { tmpForm[key] = this.form[key] } } - this.setDataFlow({ ...tmpForm }) - tmpForm = null + sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm)) } } \ No newline at end of file diff --git a/src/mixins/tipsBefore/index.js b/src/mixins/tipsBefore/index.js new file mode 100644 index 0000000..69c7ef5 --- /dev/null +++ b/src/mixins/tipsBefore/index.js @@ -0,0 +1,100 @@ +const obj = { + // 'consumerClient': '/counter/list/manage/consumerClient', + // 'currentAccount/openAccount': '/counter/list/manage/currentAccount', + // 'currentAccount/deposit': '/counter/list/manage/currentAccount' + 'consumerClient': '客户信息 -> 个人客户信息建立', + 'corporateClient': '客户信息 -> 公司客户信息建立', + 'currentAccount/openAccount': '活期业务 -> 开户', + 'currentAccount/deposit': '活期业务 -> 存款', + 'currentAccount/withdrawal': '活期业务 -> 取款', + 'currentAccount/transferAccounts': '活期业务 -> 转账', + 'currentAccount/settle': '活期业务 -> 结清', + 'currentAccount/Cancell': '活期业务 -> 销户', + 'timeDeposit/openAccount': '整存整取 -> 开户', + 'timeDeposit/deposit': '整存整取 -> 存款', + 'timeDeposit/withdrawal': '整存整取 -> 取款', + 'timeDeposit/deposit': '整存整取 -> 存款', + 'business/openAccount': '公司业务 -> 开户' +} + +import { mapGetters } from 'vuex' + +export default { + data(){ + return { + unNeed: false, + isNeedBefore: false, + needBefore: false, + tipsNefore: null + } + + }, + created() { + + 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 + return; + } + + }, + methods: { + // 暴露出外面的方法,可以提交后删存的数据 + clearSaveData() { + sessionStorage.removeItem(this.moduleName) + } + }, + beforeDestroy() { + // clearInterval(this.myTipBefore) + // this.myTipBefore = null + + // 这个业务是我们需要的,所以我们存数据 + 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({ + needsModule: 'system/needsModule', + inMyWork: 'system/inMyWork' + }) + }, +} + diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue index b6dec6b..375f833 100644 --- a/src/pages/counter/list/index.vue +++ b/src/pages/counter/list/index.vue @@ -9,10 +9,12 @@ -
+
- +
+ +
@@ -253,6 +255,7 @@ import manage from '../../manage/index'; import { addOperation, getOperation } from '@/api/http'; import backButton from '@/components/backButton' import { myConfig } from './myConfig.js' +import saveSystemModule from '@/mixins/saveSystemModule' export default { name: 'index', @@ -260,6 +263,7 @@ export default { manage: manage, backButton }, + mixins: [saveSystemModule], data() { var validatePass = (rule, value, callback) => { if (value === '') { @@ -374,7 +378,7 @@ export default { // ], popArr:[/* 弹窗展示的物品 */ {name:'银行卡',src:require('@/assets/img/goods/bankCard.png'),id:16,cardNub:'1865 3549 5675 5589'}, - {name:'定期存单',src:require('@/assets/img/seal/paid.png'),id:19}, + {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}, @@ -455,7 +459,7 @@ export default { ], 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:19}, + {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}, @@ -1399,8 +1403,13 @@ export default { }, showManage() {// 展示系统管理 this.manageVisible = true; - // this.$router.push('/counter/list/manage/consumerClient'); - this.$router.push('/counter/list/manage/consumerClient'); + const path = sessionStorage.getItem('computerPath') + if(path) { + this.$router.push(path) + }else { + this.$router.push('/counter/list/manage/consumerClient'); + } + }, popSure(){/* 弹框-确定 */ diff --git a/src/pages/manage/index/index.vue b/src/pages/manage/index/index.vue index e248c3d..f3b6ade 100644 --- a/src/pages/manage/index/index.vue +++ b/src/pages/manage/index/index.vue @@ -46,11 +46,12 @@ export default { return this.$store.state.system.fullScreen } }, - created() { - if(sessionStorage.getItem('computerPath')) { - this.$router.push(sessionStorage.getItem('computerPath')) - } - }, + // beforeMount() { + // const path = sessionStorage.getItem('computerPath') + // console.log('router-view') + // console.log(path) + // this.$router.push(path) + // }, methods: { close(){ sessionStorage.setItem('computerPath', this.$route.fullPath) diff --git a/src/pages/manage/list/business/deposit.vue b/src/pages/manage/list/business/deposit.vue index 4147038..74aad6a 100644 --- a/src/pages/manage/list/business/deposit.vue +++ b/src/pages/manage/list/business/deposit.vue @@ -54,6 +54,7 @@ import { checkHanzi, checkName, ismoney, rateListen, myValidate, autoPlay, autoP import { vercustomer, verrate } from '@/utils/verify.js' import { addOperation, getOperation } from '@/api/http'; import MyTitle from '@/components/myTitle' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'business/deposit' import { mapMutations, mapGetters } from 'vuex' @@ -66,13 +67,12 @@ export default { NeedBefore, MyDialog }, + mixins: [ TipsBefore ], data() { return { + moduleName: 'business/deposit', text:'存款',/* 顶部文字 */ visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 customerName: '', // 客户姓名 @@ -177,17 +177,10 @@ export default { } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true - } + if(this.isNeedBefore) { + return + } + this.getFormData() }, methods: { ...mapMutations({ diff --git a/src/pages/manage/list/business/openAccount.vue b/src/pages/manage/list/business/openAccount.vue index 3401e9d..d0ed140 100644 --- a/src/pages/manage/list/business/openAccount.vue +++ b/src/pages/manage/list/business/openAccount.vue @@ -99,6 +99,8 @@ const moduleName = 'business/openAccount' import { mapMutations, mapGetters } from 'vuex' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' +import TipsBefore from '@/mixins/tipsBefore' + export default { name: 'index', components:{ @@ -108,11 +110,9 @@ export default { }, data() { return { + moduleName: 'business/openAccount', text:'开户',/* 顶部文字 */ visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 customerName: '', // 客户姓名 @@ -291,21 +291,15 @@ export default { } } }, + mixins: [ TipsBefore ], created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - const { peopleNumber, userName } = this.dataFlow - this.form.customerName = userName - this.form.customerNumber = peopleNumber - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return } + const { peopleNumber, userName } = this.dataFlow + this.form.customerName = userName + this.form.customerNumber = peopleNumber + this.getFormData() }, methods: { ...mapMutations({ diff --git a/src/pages/manage/list/business/transfer.vue b/src/pages/manage/list/business/transfer.vue index 9deccbe..cb5f63a 100644 --- a/src/pages/manage/list/business/transfer.vue +++ b/src/pages/manage/list/business/transfer.vue @@ -76,6 +76,7 @@ import { mapState } from 'vuex' import { myValidate, ismoney, checkHanzi, checkName, autoPlay, autoPlay2 } from '@/utils/utilFunction.js' import { vercustomer } from '@/utils/verify.js' import MyTitle from '@/components/myTitle' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'business/transfer' import { mapMutations, mapGetters } from 'vuex' @@ -88,13 +89,12 @@ export default { NeedBefore, MyDialog }, + mixins: [ TipsBefore ], data() { return { + moduleName: 'business/transfer', text:'转账',/* 顶部文字 */ visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 transoutNum: '', // 转出账号 @@ -239,17 +239,10 @@ export default { } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return } + this.getFormData() }, mounted() { }, diff --git a/src/pages/manage/list/business/withdrawal.vue b/src/pages/manage/list/business/withdrawal.vue index 98fcd36..facaafb 100644 --- a/src/pages/manage/list/business/withdrawal.vue +++ b/src/pages/manage/list/business/withdrawal.vue @@ -76,6 +76,7 @@ import { myValidate, ismoney, checkName, checkHanzi, autoPlay, autoPlay2 } from import { vercustomer, verrate } from '@/utils/verify.js' import { addOperation, getOperation } from '@/api/http'; import MyTitle from '@/components/myTitle' +import TipsBefore from '@/mixins/tipsBefore' import { mapMutations, mapGetters } from 'vuex' import NeedBefore from '@/components/needBefore' @@ -88,13 +89,12 @@ export default { NeedBefore, MyDialog }, + mixins: [ TipsBefore ], data() { return { + moduleName: 'business/withdrawal', text:'取款',/* 顶部文字 */ visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 customerName: '', // 客户姓名 @@ -211,21 +211,10 @@ export default { } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - - // 输入账号后,默认带出币种(CNY人民币)、钞汇标识(钞户)、签发日期(调取该账户开户操作日期展示)、凭证类型(现金支票)、支取方式(印鉴) - // const { } - - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return } + this.getFormData() }, methods: { ...mapMutations({ diff --git a/src/pages/manage/list/client/consumerClient.vue b/src/pages/manage/list/client/consumerClient.vue index ab6ea22..eb46368 100644 --- a/src/pages/manage/list/client/consumerClient.vue +++ b/src/pages/manage/list/client/consumerClient.vue @@ -88,6 +88,7 @@ import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/veri import { phoneListen, mailBoxListen, checkRequired, randomPeopleNumber, myValidate, checkName, messageIdCard } from '@/utils/utilFunction.js' import MyTitle from '@/components/myTitle' +import TipsBefore from '@/mixins/tipsBefore' import MyDialog from '@/components/dialog' import NeedBefore from '@/components/needBefore' @@ -96,9 +97,7 @@ export default { name: 'consumerClient', data() { return { - unNeed: false, - isNeedBefore: '', - needBefore: '', + moduleName: 'consumerClient', idNumberJudge: false, visible:false,// 表单 form:{ @@ -223,38 +222,30 @@ export default { NeedBefore }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - if(sessionStorage.getItem('nomClientIdentity')) { - this.idNumberJudge = true - const { userName, sex, birthday, nationality, mailbox, idNumber } = this.dataFlow - this.form.idNumber = idNumber - this.form.idType = 83 - this.form.userName = userName - // let sexs = null - // if (sex == '男'){ - // sexs = 1 - // }else{ - // sexs = 2 - // } - this.form.sex = sex - this.form.birthday = birthday - this.form.nationality = nationality - this.form.mailbox = mailbox - } - this.getFormData() - - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return } + if(sessionStorage.getItem('nomClientIdentity')) { + this.idNumberJudge = true + const { userName, sex, birthday, nationality, mailbox, idNumber } = this.dataFlow + this.form.idNumber = idNumber + this.form.idType = 83 + this.form.userName = userName + // let sexs = null + // if (sex == '男'){ + // sexs = 1 + // }else{ + // sexs = 2 + // } + this.form.sex = sex + this.form.birthday = birthday + this.form.nationality = nationality + this.form.mailbox = mailbox + } + this.getFormData() }, + mixins: [ TipsBefore ], mounted() { - }, methods: { // 授权提交后 @@ -270,13 +261,10 @@ export default { getOperation(param).then((data)=>{ if(data.status == 200) { var list = data.data.judgmentRuleReqs - console.log(list) for (var i = 0; i < list.length; i++) { if (list[i].answerId == '40') {this.form.idType = +list[i].emptyTwo} // if (list[i].answerId == '41') {sessionStorage.setItem('nomClientIdentity', list[i].emptyTwo)} if (list[i].answerId == '41' && list[i].emptyTwo) { - console.log('---') - console.log(list[i].emptyTwo) this.idNumberJudge = true this.form.idNumber = list[i].emptyTwo } @@ -400,6 +388,11 @@ export default { this.setNeedsModule(moduleName) this.setDataFlow({ ...this.form }) }).catch((error)=>{ + this.$message({ + message: '服务器繁忙哦,提交失败。', + center: true, + type: 'info' + }); }) }, @@ -407,13 +400,11 @@ export default { throttle(fn,wait=1000){// 节流函数 var timer = null; - console.log(timer,'触发节流,查看timer') return function(){ console.log('进入timer0') var context = this; var args = fn; if(!timer){ - console.log('进入timer') timer = setTimeout(function(){ fn.apply(context,fn); timer = null; diff --git a/src/pages/manage/list/client/corporateClient.vue b/src/pages/manage/list/client/corporateClient.vue index 4a4b725..1f918f5 100644 --- a/src/pages/manage/list/client/corporateClient.vue +++ b/src/pages/manage/list/client/corporateClient.vue @@ -64,22 +64,20 @@ import { phoneListen, checkRequired, myValidate, checkHanzi, checkName, ismoney, import MyTitle from '@/components/myTitle' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' -import myMixin from '@/mixins/saveData' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'corporateClient' export default { name: 'index', - mixins: [ myMixin ], components: { MyTitle, NeedBefore, MyDialog }, + mixins: [ TipsBefore ], data() { return { - unNeed: false, - isNeedBefore: '', - needBefore: '', + moduleName: 'corporateClient', idNumberJudge: false, visible:false,// 表单 authorization:false,// 切授权 @@ -149,31 +147,24 @@ export default { }, created() { // firmClientIdentity - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - if(sessionStorage.getItem('firmClientIdentity')) { - this.idNumberJudge = true - const { idNumber, userName } = this.dataFlow - this.form.idNumber = idNumber - this.form.name = userName - } - for(const key in this.dataFlow) { - if(key === 'idNumber' || key === 'userName') { - continue; - } - if(this.form.hasOwnProperty(key)) { - this.form[key] = this.dataFlow[key] - } - } - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return + } + if(sessionStorage.getItem('firmClientIdentity')) { + this.idNumberJudge = true + const { idNumber, userName } = this.dataFlow + this.form.idNumber = idNumber + this.form.name = userName } + // for(const key in this.dataFlow) { + // if(key === 'idNumber' || key === 'userName') { + // continue; + // } + // if(this.form.hasOwnProperty(key)) { + // this.form[key] = this.dataFlow[key] + // } + // } + this.getFormData() }, mounted() { }, @@ -224,7 +215,6 @@ export default { // } // } // this.setDataFlow({ ...tmpForm }) - tmpForm = null this.$message.warning('请刷身份证'); this.setPopId('34') sessionStorage.setItem('computerPath', this.$route.fullPath) @@ -290,6 +280,11 @@ export default { this.setNeedsModule(moduleName) this.setDataFlow({ userName: this.form.name }) }).catch((error)=>{ + this.$message({ + message: '服务器繁忙哦,提交失败。', + center: true, + type: 'info' + }); }) }else { this.$message.error('有必填项未填哦~'); diff --git a/src/pages/manage/list/personal/callDeposits/accountClosed.vue b/src/pages/manage/list/personal/callDeposits/accountClosed.vue index 6a933c6..c28f855 100644 --- a/src/pages/manage/list/personal/callDeposits/accountClosed.vue +++ b/src/pages/manage/list/personal/callDeposits/accountClosed.vue @@ -103,22 +103,22 @@ import { myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2, messag import { mapMutations, mapGetters } from 'vuex' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'callDeposits/accountClosed' export default{ name:'', props:{}, + mixins: [ TipsBefore ], components: { NeedBefore, MyDialog }, data(){ return{ + moduleName: 'callDeposits/accountClosed', idNumberJudge: false, cardNumberJudge: false, visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 payMoney: '', // 支取金额(未对标) @@ -280,69 +280,63 @@ export default{ } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - if(sessionStorage.getItem('nomCallDepositClosedCard')) { - this.cardNumberJudge = true - const { noticeType, depositNumber, capital, interest, totalMoney, idNumber, - peopleNumber, userName, currency, goldLogo, voucherNumber, payMoney, voucherType } = this.dataFlow - this.form.certificateType = 83 - this.form.voucherType = 123 - this.form.noticeType = noticeType - this.form.depositNumber = depositNumber - this.form.capital = capital - this.form.interest = interest - this.form.totalMoney = totalMoney - // this.form.drawWayType = 93 - this.form.drawWayType = 133 - this.form.idNumber = idNumber - this.form.clientNumber = peopleNumber - this.form.clientName = userName - this.form.customerNumber = peopleNumber - this.form.currency = currency - this.form.goldLogo = goldLogo - this.form.voucherNumber = voucherNumber - this.form.payMoney = payMoney - this.form.voucherType = voucherType - // this.form.idNumber = - } + if(this.isNeedBefore) { + return + } + console.log('???') + if(sessionStorage.getItem('nomCallDepositClosedCard')) { + this.cardNumberJudge = true + const { noticeType, depositNumber, capital, interest, totalMoney, idNumber, + peopleNumber, userName, currency, goldLogo, voucherNumber, payMoney, voucherType } = this.dataFlow + this.form.certificateType = 83 + this.form.voucherType = 123 + this.form.noticeType = noticeType + this.form.depositNumber = depositNumber + this.form.capital = capital + this.form.interest = interest + this.form.totalMoney = totalMoney + // this.form.drawWayType = 93 + this.form.drawWayType = 133 + this.form.idNumber = idNumber + this.form.clientNumber = peopleNumber + this.form.clientName = userName + this.form.customerNumber = peopleNumber + this.form.currency = currency + this.form.goldLogo = goldLogo + this.form.voucherNumber = voucherNumber + this.form.payMoney = payMoney + this.form.voucherType = voucherType + // this.form.idNumber = + } - if(sessionStorage.getItem('nomCallDepositClosedCard2')) { - this.idNumberJudge = true - const { idNumber } = this.dataFlow - this.form.idNumber = idNumber - } + if(sessionStorage.getItem('nomCallDepositClosedCard2')) { + this.idNumberJudge = true + const { idNumber } = this.dataFlow + this.form.idNumber = idNumber + } - if(sessionStorage.getItem('nomCallDepositClosedPassword')) { - this.form.drawPassword = sessionStorage.getItem('nomCallDepositClosedPassword') - } + if(sessionStorage.getItem('nomCallDepositClosedPassword')) { + this.form.drawPassword = sessionStorage.getItem('nomCallDepositClosedPassword') + } - const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,38,289' - const cards = { - // 302: 'nomCallDepositClosedCard', - // 392: 'nomCallDepositClosedCard2', - // 394: 'nomCallDepositClosedPassword' - } - const callback = () => { - if(this.form.idNumber) { - this.idNumberJudge = true - } - if(this.form.voucherNumber) { - this.cardNumberJudge = true - } - if(sessionStorage.getItem('nomCallDepositOpenPassword')) { - this.form.drawPassword = sessionStorage.getItem('nomCallDepositClosedPassword') - } - } - autoPlay2(parentId, this.form, this.myTable2, this.myTable, cards) - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,38,289' + const cards = { + // 302: 'nomCallDepositClosedCard', + // 392: 'nomCallDepositClosedCard2', + // 394: 'nomCallDepositClosedPassword' + } + const callback = () => { + if(this.form.idNumber) { + this.idNumberJudge = true } + if(this.form.voucherNumber) { + this.cardNumberJudge = true + } + if(sessionStorage.getItem('nomCallDepositOpenPassword')) { + this.form.drawPassword = sessionStorage.getItem('nomCallDepositClosedPassword') + } + } + autoPlay2(parentId, this.form, this.myTable2, this.myTable, cards) }, methods: { ...mapMutations({ diff --git a/src/pages/manage/list/personal/callDeposits/callDeposits.vue b/src/pages/manage/list/personal/callDeposits/callDeposits.vue index 624dacf..c68a321 100644 --- a/src/pages/manage/list/personal/callDeposits/callDeposits.vue +++ b/src/pages/manage/list/personal/callDeposits/callDeposits.vue @@ -43,6 +43,7 @@ import openAccount from './openAccount.vue' import accountClosed from './accountClosed.vue' import MyTitle from '@/components/myTitle' +import TipsBefore from '@/mixins/tipsBefore' export default { name: 'index', @@ -50,6 +51,7 @@ export default { openAccount,accountClosed, MyTitle }, + mixins: [ TipsBefore ], data() { return { text:'',/* 顶部文字 */ diff --git a/src/pages/manage/list/personal/callDeposits/openAccount.vue b/src/pages/manage/list/personal/callDeposits/openAccount.vue index 4058639..6db9904 100644 --- a/src/pages/manage/list/personal/callDeposits/openAccount.vue +++ b/src/pages/manage/list/personal/callDeposits/openAccount.vue @@ -86,23 +86,23 @@ import { myValidate, checkHanzi, checkName, ismoney, autoPlay2, autoPlay, messag import { mapMutations, mapGetters } from 'vuex' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'callDeposits/openAccount' export default{ name:'', props:{}, + mixins: [ TipsBefore ], components: { NeedBefore, MyDialog }, data(){ return{ + moduleName: 'callDeposits/openAccount', idNumberJudge: false, cardNumberJudge: false, visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', form:{ // 必填项 @@ -268,38 +268,28 @@ export default{ } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - // 291: 'nomCallDepositOpen2', - // 297: 'nomCallDepositOpen3', - // 301: 'nomCallDepositOpenPassword' - if(sessionStorage.getItem('nomCallDepositOpen2')) { - this.idNumberJudge = true - const { idNumber, peopleNumber, userName, currency, goldLogo, depositType } = this.dataFlow - this.form.idNumber = idNumber - this.form.clientNumber = peopleNumber - this.form.customerName = userName - this.form.currency = currency - this.form.goldLogo = goldLogo - this.form.depositType = depositType - } - if(sessionStorage.getItem('nomCallDepositOpen3')) { - const { voucherNumber } = this.dataFlow - this.cardNumberJudge = true - this.form.voucherNumber = voucherNumber - } - if(sessionStorage.getItem('nomCallDepositOpenPassword')) { - this.form.drawPassword = sessionStorage.getItem('nomCallDepositOpenPassword') - } - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + if(this.isNeedBefore) { + return + } + if(sessionStorage.getItem('nomCallDepositOpen2')) { + this.idNumberJudge = true + const { idNumber, peopleNumber, userName, currency, goldLogo, depositType } = this.dataFlow + this.form.idNumber = idNumber + this.form.clientNumber = peopleNumber + this.form.customerName = userName + this.form.currency = currency + this.form.goldLogo = goldLogo + this.form.depositType = depositType + } + if(sessionStorage.getItem('nomCallDepositOpen3')) { + const { voucherNumber } = this.dataFlow + this.cardNumberJudge = true + this.form.voucherNumber = voucherNumber + } + if(sessionStorage.getItem('nomCallDepositOpenPassword')) { + this.form.drawPassword = sessionStorage.getItem('nomCallDepositOpenPassword') } + this.getFormData() }, methods: { ...mapMutations({ diff --git a/src/pages/manage/list/personal/currentAccount/accountCancellation.vue b/src/pages/manage/list/personal/currentAccount/accountCancellation.vue index 7302271..9db74d3 100644 --- a/src/pages/manage/list/personal/currentAccount/accountCancellation.vue +++ b/src/pages/manage/list/personal/currentAccount/accountCancellation.vue @@ -48,21 +48,21 @@ import { myValidate, checkHanzi, checkName, autoPlay, autoPlay2, inputListen, me import { mapMutations, mapGetters } from 'vuex' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' +import TipsBefore from '@/mixins/tipsBefore' const moduleName = 'currentAccount/Cancell' // 开怀 export default{ name:'', props:{}, + mixins: [ TipsBefore ], components: { NeedBefore, MyDialog }, data(){ return{ + moduleName:'currentAccount/Cancell', visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', idNumberJudge: false, cardNumberJudge: false, form:{ @@ -114,47 +114,41 @@ export default{ } }, created() { - // 这里开始!!!!!!!!!!! + // 混入函数判定,如果不需要则不执行初始化代码 - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - const { voucherNumber, userName } = this.dataFlow - this.form.cardNumber = voucherNumber - this.form.userName = userName - if(sessionStorage.getItem('nomCurrentCancellCard2')) { - this.idNumberJudge = true - const { idNumber } = this.dataFlow - this.form.idNumber = idNumber - } + if(this.isNeedBefore) { + return + } - if(sessionStorage.getItem('nomCurrentCancellPassword')) { - this.form.drawPassword = sessionStorage.getItem('nomCurrentCancellPassword') - } + const { voucherNumber, userName } = this.dataFlow + this.form.cardNumber = voucherNumber + this.form.userName = userName + if(sessionStorage.getItem('nomCurrentCancellCard2')) { + this.idNumberJudge = true + const { idNumber } = this.dataFlow + this.form.idNumber = idNumber + } + if(sessionStorage.getItem('nomCurrentCancellPassword')) { + this.form.drawPassword = sessionStorage.getItem('nomCurrentCancellPassword') + } - const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,57,67' - const cardArr = { - // 113: 'nomCurrentCancellCard1', - // 116: 'nomCurrentCancellCard2', - // 117: 'nomCurrentCancellPassword' - } - const callback = () => { - if(this.form.idNumber) { - this.idNumberJudge = true - } - if(sessionStorage.getItem('nomCurrentCancellPassword')) { - this.form.drawPassword = sessionStorage.getItem('nomCurrentCancellPassword') - } - } - autoPlay2(parentId, this.form, this.myTable2, this.myTable, cardArr, callback) - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) + + const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,57,67' + const cardArr = { + // 113: 'nomCurrentCancellCard1', + // 116: 'nomCurrentCancellCard2', + // 117: 'nomCurrentCancellPassword' + } + const callback = () => { + if(this.form.idNumber) { + this.idNumberJudge = true + } + if(sessionStorage.getItem('nomCurrentCancellPassword')) { + this.form.drawPassword = sessionStorage.getItem('nomCurrentCancellPassword') } - }else { - this.isNeedBefore = true - this.unNeed = true } + autoPlay2(parentId, this.form, this.myTable2, this.myTable, cardArr, callback) }, mounted() { diff --git a/src/pages/manage/list/personal/currentAccount/deposit.vue b/src/pages/manage/list/personal/currentAccount/deposit.vue index 9cf62c3..87fd204 100644 --- a/src/pages/manage/list/personal/currentAccount/deposit.vue +++ b/src/pages/manage/list/personal/currentAccount/deposit.vue @@ -55,6 +55,7 @@ import { mapMutations, mapGetters } from 'vuex' import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' import { ismoney, myValidate, checkName, rateListen, messageCard } from '@/utils/utilFunction.js' import { addOperation, getOperation } from '@/api/http'; +import TipsBefore from '@/mixins/tipsBefore' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' @@ -62,16 +63,15 @@ const moduleName = 'currentAccount/deposit' export default{ name:'', props:{}, + mixins: [ TipsBefore ], components: { NeedBefore, MyDialog }, data(){ return{ + moduleName: 'currentAccount/deposit', visible: false, - unNeed: false, - isNeedBefore: '', - needBefore: '', cardNumberJudge: false, form:{ currency:'', @@ -121,25 +121,20 @@ export default{ } }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - if(sessionStorage.getItem('nomBusinessDepositCard')) { - const { userName, goldLogo, currency, voucherNumber } = this.dataFlow - this.form.userName = userName - this.form.goldLogo = goldLogo // goldLogo // 13是什么鬼 - this.form.currency = currency - this.form.voucherNumber = voucherNumber - this.cardNumberJudge = true - } - this.getFormData() - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + + if(this.isNeedBefore) { + return + } + + if(sessionStorage.getItem('nomBusinessDepositCard')) { + const { userName, goldLogo, currency, voucherNumber } = this.dataFlow + this.form.userName = userName + this.form.goldLogo = goldLogo // goldLogo // 13是什么鬼 + this.form.currency = currency + this.form.voucherNumber = voucherNumber + this.cardNumberJudge = true } + this.getFormData() }, methods: { @@ -220,6 +215,11 @@ export default{ // type: 'success' // }); }).catch((error)=>{ + this.$message({ + message: '服务器繁忙哦,提交失败。', + center: true, + type: 'info' + }); }) }else { this.$message.error('有必填项未填哦~'); diff --git a/src/pages/manage/list/personal/currentAccount/index.vue b/src/pages/manage/list/personal/currentAccount/index.vue index 5a9fb7e..8508b0e 100644 --- a/src/pages/manage/list/personal/currentAccount/index.vue +++ b/src/pages/manage/list/personal/currentAccount/index.vue @@ -114,6 +114,7 @@ export default { }, destroyed() { sessionStorage.setItem('currentAccountIndex', this.cacheVal) + }, methods: { handleSelect(val){ diff --git a/src/pages/manage/list/personal/currentAccount/openAccount.vue b/src/pages/manage/list/personal/currentAccount/openAccount.vue index d00d049..5df5625 100644 --- a/src/pages/manage/list/personal/currentAccount/openAccount.vue +++ b/src/pages/manage/list/personal/currentAccount/openAccount.vue @@ -40,12 +40,32 @@ - + + + + + + + - + + + + + @@ -58,7 +78,11 @@ - + + + + + @@ -89,13 +113,20 @@ - - + + + + + + - + + + + @@ -108,8 +139,13 @@ - - + + + + + + + @@ -138,13 +174,20 @@ - - + + + + + + - + + + + @@ -157,8 +200,12 @@ - - + + + + + + @@ -187,26 +234,6 @@ 提交
- @@ -218,16 +245,19 @@ import { vercustomer } from '@/utils/verify.js' import { myValidate, checkName, checkHanzi, inputListen } from '@/utils/utilFunction.js' import NeedBefore from '@/components/needBefore' import MyDialog from '@/components/dialog' +import TipsBefore from '@/mixins/tipsBefore' + const moduleName = 'currentAccount/openAccount' + export default { data(){ return{ + moduleName: 'currentAccount/openAccount', + passwordTag: '', cardNumberTag: '', - unNeed: false, - isNeedBefore: '', - needBefore: '', + cardNumberJudge: false, cardNumberJudge2: false, @@ -350,53 +380,82 @@ export default { num:0, } }, + mixins: [ TipsBefore ], components: { NeedBefore, MyDialog }, created() { - if(this.inMyWork(moduleName)) { - if(this.needsModule(moduleName) === '') { - const { peopleNumber, userName } = this.dataFlow - this.form.userNumber = peopleNumber - this.form.userName = userName - const { voucherNumber } = this.dataFlow + // mixins函数判定,如果不需要则不执行初始化代码 + + if(sessionStorage.getItem('openAccountCount')) { + this.count = parseInt(sessionStorage.getItem('openAccountCount')) + if(this.count === 1) { + this.formTwo = true + }else if(this.count === 2) { + this.formTwo = true + this.formThree = true + } + // this.formThree = true + // this.openAccount() + } - // 判断是否使用刷卡器 - if(sessionStorage.getItem('accountVoucher')) { - this.form.cardNumber = voucherNumber - this.cardNumberJudge = true - } - if(sessionStorage.getItem('accountVoucherTwo')) { - this.form.cardNumber2 = voucherNumber - this.cardNumberJudge2 = true - } - if(sessionStorage.getItem('accountVoucherThree')) { - this.form.cardNumber3 = voucherNumber - this.cardNumberJudge3 = true - } + if(this.isNeedBefore) { + return + } - // 无缓存的话密码出不来 - if(sessionStorage.getItem('accountPassword')) { - this.form.drawPassword = sessionStorage.getItem('accountPassword') - } - if(sessionStorage.getItem('accountPasswordTwo')) { - this.form.drawPassword2 = sessionStorage.getItem('accountPasswordTwo') - } - if(sessionStorage.getItem('accountPasswordThree')) { - this.form.drawPassword3 = sessionStorage.getItem('accountPasswordThree') - } + console.log('s..asdasd') + - this.getOptionsList() - - }else { - this.isNeedBefore = true - this.needBefore = this.needsModule(moduleName) - } - }else { - this.isNeedBefore = true - this.unNeed = true + const { peopleNumber, userName } = this.dataFlow + this.form.userNumber = peopleNumber + this.form.userName = userName + const { voucherNumber } = this.dataFlow + + // 判断是否使用刷卡器 + if(sessionStorage.getItem('accountVoucher')) { + this.form.cardNumber = voucherNumber + this.cardNumberJudge = true + } + if(sessionStorage.getItem('accountVoucherTwo')) { + this.form.cardNumber2 = voucherNumber + this.cardNumberJudge2 = true + } + if(sessionStorage.getItem('accountVoucherThree')) { + this.form.cardNumber3 = voucherNumber + this.cardNumberJudge3 = true } + + + // 无缓存的话密码出不来 + if(sessionStorage.getItem('accountPassword')) { + this.form.drawPassword = sessionStorage.getItem('accountPassword') + } + if(sessionStorage.getItem('accountPasswordTwo')) { + this.form.drawPassword2 = sessionStorage.getItem('accountPasswordTwo') + } + if(sessionStorage.getItem('accountPasswordThree')) { + this.form.drawPassword3 = sessionStorage.getItem('accountPasswordThree') + } + + this.getOptionsList() + + // this.getOptionsList() + // 这个顺序不能错!要拿到itemid + // this.$nextTick(() => { + // if(sessionStorage.getItem('openAccountCount')) { + // this.count = sessionStorage.getItem('openAccountCount') + // if(this.count === 1) { + // this.formTwo = true + // }else { + // this.formThree = true + // } + // // this.formThree = true + // // this.openAccount() + // } + // }) + + }, mounted(){ // currencySelectList:[ @@ -415,6 +474,10 @@ export default { setDataFlow: 'system/setDataFlow', setPopId: 'system/setPopId' }), + initData() { + + }, + getOptionsList(){ for(var i=8;i<14;i++){ this.getSubjectInfoData(i) @@ -559,8 +622,6 @@ export default { }else if (item == '13'){ this.drawWaySelectList = data.data.items; this.form.drawWay = this.drawWaySelectList[0].itemId - console.log('---drawWaySelectList') - console.log(this.drawWaySelectList) } } }).catch((error)=>{ @@ -575,23 +636,33 @@ export default { }) }, openAccount(){ + // if(sessionStorage.getItem('openAccountCount')) { + // this.count = sessionStorage.getItem('openAccountCount') + // } this.count = this.count+1; + sessionStorage.setItem('openAccountCount', this.count) if (this.count > 2){ this.count = 2 this.$message({ type: 'error', - message: '最多只能添加三个!' + message: '最多只能添加三个!', + center: true }); } if(this.count == 1 || this.count == 2){ this.formTwo = true - this.form.accountQualitysTwo = this.accountQualitySelectList[0].itemId - this.form.voucherTypesTwo = this.voucherTypeSelectList[0].itemId + // this.form.accountQualitysTwo = this.accountQualitySelectList[0].itemId + this.form.accountQualitysTwo = 14 + // this.form.voucherTypesTwo = this.voucherTypeSelectList[0].itemId + this.form.voucherTypesTwo = 15 + } if (this.count == 2){ this.formThree = true - this.form.accountQualitysThree = this.accountQualitySelectList[0].itemId - this.form.voucherTypesThree = this.voucherTypeSelectList[0].itemId + // this.form.accountQualitysThree = this.accountQualitySelectList[0].itemId + this.form.accountQualitysThree = 14 + // this.form.voucherTypesThree = this.voucherTypeSelectList[0].itemId + this.form.voucherTypesThree = 15 } }, //点击提交表单 @@ -675,6 +746,11 @@ export default { addOperation(param).then((data)=>{ }).catch((error)=>{ + this.$message({ + message: '服务器繁忙哦,提交失败。', + center: true, + type: 'info' + }); }) formList.push( {"answerId":'77',"emptyOne": "17", "emptyTwo": drawPassword, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,26,57,62,77", "type": "3"},//支取密码 @@ -730,6 +806,11 @@ export default { // type: 'success' // }); }).catch((error)=>{ + this.$message({ + message: '服务器繁忙哦,提交失败。', + center: true, + type: 'info' + }); }) }, deleteSecond(){ @@ -739,6 +820,7 @@ export default { type: 'warning' }).then(() => { this.count = this.count-1; + sessionStorage.setItem('openAccountCount', this.count) if (this.count < 1){this.count = 0} if (this.count == 0){this.formTwo = false} if (this.count == 1){this.formThree = false} @@ -820,7 +902,13 @@ export default { idCardNumber: 'system/idCardNumber', inMyWork: 'system/inMyWork' }) - } + }, + watch: { + count(newVal) { + console.log(newVal) + } + }, + };