From a3298d4e03b929a1fb9e00f3211baa577338b9c8 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 15 十月 2025 10:38:23 +0800
Subject: [PATCH] 界面修改

---
 components/WorkOrderPrint.vue |   89 ++++++++++++++++++++++++++++----------------
 1 files changed, 57 insertions(+), 32 deletions(-)

diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index cf68374..04daa51 100644
--- a/components/WorkOrderPrint.vue
+++ b/components/WorkOrderPrint.vue
@@ -1,5 +1,6 @@
 <template>
-	<view class="page">
+	<!-- 鏍瑰厓绱犲鍔犲姩鎬佺被锛屽脊绐楀嚭鐜版椂闄勫姞 has-overlay锛岀敤浜庢帶鍒跺簳灞備氦浜掍笌灞傜骇 -->
+	<view class="page" :class="{'has-overlay': (isShowUserSelect || isShow || barcodeIsShow)}">
 		<view class="status-section">
 			<!-- 鎶ュ伐璁板綍琛� -->
 			<view class="report-table-wrapper">
@@ -23,7 +24,7 @@
 					<tbody>
 						<tr>
 							<td>{{ nowTime }}</td>
-							<td>{{ staffNo || '-' }}</td>
+							<td>{{ staffName || '-' }}</td>
 							<td>{{ orderNo || '-' }}</td>
 							<td>{{ order.daa003 || '-' }}</td>
 							<td>{{ planQtyDisplay }}</td>
@@ -68,7 +69,6 @@
 				</view>
 			</view>
 
-			<!-- 宸茬Щ闄�: 浜у搧缂栫爜 / 浜у搧鍚嶇О / 浜у搧瑙勬牸 杈撳叆鍖哄煙 -->
 			<!-- 涓嶈壇鏁伴噺 -->
 			<view class="print-section" style="margin-top:10px;">
 				<view class="barcode-info">
@@ -84,25 +84,27 @@
 			</view>
 
 			<!-- 鎶ュ伐浜洪�夋嫨 -->
-			<!-- 鏇挎崲鍘熸湁鎶ュ伐浜洪�夋嫨鍖哄煙 -->
 			<view class="current-user-section">
 				<text>褰撳墠鎶ュ伐浜猴細</text>
-				<text class="current-user-name">{{ staffNo ? staffNo.split(':')[1] : '鏈�夋嫨' }}</text>
+				<text class="current-user-name">{{ staffName || '鏈�夋嫨' }}</text>
 				<button class="select-user-btn" @click="isShowUserSelect = true">閫変汉</button>
 			</view>
 
 			<!-- 閫変汉寮圭獥 -->
 			<view v-if="isShowUserSelect" class="overlay">
 				<view class="popup user-select-popup">
-					<!-- 涓�琛屼笁鍒楃殑閫変汉鎸夐挳 -->
-					<view class="user-list-grid">
-						<button v-for="(u, index) in users" :key="index"
-								class="user-list-btn"
-								@click="selectUser(u)">
-							{{ u.split(':')[1] }}
-						</button>
+					<view class="user-list-scroll">
+						<view class="user-list-grid">
+							<button v-for="(u, index) in users"
+									:key="index"
+									class="user-list-btn"
+									:class="{'selected': u === staffNo}"
+									@click="selectUser(u)">
+								{{ u.split(':')[1] }}
+							</button>
+						</view>
 					</view>
-					<view style="text-align:center;margin-top:18px;">
+					<view class="user-popup-footer">
 						<button class="clean-btn" style="width: 60%;" @click="isShowUserSelect = false">鍏抽棴</button>
 					</view>
 				</view>
@@ -179,7 +181,13 @@
 			calculatedCurrentCount() { return (this.productionCount || 0) - (this.initialValue || 0); },
 			calculatedTotalProduction() { return (this.kgQty || 0) + this.calculatedCurrentCount; },
 			calculatedDefectiveCount() { return this.calculatedTotalProduction - (this.sQuantity || 0); },
