From 7fdb8c4db95ffee41211671a9315993e94e2b573 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 13 三月 2025 17:14:16 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject

---
 UI-Project/src/views/Returns/upreturns.vue |   59 ++++++++++++++++++-----------------------------------------
 1 files changed, 18 insertions(+), 41 deletions(-)

diff --git a/UI-Project/src/views/Returns/upreturns.vue b/UI-Project/src/views/Returns/upreturns.vue
index 87b14cc..5e9904d 100644
--- a/UI-Project/src/views/Returns/upreturns.vue
+++ b/UI-Project/src/views/Returns/upreturns.vue
@@ -31,6 +31,7 @@
 const buttonEnabledStatus = ref({});
 const globalDate = inject('globalDate');
 import { inject } from 'vue';
+import { tr } from "element-plus/es/locale";
 const tableData = ref([])
 const titleSelectJson = ref({
   engineerId: [],
@@ -83,42 +84,25 @@
   if (data.LoadOneState != null) {
     cuttingMachineStatusColor.value = data.LoadOneState[0] == 1 ? 'green' : '#911005';
   }
-  if (data.list!=null) {
-  tableDataa.value = data.list[0].slice(0, 2);
-  }else {
-    tableDataa.value = ''
-  }
   if (data.stationOne != null) {
-    // data.stationOne[0].forEach(station => {
-    //   stationInfos[station.slot] = {
-    //     hasValidDimension: station.patternHeight !== null && station.patternHeight !== '' ||
-    //                        station.patternThickness !== null && station.patternThickness !== ''
-    //   };
-    //   console.log(station);
-    //   console.log(stationInfos[station.slot]);
-      
-    // });
     data.stationOne[0].forEach((station) => {
-  stationInfos[station.patternHeight] = {
-    hasPatternHeight: station.patternHeight !== null && station.patternHeight !== '',
-  };
-  // buttonEnabledStatus.value[workstationId] = hasValidDimension;
-      console.log(station);
-      console.log(stationInfos[station.patternHeight]);
-});
+      if(station.patternThickness !== undefined){
+        station.haspatternThickness=false;
+      }else{
+        station.haspatternThickness=true;
+      }
+      // stationInfos[station.patternThickness] = {
+      //   haspatternThickness: station.patternThickness !== undefined,
+      // };
+    });
+    
+    console.log(data.stationOne);
+    if (data.list != null) {
+      tableDataa.value = data.list[0].slice(0, 2);
+    } else {
+      tableDataa.value = [];
+    }
   }
-  // if (data.stationOne != null) {
-  //   // 鍒濆鍖栨寜閽姸鎬佸璞�
-  //   buttonEnabledStatus.value = {};
-  //   data.stationOne[0].forEach((station, index) => {
-  //     const workstationId = station.workstationId;
-  //     const hasValidDimension = station.patternHeight !== null && station.patternHeight !== '' ||
-  //                               station.patternThickness !== null && station.patternThickness !== '';
-  //     buttonEnabledStatus.value[workstationId] = hasValidDimension;
-  //     console.log(station.workstationId);
-      
-  //   });
-  // }
   if(data.loadTask1!=null){
   tableData.value = data.loadTask1[0]
   window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId)
@@ -132,13 +116,6 @@
   canSelectProjectc.value = false;
   tableData.value = '';
 }
-};
-// 妫�鏌ユ寜閽槸鍚﹀彲鐢�
-// const isButtonEnabled = (slot: string) => {
-//   return buttonEnabledStatus.value[slot] || false;
-// };
-const isButtonEnabled = (patternHeight: string) => {
-  return stationInfos[patternHeight]?.hasValidDimension ?? false;
 };
 onBeforeUnmount(() => {
   closeWebSocket();
@@ -529,7 +506,7 @@
             <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80"/>
             <el-table-column fixed="right" :label="$t('film.operate')" align="center">
             <template #default="scope">
-          <el-button size="mini" :disabled="!isButtonEnabled(scope.row.patternHeight)" type="text" plain @click="handleptask(scope.row.workstationId)">{{ $t('basicData.rackreset') }}</el-button>
+          <el-button size="mini" :disabled="(!stationInfos[scope.row.patternThickness])" type="text" plain @click="handleptask(scope.row.workstationId)">{{ $t('basicData.rackreset') }}{{ scope.row.haspatternThickness}}</el-button>
             </template>
         </el-table-column>
           </el-table>

--
Gitblit v1.8.0