From eeeaaf05af45fa0f676aaf09ab336bf2d210be80 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 15 十月 2025 10:41:10 +0800
Subject: [PATCH] Revert "界面修改"
---
components/WorkOrderPrint.vue | 45 +++++++++++++++++++++++++++------------------
1 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index 04daa51..84506b4 100644
--- a/components/WorkOrderPrint.vue
+++ b/components/WorkOrderPrint.vue
@@ -24,7 +24,7 @@
<tbody>
<tr>
<td>{{ nowTime }}</td>
- <td>{{ staffName || '-' }}</td>
+ <td>{{ staffNo || '-' }}</td>
<td>{{ orderNo || '-' }}</td>
<td>{{ order.daa003 || '-' }}</td>
<td>{{ planQtyDisplay }}</td>
@@ -69,6 +69,7 @@
</view>
</view>
+ <!-- 宸茬Щ闄�: 浜у搧缂栫爜 / 浜у搧鍚嶇О / 浜у搧瑙勬牸 杈撳叆鍖哄煙 -->
<!-- 涓嶈壇鏁伴噺 -->
<view class="print-section" style="margin-top:10px;">
<view class="barcode-info">
@@ -84,21 +85,21 @@
</view>
<!-- 鎶ュ伐浜洪�夋嫨 -->
+ <!-- 鏇挎崲鍘熸湁鎶ュ伐浜洪�夋嫨鍖哄煙 -->
<view class="current-user-section">
<text>褰撳墠鎶ュ伐浜猴細</text>
- <text class="current-user-name">{{ staffName || '鏈�夋嫨' }}</text>
+ <text class="current-user-name">{{ staffNo ? staffNo.split(':')[1] : '鏈�夋嫨' }}</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-scroll">
<view class="user-list-grid">
- <button v-for="(u, index) in users"
- :key="index"
+ <button v-for="(u, index) in users" :key="index"
class="user-list-btn"
- :class="{'selected': u === staffNo}"
@click="selectUser(u)">
{{ u.split(':')[1] }}
</button>
@@ -181,13 +182,7 @@
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; },
- // 鏂板锛氳В鏋愬鍚�
- staffName() {
- if (!this.staffNo) return '';
- const parts = this.staffNo.split(':');
- return parts.length > 1 ? parts[1] : this.staffNo;
- }
+ planQtyDisplay() { return this.order.planQty || this.order.planQuantity || this.order.daa007 || this.order.daa010 || 0; }
},
created() {
this.initializeData();
@@ -208,16 +203,19 @@
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",
@@ -225,6 +223,7 @@
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;
@@ -233,6 +232,7 @@
uni.setStorageSync('orderNo', this.orderNo);
this.fetchData(false);
},
+ // 鎷夊彇鏁版嵁
fetchData(flag) {
if (!this.orderId && !this.orderNo) return;
this.getOrderById();
@@ -245,11 +245,13 @@
});
}
},
+ // 鏃у脊绐楅�変汉
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;
@@ -265,11 +267,14 @@
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 => {
@@ -279,6 +284,7 @@
this.productionCount = this.order.todayOutput || 0;
});
},
+ // 鑾峰彇鎵�鏈夊憳宸�
getXS0101() {
this.$post({ url: "/MesStaff/GetAllXS0101" })
.then(res => {
@@ -286,6 +292,7 @@
this.users = this.staff.map(s => s.staffNo + ":" + s.staffName);
});
},
+ // 鑾峰彇宸ュ崟鎵撳嵃淇℃伅
getWomdaaPrintById() {
this.$post({ url: "/Womdaa/GetWomdaaPrintById", data: { orderId: this.orderId } })
.then(res => {
@@ -300,9 +307,11 @@
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();
@@ -348,6 +357,7 @@
}
} catch (e) { }
},
+ // 鍏抽棴寮圭獥骞堕噸缃�
deleteBarcode() {
this.isShow = false;
this.isGeneratingBarcode = false;
@@ -367,10 +377,11 @@
box-sizing: border-box;
}
+ /* 寮圭獥鍑虹幇鏃朵粎绂佺敤搴曞眰鏅�氬唴瀹癸紝涓嶇鐢ㄥ脊绐楁湰韬� */
.page.has-overlay .status-section > :not(.overlay) {
pointer-events: none;
}
-
+ /* 纭繚寮圭獥缁х画鍙氦浜� */
.page.has-overlay .status-section > .overlay {
pointer-events: auto;
}
@@ -558,6 +569,7 @@
border-radius: 8px;
}
+ /* 鍏抽敭: 寮圭獥灞傜骇 */
.overlay {
position: fixed;
top: 0;
@@ -582,7 +594,7 @@
max-height: 80vh;
overflow-y: auto;
border-radius: 8px;
- z-index: 1001;
+ z-index: 1001; /* 楂樹簬 overlay 鑳屾櫙灞� */
}
.clean-btn {
@@ -630,6 +642,7 @@
margin-left: 8px;
}
+ /* 閫変汉寮圭獥鏁翠綋甯冨眬锛屽唴瀹瑰尯婊氬姩锛屽簳閮ㄦ寜閽浐瀹� */
.user-select-popup {
width: 480px;
max-width: 96vw;
@@ -671,10 +684,6 @@
width: 100%;
box-sizing: border-box;
}
-
- .user-list-btn.selected {
- background: #ff9500;
- }
@media (max-width:1400px) {
input.highlight {
--
Gitblit v1.9.3