Browse Source

手工拣选看板

master
han\hanst 2 months ago
parent
commit
dd710e21cd
  1. 22
      src/views/modules/dashboard/picking-board-1028.vue
  2. 22
      src/views/modules/dashboard/picking-board-1043.vue

22
src/views/modules/dashboard/picking-board-1028.vue

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 数据表格 --> <!-- 数据表格 -->
<div class="panel-table"> <div class="panel-table">
<table class="data-table"> <table class="data-table">
@ -107,12 +107,12 @@ export default {
// 1028 // 1028
station1028List: [], station1028List: [],
// //
workOrderNo: '', workOrderNo: '',
materialName: '', materialName: '',
workOrderTime: '', workOrderTime: '',
// //
scrollInterval: null, scrollInterval: null,
scrollSpeed: 50 // scrollSpeed: 50 //
@ -132,7 +132,7 @@ export default {
if (this.useWebSocket) { if (this.useWebSocket) {
this.initWebSocket() this.initWebSocket()
} }
// //
this.$nextTick(() => { this.$nextTick(() => {
this.startAutoScroll() this.startAutoScroll()
@ -244,7 +244,7 @@ export default {
// 1028 // 1028
if (message.data.station1028List) { if (message.data.station1028List) {
this.station1028List = message.data.station1028List this.station1028List = message.data.station1028List
// //
if (this.station1028List.length > 0) { if (this.station1028List.length > 0) {
this.materialName = this.station1028List[0].pickingMaterialName || '' this.materialName = this.station1028List[0].pickingMaterialName || ''
@ -252,7 +252,7 @@ export default {
this.workOrderNo = this.station1028List[0].workOrderNo || '' this.workOrderNo = this.station1028List[0].workOrderNo || ''
this.workOrderTime = this.station1028List[0].workOrderTime || '' this.workOrderTime = this.station1028List[0].workOrderTime || ''
} }
console.log('[1028站看板] 数据更新成功:', this.station1028List.length, '条') console.log('[1028站看板] 数据更新成功:', this.station1028List.length, '条')
} }
} }
@ -275,19 +275,19 @@ export default {
console.log('[1028站看板] WebSocket已断开') console.log('[1028站看板] WebSocket已断开')
} }
}, },
/** /**
* 启动自动滚动 * 启动自动滚动
*/ */
startAutoScroll() { startAutoScroll() {
const tableBody = this.$el.querySelector('.panel-table') const tableBody = this.$el.querySelector('.panel-table')
if (!tableBody) return if (!tableBody) return
// 10 // 10
if (this.station1028List.length <= 10) {
if (this.station1028List.length < 10) {
return return
} }
this.scrollInterval = setInterval(() => { this.scrollInterval = setInterval(() => {
if (tableBody.scrollTop + tableBody.clientHeight >= tableBody.scrollHeight) { if (tableBody.scrollTop + tableBody.clientHeight >= tableBody.scrollHeight) {
// //
@ -465,7 +465,7 @@ export default {
.panel-title-bar { .panel-title-bar {
background: linear-gradient(135deg, rgba(23, 179, 163, 0.3) 0%, rgba(23, 179, 163, 0.15) 100%); background: linear-gradient(135deg, rgba(23, 179, 163, 0.3) 0%, rgba(23, 179, 163, 0.15) 100%);
border-bottom: 1px solid rgba(23, 179, 163, 0.3); border-bottom: 1px solid rgba(23, 179, 163, 0.3);
padding: 12px 16px;
padding: 2px 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

22
src/views/modules/dashboard/picking-board-1043.vue

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 数据表格 --> <!-- 数据表格 -->
<div class="panel-table"> <div class="panel-table">
<table class="data-table"> <table class="data-table">
@ -107,12 +107,12 @@ export default {
// 1043 // 1043
station1043List: [], station1043List: [],
// //
workOrderNo: '', workOrderNo: '',
materialName: '', materialName: '',
workOrderTime: '', workOrderTime: '',
// //
scrollInterval: null, scrollInterval: null,
scrollSpeed: 50 // scrollSpeed: 50 //
@ -132,7 +132,7 @@ export default {
if (this.useWebSocket) { if (this.useWebSocket) {
this.initWebSocket() this.initWebSocket()
} }
// //
this.$nextTick(() => { this.$nextTick(() => {
this.startAutoScroll() this.startAutoScroll()
@ -244,7 +244,7 @@ export default {
// 1043 // 1043
if (message.data.station1043List) { if (message.data.station1043List) {
this.station1043List = message.data.station1043List this.station1043List = message.data.station1043List
// //
if (this.station1043List.length > 0) { if (this.station1043List.length > 0) {
this.materialName = this.station1043List[0].pickingMaterialName || '' this.materialName = this.station1043List[0].pickingMaterialName || ''
@ -252,7 +252,7 @@ export default {
this.workOrderNo = this.station1043List[0].workOrderNo || '' this.workOrderNo = this.station1043List[0].workOrderNo || ''
this.workOrderTime = this.station1043List[0].workOrderTime || '' this.workOrderTime = this.station1043List[0].workOrderTime || ''
} }
console.log('[1043站看板] 数据更新成功:', this.station1043List.length, '条') console.log('[1043站看板] 数据更新成功:', this.station1043List.length, '条')
} }
} }
@ -275,19 +275,19 @@ export default {
console.log('[1043站看板] WebSocket已断开') console.log('[1043站看板] WebSocket已断开')
} }
}, },
/** /**
* 启动自动滚动 * 启动自动滚动
*/ */
startAutoScroll() { startAutoScroll() {
const tableBody = this.$el.querySelector('.panel-table') const tableBody = this.$el.querySelector('.panel-table')
if (!tableBody) return if (!tableBody) return
// 10 // 10
if (this.station1043List.length <= 10) {
if (this.station1043List.length < 10) {
return return
} }
this.scrollInterval = setInterval(() => { this.scrollInterval = setInterval(() => {
if (tableBody.scrollTop + tableBody.clientHeight >= tableBody.scrollHeight) { if (tableBody.scrollTop + tableBody.clientHeight >= tableBody.scrollHeight) {
// //
@ -465,7 +465,7 @@ export default {
.panel-title-bar { .panel-title-bar {
background: linear-gradient(135deg, rgba(23, 179, 163, 0.3) 0%, rgba(23, 179, 163, 0.15) 100%); background: linear-gradient(135deg, rgba(23, 179, 163, 0.3) 0%, rgba(23, 179, 163, 0.15) 100%);
border-bottom: 1px solid rgba(23, 179, 163, 0.3); border-bottom: 1px solid rgba(23, 179, 163, 0.3);
padding: 12px 16px;
padding: 2px 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

Loading…
Cancel
Save