From 085bd85263b3bed9fb97fbabd0af54fdfd5aec11 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期二, 18 十一月 2025 17:33:56 +0800
Subject: [PATCH] Revert "调试"

---
 pages/index.vue |  122 +++++++++++++++++++---------------------
 1 files changed, 57 insertions(+), 65 deletions(-)

diff --git a/pages/index.vue b/pages/index.vue
index 1e54aa2..11b7a01 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -553,42 +553,49 @@
 				return str;
 			},
 
-            // 鍒�鍏风粦瀹氬垽鏂挬瀛� (浼樺寲鐗�)
-            hasBindedCutter() {
-                const o = this.isShowTableData[0];
-                if (!o) return false;
-                return ['outToolId', 'outToolCode', 'outToolName'].some(k => {
-                    const v = o[k];
-                    return v !== undefined && v !== null && v.toString().trim() !== '';
-                });
-            },
+                // 鍒�鍏风粦瀹氬垽鏂挬瀛�
+                hasBindedCutter() {
+                    const currentOrder = this.isShowTableData[0];
+                    return (
+                        currentOrder &&
+                        (
+                            (currentOrder.outToolId && currentOrder.outToolId.toString().trim() !== '') ||
+                            (currentOrder.outToolCode && currentOrder.outToolCode.trim() !== '') ||
+                            (currentOrder.outToolName && currentOrder.outToolName.trim() !== '')
+                        )
+                    );
+				},
 
-            cancel() {
-                if (!this.machineNo) return;
-
-                if (this.hasBindedCutter()) {
-                    uni.showToast({
-                        title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
-                        icon: 'error',
-                        duration: 2000
-                    });
-                    return;
-                }
-
-                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 = [];
+                cancel() {
+                    if (!this.machineNo) {
+                        return;
                     }
-                });
-            },
+
+                    // 浣跨敤閽╁瓙鍒ゆ柇
+                    if (this.hasBindedCutter()) {
+                        uni.showToast({
+                            title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
+                            icon: 'error',
+                            duration: 2000
+                        });
+                        return;
+                    }
+
+                    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 = [];
+                        }
+                    });
+                },
 
 			formatDate(date) {
 				let year = date.getFullYear(); // 鑾峰彇骞翠唤
@@ -645,37 +652,22 @@
 				})
 			},
             //鑾峰彇琛ㄦ牸鐨勬暟鎹簮
-            getWomdaaIsShow() {
-                this.$post({
-                    url: "/Womdaa/GetWomdaasByShow",
-                    data: {
-                        machineNo: this.machineNo,
-                    }
-                }).then(res => {
-                    let list = res.data.tbBillList || [];
-                    // 褰掍竴鍖栧垁鍏峰瓧娈�
-                    this.isShowTableData = list.map(row => {
-                        return {
-                            ...row,
-                            outToolId: row.outToolId ?? row.out_tool_id ?? row.outToolID ?? row.toolId ?? row.ToolId,
-                            outToolCode: row.outToolCode ?? row.out_tool_code ?? row.toolCode ?? row.ToolCode,
-                            outToolName: row.outToolName ?? row.out_tool_name ?? row.toolName ?? row.ToolName,
-                        };
-                    });
-                    if (this.isShowTableData.length > 0) {
-                        console.log("宸ュ崟棣栨潯瀹屾暣鏁版嵁:", JSON.stringify(this.isShowTableData[0]));
-                        console.log("鍒�鍏峰瓧娈�:",
-                            this.isShowTableData[0].outToolId,
-                            this.isShowTableData[0].outToolCode,
-                            this.isShowTableData[0].outToolName
-                        );
-                    }
-                    if (this.isShowTableData.length === 1) {
-                        uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
-                        uni.setStorageSync('id', this.isShowTableData[0].id);
-                    }
-                });
-            },
+			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]);
+					}
+				});
+			},
 
             isShowTab() {
                 if (this.isShowTableData.length > 0) {

--
Gitblit v1.9.3