diff --git a/src/components/checkPhoto/index.vue b/src/components/checkPhoto/index.vue index 14fb8cf..b4d178a 100644 --- a/src/components/checkPhoto/index.vue +++ b/src/components/checkPhoto/index.vue @@ -183,6 +183,11 @@

{{ dataFlow.transMoney }}

+ + diff --git a/src/components/selectBusiness/index.vue b/src/components/selectBusiness/index.vue index 8eecba2..708da8a 100644 --- a/src/components/selectBusiness/index.vue +++ b/src/components/selectBusiness/index.vue @@ -162,7 +162,8 @@ export default { }, watch: { showBusiness(newVal) { - if(!newVal) { + console.log('what') + if(newVal) { this.takeCheck = this.businessKey } } diff --git a/src/mixins/saveData/index.js b/src/mixins/saveData/index.js deleted file mode 100644 index 81ecdcf..0000000 --- a/src/mixins/saveData/index.js +++ /dev/null @@ -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)) - } -} \ No newline at end of file diff --git a/src/mixins/tipsBefore/index.js b/src/mixins/tipsBefore/index.js index 9300a68..9642be4 100644 --- a/src/mixins/tipsBefore/index.js +++ b/src/mixins/tipsBefore/index.js @@ -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({ diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue index 24cdc5e..709975c 100644 --- a/src/pages/counter/list/index.vue +++ b/src/pages/counter/list/index.vue @@ -3,7 +3,7 @@ - + @@ -212,14 +212,6 @@
- @@ -423,26 +415,6 @@
- - - - - - - - @@ -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}, - ], // 这里id只是起到v-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 { - // 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 } // 如果不是钱箱或传票栏或印章盒或传票栏或客户,刷卡后返回 diff --git a/src/pages/manage/list/personal/timeDeposit/openAccount.vue b/src/pages/manage/list/personal/timeDeposit/openAccount.vue index 97ec7b2..80cb6da 100644 --- a/src/pages/manage/list/personal/timeDeposit/openAccount.vue +++ b/src/pages/manage/list/personal/timeDeposit/openAccount.vue @@ -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) diff --git a/src/store/modules/system.js b/src/store/modules/system.js index 3ccc849..41c784b 100644 --- a/src/store/modules/system.js +++ b/src/store/modules/system.js @@ -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 { 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 { + // console.log("callback", callback); + // console.log("校验某一项的规则对象", rule); + // console.log("用户输入的值", value); + + // 对输入框类型的校验 + 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 +来源:稀土掘金 +著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 \ No newline at end of file