From f13213d0a2d44443790e648896303ed93dc1bacd Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 19 十一月 2025 11:17:50 +0800
Subject: [PATCH] 调试
---
components/WorkOrderPrint.vue | 81 +++++++++++++++++++++++++++++-----------
1 files changed, 59 insertions(+), 22 deletions(-)
diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index f1b4e2d..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: 32px;
+ font-size: 36px; /* 浠�32px鏀逛负36px */
+ font-weight: bold; /* 鍙�夛細鍔犵矖瀛椾綋 */
}
.submit-section {
@@ -811,19 +849,18 @@
/* 閫変汉鎸夐挳 - 钃濊壊涓婚 */
.select-user-btn {
- background: #007aff; /* 鏀逛负钃濊壊鑳屾櫙 */
- border: 2px solid #0056cc; /* 娣辫摑鑹茶竟妗� */
- box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3); /* 钃濊壊闃村奖 */
+ background: #00a2e9; /* 涓庢彁浜ゆ寜閽浉鍚岀殑钃濊壊 */
color: #fff; /* 鐧借壊鏂囧瓧 */
- padding: 6px 22px;
- background: #eee;
- border: 1px solid #aaa;
- border-radius: 8px;
- font-size: 32px;
+ 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