|
|
|
@ -111,7 +111,7 @@ |
|
|
|
|
<div class="dia-header"> |
|
|
|
|
<div class="data-title">{{ popText }}</div> |
|
|
|
|
<img class="close" v-lazy="lazyImg[28]" alt="" @click="closePop" /> |
|
|
|
|
</div> |
|
|
|
|
</div>ko |
|
|
|
|
<p v-if="popText=='密码器'" class="tips"></p> |
|
|
|
|
<p v-else-if="popText=='重要空白凭证箱'||popText=='普通凭证箱'" class="tips">- 请从以下物品中选取所需材料 -</p> |
|
|
|
|
<p v-else class="tips">- 请从物品栏选中或拖拽所需材料 -</p> |
|
|
|
@ -141,9 +141,9 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div v-else-if="popText==='重要空白凭证箱'" class="seal" style="width:1200px;"> |
|
|
|
|
<div v-else-if="popText==='重要空白凭证箱'" class="seal" style="width:1200px;" ref="popUpImportanceArr"> |
|
|
|
|
<div class="left else"> |
|
|
|
|
<div v-for="(item, index) in importanceArr" :key="index" :class="{ checked: importantChecked.includes(item.id),file:true }" @click="dblClickFn(item)"> |
|
|
|
|
<div v-for="(item, index) in importanceArr" :key="index" :class="{ checked: importantChecked.includes(item.id),file:true, importanceArrClass: true }" @click="dblClickFn(item)"> |
|
|
|
|
<img :src="item.src" alt="" /> |
|
|
|
|
<p>{{item.name}}</p> |
|
|
|
|
</div> |
|
|
|
@ -759,6 +759,77 @@ export default { |
|
|
|
|
if(newVal === false) { |
|
|
|
|
this.changeShowGoods(false) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
showPop(newVal) { |
|
|
|
|
if(newVal) { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
const importanceArrClassArr = document.getElementsByClassName('importanceArrClass') |
|
|
|
|
new Sortable(this.$refs.popUpImportanceArr, { |
|
|
|
|
animation: 150, |
|
|
|
|
group: { |
|
|
|
|
name:'shared', |
|
|
|
|
pull:'clone',// 是否可以被移出或克隆 |
|
|
|
|
put:true |
|
|
|
|
}, |
|
|
|
|
sort: false,// 禁止排序 |
|
|
|
|
// 结束拖拽 |
|
|
|
|
onAdd: evt => { |
|
|
|
|
if(!importanceArrClassArr.length) return that.$message.warning('非可拖拽的交互!') |
|
|
|
|
console.log('what the fuck') |
|
|
|
|
console.log(this.goodsShelfTotalData) |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// popUpImportanceArr |
|
|
|
|
for(let i=0;i<this.importanceArr.length;i++) { |
|
|
|
|
new Sortable(importanceArrClassArr[i], { |
|
|
|
|
animation: 150, |
|
|
|
|
group: { |
|
|
|
|
name:'shared', |
|
|
|
|
pull:'clone',// 是否可以被移出或克隆 |
|
|
|
|
put:false// 禁止拖入 |
|
|
|
|
}, |
|
|
|
|
sort: false,// 禁止排序 |
|
|
|
|
onEnd: evt => { // 结束拖拽 |
|
|
|
|
console.log('???') |
|
|
|
|
// 判断拖拽的地址 |
|
|
|
|
if(!this.$refs.popUpImportanceArr) return this.$message.warning('非可拖拽的交互!') |
|
|
|
|
let targetDom = this.$refs.popUpImportanceArr.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(this.goodsShelfTotalData[evt.oldIndex].name,'执行拖拽2'); |
|
|
|
|
this.checkList.push(this.goodsShelfTotalData[evt.oldIndex].name) |
|
|
|
|
let ifElse = 0; |
|
|
|
|
for(var i=0;i<this.popArr.length;i++){ |
|
|
|
|
if (this.goodsShelfTotalData[evt.oldIndex].name == this.popArr[i].name){ |
|
|
|
|
if (this.receptionList == null){ |
|
|
|
|
this.receptionList = [] |
|
|
|
|
} |
|
|
|
|
if (this.receptionList.length){ |
|
|
|
|
for(var j=0;j< this.receptionList.length;j++){ |
|
|
|
|
if (this.receptionList[j].name == this.goodsShelfTotalData[evt.oldIndex].name){ |
|
|
|
|
ifElse = ifElse+1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(ifElse > 0){ |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.receptionList.push(this.popArr[i]) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.receptionList.push(this.popArr[i]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -768,6 +839,7 @@ export default { |
|
|
|
|
} else { |
|
|
|
|
this.manageVisible = false; |
|
|
|
|
} |
|
|
|
|
console.log('what?') |
|
|
|
|
}, |
|
|
|
|
mounted(){ |
|
|
|
|
let that = this |
|
|
|
@ -815,6 +887,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
// (item, index) in importanceArr" :ref="'importanceArr'+index |
|
|
|
|
// 拖拽-弹框 |
|
|
|
|
new Sortable(this.$refs.popUp, { |
|
|
|
|
animation: 150, |
|
|
|
|