20240205
luoJunYong.123 3 years ago
parent 792b663c0a
commit 2c8a574644
  1. 70
      src/pages/counter/list/index.vue
  2. 16
      src/store/modules/system.js

@ -136,12 +136,17 @@
<div v-else-if="popText==='印章盒'" class="seal" style="width:1200px;">
<div class="left">
<div v-for="(item, index) in sealArr" :key="index" :class="{ checked: sealChecked.includes(item.id),file:true }" @click="dblClickFn(item)">
<!-- dblClickFn(item) -->
<div v-for="(item, index) in sealArr" :key="index" :class="{ checked: sealChecked.includes(item.id),file:true }" @click="checkSeal(item.id)">
<img :src="item.src" alt="" />
<p>{{item.name}}</p>
</div>
</div>
<div class="box right" ref="goods">
<div class="box right" ref="popUpSeal">
<div class="img-wrap" :class="{ checked: commonChecked.includes(item.id),'img-wrap':true }" @click='dislodgeItem(index)' v-for="(item, index) in receptionList" :key="index" >
<img :src="item.src" class="fileSeal" alt="" />
<p class="text">{{item.name}}</p>
</div>
<!-- <div v-for="(item, index) in goods" :key="index" :class="{ checked: checkList.includes(item.id),file:true }" @click="dblClickFn(item)">-->
<!-- <img :src="item.src" alt="" />-->
<!-- <p>{{item.name}}</p>-->
@ -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()
// popUppopUpSeal
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.right&&evt.originalEvent.pageX>targetDom.left){
if(evt.originalEvent.pageY<targetDom.bottom&&evt.originalEvent.pageY>targetDom.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<that.popArr.length;i++){
if (that.goodsShelfTotalData[evt.oldIndex].name == that.popArr[i].name){
if (that.receptionList == null){
@ -1065,7 +1084,8 @@ export default {
return
}
}
that.goodsShelfTotalData.push(that.importanceArr[evt.oldIndex])
// that.goodsShelfTotalData.push(that.importanceArr[evt.oldIndex])
// that.addGoods(that.importanceArr[evt.oldIndex])
}
}
}
@ -1083,6 +1103,7 @@ export default {
// }
},
});
},
methods: {
...mapMutations({
@ -1130,8 +1151,10 @@ export default {
},
showData(type,nbm) {/* 展示弹窗-type为弹窗标题文字 */
this.nbm = nbm
// 西
// this.goodsShelfTotalData = [...this.goods2]
if(type == '普通凭证箱' || type == '系统'){
this.goodsShelfTotalData = this.systemInputGoodsShelf
// this.goodsShelfTotalData = this.systemInputGoodsShelf
let parentId = ''
if(type == '普通凭证箱'){
parentId = '285,287,3'
@ -1140,7 +1163,7 @@ export default {
parentId = '285,287,5'
}
}else if(type == '身份证扫描仪' || type == '验钞机' || type == '资料' || type == '重要空白凭证箱' || type == '身份证扫描器'){
this.goodsShelfTotalData = this.auditGoodsShelf
// this.goodsShelfTotalData = this.auditGoodsShelf
let parentId = ''
if(type == '重要空白凭证箱'){
parentId = '285,287,2'
@ -1158,7 +1181,7 @@ export default {
parentId: parentId
}
}else if(type == '打印机' || type == '客户签字' || type == '印章盒'){
this.goodsShelfTotalData = this.printoutGoodsShelf
// this.goodsShelfTotalData = this.printoutGoodsShelf
let parentId = ''
if(type == '打印机'){
parentId = '285,287,10'
@ -1170,7 +1193,7 @@ export default {
parentId = '285,287,8'
}
}else if(type == '钱箱'){
this.goodsShelfTotalData = this.cashboxGoodsShelf;
// this.goodsShelfTotalData = this.cashboxGoodsShelf;
let param= {
parentId: '285,287,1'
}
@ -1214,7 +1237,6 @@ export default {
}, 200)
},
dblClickFn(item,val){/* 选中/预览 单/双击函数 */
console.log(item)
let that = this
this.clickNum++
if (this.clickNum === 2) { //
@ -1250,6 +1272,8 @@ export default {
},
checkSeal(id) {/* 选中印章 */
this.sealChecked.includes(id) ? this.sealChecked.splice(this.sealChecked.indexOf(id), 1) : this.sealChecked.push(id);
console.log('---')
console.log(this.sealChecked)
},
checkImportant(id){/* 选中重空凭证 */
this.importantChecked.includes(id) ? this.importantChecked.splice(this.importantChecked.indexOf(id), 1) : this.importantChecked.push(id);
@ -1316,7 +1340,7 @@ export default {
}
}else{
console.log('-刷卡确认')
this.goodsShelfTotalData = this.auditGoodsShelf
// this.goodsShelfTotalData = this.auditGoodsShelf
if (this.$store.state.system.id == '33'){
this.nbm = 33
// this.goodsShelfTotalData = this.auditGoodsShelf
@ -1656,7 +1680,7 @@ export default {
}).catch((error)=>{
})
}else{
this.goodsShelfTotalData = this.auditGoodsShelf
// this.goodsShelfTotalData = this.auditGoodsShelf
}
}

@ -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) {

Loading…
Cancel
Save