From f13213d0a2d44443790e648896303ed93dc1bacd Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 19 十一月 2025 11:17:50 +0800
Subject: [PATCH] 调试
---
components/WorkOrderPrint.vue | 90 +++++++++++++++++++++++++++++++++-----------
1 files changed, 67 insertions(+), 23 deletions(-)
diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index 469d002..eaaa0fd 100644
--- a/components/WorkOrderPrint.vue
+++ b/components/WorkOrderPrint.vue
@@ -238,9 +238,10 @@
printNum: 1, reportingList: [], printLoading: false, customAmount: '',
isGeneratingBarcode: false, lastGenerateTime: 0, generateRequestId: null,
nowTimeTimer: null, nowTime: '',
- userSearch: '',
+ userSearch: '',
+ refreshTimer: null, // 鏂板锛氳嚜鍔ㄥ埛鏂板畾鏃跺櫒
/* 鏂板锛氬巻鍙叉姤宸ヨ褰曟暟缁� */
- reportingHistory: []
+ reportingHistory: []
}
},
computed: {
@@ -278,10 +279,35 @@
this.getXS0101();
this.updateNowTime();
// 绉掔骇鍒锋柊锛涘涓嶉渶鍔ㄦ�佽烦绉掑彲鏀逛负 60000
- this.nowTimeTimer = setInterval(this.updateNowTime, 1000);
+ this.nowTimeTimer = setInterval(this.updateNowTime, 1000);
+
+ // 鏂板锛氭瘡鍒嗛挓鑷姩鍒锋柊鏁版嵁锛�60000姣 = 1鍒嗛挓锛�
+ this.startAutoRefresh();
},
- beforeDestroy() { if (this.nowTimeTimer) clearInterval(this.nowTimeTimer); },
- methods: {
+ beforeDestroy() {
+ if (this.nowTimeTimer) clearInterval(this.nowTimeTimer);
+ // 鏂板锛氭竻鐞嗚嚜鍔ㄥ埛鏂板畾鏃跺櫒
+ this.stopAutoRefresh();
+ },
+ methods: {
+ // 鏂板锛氬紑濮嬭嚜鍔ㄥ埛鏂�
+ startAutoRefresh() {
+ // 鍏堟竻闄ゅ彲鑳藉瓨鍦ㄧ殑鏃у畾鏃跺櫒
+ this.stopAutoRefresh();
+ // 璁剧疆鏂扮殑瀹氭椂鍣紝姣忓垎閽熸墽琛屼竴娆�
+ this.refreshTimer = setInterval(() => {
+ console.log('鑷姩鍒锋柊鏁版嵁...');
+ this.refresh();
+ }, 60000); // 60000姣 = 1鍒嗛挓
+ },
+ // 鏂板锛氬仠姝㈣嚜鍔ㄥ埛鏂�
+ stopAutoRefresh() {
+ if (this.refreshTimer) {
+ clearInterval(this.refreshTimer);
+ this.refreshTimer = null;
+ }
+ },
+
formatUser(u) {
if (!u) return '';
const segs = u.split(':');
@@ -303,13 +329,24 @@
this.isGeneratingBarcode = false; this.generateRequestId = null; this.lastGenerateTime = 0;
this.$showMessage("宸查噸缃潯鐮佺敓鎴愮姸鎬�");
},
- refresh() {
- this.$sendPostRequest({
- url: "http://192.168.0.94:9095/Numerical/RefreshDevBycl",
- data: { machineNo: this.order.machineNo },
- contentType: "application/json"
- }).then(r => { r.code == 200 ? this.fetchData(true) : this.$showMessage("鍚屾澶辫触"); });
- },
+ // 淇敼锛氬湪鎵嬪姩鍒锋柊鏃朵篃閲嶇疆鑷姩鍒锋柊璁℃椂鍣�
+ refresh() {
+ this.$sendPostRequest({
+ url: "http://192.168.0.94:9095/Numerical/RefreshDevBycl",
+ data: { machineNo: this.order.machineNo },
+ contentType: "application/json"
+ }).then(r => {
+ if (r.code == 200) {
+ this.fetchData(true);
+ this.$showMessage("鏁版嵁鍒锋柊鎴愬姛");
+ } else {
+ this.$showMessage("鍚屾澶辫触");
+ }
+ }).catch(error => {
+ console.error('鍒锋柊澶辫触:', error);
+ this.$showMessage("鍒锋柊澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�");
+ });
+ },
onDaa003Change(v) {
let o = this.lineList[this.DAA003List.indexOf(v)];
this.orderId = o.id; this.orderNo = o.daa001;
@@ -751,7 +788,8 @@
display: flex;
align-items: center;
gap: 14px;
- font-size: 26px;
+ font-size: 36px; /* 浠�32px鏀逛负36px */
+ font-weight: bold; /* 鍙�夛細鍔犵矖瀛椾綋 */
}
.submit-section {
@@ -767,20 +805,22 @@
box-sizing: border-box;
}
+ /* 涓嶈壇鏁伴噺杈撳叆妗� */
.bad-input {
width: 320px;
max-width: 100%;
height: 66px;
border: 3px solid #808080;
- font-size: 34px;
+ font-size: 42px;
text-align: center;
}
+ /* 纭鎻愪氦鎸夐挳*/
.details-btn {
padding: 12px 34px;
background: #00a2e9;
color: #fff;
- font-size: 20px;
+ font-size: 32px;
border: none;
cursor: pointer;
border-radius: 12px;
@@ -793,7 +833,7 @@
.current-user-section {
display: flex;
align-items: center;
- font-size: 26px;
+ font-size: 32px;
border: 1.5px solid #f00;
border-radius: 10px;
padding: 14px 22px;
@@ -804,19 +844,23 @@
.current-user-name {
font-weight: bold;
- font-size: 26px;
+ font-size: 32px;
}
+ /* 閫変汉鎸夐挳 - 钃濊壊涓婚 */
.select-user-btn {
- padding: 6px 22px;
- background: #eee;
- border: 1px solid #aaa;
- border-radius: 8px;
- font-size: 24px;
+ background: #00a2e9; /* 涓庢彁浜ゆ寜閽浉鍚岀殑钃濊壊 */
+ color: #fff; /* 鐧借壊鏂囧瓧 */
+ border: none; /* 绉婚櫎杈规 */
+ padding: 12px 22px; /* 璋冩暣鍐呰竟璺濅笌鎻愪氦鎸夐挳鍗忚皟 */
+ border-radius: 12px; /* 涓庢彁浜ゆ寜閽浉鍚岀殑鍦嗚 */
+ font-size: 32px; /* 淇濇寔瀛椾綋澶у皬 */
+ cursor: pointer;
+ transition: background 0.15s; /* 娣诲姞杩囨浮鏁堟灉 */
}
.select-user-btn:hover {
- background: #ddd;
+ background: #008ac2;
}
.overlay {
--
Gitblit v1.9.3