From cd718c2363f8a0426d5bf7365c0df146f86b055f Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 19 十一月 2025 10:59:59 +0800
Subject: [PATCH] 定时刷新

---
 pages/index.vue |  145 ++++++++++++++++++++++++++++-------------------
 1 files changed, 86 insertions(+), 59 deletions(-)

diff --git a/pages/index.vue b/pages/index.vue
index fa89811..77ea94a 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -8,18 +8,18 @@
 			<view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)">
 				涓荤晫闈�
 			</view>
+			<view class="tab-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)">
+				涓婂垁涓嬪垁
+			</view>
 			<view class="tab-item" :class="{ active: currentTab === 3 }" @click="changeTab(3)">
 				璋冩満閫佹
-			</view>
-			<view class="tab-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)">
-				鍒�鍏风鐞�
 			</view>
 			<view class="tab-item" :class="{ active: currentTab === 4 }" @click="changeTab(4)">
 				鐢熶骇鎶ュ伐
 			</view>
-			<!-- <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)">
-				寮�宸ュ畬宸�
-			</view> -->
+			<view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)">
+		        寮�宸ュ畬宸�
+	        </view> 
 			<view class="tab-item" :class="{ active: currentTab === 5 }" @click="changeTab(5)">
 				e-SOP
 			</view>
@@ -30,8 +30,8 @@
 				璁惧鐐规
 			</view>
 			<!-- <view class="tab-item" :class="{ active: currentTab === 8 }" @click="changeTab(8)">
-				鎵撳嵃鏈鸿缃�
-			</view> -->
+		鎵撳嵃鏈鸿缃�
+	</view> -->
 
 		</view>
 		<view class="font"></view>
@@ -41,9 +41,9 @@
 					<view class="top-right">
 						<button class="refresh-btn" @click="refresh">鍒锋柊</button>
 					</view>
-					<!--<view>
+					<view>
 						<h4>涓�鍙版満鍙板彧鑳介�夋嫨涓�鏉″伐鍗曪紙澶氶�夐粯璁や负鏈�鍚庝竴鏉★級</h4>
-					</view>-->
+					</view>
 					<view class="section top-section">
 						<view class="form-row">
 							<view>
@@ -177,11 +177,12 @@
 		<view v-if="isShow" class="overlay">
 			<view class="popup">
 				<view class="form-row">
-					<view>
-						<label style="float: left;margin-top: 18px;">閫夋嫨宸ュ崟鐘舵��:</label>
+					<view style="display: flex; align-items: center;">
+						<label style="float: left;margin-top: 18px;">鐐瑰嚮鎸夐挳绛涢�夊伐鍗曠姸鎬�:</label>
 						<superwei-combox :candidates="engineeringNoMapList" placeholder="璇烽�夋嫨" v-model="engineeringNo"
 										 @select="onEngineeringNoChange" class="picker"
 										 style="padding: 7px 46px;width: 650px;"></superwei-combox>
+						<span style="margin-left: 20px; color: #ff6600; font-size: 18px;">澶氶�夋椂鍙繚鐣欐渶鍚庝竴鏉″伐鍗�</span>
 					</view>
 				</view>
 
@@ -551,28 +552,38 @@
 				}
 				return str;
 			},
-			cancel() {
 
-				if (!this.machineNo) {
-					return;
-				}
+            cancel() {
+                if (!this.machineNo) {
+                    return;
+                }
 
-				let editDate = this.formatDate(new Date());
+                // 鐩存帴鐢� flag 鍒ゆ柇
+                if (this.hasBindedCutterFlag) {
+                    uni.showToast({
+                        title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
+                        icon: 'error',
+                        duration: 2000
+                    });
+                    return;
+                }
 
-				this.selectedIndexs = [];
+                let editDate = this.formatDate(new Date());
+                this.selectedIndexs = [];
 
-				this.$post({
-					url: "/MesOrderSelect/Remove",
-					data: {
-						machineNo: this.machineNo,
-						editDate: editDate
-					},
-				}).then(res => {
-					if (res.data.tbBillList > 0) {
-						this.isShowTableData = [];
-					}
-				});
-			},
+                this.$post({
+                    url: "/MesOrderSelect/Remove",
+                    data: {
+                        machineNo: this.machineNo,
+                        editDate: editDate
+                    },
+                }).then(res => {
+                    if (res.data.tbBillList > 0) {
+                        this.isShowTableData = [];
+                    }
+                });
+            },
+
 			formatDate(date) {
 				let year = date.getFullYear(); // 鑾峰彇骞翠唤
 				let month = String(date.getMonth() + 1).padStart(2, '0'); // 鑾峰彇鏈堜唤骞惰ˉ闆�
@@ -628,22 +639,33 @@
 				})
 			},
             //鑾峰彇琛ㄦ牸鐨勬暟鎹簮