-			planQtyDisplay() { return this.order.planQty || this.order.planQuantity || this.order.daa007 || this.order.daa010 || 0; }
+			planQtyDisplay() { return this.order.planQty || this.order.planQuantity || this.order.daa007 || this.order.daa010 || 0; },
+			// 鏂板锛氳В鏋愬鍚�
+			staffName() {
+				if (!this.staffNo) return '';
+				const parts = this.staffNo.split(':');
+				return parts.length > 1 ? parts[1] : this.staffNo;
+			}
 		},
 		created() {
 			this.initializeData();
@@ -200,19 +208,16 @@
 				const d = new Date(), p = n => n.toString().padStart(2, '0');
 				this.nowTime = `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
 			},
-			// 鍒濆鍖栨暟鎹�
 			initializeData() {
 				this.productionCount = this.printedCount = this.defectiveCount = 0;
 				this.icount = 1; this.bqty = 0; this.sQuantity = 0; this.kgQty = 0;
 				this.initialValue = 0; this.qqty = 0;
 				this.isGeneratingBarcode = false; this.lastGenerateTime = 0; this.generateRequestId = null;
 			},
-			// 閲嶇疆鏉$爜鐢熸垚鐘舵��
 			resetGenerateState() {
 				this.isGeneratingBarcode = false; this.generateRequestId = null; this.lastGenerateTime = 0;
 				this.$showMessage("宸查噸缃潯鐮佺敓鎴愮姸鎬�");
 			},
-			// 鍒锋柊鏁版嵁
 			refresh() {
 				this.$sendPostRequest({
 					url: "http://192.168.0.94:9095/Numerical/RefreshDev",
@@ -220,7 +225,6 @@
 					contentType: "application/json"
 				}).then(r => { r.code == 200 ? this.fetchData(true) : this.$showMessage("鍚屾澶辫触"); });
 			},
-			// 宸ュ崟鍒囨崲
 			onDaa003Change(v) {
 				let o = this.lineList[this.DAA003List.indexOf(v)];
 				this.orderId = o.id; this.orderNo = o.daa001;
@@ -229,7 +233,6 @@
 				uni.setStorageSync('orderNo', this.orderNo);
 				this.fetchData(false);
 			},
-			// 鎷夊彇鏁版嵁
 			fetchData(flag) {
 				if (!this.orderId && !this.orderNo) return;
 				this.getOrderById();
@@ -242,13 +245,11 @@
 						});
 				}
 			},
-			// 鏃у脊绐楅�変汉
 			toggleUser(u) {
 				if (!u) return;
 				this.user = this.user === u ? null : u;
 				this.staffNo = this.user;
 			},
-			// 鎻愪氦涓嶈壇鏁伴噺
 			confirmCustomAmount() {
 				if (!this.customAmount || isNaN(Number(this.customAmount))) {
 					this.$showMessage('璇疯緭鍏ユ湁鏁堢殑鏁伴噺'); return;
@@ -264,14 +265,11 @@
 					this.customAmount = '';
 				}).catch(() => this.$showMessage('鎶ュ簾鏁伴噺濉啓澶辫触锛岃閲嶈瘯'));
 			},
-			// 淇濆瓨
 			save() {
 				if (!this.staffNo) { this.$showMessage('璇烽�夋嫨鎶ュ伐浜�'); return; }
 				uni.showToast({ title: '淇濆瓨鎴愬姛', icon: 'success' });
 			},
-			// 鍙栨秷
 			cancel() { uni.showToast({ title: '鍙栨秷鎿嶄綔', icon: 'none' }); },
-			// 鑾峰彇宸ュ崟淇℃伅
 			getOrderById() {
 				this.$post({ url: "/Womdaa/GetWomdaaById", data: { orderId: this.orderId, orderNo: this.orderNo } })
 					.then(res => {
@@ -281,7 +279,6 @@
 						this.productionCount = this.order.todayOutput || 0;
 					});
 			},
-			// 鑾峰彇鎵�鏈夊憳宸�
 			getXS0101() {
 				this.$post({ url: "/MesStaff/GetAllXS0101" })
 					.then(res => {
@@ -289,7 +286,6 @@
 						this.users = this.staff.map(s => s.staffNo + ":" + s.staffName);
 					});
 			},
-			// 鑾峰彇宸ュ崟鎵撳嵃淇℃伅
 			getWomdaaPrintById() {
 				this.$post({ url: "/Womdaa/GetWomdaaPrintById", data: { orderId: this.orderId } })
 					.then(res => {
@@ -304,11 +300,9 @@
 						if (this.bqty === 0) this.Completed();
 					}).catch(() => { });
 			},
-			// 宸ュ崟瀹屾垚
 			Completed() {
 				this.$post({ url: "/MesOrderSta/Completed", data: { orderId: this.orderId, orderNo: this.orderNo } });
 			},
-			// 钃濈墮鍒濆鍖�
 			init() {
 				try {
 					const v = this.getAndroidVersion();
@@ -354,7 +348,6 @@
 					}
 				} catch (e) { }
 			},
-			// 鍏抽棴寮圭獥骞堕噸缃�
 			deleteBarcode() {
 				this.isShow = false;
 				this.isGeneratingBarcode = false;
@@ -373,6 +366,14 @@
 		flex-direction: column;
 		box-sizing: border-box;
 	}
+
+		.page.has-overlay .status-section > :not(.overlay) {
+			pointer-events: none;
+		}
+
+		.page.has-overlay .status-section > .overlay {
+			pointer-events: auto;
+		}
 
 	.report-table-wrapper {
 		margin-bottom: 8px;
@@ -543,6 +544,8 @@
 		display: flex;
 		justify-content: space-between;
 		margin-top: 12px;
+		position: relative;
+		z-index: 10;
 	}
 
 	.save-btn, .cancel-btn {
@@ -565,6 +568,7 @@
 		display: flex;
 		justify-content: center;
 		align-items: center;
+		z-index: 1000;
 	}
 
 	.popup {
@@ -578,6 +582,7 @@
 		max-height: 80vh;
 		overflow-y: auto;
 		border-radius: 8px;
+		z-index: 1001;
 	}
 
 	.clean-btn {
@@ -628,15 +633,31 @@
 	.user-select-popup {
 		width: 480px;
 		max-width: 96vw;
-		padding: 32px 24px 24px 24px;
+		max-height: 80vh;
+		padding: 0;
+		display: flex;
+		flex-direction: column;
+		justify-content: flex-start;
 	}
 
-	/* 涓�琛屼笁鍒楃殑閫変汉鎸夐挳 */
+	.user-list-scroll {
+		flex: 1 1 auto;
+		overflow-y: auto;
+		padding: 32px 24px 0 24px;
+	}
+
 	.user-list-grid {
 		display: grid;
 		grid-template-columns: repeat(3, 1fr);
 		gap: 18px 18px;
-		margin-bottom: 8px;
+		margin-bottom: 0;
+	}
+
+	.user-popup-footer {
+		flex-shrink: 0;
+		padding: 18px 24px 24px 24px;
+		background: #fff;
+		text-align: center;
 	}
 
 	.user-list-btn {
@@ -651,6 +672,10 @@
 		box-sizing: border-box;
 	}
 
+		.user-list-btn.selected {
+			background: #ff9500;
+		}
+
 	@media (max-width:1400px) {
 		input.highlight {
 			font-size: 14px;

--
Gitblit v1.9.3