首页数据提交

20240205
e 3 years ago
parent 3fd8af6382
commit 98e1655647
  1. 224
      src/pages/counter/list/index.vue

@ -18,56 +18,56 @@
<div slot="content">
<img src="@/assets/img/tooltip/cpl.png" alt="" />
</div>
<img class="sth summons cp" src="@/assets/img/summons.png" alt="" @click="showData('传票箱')" />
<img class="sth summons cp" src="@/assets/img/summons.png" alt="" @click="showData('传票箱',1)" />
</el-tooltip>
<el-tooltip placement="top-start" popper-class="sth-popper" offset="250">
<div slot="content">
<img src="@/assets/img/tooltip/ptpzx.png" alt="" />
</div>
<img class="sth voucher-box cp" src="@/assets/img/voucher-box.png" alt="" @click="showData('普通凭证箱')" />
<img class="sth voucher-box cp" src="@/assets/img/voucher-box.png" alt="" @click="showData('普通凭证箱',2)" />
</el-tooltip>
<el-tooltip placement="top-start" popper-class="sth-popper" offset="250">
<div slot="content">
<img src="@/assets/img/tooltip/zk.png" alt="" />
</div>
<img class="sth important cp" src="@/assets/img/important.png" alt="" @click="showData('重要空白凭证箱')" />
<img class="sth important cp" src="@/assets/img/important.png" alt="" @click="showData('重要空白凭证箱',3)" />
</el-tooltip>
<el-tooltip placement="left-start" popper-class="sth-popper">
<div slot="content">
<img src="@/assets/img/tooltip/qx.png" alt="" />
</div>
<img class="sth money-box cp" src="@/assets/img/money-box.png" alt="" @click="showData('钱箱')" />
<img class="sth money-box cp" src="@/assets/img/money-box.png" alt="" @click="showData('钱箱',4)" />
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="-100">
<div slot="content">
<img src="@/assets/img/tooltip/yzh.png" alt="" />
</div>
<img class="sth seal-box cp" src="@/assets/img/seal-box.png" @click="showData('印章盒')" alt="" />
<img class="sth seal-box cp" src="@/assets/img/seal-box.png" @click="showData('印章盒',5)" alt="" />
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="-100">
<div slot="content">
<img src="@/assets/img/tooltip/ycj.png" alt="" />
</div>
<img class="sth currency-detector cp" src="@/assets/img/currency-detector.png" @click="showData('验钞机')" alt="" />
<img class="sth currency-detector cp" src="@/assets/img/currency-detector.png" @click="showData('验钞机',6)" alt="" />
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="-400">
<div slot="content">
<img src="@/assets/img/tooltip/dyj.png" alt="" />
</div>
<img class="sth printer cp" src="@/assets/img/printer.png" alt="" @click="showData('打印机')" />
<img class="sth printer cp" src="@/assets/img/printer.png" alt="" @click="showData('打印机',7)" />
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="50">
<div slot="content">
<img src="@/assets/img/tooltip/mmq.png" alt="" />
</div>
<img class="sth cipher-machine cp" src="@/assets/img/cipher-machine.png" @click="showData('密码器')" alt="" />
<img class="sth cipher-machine cp" src="@/assets/img/cipher-machine.png" @click="showData('密码器',8)" alt="" />
</el-tooltip>
<img class="sth employee" src="@/assets/img/employee.png" alt="" />
@ -76,21 +76,21 @@
<div slot="content">
<img src="@/assets/img/tooltip/data.png" alt="" />
</div>
<p class="employeeText" @click="showData('资料')">资料</p>
<p class="employeeText" @click="showData('资料',9)">资料</p>
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="00">
<div slot="content">
<img src="@/assets/img/tooltip/skj.png" alt="" />
</div>
<img class="sth card-machine cp" src="@/assets/img/card-machine.png" alt="" @click="showData('刷卡器')" />
<img class="sth card-machine cp" src="@/assets/img/card-machine.png" alt="" @click="showData('刷卡器',10)" />
</el-tooltip>
<el-tooltip placement="top" popper-class="sth-popper" offset="-100">
<div slot="content">
<img src="@/assets/img/tooltip/sfz.png" alt="" />
</div>
<img class="sth idCard-scanner cp" src="@/assets/img/idCard-scanner.png" @click="showData('身份证扫描仪')" alt="" />
<img class="sth idCard-scanner cp" src="@/assets/img/idCard-scanner.png" @click="showData('身份证扫描仪',11)" alt="" />
</el-tooltip>
<!-- 物品栏 -->
@ -106,7 +106,7 @@
</div>
<!-- 硬件交互--弹框 -->
<div v-show="showPop" width="1280px" class="data-dia">
<div v-show="showPop" width="1120px" class="data-dia">
<div class="dia-header">
<div class="data-title">{{ popText }}</div>
<img class="close" src="@/assets/svg/close.svg" alt="" @click="closePop" />
@ -134,10 +134,10 @@
</div>
</div>
<div class="box right" ref="goods">
<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>
</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>-->
<!-- </div>-->
</div>
</div>
@ -317,6 +317,7 @@ export default {
clickNum:0,
showImg:false,
imgSrc:'',
nbm:0,
};
},
computed: {
@ -350,8 +351,6 @@ export default {
}
},
created() {
console.log(/^[0-9]*$/.test('1234'),'/^[0-9]*$/');
console.log(/^\/d{6}$/.test('124056'),'/^[0-9]*$/');
let arr = this.$route.path.split('/').slice(-2);
if (arr.pop() === 'manage' || arr[0] === 'manage') {
this.manageVisible = true;
@ -361,26 +360,27 @@ export default {
},
mounted(){
this.getQueryVariable()
// Promise.resolve(2).then(value => {
//     console.log(111, value)
//     return value
//     })
//     .then(value => {
//     console.log(222, value)
//     return Promise.resolve(value)
//     })
//     .then(value => {
//     console.log(333, value)
//     })
//     .then(value => {
//     console.log(444, value)
//     return Promise.reject(value)
//     })
//     .then(value => {
//     console.log(555, value)
//     }).catch(err => {
//         console.log(666, err)
//     })
// Promise.resolve(2).then(value=>{
// console.log(111,value)
// return value
// })
// .then(value=>{
// console.log(222,value)
// return Promise.resolve(value)
// })
// .then(value=>{
// console.log(333,value)
// })
// .then(value=>{
// console.log(444,value)
// return Promise.reject(value)
// })
// .then(value=>{
// console.log(555,value)
// }).catch(err=>{
// console.log(666,err)
// })
let that = this
// -
new Sortable(this.$refs.goods, {
@ -398,28 +398,27 @@ export default {
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.goods[evt.oldIndex].name,'执行拖拽2');
that.checkList.push(that.goods[evt.oldIndex].name)
let ifElse = 0;
for(var i=0;i<that.popArr.length;i++){
if (that.goods[evt.oldIndex].name == that.popArr[i].name){
if (that.receptionList.length){
for(var j=0;j< that.receptionList.length;j++){
if (that.receptionList[j].name == that.goods[evt.oldIndex].name){
ifElse = ifElse+1
}
}
if(ifElse > 0){
console.log(that.goodsShelfTotalData[evt.oldIndex].name,'执行拖拽2');
that.checkList.push(that.goodsShelfTotalData[evt.oldIndex].name)
let ifElse = 0;
for(var i=0;i<that.popArr.length;i++){
if (that.goodsShelfTotalData[evt.oldIndex].name == that.popArr[i].name){
if (that.receptionList.length){
for(var j=0;j< that.receptionList.length;j++){
if (that.receptionList[j].name == that.goodsShelfTotalData[evt.oldIndex].name){
ifElse = ifElse+1
}
}
if(ifElse > 0){
}else{
that.receptionList.push(that.popArr[i])
}
}else{
that.receptionList.push(that.popArr[i])
}
}else{
that.receptionList.push(that.popArr[i])
}
}else{
that.receptionList.push(that.popArr[i])
}
}
}
}
alert('拉入到物品栏')
}
}
},
@ -448,26 +447,27 @@ export default {
},
methods: {
getQueryVariable(variable) {
var query = window.location.href;
var vars = query.split("?");
// var query = window.location.href;
// var vars = query.split("?");
// if (vars.length <= 0){
for (var i=1;i<vars.length;i++) {
var pair = vars[i].split("&");
if(pair[0] == variable){return pair[1];}
}
for (var j=0;j<pair.length;j++){
var index=pair[j].lastIndexOf("=");
pair[j]=pair[j].substring(index+1,pair[j].length);
}
sessionStorage.setItem('token', pair[0])
sessionStorage.setItem('cid', pair[1])
sessionStorage.setItem('systemId', pair[2])
// for (var i=1;i<vars.length;i++) {
// var pair = vars[i].split("&");
// if(pair[0] == variable){return pair[1];}
// }
// for (var j=0;j<pair.length;j++){
// var index=pair[j].lastIndexOf("=");
// pair[j]=pair[j].substring(index+1,pair[j].length);
// }
// sessionStorage.setItem('token', pair[0])
// sessionStorage.setItem('cid', pair[1])
// sessionStorage.setItem('systemId', pair[2])
// }
},
toggleGoods() {
this.showGoods = !this.showGoods;
},
showData(type) {/* 展示弹窗-type为弹窗标题文字 */
showData(type,nbm) {/* 展示弹窗-type为弹窗标题文字 */
this.nbm = nbm
if(type == '重要空白凭证箱'){
this.goodsShelfTotalData = this.systemInputGoodsShelf
}else if(type == '身份证扫描仪' || type == '验钞机' || type == '资料'){
@ -498,6 +498,7 @@ export default {
}, 200)
},
dblClickFn(item,val){/* 选中/预览 单/双击函数 */
console.log(item)
let that = this
this.clickNum++
if (this.clickNum === 2) { //
@ -587,7 +588,14 @@ export default {
}
this.toggleGoods()
if(this.popText == '密码器'){
if(this.passwordForm.password && this.passwordForm.passwordAgain){
if (this.nbm == 8){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "18", "emptyTwo": this.passwordForm.passwordAgain, "operationIds": "0,282,"+this.receptionList[i].id,"type": "3"})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}
if(this.passwordForm.password && this.passwordForm.passwordAgain){
if(this.passwordForm.password.length >=6 && this.passwordForm.passwordAgain.length >=6){
if(this.passwordForm.password == this.passwordForm.passwordAgain) {
this.$store.commit('system/changePop', {show: false, text: ''})
@ -600,9 +608,69 @@ export default {
}else{
if (this.receptionList.length >0){
this.$message.success(`${this.popText}操作成功!`)
// setTimeout(()=>{
//
// },800)
if (this.nbm == 1){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,4,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 2){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,3,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 3){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,2,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 4){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,1,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 5){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,8,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 6){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,9,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 7){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,10,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 9){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,11,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 10){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,6,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else if (this.nbm == 11){
let formList = []
let ruleReqs = sessionStorage.getItem('ruleReqs')
if (ruleReqs){formList = JSON.parse(ruleReqs);}else{formList = []}
for (var i=0;i<this.receptionList.length;i++){formList.push({"emptyOne": "", "emptyTwo": "", "operationIds": "0,7,"+this.receptionList[i].id,"type": ""})}
sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
}else{
}
this.$store.commit('system/changePop',{show:false,text:''})
this.receptionList = [];
}else{
@ -1081,9 +1149,9 @@ export default {
left: 50%;
transform: translate(-50%, 0);
padding: 0 15px 15px;
z-index: 999;
z-index: 997;
border: 1px solid #e6e6e6;
max-height: 830px;
max-height: 600px;
overflow: auto;
.dia-header {
position: relative;

Loading…
Cancel
Save