From 8e37b959738eaa0e2a92b1b51a4eaf0429aa0e2b Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 24 十月 2025 16:23:33 +0800
Subject: [PATCH] 工单自动带出刀具时也填充寿命比预警值

---
 pages/index.vue |   60 ++++++++++++++++++++++++++++--------------------------------
 1 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/pages/index.vue b/pages/index.vue
index 117cfa8..70ba9da 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -14,11 +14,11 @@
 			<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 === 4 }" @click="changeTab(4)">
-				鎵撶爜鎶ュ伐
 			</view>
 			<view class="tab-item" :class="{ active: currentTab === 5 }" @click="changeTab(5)">
 				e-SOP
@@ -127,8 +127,7 @@
 
 					<view>
 						<text style="color: red;">
-							璇存槑:鍒濆鐘舵�佹槸锛屾寜榻胯疆鏈烘煡鍑烘墍鏈夌殑鏈畬宸ョ殑宸ュ崟銆傜敤閫夋嫨妗嗘爣璇嗘満鍣ㄨ寮�宸ョ殑宸ュ崟.
-							鍙兘鍚屾椂寮�宸ヤ竴涓伐鍗曪紝澶氶�夐粯璁や负鏈�鍚庝竴涓�傞�夋嫨瀹屾垚锛岀偣鍑讳繚瀛橀�夋嫨銆傜郴缁熶繚鐣欓�変腑鐨勫伐鍗曘��
+							璇存槑:鍙兘鍚屾椂寮�宸ヤ竴涓伐鍗曘�傞�夋嫨瀹屾垚锛岀偣鍑讳繚瀛橀�夋嫨銆傜郴缁熶繚鐣欓�変腑鐨勫伐鍗曘��
 							濡傛灉瑕侀噸閫夛紝鐐瑰嚮娓呯┖閲嶉�夊姛鑳姐��
 						</text>
 					</view>
@@ -277,6 +276,9 @@
 			return {
                 orderStatus: '', // 榛樿鍏ㄩ儴
 				currentTab: 7,
+
+                productCode: '', // 浜у搧缂栫爜
+                productSpec: '', // 浜у搧瑙勬牸
 
 				machineList: [],
 
@@ -568,12 +570,8 @@
 				return `${year}-${month}-${day}`; // 杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆
 			},
 			selectionChange(e) {
-                // 鍙繚鐣欐渶鍚庝竴涓�変腑鐨勫伐鍗�
-                if (Array.isArray(e.detail.index)) {
-                    this.selectedIndexs = [e.detail.index[e.detail.index.length - 1]];
-                } else {
-                    this.selectedIndexs = [e.detail.index];
-                }
+                // 鍗曢�夌洿鎺ヨ祴鍊�
+                this.selectedIndexs = [e.detail.index];
 			},
 
 			selectedItems() {
@@ -637,29 +635,25 @@
 				});
 			},
 
-			isShowTab() {
+            isShowTab() {
+                if (this.isShowTableData.length > 0) {
+                    uni.showToast({
+                        title: '宸叉湁姝e湪鎿嶄綔鐨勫伐鍗曪紝涓嶈兘鍐嶆閫夋嫨',
+                        icon: 'error',
+                        duration: 2000
+                    });
+                    return;
+                }
 
-				if (this.isShowTableData.length > 0) {
-					uni.showToast({
-						title: '宸叉湁姝e湪鎿嶄綔鐨勫伐鍗曪紝涓嶈兘鍐嶆閫夋嫨',
-						//灏嗗�艰缃负 success 鎴栬�呯洿鎺ヤ笉鐢ㄥ啓icon杩欎釜鍙傛暟
-						icon: 'error',
-						//鏄剧ず鎸佺画鏃堕棿涓� 2绉�
-						duration: 2000
-					});
-
-					return;
-				}
-
-				this.isShow = true;
-
-				this.engineeringNo = null;
-				this.tableData = [];
+                this.isShow = true;
+                // 榛樿閫変腑鈥滃緟寮�宸モ��
+                this.engineeringNo = '寰呭紑宸�';
+                this.tableData = [];
                 // 涓嬫媺妗嗗彧鏄剧ず宸ュ崟鐘舵��
-                this.engineeringNoMapList = ['寰呭紑宸�', '鏈紑宸�', '瀹屽伐', '鏆傚仠'];
-                // 榛樿鏄剧ず鍏ㄩ儴宸ュ崟
-                this.getWomdaa();
-			},
+                this.engineeringNoMapList = ['寰呭紑宸�', '鏈紑宸�', '寮�宸�', '鏆傚仠', '瀹屽伐'];
+                // 榛樿鏄剧ず鈥滃緟寮�宸モ�濆伐鍗�
+                this.getWomdaaByStatus();
+            },
             // 涓嬫媺妗嗛�変腑鍚庯紝鎸夌姸鎬佺瓫閫夊伐鍗�
             onEngineeringNoChange(status) {
                 this.engineeringNo = status;
@@ -696,6 +690,8 @@
 			toDetail(item) {
 				this.orderId = item.id;
 				this.selectedOrder = item.daa001;
+                this.productCode = item.daa002; // 浜у搧缂栫爜
+                this.productSpec = item.daa004; // 浜у搧瑙勬牸
 				this.currentTab = 0;
 			}
 		},

--
Gitblit v1.9.3