+
+
+
{{item.name}}
+
@@ -399,6 +404,7 @@ export default {
checkList: [],// 物品栏选中
elseBoxCheck:[],/* 所有其他可从物品栏拖拽物品进入的弹框 */
//身份证扫描仪//审核资料//验钞机//选择重要空白凭证
+ // 拿业务的东西替换掉
auditGoodsShelf:[
{name:'身份证', src:require('@/assets/img/goods/idcard.png'), id:13},
{name:'开户申请书', src:require('@/assets/img/goods/khsqs.png'), id:14},
@@ -428,13 +434,13 @@ export default {
{name:'现金', src:require('@/assets/img/goods/cash-sm.png'), id:15},
{name:'身份证复印件', src:require('@/assets/img/idCard-copy-sm.png'), id:23},
],
- // 总盒子里面的东西
- goodsShelfTotalData:[
- {name:'身份证', src:require('@/assets/img/goods/idcard.png'), id:13},
- {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},
- ],
+ // 总盒子里面的东西 写在computed了 业务物品
+ // goodsShelfTotalData:[
+ // {name:'身份证', src:require('@/assets/img/goods/idcard.png'), id:13},
+ // {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},
+ // ],
// goods:[/* 物品栏物品 */
// ],
popArr:[/* 弹窗展示的物品 */
@@ -477,7 +483,7 @@ export default {
{name:'现金支票',src:require('@/assets/img/goods/xjzp.png'),id:'现金支票'},
],
commonArr:[/* 普通凭证箱 */
- {name:'存款凭条',src:require('@/assets/img/seal/paid.png'),id:17},
+ {name:'存款凭条',src:require('@/assets/img/goods/ckpt.png'),id:17},
{name:'取款凭条',src:require('@/assets/img/goods/qkpt.png'),id:'取款凭条'},
{name:'转账凭条',src:require('@/assets/img/goods/zzpt.png'),id:'转账凭条'},
{name:'业务收费凭证',src:require('@/assets/img/goods/ywsfpz.png'),id:'业务收费凭证'},
@@ -537,6 +543,12 @@ export default {
};
},
computed: {
+ // auditGoodsShelf() {
+ // return this.$store.state.system.goods2
+ // },
+ // goodsShelfTotalData() {
+ // return this.$store.getters.goods2
+ // },
businessKey() {
return this.$store.state.system.businessKey
},
@@ -919,7 +931,7 @@ export default {
return this.$store.state.system.goodsOpen
},
...mapGetters({
- goods2: 'system/goods2',
+ goodsShelfTotalData: 'system/goods2',
})
},
watch: {
@@ -986,7 +998,7 @@ export default {
//在页面加载时读取localStorage里的状态信息
if(sessionStorage.getItem('systemKey')) {
- this.$store.commit('system/containBusinessKey', sessionStorage.getItem('systemKey'))
+ this.$store.commit('system/setBusinessKey', sessionStorage.getItem('systemKey'))
console.log('---')
console.log(this.$store.state.system.businessKey)
}
@@ -1008,14 +1020,21 @@ export default {
},
sort: false,// 禁止排序
onEnd: function (/**Event*/evt) { // 结束拖拽
- // 判断拖拽的地址
- if(!that.$refs.popUp) return that.$message.warning('非可拖拽的交互!')
- let targetDom = that.$refs.popUp.getBoundingClientRect()
+ // 判断拖拽的地址 popUp和popUpSeal都是可以被拖拽上去的
+ if(!that.$refs.popUp && !that.$refs.popUpSeal) return that.$message.warning('非可拖拽的交互!')
+ let targetDom
+ if(that.$refs.popUp) {
+ targetDom = that.$refs.popUp.getBoundingClientRect()
+ }else if(that.$refs.popUpSeal) {
+ targetDom = that.$refs.popUpSeal.getBoundingClientRect()
+ }
if(evt.originalEvent.pageX
targetDom.left){
if(evt.originalEvent.pageYtargetDom.top){
/* oldindex识别是拖拽了哪个文件 */
// console.log(that.goodsShelfTotalData[evt.oldIndex].name,'执行拖拽2');
that.checkList.push(that.goodsShelfTotalData[evt.oldIndex].name)
+ console.log('checkList')
+ console.log(that.checkList)
for(var i=0;i{
})
}else{
- this.goodsShelfTotalData = this.auditGoodsShelf
+ // this.goodsShelfTotalData = this.auditGoodsShelf
}
}
diff --git a/src/store/modules/system.js b/src/store/modules/system.js
index d455419..20fe0fd 100644
--- a/src/store/modules/system.js
+++ b/src/store/modules/system.js
@@ -31,10 +31,14 @@ export default {
businessKey: '',
businessSelect: {
+ '': {
+ data: [],
+ needs: []
+ },
'项目一': {
data: [15, 13, 23, 14],
needs: [16, 17]
- }
+ },
},
goods:[// 物品栏的物品
{
@@ -76,10 +80,12 @@ export default {
],
},
mutations: {
- containBusinessKey(state, containKey) {
- state.businessKey = containKey
- },
setBusinessKey: (state, val) => {
+ // 这个是容错的 后面可以删掉
+ if(!state.businessSelect[val]) {
+ state.businessKey = '项目一'
+ return
+ }
state.businessKey = val
},
addGoods: (state, goods) => {
@@ -164,6 +170,8 @@ export default {
getters: {
// 选择项目物品栏中的物品 根据myKey判断有什么
goods2(state) {
+ console.log('???')
+ console.log(state.businessKey)
// 调试容错采用if-else
const arr = []
for(const item of state.businessSelect[state.businessKey].data) {