diff --git a/src/api/api.js b/src/api/api.js index 4e5aeb5..a09c21b 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -10,14 +10,14 @@ if (dev) { // 本地 host = 'http://121.37.12.51/' // 中台测试服 // host = 'https://www.occupationlab.com/' // 正式服 - // host = 'http://192.168.31.151:9000/' // 榕 - // host = 'http://192.168.31.116:9000/' // 赓 + host = 'http://192.168.31.217:9000/' } // 创建axios实例 const service = axios.create({ baseURL: host, // 测试 timeout: 30000 // 请求超时时间 }) +let logouted = 0; // 添加request拦截器 service.interceptors.request.use(config => { return config @@ -34,11 +34,13 @@ service.interceptors.response.use( }, error => { if (error.response.status == 401) { - console.log("🚀 ~ error:", error.response.status, store.commit('user/logout')) - util.errorMsg('登录过期,请重新登录') - setTimeout(() => { - store.commit('user/logout') - }, 1500) + if (!logouted) { + util.errorMsg('登录过期,请重新登录') + setTimeout(() => { + store.commit('user/logout') + }, 1500) + logouted = 1 + } } return Promise.reject(error.response) } diff --git a/src/api/http.js b/src/api/http.js index 8f405ba..69cb2f2 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -1,52 +1,78 @@ -// 引入封装好的axios -// ps:如果没有封装,正常引入axios即可 -import {get, post,deletes,put} from './api.js' +import { get, post, deletes, put } from './api.js' // import axios from "./"; -// /api为配置跨域的路径变量 -export const getProjectBySystemId= (params) => { - return get( '/occupationlab/occupationlab/projectManage/getProjectBySystemId',params) +export const getProjectBySystemId = (params) => { + return get('/occupationlab/occupationlab/projectManage/getProjectBySystemId', params) } -export const getProjectDetail= (params) => { - return get( '/occupationlab/occupationlab/projectManage/getProjectDetail',params) +export const getProjectDetail = (params) => { + return get('/occupationlab/occupationlab/projectManage/getProjectDetail', params) } -export const submit= (params) => { - return post( '/bank/bank/submit',params) +export const submit = (params) => { + return post('/bank/bank/submit', params) } -export const getSubjectInfo= (params) => { - return get( '/judgment/judgment/lcSubject/getSubjectInfo',params) +export const getSubjectInfo = (params) => { + return get('/judgment/judgment/lcSubject/getSubjectInfo', params) } -export const getQueryCache= () => { - return get( '/bank/bank/queryCache') +export const getQueryCache = () => { + return get('/bank/bank/queryCache') } -export const addOperation= (params) => { - return post( '/bank/bank/addOperation',params) +export const addOperation = (params) => { + return post('/bank/bank/addOperation', params) } -export const getOperation= (params) => { - return get( '/bank/bank/getOperation',params) +export const getOperation = (params) => { + return get('/bank/bank/getOperation', params) } -export const deleteCache= () => { - return get( '/bank/bank/deleteCache') +export const deleteCache = () => { + return get('/bank/bank/deleteCache') } -export const exportBankExperimentReport= (params) => { - return post( '/occupationlab/occupationlab/achievement/exportBankExperimentReport',params) +export const exportBankExperimentReport = (params) => { + return post('/occupationlab/occupationlab/achievement/exportBankExperimentReport', params) } -export const updateReport= (params) => { - return post( '/occupationlab/occupationlab/achievement/updateReport',params) +export const updateReport = (params) => { + return post('/occupationlab/occupationlab/achievement/updateReport', params) } // 学生查看考核状态 -export const checkTest= (params) => { - return get( '/occupationlab/occupationlab/assessment/getDetailById', {...params}) +export const checkTest = (params) => { + return get('/occupationlab/occupationlab/assessment/getDetailById', { ...params }) } -export const checkTest2= (params) => { - return post( '/occupationlab/occupationlab/assessment/pageStuAssessment',{ - pageNum: 1, - pageSize: 10000, - ...params - }) +export const checkTest2 = (params) => { + return post('/occupationlab/occupationlab/assessment/pageStuAssessment', { + pageNum: 1, + pageSize: 10000, + ...params + }) } export const reportDetail = (reportId) => { - return get( '/occupationlab/occupationlab/achievement/reportDetail',{ - reportId - }) + return get('/occupationlab/occupationlab/achievement/reportDetail', { + reportId + }) +} +export const creditEvaluationInput = data => { + return post('/judgment/bankCreditEvaluation/creditEvaluationInput', data) +} + +export const loanContractDel = data => { + return post('/judgment/bankLoanContractInfo/batchDeletion', data) +} +export const loanContractFind = id => { + return post('/judgment/bankLoanContractInfo/findById?id=' + id) +} +export const loanContractList = (data) => { + return post('/judgment/bankLoanContractInfo/pagingQuery', data) +} +export const loanContractSave = (data) => { + return post('/judgment/bankLoanContractInfo/saveOrUpdate', data) +} + +export const personalBasicDel = data => { + return post('/judgment/bankPersonalBasicInfo/batchDeletion', data) +} +export const personalBasicFind = id => { + return post('/judgment/bankPersonalBasicInfo/findById?id=' + id) +} +export const personalBasicList = (data) => { + return post('/judgment/bankPersonalBasicInfo/pagingQuery', data) +} +export const personalBasicSave = (data) => { + return post('/judgment/bankPersonalBasicInfo/saveOrUpdate', data) } \ No newline at end of file diff --git a/src/mixins/tipsBefore/index.js b/src/mixins/tipsBefore/index.js index 9642be4..cef2c4a 100644 --- a/src/mixins/tipsBefore/index.js +++ b/src/mixins/tipsBefore/index.js @@ -2,85 +2,80 @@ 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': '公司业务 -> 开户' + // '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() { - // 将上次保存的这个模块的数据写上页面,因为上次退出时保存了这个模块的数据(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] - } - } + data () { + return { + unNeed: false, + isNeedBefore: false, + needBefore: false, + tipsNefore: null + } + }, + created () { + // 将上次保存的这个模块的数据写上页面,因为上次退出时保存了这个模块的数据(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) - } - }else { - this.isNeedBefore = true - this.unNeed = true - return; - } - - }, - methods: { - // 暴露出外面的方法,可以提交后删除调存在sessionStorage中的的数据,因为有后端缓存了。 - clearSaveData() { - sessionStorage.removeItem(this.moduleName) - } - }, - beforeDestroy() { - // clearInterval(this.myTipBefore) - // this.myTipBefore = null + // 如果所选业务需要(需求变更,不用管这个了) + if (this.inMyWork(this.moduleName)) { + if (this.needsModule(this.moduleName)) { + this.isNeedBefore = true + this.needBefore = this.needsModule(this.moduleName) + } + } else { + this.isNeedBefore = true + this.unNeed = true + return; + } - // 这个业务是我们需要的,所以我们存数据 + }, + methods: { + // 暴露出外面的方法,可以提交后删除调存在sessionStorage中的的数据,因为有后端缓存了。 + clearSaveData () { + sessionStorage.removeItem(this.moduleName) + } + }, + beforeDestroy () { + // 这个业务是我们需要的,所以我们存数据 + let tmpForm = {} + for (const key in this.form) { + if (this.form[key] !== '') { + tmpForm[key] = this.form[key] + } + } - let tmpForm = {} - for(const key in this.form) { - if(this.form[key] !== '') { - tmpForm[key] = this.form[key] - } - } - - // 系统录入当前页面关闭或离开的时候,保存当前模块的数据。回来的时候这些数据还在(业务需求)。 - sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm)) - - }, - computed: { - ...mapGetters({ - needsModule: 'system/needsModule', - inMyWork: 'system/inMyWork' - }) - }, + // 系统录入当前页面关闭或离开的时候,保存当前模块的数据。回来的时候这些数据还在(业务需求)。 + sessionStorage.setItem(this.moduleName, JSON.stringify(tmpForm)) + }, + computed: { + ...mapGetters({ + needsModule: 'system/needsModule', + inMyWork: 'system/inMyWork' + }) + }, } diff --git a/src/pages/manage/list/business/transfer.vue b/src/pages/manage/list/business/transfer.vue index 08f8714..7d3093c 100644 --- a/src/pages/manage/list/business/transfer.vue +++ b/src/pages/manage/list/business/transfer.vue @@ -1,74 +1,77 @@ // 转账 diff --git a/src/pages/manage/list/corporateLoans/application.vue b/src/pages/manage/list/corporateLoans/application.vue index d6cd54b..4f72d87 100644 --- a/src/pages/manage/list/corporateLoans/application.vue +++ b/src/pages/manage/list/corporateLoans/application.vue @@ -4,60 +4,36 @@
- +
- 新建贷款申请 + 新建贷款申请 - - + + - + - + - + - + - + - + @@ -105,8 +81,9 @@ export default { \ No newline at end of file diff --git a/src/pages/manage/list/corporateLoans/apply/creditEvaluation/basic.vue b/src/pages/manage/list/corporateLoans/apply/creditEvaluation/basic.vue index 2d5dd56..90b653f 100644 --- a/src/pages/manage/list/corporateLoans/apply/creditEvaluation/basic.vue +++ b/src/pages/manage/list/corporateLoans/apply/creditEvaluation/basic.vue @@ -7,77 +7,78 @@
客户信息
- - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + @@ -89,305 +90,130 @@ 下一步 - \ No newline at end of file diff --git a/src/store/modules/system.js b/src/store/modules/system.js index 04483f3..9c6c70e 100644 --- a/src/store/modules/system.js +++ b/src/store/modules/system.js @@ -1,7 +1,3 @@ -/* 银行系统 */ - - - /* 所有物品名字 这里能将东西查找出来并渲染上物品栏 */ const allGoods = { 469: { name: '预留印鉴卡(一)', src: require('@/assets/img/goods/预留印鉴卡.png'), id: 469 }, @@ -2735,6 +2731,7 @@ export default { // 初始化公共数据 allDataFlow: { ...allDataFlow }, isCredit: false, + creditIds: {}, }, mutations: { // 设置tipDialog组件提示的信息。这个组件是根据UI设计的。 @@ -3193,6 +3190,10 @@ export default { setCredit (state, val) { state.isCredit = val }, + // 缓存信用评估id + setCreditIds (state, val) { + state.creditIds = val + }, }, actions: { }, diff --git a/src/utils/utilFunction.js b/src/utils/utilFunction.js index 8d860b9..46b9e35 100644 --- a/src/utils/utilFunction.js +++ b/src/utils/utilFunction.js @@ -4,329 +4,329 @@ import store from '@/store' -const phoneListen = function(val, form, prop) { - if(/^[0-9]*$/.test(val)) { - form[prop] = val; - } +const phoneListen = function (val, form, prop) { + if (/^[0-9]*$/.test(val)) { + form[prop] = val; + } } -const mailBoxListen = function(val, form, prop) { - if(/^[\u4E00-\u9FA5A-Za-z0-9_]+$/.test(val) || val==='') { - form[prop] = val; - } +const mailBoxListen = function (val, form, prop) { + if (/^[\u4E00-\u9FA5A-Za-z0-9_]+$/.test(val) || val === '') { + form[prop] = val; + } } // 校验中文 -const checkHanzi = function(val, form, prop) { - // 检查符号 - const charReg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; - // 检查空格 - const tmpCheck = val.substr(val.length-1, 1); - if(tmpCheck === ' ' || charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) { - return; - } - form[prop] = val; +const checkHanzi = function (val, form, prop) { + // 检查符号 + const charReg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; + // 检查空格 + const tmpCheck = val.substr(val.length - 1, 1); + if (tmpCheck === ' ' || charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) { + return; + } + form[prop] = val; } -const checkName = function(val, form, prop) { - // 检查符号 - const charReg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; - // // 检查数字 - const charReg2 = /^[0-9]*$/; - const tmpCheck = val.substr(val.length-1, 1); - if(val.length?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; + // // 检查数字 + const charReg2 = /^[0-9]*$/; + const tmpCheck = val.substr(val.length - 1, 1); + if (val.length < form[prop].length) { form[prop] = val; + return; + } + if (charReg.test(val) || charReg2.test(tmpCheck)) { + return; + } + form[prop] = val; } // 检查证件号 -const certificateNumber = function(val, form, prop) { - const charReg = /^(0|[0-9][0-9]*)$/; - if(val.length?:"{}|,.\/;'\\[\]·~!@#¥……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; - const charReg =/^\\d+(\\.\\d)?\\d{0,1}%$/ - // 检查空格 - if(charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) { - return; - } - form[prop] = val; +const rateListen = function (val, form, prop) { + + // 检查符号 允许% + // const charReg = /[`~!@#$^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥……&*()——\-+={}|《》?:“”【】、;‘',。、]/im; + const charReg = /^\\d+(\\.\\d)?\\d{0,1}%$/ + // 检查空格 + if (charReg.test(val) || /[\u4E00-\u9FA5]/i.test(val)) { + return; + } + form[prop] = val; } // 监听数字 -const inputListen = function(val, row, prop) { - // 检查空格 - const tmpCheck = val.substr(val.length-1, 1); - if(tmpCheck === ' ') { - return; - } - if(val === '') { - row[prop] = val; - return; - } - row[prop] = Number(val.replace(/\D+/, '')) +const inputListen = function (val, row, prop) { + // 检查空格 + const tmpCheck = val.substr(val.length - 1, 1); + if (tmpCheck === ' ') { + return; + } + if (val === '') { + row[prop] = val; + return; + } + row[prop] = Number(val.replace(/\D+/, '')) } // 另一个监听数字的方法,根据需求不同来选。 -const inputListen2 = function(val, row, prop) { - // 检查空格 - const tmpCheck = val.substr(val.length-1, 1); - if(tmpCheck === ' ') { - return; - } - // 可以删光 - if(val === '') { - row[prop] = val; - return; - } - if(Number(val) || Number(val)===0) { - row[prop] = val - } +const inputListen2 = function (val, row, prop) { + // 检查空格 + const tmpCheck = val.substr(val.length - 1, 1); + if (tmpCheck === ' ') { + return; + } + // 可以删光 + if (val === '') { + row[prop] = val; + return; + } + if (Number(val) || Number(val) === 0) { + row[prop] = val + } } // 验证是否金钱 -const ismoney = function(val, row, prop) { - // 检查空格 - const tmpCheck = val.substr(val.length-1, 1); - if(tmpCheck === ' ') { - return; - } - if(val.length === 15) { - return - } - // const reg = /([1-9]\d{0,9}|0)(\.\d{1,2})?$/ // 不用保留 - const reg2 = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; // 保留小数点后两位 - if (reg2.test(Number(val)) || val==='') { - row[prop] = val - } +const ismoney = function (val, row, prop) { + // 检查空格 + const tmpCheck = val.substr(val.length - 1, 1); + if (tmpCheck === ' ') { + return; + } + if (val.length === 15) { + return + } + // const reg = /([1-9]\d{0,9}|0)(\.\d{1,2})?$/ // 不用保留 + const reg2 = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; // 保留小数点后两位 + if (reg2.test(Number(val)) || val === '') { + row[prop] = val + } } // 检查某个空是否填写完成 -const checkRequired = function(form, obj) { - for(const prop in obj) { - if(form[prop] === '') { - MessageBox.alert('请填写' + obj[prop], '提示', { - type: 'info', - confirmButtonText: '确定' - }); - return prop - } +const checkRequired = function (form, obj) { + for (const prop in obj) { + if (form[prop] === '') { + MessageBox.alert('请填写' + obj[prop], '提示', { + type: 'info', + confirmButtonText: '确定' + }); + return prop } - return ''; + } + return ''; } // 自己封装的验证方法,配合element-ui的validate使用 const myValidate = (callback, refs) => { - return (valid, obj) => { - if (valid) { - callback() - } else { - let tmpObj = {}; - for(const key in obj) { - tmpObj = obj[key][0] - break; - } - const { message, field } = tmpObj - try { - refs[field].focus(); - } catch (error) { - - } - Message.warning({ - center: true, - message - }) - } + return (valid, obj) => { + if (valid) { + callback() + } else { + let tmpObj = {}; + for (const key in obj) { + tmpObj = obj[key][0] + break; + } + const { message, field } = tmpObj + try { + refs[field].focus(); + } catch (error) { + + } + Message.warning({ + center: true, + message + }) } + } } // 电脑的系统录入中提交表单 -const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => { - let projectId = sessionStorage.getItem('projectId') || 11 // 默认11吧? - let startTime = sessionStorage.getItem('startTime') - let formList = []; - // let tmpIndex = 100; - for(const key in myTable2) { - const { prop, type, subjectId='' } = myTable2[key] - if(form[prop]){ - formList.push({ "answerId": key + '', "emptyOne": '' + subjectId, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, "type":type }) - } +const autoPlay = (parentId, form, myTable2, myTable, cards = []) => { + let projectId = sessionStorage.getItem('projectId') || 11 // 默认11吧? + let startTime = sessionStorage.getItem('startTime') + let formList = []; + // let tmpIndex = 100; + for (const key in myTable2) { + const { prop, type, subjectId = '' } = myTable2[key] + if (form[prop]) { + formList.push({ "answerId": key + '', "emptyOne": '' + subjectId, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, "type": type }) } + } - for(const key in myTable) { - 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{ - // Message.success({ - // center: true, - // message: '提交成功' - // }) - }).catch((error)=>{ - - this.$message({ - message: '服务器繁忙,提交失败。', - center: true, - type: 'info' - }); - }) + + let params = { + parentId, + lcJudgmentRuleReq: formList, + projectId: projectId, + // projectId:+projectId, + startTime: startTime, + } + addOperation(params).then((data) => { + // Message.success({ + // center: true, + // message: '提交成功' + // }) + }).catch((error) => { + + this.$message({ + message: '服务器繁忙,提交失败。', + center: true, + type: 'info' + }); + }) } // 电脑录入中获取缓存信息 -const autoPlay2 = (parentId=11, form, myTable2, myTable, cardArr, callback) => { - // 默认11吧? - let param= { - parentId - } - getOperation(param).then((data)=>{ - if(data.status == 200) { - var list = data.data.judgmentRuleReqs - // const tmpObj = Object.assign(myTable, myTable2) ...巨坑,把后面的属性给到前面了 - const tmpObj = {...myTable, ...myTable2} - for (var i = 0; i < list.length; i++) { - const { answerId, emptyTwo } = list[i] - - if(!cardArr) { - if(Number(emptyTwo)) { - const tmpNumber =+emptyTwo - // console.log('kao000') - // console.log(tmpNumber) - form[tmpObj[answerId].prop] = tmpNumber - }else { - form[tmpObj[answerId].prop] = emptyTwo - } - } else { - if(cardArr[answerId]) { - try{ - sessionStorage.setItem(cardArr[answerId], JSON.parse(list[i].emptyTwo)) - }catch(e) { - // sessionStorage.setItem(cardArr[answerId], list[i].emptyTwo) - continue; - } - - }else { - if(Number(emptyTwo)) { - form[tmpObj[answerId].prop] = +emptyTwo - }else { - form[tmpObj[answerId].prop] = emptyTwo - } - // form[tmpObj[answerId].prop] = emptyTwo - } - } - - // form[tmpObj[answerId].prop] = emptyTwo +const autoPlay2 = (parentId = 11, form, myTable2, myTable, cardArr, callback) => { + // 默认11吧? + let param = { + parentId + } + getOperation(param).then((data) => { + if (data.status == 200) { + var list = data.data.judgmentRuleReqs + // const tmpObj = Object.assign(myTable, myTable2) ...巨坑,把后面的属性给到前面了 + const tmpObj = { ...myTable, ...myTable2 } + for (var i = 0; i < list.length; i++) { + const { answerId, emptyTwo } = list[i] + + if (!cardArr) { + if (Number(emptyTwo)) { + const tmpNumber = +emptyTwo + // console.log('kao000') + // console.log(tmpNumber) + form[tmpObj[answerId].prop] = tmpNumber + } else { + form[tmpObj[answerId].prop] = emptyTwo + } + } else { + if (cardArr[answerId]) { + try { + sessionStorage.setItem(cardArr[answerId], JSON.parse(list[i].emptyTwo)) + } catch (e) { + // sessionStorage.setItem(cardArr[answerId], list[i].emptyTwo) + continue; + } + + } else { + if (Number(emptyTwo)) { + form[tmpObj[answerId].prop] = +emptyTwo + } else { + form[tmpObj[answerId].prop] = emptyTwo } - callback() + // form[tmpObj[answerId].prop] = emptyTwo + } } - }).catch((error)=>{ - }) + + // form[tmpObj[answerId].prop] = emptyTwo + } + callback() + } + }).catch((error) => { + }) } const autoPlay3 = (name, allName, arr) => { // 要接收的, 所有的, 要接收的属性 - for(let key of arr) { - name[key] = allName[key] - } + for (let key of arr) { + name[key] = allName[key] + } } // 获取当前年月日并格式化 const getNowDate = () => { - const date = new Date() - var y = date.getFullYear(); - var m = date.getMonth() + 1; - m = m < 10 ? '0' + m : m; - var d = date.getDate(); - d = d < 10 ? ('0' + d) : d; - return y + '-' + m + '-' + d; + const date = new Date() + var y = date.getFullYear(); + var m = date.getMonth() + 1; + m = m < 10 ? '0' + m : m; + var d = date.getDate(); + d = d < 10 ? ('0' + d) : d; + return y + '-' + m + '-' + d; } // 提示请刷身份证信息 -const messageIdCard = (message='请刷身份证') => { - store.commit('system/setTipsOperate', message) - // Message.warning({ - // center: true, - // message, - // }) +const messageIdCard = (message = '请刷身份证') => { + store.commit('system/setTipsOperate', message) + // Message.warning({ + // center: true, + // message, + // }) } // 提示请刷银行卡信息 -const messageCard = (message='请刷银行卡') => { - store.commit('system/setTipsOperate', message) - // Message.warning({ - // center: true, - // message - // }) +const messageCard = (message = '请刷银行卡') => { + store.commit('system/setTipsOperate', message) + // Message.warning({ + // center: true, + // message + // }) } // 提示请填写支取密码信息 -const messagePassword = (message='请填写支取密码') => { - store.commit('system/setTipsOperate', message) - // Message.warning({ - // center: true, - // message, - // }) +const messagePassword = (message = '请填写支取密码') => { + store.commit('system/setTipsOperate', message) + // Message.warning({ + // center: true, + // message, + // }) } // 随机生成10位客户号 const randomPeopleNumber = () => { - const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - const $chars2 = '1234567890' - const maxPos = $chars2.length; - let str = ''; - // str += $chars.charAt(Math.floor(Math.random() * maxPos)) - for (let i = 0; i <= 9; i++) { - str += $chars2.charAt(Math.floor(Math.random() * maxPos)); - } - return str; + const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + const $chars2 = '1234567890' + const maxPos = $chars2.length; + let str = ''; + // str += $chars.charAt(Math.floor(Math.random() * maxPos)) + for (let i = 0; i <= 9; i++) { + str += $chars2.charAt(Math.floor(Math.random() * maxPos)); + } + return str; } - export { - randomPeopleNumber, - phoneListen, - mailBoxListen, - checkRequired, - inputListen, - ismoney, - checkHanzi, - myValidate, - checkName, - rateListen, - autoPlay, - autoPlay2, - autoPlay3, - getNowDate, - inputListen2, - messageIdCard, - messageCard, - messagePassword, - certificateNumber - } \ No newline at end of file +export { + randomPeopleNumber, + phoneListen, + mailBoxListen, + checkRequired, + inputListen, + ismoney, + checkHanzi, + myValidate, + checkName, + rateListen, + autoPlay, + autoPlay2, + autoPlay3, + getNowDate, + inputListen2, + messageIdCard, + messageCard, + messagePassword, + certificateNumber +} \ No newline at end of file