-			getWomdaaIsShow() {
-				this.$post({
-					url: "/Womdaa/GetWomdaasByShow",
-					data: {
-						machineNo: this.machineNo,
-					}
-				}).then(res => {
-					this.isShowTableData = res.data.tbBillList;
+            getWomdaaIsShow() {
+                this.$post({
+                    url: "/Womdaa/GetWomdaasByShow",
+                    data: {
+                        machineNo: this.machineNo,
+                    }
+                }).then(res => {
+                    this.isShowTableData = res.data.tbBillList;
 
-					if (this.isShowTableData.length == 1) {
-						uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
-						uni.setStorageSync('id', this.isShowTableData[0].id);
-						//this.toDetail(this.isShowTableData[0]);
-					}
-				});
-			},
+                    // 鍙垽鏂涓�鏉★紙鍙厑璁镐竴鏉″伐鍗曪級
+                    const order = this.isShowTableData[0];
+                    let hasBindedCutter = false;
+                    if (order) {
+                        hasBindedCutter =
+                            (order.outToolId && order.outToolId.toString().trim() !== '') ||
+                            (order.outToolCode && order.outToolCode.trim() !== '') ||
+                            (order.outToolName && order.outToolName.trim() !== '');
+                    }
+                    // 瀛樺偍鍒� data 鍙橀噺
+                    this.hasBindedCutterFlag = hasBindedCutter;
+
+                    if (this.isShowTableData.length == 1) {
+                        uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
+                        uni.setStorageSync('id', this.isShowTableData[0].id);
+                    }
+                });
+            },
 
             isShowTab() {
                 if (this.isShowTableData.length > 0) {
@@ -887,16 +909,21 @@
 		/* Increased font size for content */
 	}
 
-	.picker {
-		float: left;
-		margin-top: 7px;
-		margin-left: 10px;
-		text-align: center;
-		font-size: 100%;
-		padding: 5.5px 1px;
-		background-color: #f8f8f8;
-		border: 2px solid #ccc;
-	}
+    .picker {
+        float: left;
+        margin-top: 7px;
+        margin-left: 10px;
+        text-align: center;
+        font-size: 32px !important; // 寮哄埗澶у瓧浣擄紝閫傞厤浣庡瘑搴�
+        min-height: 60px; // 璁╅�夋嫨妗嗛珮搴︿篃鍙樺ぇ
+        line-height: 60px;
+        padding: 5.5px 1px;
+        background-color: #fff; // 杩欓噷鏀逛负钃濊壊
+        border: 2px solid #007aff; // 杈规涔熸敼涓鸿摑鑹�
+        color: #007aff; // 瀛椾綋棰滆壊鏀逛负鐧借壊锛屼繚璇佸彲璇绘��
+        border-radius: 6px;
+        transition: background 0.2s;
+    }
 
 	.th {
 		background-color: lightskyblue;
@@ -1009,10 +1036,10 @@
 	}
 
     .select-btn {
-        width: 120px;
-        height: 48px;
-        font-size: 1.6vw;
-        border-radius: 8px;
+        width: 180px; // 鏇村
+        height: 80px; // 鏇撮珮
+        font-size: 1.8vw; // 瀛椾綋涔熺暐澶�
+        border-radius: 10px;
         background-color: #f5f5f5;
         color: #007aff;
         border: 2px solid #007aff;

--
Gitblit v1.9.3