|
|
|
@ -95,7 +95,7 @@ const allGoods = { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 这里的参数是全体的 具体要不一样可以在业务的dataFlow中设置进行覆盖
|
|
|
|
|
const idNumber = '220602199202281234' |
|
|
|
|
const idNumber = '220602199202281229' |
|
|
|
|
function getBirthday (idCard){ |
|
|
|
|
var birthday = ""; |
|
|
|
|
if (idCard != null && idCard != "") { |
|
|
|
@ -116,7 +116,7 @@ const capital = 100 |
|
|
|
|
const peopleNumber = '111222' |
|
|
|
|
const collectingCompany = '袋鼠互联网科技有限公司' |
|
|
|
|
const transMoney = '81100' |
|
|
|
|
const phone = '13222223122' |
|
|
|
|
const phone = '1589017718' |
|
|
|
|
const staticPhone = '0755-88281987' |
|
|
|
|
const mailNumber = '518052' |
|
|
|
|
const eMailAddress = '666@qq.com' |
|
|
|
@ -2534,6 +2534,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
},
|
|
|
|
|
}, |
|
|
|
|
allDataFlow: { ...allDataFlow }, |
|
|
|
|
goods:[// 物品栏的物品
|
|
|
|
|
{ |
|
|
|
|
name:'身份证', |
|
|
|
@ -2561,12 +2562,6 @@ export default { |
|
|
|
|
// id:'e'
|
|
|
|
|
// },
|
|
|
|
|
], |
|
|
|
|
goodsOpen:[// 物品栏的物品
|
|
|
|
|
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13}, |
|
|
|
|
{name:'身份证复印件',src:require('@/assets/img/idCard-copy-sm.png'),id:23}, |
|
|
|
|
{name:'银行卡',src:require('@/assets/img/goods/bankCard.png'),id:16}, |
|
|
|
|
{name:426,src:require('@/assets/img/goods/zzpt.png'),id:426}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
mutations: { |
|
|
|
|
// 设置tipDialog组件提示的信息。这个组件是根据UI设计的。
|
|
|
|
@ -2650,24 +2645,32 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 数据流动,当前面模块的信息被后面的模块需要时,用这个方法可以将前面模块的数据存到后面去,毕竟服务器接口少。比如模块1 -> 模块2 模块1完成的数据可以流到模块2
|
|
|
|
|
setDataFlow(state, obj) { |
|
|
|
|
for(let key in obj) { |
|
|
|
|
state.businessSelect[state.businessKey].dataFlow[key] = obj[key] |
|
|
|
|
} |
|
|
|
|
// for(let key in obj) {
|
|
|
|
|
|
|
|
|
|
// state.allDataFlow[key] = obj[key]
|
|
|
|
|
// // this.$set()
|
|
|
|
|
// }
|
|
|
|
|
state.businessSelect[state.businessKey].dataFlow = { ...state.businessSelect[state.businessKey].dataFlow, ...obj } |
|
|
|
|
}, |
|
|
|
|
// 重置业务状态中的数据,用于重新开始。
|
|
|
|
|
initState(state) { |
|
|
|
|
state.businessSelect = JSON.parse(JSON.stringify(myInitState)) |
|
|
|
|
state.allDataFlow = { ...allDataFlow } |
|
|
|
|
state.businessKey = '' |
|
|
|
|
}, |
|
|
|
|
// 控制选择业务列表的展示状态
|
|
|
|
|
setShowBusiness(state, isShow) { |
|
|
|
|
state.showBusiness = isShow |
|
|
|
|
}, |
|
|
|
|
// 需求是:点击桌面上的物品显示交互状态,但如果点击关闭则回退到一开始的状态。
|
|
|
|
|
replaceThingsGoods(state, idArr) { |
|
|
|
|
state.businessSelect[state.businessKey].data.splice(0, state.businessSelect[state.businessKey].data.length, ...idArr) |
|
|
|
|
}, |
|
|
|
|
// 替换某个业务中的某个箱子中的物品状态
|
|
|
|
|
replaceThings(state, { name, idArr }) { |
|
|
|
|
state.businessSelect[state.businessKey][name].splice(0, state.businessSelect[state.businessKey][name].length, ...idArr) |
|
|
|
|
}, |
|
|
|
|
// 向某个箱子中放入东西
|
|
|
|
|
pushThings(state, { name, idArr}) { |
|
|
|
|
if(name === 'sealBox') { // 印章盒只能放一个东西
|
|
|
|
|
const sealBox = state.businessSelect[state.businessKey][name] |
|
|
|
@ -2686,6 +2689,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 向物品栏中放入东西
|
|
|
|
|
pushThingsGoods(state, idArr) { |
|
|
|
|
for(let i=0; i<idArr.length; i++) { |
|
|
|
|
const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i]) |
|
|
|
@ -2694,22 +2698,25 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 将某个箱子中的一些物品删掉
|
|
|
|
|
outThings(state, { name, idArr}) { |
|
|
|
|
if(!(idArr instanceof Array)) { |
|
|
|
|
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id === idArr) |
|
|
|
|
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id == idArr) |
|
|
|
|
state.businessSelect[state.businessKey][name].splice(index, 1) |
|
|
|
|
}else { |
|
|
|
|
for(let i=0; i<idArr.length; i++) { |
|
|
|
|
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id === idArr[i]) |
|
|
|
|
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id == idArr[i]) |
|
|
|
|
state.businessSelect[state.businessKey][name].splice(index, 1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 将某个箱子中的一些物品删掉的方法2,更好用。
|
|
|
|
|
outThings2(state, { name, index}) { |
|
|
|
|
if(state.businessSelect[state.businessKey][name].length > index) { |
|
|
|
|
state.businessSelect[state.businessKey][name].splice(index, 1) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 删掉物品栏中的物品,和pushThings一起用,拿掉物品栏中物品的同时向箱子中装入物品。
|
|
|
|
|
outThingsGoods(state, idArr) { |
|
|
|
|
for(let i=0; i<idArr.length; i++) { |
|
|
|
|
const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i]) |
|
|
|
@ -2718,7 +2725,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 将物品放入传票栏
|
|
|
|
|
backCulture(state, idArr) { |
|
|
|
|
for(let i=0; i<idArr.length; i++) { |
|
|
|
|
const index = state.businessSelect[state.businessKey].cultureArr.findIndex(item => item === idArr[i]) |
|
|
|
@ -2730,6 +2737,7 @@ export default { |
|
|
|
|
this.commit('system/outThingsGoods', [...idArr]) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 将物品返还给客户
|
|
|
|
|
backPeople(state, idArr) { |
|
|
|
|
for(let i=0; i<idArr.length; i++) { |
|
|
|
|
const index = state.businessSelect[state.businessKey].backPeople.findIndex(item => item === idArr[i]) |
|
|
|
@ -2741,19 +2749,24 @@ export default { |
|
|
|
|
} |
|
|
|
|
this.commit('system/outThingsGoods', [...idArr]) |
|
|
|
|
}, |
|
|
|
|
// 将现金放入钱箱
|
|
|
|
|
payMoney(state) { |
|
|
|
|
const index = state.businessSelect[state.businessKey].data.findIndex(item => item === 15) |
|
|
|
|
if(index !== -1) { |
|
|
|
|
state.businessSelect[state.businessKey].data.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// cb是回调函数
|
|
|
|
|
// 盖章逻辑(本来想着直接把审核资料、验钞等方法也写在这里的,因为直接物品也在这里。奈何时间不太够。没事) cb是回调函数
|
|
|
|
|
stampJudge(state, { sealArr, cb }) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const needStamp = state.businessSelect[state.businessKey].isStamp
|
|
|
|
|
const id = state.businessSelect[state.businessKey].sealBox[0] |
|
|
|
|
let judgeDelete = true // 盖完章是否变化 为false的会删掉。。。
|
|
|
|
|
let stampSuccess = '' // 盖章成功
|
|
|
|
|
|
|
|
|
|
// 以为要特定的章盖特定的物品,盖完后结果还不一样。有些东西盖了会消失,有些不会。
|
|
|
|
|
// 有些东西还要盖两个章。当时选择了最直接的if-else判断。其实用map结构也不是不行。
|
|
|
|
|
if(sealArr.length === 1) { |
|
|
|
|
const seal = sealArr[0] |
|
|
|
|
if(seal === '业务专用章') { |
|
|
|
@ -2867,6 +2880,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(stampSuccess) { |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
@ -2907,50 +2921,37 @@ export default { |
|
|
|
|
// message: '盖章成功'
|
|
|
|
|
// })
|
|
|
|
|
}, |
|
|
|
|
// 设置当前的业务
|
|
|
|
|
setBusinessKey: (state, val) => { |
|
|
|
|
// 这个是容错的 后面可以删掉
|
|
|
|
|
if(!state.businessSelect[val]) { |
|
|
|
|
state.businessKey = '业务一' |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
state.businessKey = val |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 刷新的时候会在sessionStorage中保存system中的信息,刷新完成后赋值回来
|
|
|
|
|
setBusinessSelect(state, val) { |
|
|
|
|
state.businessSelect = val |
|
|
|
|
}, |
|
|
|
|
// 将物品添加到物品栏中
|
|
|
|
|
addGoods: (state, goods) => { |
|
|
|
|
if(!(goods instanceof Array)) { |
|
|
|
|
goods = [ goods ] |
|
|
|
|
} |
|
|
|
|
const needArr = [...state.businessSelect[state.businessKey].needs] |
|
|
|
|
for(let i=0; i<goods.length; i++) { |
|
|
|
|
// for(let j=0; j<needArr.length; j++) {
|
|
|
|
|
// // if(goods[i] === needArr[j]) {
|
|
|
|
|
// // console.log(goods[i] + '- -' + needArr[j])
|
|
|
|
|
// // // 如果这个物品是这个业务需要添加的 就加进去 否则不添加
|
|
|
|
|
// // state.businessSelect[state.businessKey].data.push(needArr[j])
|
|
|
|
|
// // // 加进去了 下次就添加不了了
|
|
|
|
|
// // state.businessSelect[state.businessKey].needs.splice(j,1)
|
|
|
|
|
// // break;
|
|
|
|
|
// // }else {
|
|
|
|
|
// // console.log('???')
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
const index = state.businessSelect[state.businessKey].data.findIndex(item => item === goods[i]) |
|
|
|
|
const index = state.businessSelect[state.businessKey].data.findIndex(item => item == goods[i]) |
|
|
|
|
if(index !== -1) { |
|
|
|
|
state.businessSelect[state.businessKey].data.push(needArr[j]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 将物品栏中的某个物品删除掉
|
|
|
|
|
deleteGoods: (state, index) => { |
|
|
|
|
// 传个物品对象过来
|
|
|
|
|
state.businessSelect[state.businessKey].data.splice(index, 1) |
|
|
|
|
}, |
|
|
|
|
// 改变电脑屏幕的大小
|
|
|
|
|
changeFullscreen:(state,val) => { |
|
|
|
|
state.fullScreen = val |
|
|
|
|
}, |
|
|
|
|
// 更改弹窗
|
|
|
|
|
// 更改弹窗状态(显示、文字)
|
|
|
|
|
changePop:(state,val)=>{ |
|
|
|
|
state.showPop = val.show |
|
|
|
|
state.popText = val.text? val.text: '' |
|
|
|
@ -2961,6 +2962,7 @@ export default { |
|
|
|
|
state.showGoods = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 改变物品栏中的物品
|
|
|
|
|
changeGoods:(state,obj)=>{/* 赋值/push/删除 */ |
|
|
|
|
if(obj.goods&&obj.goods.length>0){ |
|
|
|
|
state.goods = obj.goods |
|
|
|
@ -2985,21 +2987,6 @@ export default { |
|
|
|
|
changeShowGoods(state, judge) { |
|
|
|
|
state.showGoods = judge |
|
|
|
|
}, |
|
|
|
|
addGoodsOpen(state, arr) { |
|
|
|
|
// 传来要做的事和数组
|
|
|
|
|
state.goodsOpen.push(...arr) |
|
|
|
|
}, |
|
|
|
|
removeGoodsOpen(state, obj) { |
|
|
|
|
// 传来要做的事和数组
|
|
|
|
|
state.goodsOpen.map((item, index) => { |
|
|
|
|
if(item.name === obj.name) { |
|
|
|
|
state.goodsOpen.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
setGoodsOpen(state, arr) { |
|
|
|
|
state.goodsOpen = arr |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
actions: { |
|
|
|
|
}, |
|
|
|
@ -3016,6 +3003,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
return arr |
|
|
|
|
}, |
|
|
|
|
// 获取页面中的下拉框的选项
|
|
|
|
|
getSelectList(state) { |
|
|
|
|
return state.selectList |
|
|
|
|
// currencySelectList: [],
|
|
|
|
@ -3029,6 +3017,7 @@ export default { |
|
|
|
|
popId(state) { |
|
|
|
|
return state.popId |
|
|
|
|
}, |
|
|
|
|
// 获得当前业务的id,用来发送请求/获取缓存
|
|
|
|
|
businessId(state) { |
|
|
|
|
return state.businessSelect[state.businessKey].id + ',' |
|
|
|
|
}, |
|
|
|
@ -3050,10 +3039,11 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 选择业务后合并信息
|
|
|
|
|
// 选择业务后合并信息,有些业务需要配置自己的信息
|
|
|
|
|
dataFlow(state) { |
|
|
|
|
return Object.assign(allDataFlow, state.businessSelect[state.businessKey].dataFlow) |
|
|
|
|
return Object.assign(state.allDataFlow, state.businessSelect[state.businessKey].dataFlow) |
|
|
|
|
}, |
|
|
|
|
//
|
|
|
|
|
goods2(state) { |
|
|
|
|
// 调试容错采用if-else
|
|
|
|
|
const arr = [] |
|
|
|
@ -3122,7 +3112,6 @@ export default { |
|
|
|
|
}else { |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
inMyWork(state) { |
|
|
|
|
return (moduleName) => { |
|
|
|
|