From e713b378b01d189f972cfb5b9eae749ee95a8b51 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 29 十月 2022 13:48:00 +0800
Subject: [PATCH] 1.解决两个账号登录,是否被挤掉的问题
---
src/views/scgl/sckbg.vue | 99 +++++++++++++++++++++++++++++++++++++++----------
1 files changed, 79 insertions(+), 20 deletions(-)
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index f28de38..cafa374 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -31,6 +31,8 @@
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -138,7 +140,7 @@
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -150,7 +152,7 @@
fixed="right"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -220,6 +222,8 @@
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="WXtableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -326,7 +330,7 @@
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -338,7 +342,7 @@
fixed="right"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -386,6 +390,8 @@
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="badTableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -600,6 +606,7 @@
placeholder="璇烽�夋嫨"
:disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
multiple
+ collapse-tags
>
<el-option
v-for="item in badArr"
@@ -633,8 +640,10 @@
<i class="el-icon-s-operation" style="color:#42b983;" /> 浜哄憳鍒楄〃
<el-button type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
<el-table
+ ref="userTableDataRef"
:data="userTableData"
border
+ class="tableFixed"
:row-class-name="tableRowClassName"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -815,6 +824,7 @@
v-model="dialogForm.badcode"
style="width: 200px;"
multiple
+ collapse-tags
:disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
placeholder="璇烽�夋嫨"
>
@@ -847,10 +857,34 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-if="dialogTitle==='鑷埗寮�濮�'" type="primary" @click="dialogVisibleConfirm">寮� 宸�</el-button>
- <el-button v-if="dialogTitle==='鑷埗鎶ュ伐'" type="primary" @click="dialogVisibleConfirm">鎻愪氦/鎵撳嵃</el-button>
- <el-button v-if="dialogTitle==='澶栧崗鍙戞枡'" type="primary" @click="dialogVisibleConfirm">鍙戞枡</el-button>
- <el-button v-if="dialogTitle==='澶栧崗鏀舵枡'" type="primary" @click="dialogVisibleConfirm">鏀舵枡/鎵撳嵃</el-button>
+ <el-button
+ v-if="dialogTitle==='鑷埗寮�濮�'"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >寮� 宸�</el-button>
+ <el-button
+ v-if="dialogTitle==='鑷埗鎶ュ伐'"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鎻愪氦/鎵撳嵃</el-button>
+ <el-button
+ v-if="dialogTitle==='澶栧崗鍙戞枡'"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鍙戞枡</el-button>
+ <el-button
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鏀舵枡/鎵撳嵃</el-button>
</div>
</span>
</el-dialog>
@@ -877,7 +911,9 @@
>
<div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
</div>
- <div style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center">
+ <div
+ style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
<div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
{{ qrForm.startqty }}
</div>
@@ -1088,7 +1124,12 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="badDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" @click="badDialogVisibleConfirm ">淇� 瀛�/鎵� 鍗�</el-button>
+ <el-button
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="badDialogVisibleConfirm "
+ >淇� 瀛�/鎵� 鍗�</el-button>
</div>
</span>
</el-dialog>
@@ -1308,7 +1349,7 @@
OperationArr: [], // 浜哄憳鏁扮粍
sendButtonIsDisabled: false, // 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
judgeIsScanningArr: [], // 鍒ゆ柇鏄惁鎵爜鏁扮粍
- countJudgeIsScanningInput: 0// 鍒ゆ柇鎵爜妗嗙殑涓暟
+ countJudgeIsScanningInput: 0 // 鍒ゆ柇鎵爜妗嗙殑涓暟
}
},
watch: {
@@ -1776,6 +1817,8 @@
})
this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode))
+
+ this.$refs.tableDataRef.doLayout()
},
// 鐢ㄦ埛娣诲姞
userAdd() {
@@ -1895,6 +1938,7 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
if (this.dialogTitle === '澶栧崗鍙戞枡') {
if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
@@ -1911,9 +1955,10 @@
}
SavaMesOrderStepOut(data).then(res => {
if (res.code === '200') {
- this.$message.success('鍙戞枡鎴愬姛锛�')
this.dialogVisible = false
+ this.$message.success('鍙戞枡鎴愬姛锛�')
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鍙戞枡澶辫触!')
}
@@ -1946,14 +1991,14 @@
}
SavaMesOrderStepIn(data).then(res => {
if (res.code === '200') {
+ this.dialogVisible = false
this.$message.success('鏀舵枡鎴愬姛锛�')
-
if (this.dialogForm.nextstepcode === '') {
this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
this.dialogVisible2 = true
}
- this.dialogVisible = false
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鏀舵枡澶辫触!')
}
@@ -1972,9 +2017,10 @@
}
SavaMesOrderStepStart(data).then(res => {
if (res.code === '200') {
- this.$message.success('寮�宸ユ垚鍔燂紒')
this.dialogVisible = false
+ this.$message.success('寮�宸ユ垚鍔燂紒')
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('寮�宸ュけ璐�!')
}
@@ -2022,14 +2068,14 @@
SavaMesOrderStepReport(data).then(res => {
if (res.code === '200') {
+ this.dialogVisible = false
this.$message.success('鎶ュ伐鎴愬姛锛�')
-
if (this.dialogForm.nextstepcode === '') {
this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
this.dialogVisible2 = true
}
- this.dialogVisible = false
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鎶ュ伐澶辫触!')
}
@@ -2098,6 +2144,7 @@
if (window.innerHeight < 769) {
this.tableHeight = this.tableHeight - 50
}
+ this.$refs.tableDataRef.doLayout()
})
},
@@ -2114,13 +2161,16 @@
const data = {
Data: this.badTableDataDialog
}
+ this.$store.state.app.buttonIsDisabled = true
EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => {
if (res.code === '200' || res.code === '301') {
this.getBadList()
this.badDialogVisible = false
this.badPrint(this.OperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
this.dialogVisible2 = true
- return this.$message.success('淇濆瓨鎴愬姛锛�')
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+
+ this.$store.state.app.buttonIsDisabled = false
}
})
},
@@ -2133,7 +2183,7 @@
this.qrForm.nextstepname = this.badDialogForm.nextstepname
this.qrForm.operator = username
this.qrForm.operatorTime = handleDatetime2(new Date())
- console.log(this.qrForm, 22)
+
this.$nextTick(() => {
this.bindQRCode(this.qrForm.qrvalue)
})
@@ -2145,7 +2195,7 @@
this.badTableDataDialog = []
this.judgeIsScanningArr = []
},
- async getMesOrderSelectUserAll() {
+ async getMesOrderSelectUserAll() {
const { data: res } = await MesOrderSelectUser({ usercode: '' })
this.OperationArr = res
},
@@ -2428,6 +2478,15 @@
margin-bottom: 0;
}
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
+ height: 100% !important;
+ }
+
+ ::v-deep .el-table__fixed {
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3