From 2935442d9bdb795fecaa704d3bce2f6249b208d4 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 25 十二月 2024 16:12:48 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

---
 UI-Project/config.js                                                                                                                   |   10 
 UI-Project/src/lang/zh.js                                                                                                              |    7 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml                                                |    2 
 UI-Project/src/router/index.js                                                                                                         |    5 
 UI-Project/src/utils/constants.js                                                                                                      |    5 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java              |   10 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-dev.yml                                            |    1 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java                       |    1 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java |    6 
 UI-Project/src/views/PurchaseReturn/purchaseReturn.vue                                                                                 |  686 +++++++++++++++++++++++++++++++++++++-----
 UI-Project/src/views/PurchaseReturn/purchaseprint.vue                                                                                  |  178 +++++++++++
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java                              |   17 
 12 files changed, 829 insertions(+), 99 deletions(-)

diff --git a/UI-Project/config.js b/UI-Project/config.js
index e752fc6..1c0bc92 100644
--- a/UI-Project/config.js
+++ b/UI-Project/config.js
@@ -1,10 +1,12 @@
 export default {
-    // serverUrl: "10.153.19.150:88/api",
+    serverUrl: "10.153.19.150:88/api",
+    // serverUrl: "10.153.19.44:88/api",
 //  serverUrl: "192.168.1.199:88/api",
-    serverUrl: "127.0.0.1:88/api",
-    // serverUrl2: "10.153.19.150:88"
+    // serverUrl: "127.0.0.1:88/api",
+    serverUrl2: "10.153.19.150:88"
+    // serverUrl2: "10.153.19.44:88"
     // serverUrl2: "192.168.1.199:88"
-    serverUrl2: "127.0.0.1:88"
+    // serverUrl2: "127.0.0.1:88"
 
     //serverUrl:"res.abeim.cn"
 }
\ No newline at end of file
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 965fdaf..e155fb5 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -106,6 +106,7 @@
           dilapidation:'鐮存崯',
           takeaway:'浜哄伐鎷胯蛋',
           takeon:'鎽嗙墖瀹屾垚',
+          takeall:'鍏ㄩ儴鎷胯蛋',
       },
       searchOrder:{
           deleteTask:'鍒犻櫎宸ョ▼',
@@ -268,9 +269,9 @@
           finedging:'宸茬(杈�',
       },
       processCard:{
-          intofurnace:'杩涚倝涓�',
-          beforefurnace:'杩涚倝鍓�',
-          outfurnace:'宸插嚭鐐夌幓鐠�',
+          intofurnace:'閽㈠寲鐐�',
+          beforefurnace:'鎽嗙墖鍙�',
+          outfurnace:'鍑虹墖鍙�',
           print:'鎷胯蛋鎵撳嵃',
           printing:'鎵撳嵃',
           projectnumber:'璇疯緭鍏ュ伐绋嬪彿',
diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index 73a2754..ec0a24e 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -185,6 +185,11 @@
     name: 'purchaseStorage',
     component: () => import('../views/PurchaseReturn/purchaseStorage.vue')
   },
+  {
+    path: '/PurchaseReturn/purchaseprint',
+    name: 'purchaseprint',
+    component: () => import('../views/PurchaseReturn/purchaseprint.vue')
+  },
 ]
 },
           /*----------- 涓嬬墖鍙� ----------------*/
diff --git a/UI-Project/src/utils/constants.js b/UI-Project/src/utils/constants.js
index 69000bc..557e105 100644
--- a/UI-Project/src/utils/constants.js
+++ b/UI-Project/src/utils/constants.js
@@ -1,4 +1,5 @@
 //  export const WebSocketHost = "192.168.1.199";
-// export const WebSocketHost = "10.153.19.150";
-export const WebSocketHost = "127.0.0.1";
+export const WebSocketHost = "10.153.19.150";
+// export const WebSocketHost = "10.153.19.44";
+// export const WebSocketHost = "127.0.0.1";
 export const host = "88";
\ No newline at end of file
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index c70f264..41e5537 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -6,7 +6,6 @@
 import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
 import {useI18n} from 'vue-i18n'
 import {useRouter} from 'vue-router'
-
 const {t} = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const dialogFormVisible = ref(false)
@@ -15,28 +14,36 @@
 const dialogFormVisiblec = ref(false)
 const blind1 = ref(false)
 const blind2 = ref(false)
+const blind3 = ref(false)
+const blind4 = ref(false)
 const blinda = ref(false)
 const blindb = ref(false)
-const dialogVisible = ref(false)
 const width = ref();
 const height = ref();
 const currentRect = ref(null);
 const canSelectProject1 = ref(true);
 const canSelectProject2 = ref(true);
+const canSelectProject3 = ref(true);
+const canSelectProject4 = ref(true);
 const canSelectProjecta = ref(true);
 const cantakea = ref(true);
 const cantakeb = ref(true);
 const canona = ref(true);
+const cantakeall = ref(true);
 const canonb = ref(true);
 const canSelectProjectb = ref(true);
 const adjustedRects1 = ref([]);
 const adjustedRects2 = ref([]);
+const adjustedRects3 = ref([]);
+const adjustedRects4 = ref([]);
 const adjustedRectsa = ref([]);
 const adjustedRectsb = ref([]);
 const tableData = ref([])
 const engineerId = ref('')
 const router = useRouter()
 const currentGlassId = ref(null);
+const currentengineerId = ref(null);
+const currenttemperingLayoutId = ref(null);
 const currenttemperingFeedSequence = ref(null);
 onMounted(async () => {  
   try {  
@@ -68,32 +75,6 @@
     ElMessage.error(response.message);
   }
 };
-const printing = async () => {
-  let postData = {  
-    type: 9,  
-    workingProcedure: '閽㈠寲',  
-    ...(engineerId.value !== '' && { engineerId: engineerId.value }),  
-  };  
-  console.log(engineerId.value);
-  
-  const response = await request.post("/loadGlass/damage/selectDamagePrintDetails", postData)
-  if (response.code === 200) {
-  dialogVisible.value = true;
-    tableData.value = response.data; 
-    await nextTick(); 
-    // 寤舵椂 2 绉掑悗鎵撳嵃锛堟椂闂村彲浠ユ牴鎹渶瑕佽皟鏁达級  
-    setTimeout(() => {  
-      window.print();  
-    }, 2000);
-} else {
-    ElMessage.error(response.message);
-  }
-};
-const printTable = () => {  
-  // 杩欓噷鍙互娣诲姞涓�浜汣SS鏍峰紡鏉ヤ紭鍖栨墦鍗版晥鏋�  
-  // 渚嬪锛屽彲浠ユ坊鍔犱竴涓殣钘忕殑鎵撳嵃鏍峰紡琛�  
-  window.print();  
-};  
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
 const handleMessage = (data) => {  
   // 杩涚倝涓彸
@@ -104,8 +85,8 @@
     const existingRects = adjustedRects2.value.filter(rect => newGlassIds.has(rect.glassId));  
     // 璁$畻鏂扮殑鐭╁舰  
     const newRects = data.intoGlass2[0].map(rect => {  
-      const scaleFactor =  794.67/5087; 
-      const scaleFactorY =  430/2800; 
+      const scaleFactor =  845/5000;
+      const scaleFactorY =  430/2750;
         let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
         let newX = rect.yCoordinate; 
       if (rect.width < rect.height) {
@@ -120,13 +101,13 @@
     adjustedHeight = heighta * scaleFactorY;
     // adjustedWidtha = widtha;  
     // adjustedHeighta = heighta;   
-    newX = 5087 - (rect.yCoordinate + widtha); 
+    newX = 5000 - (rect.yCoordinate + widtha); 
     } else {  
     adjustedWidth = heighta * scaleFactor;  
     adjustedHeight = widtha * scaleFactorY;  
     // adjustedWidtha = widtha;  
     // adjustedHeighta = heighta;  
-    newX = 5087 - (rect.yCoordinate + heighta); 
+    newX = 5000 - (rect.yCoordinate + heighta); 
   } 
         return {  
         ...rect, 
@@ -150,15 +131,16 @@
   else if (data.intoGlass2 == null) {
     adjustedRects2.value = []
   }
-  // 杩涚倝涓乏
-  if (data.intoGlass && data.intoGlass.length > 0) {
-    console.log(data.intoGlass);
-    
-    const newGlassIds = new Set(data.intoGlass[0].map(rect => rect.glassId));
+  // 杩涚倝涓�1
+  if (data.intoGlass1 && data.intoGlass1.length > 0) {
+    console.log(data.intoGlass1);
+    const newGlassIds = new Set(data.intoGlass1[0].map(rect => rect.glassId));
     const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
-    const newRects = data.intoGlass[0].map(rect => {
-      const scaleFactor =  810.89/5087;
-      const scaleFactorY =  430/2800;
+    const newRects = data.intoGlass1[0].map(rect => {
+      const scaleFactor =  845/5000;
+      const scaleFactorY =  430/2750;
+      // const scaleFactor =  600/5087;
+      // const scaleFactorY =  200/2800;
       let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
       let newX = rect.yCoordinate; 
       if (rect.width < rect.height) {
@@ -173,13 +155,13 @@
     adjustedHeight = heighta * scaleFactorY;
     // adjustedWidtha = widtha;  
     // adjustedHeighta = heighta;  
-    newX = 5087 - (rect.yCoordinate + widtha); 
+    newX = 5000 - (rect.yCoordinate + widtha); 
     } else {  
     adjustedWidth = heighta * scaleFactor;  
     adjustedHeight = widtha * scaleFactorY;  
     // adjustedWidtha = widtha;  
     // adjustedHeighta = heighta;  
-    newX = 5087 - (rect.yCoordinate + heighta);  
+    newX = 5000 - (rect.yCoordinate + heighta);  
   } 
         return {  
         ...rect, 
@@ -202,6 +184,112 @@
   }  
   else {
     adjustedRects1.value = []
+  }
+  // 杩涚倝涓�3
+  if (data.intoGlass3 && data.intoGlass3.length > 0) {
+    console.log(data.intoGlass3);
+    const newGlassIds = new Set(data.intoGlass3[0].map(rect => rect.glassId));
+    const existingRects = adjustedRects3.value.filter(rect => newGlassIds.has(rect.glassId));
+    const newRects = data.intoGlass3[0].map(rect => {
+      const scaleFactor =  845/5000;
+      const scaleFactorY =  430/2750;
+      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
+      let newX = rect.yCoordinate; 
+      if (rect.width < rect.height) {
+        widtha = rect.height;
+        heighta = rect.width;
+      }else {
+        widtha = rect.width;
+        heighta = rect.height;
+      }
+      if (rect.angle === 0) {  
+    adjustedWidth = widtha * scaleFactor;
+    adjustedHeight = heighta * scaleFactorY;
+    // adjustedWidtha = widtha;  
+    // adjustedHeighta = heighta;  
+    newX = 5000 - (rect.yCoordinate + widtha); 
+    } else {  
+    adjustedWidth = heighta * scaleFactor;  
+    adjustedHeight = widtha * scaleFactorY;  
+    // adjustedWidtha = widtha;  
+    // adjustedHeighta = heighta;  
+    newX = 5000 - (rect.yCoordinate + heighta);  
+  } 
+        return {  
+        ...rect, 
+        xcoordinate: newX * scaleFactor,
+        ycoordinate: rect.xCoordinate * scaleFactorY,
+        width: adjustedWidth,  
+        height: adjustedHeight,  
+        widtha: rect.width, 
+        heighta: rect.height,
+      }
+    });     
+    // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��  
+    adjustedRects3.value = existingRects.map(oldRect => {  
+      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
+      if (newRect) {  
+        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
+      }  
+      return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�  
+    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));  
+  }  
+  else {
+    adjustedRects3.value = []
+  }
+  // 杩涚倝涓�4
+  if (data.intoGlass4 && data.intoGlass4.length > 0) {  
+    // 鎻愬彇鏂扮殑鐭╁舰ID  
+    const newGlassIds = new Set(data.intoGlass4[0].map(rect => rect.glassId));  
+    // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�  
+    const existingRects = adjustedRects4.value.filter(rect => newGlassIds.has(rect.glassId));  
+    // 璁$畻鏂扮殑鐭╁舰  
+    const newRects = data.intoGlass4[0].map(rect => { 
+      const scaleFactor =  845/5000;
+      const scaleFactorY =  430/2750;
+        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
+        let newX = rect.yCoordinate; 
+      if (rect.width < rect.height) {
+        widtha = rect.height;
+        heighta = rect.width;
+      }else {
+        widtha = rect.width;
+        heighta = rect.height;
+      }
+      if (rect.angle === 0) {  
+    adjustedWidth = widtha * scaleFactor;
+    adjustedHeight = heighta * scaleFactorY;
+    // adjustedWidtha = widtha;  
+    // adjustedHeighta = heighta;   
+    newX = 5000 - (rect.yCoordinate + widtha); 
+    } else {  
+    adjustedWidth = heighta * scaleFactor;  
+    adjustedHeight = widtha * scaleFactorY;  
+    // adjustedWidtha = widtha;  
+    // adjustedHeighta = heighta;  
+    newX = 5000 - (rect.yCoordinate + heighta); 
+  } 
+        return {  
+        ...rect, 
+        xcoordinate: newX * scaleFactor,
+        ycoordinate: rect.xCoordinate * scaleFactorY,
+        width: adjustedWidth,  
+        height: adjustedHeight,  
+        widtha: rect.width, 
+        heighta: rect.height,
+      }
+    });   
+    // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��  
+    adjustedRects4.value = existingRects.map(oldRect => {  
+      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
+      if (newRect) {  
+        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
+      }  
+      return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�  
+    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));  
+  }  
+  else if (data.intoGlass4 == null) {
+    adjustedRects4.value = []
   }
 // 杩涚倝鍓�
   if (data.waitingGlass && data.waitingGlass.length > 0) {  
@@ -371,8 +459,22 @@
     }
   });  
 }
+function updateoutColors3() {
+  adjustedRects3.value.forEach(rect => {  
+    if (rect.glassId === glassId) {  
+      rect.state = 9;
+    }
+  });  
+}
 function updateoutColorsd() {
   adjustedRects2.value.forEach(rect => {  
+    if (rect.glassId === glassId) {  
+      rect.state = 9;
+    }
+  });  
+} 
+function updateoutColors4() {
+  adjustedRects4.value.forEach(rect => {  
     if (rect.glassId === glassId) {  
       rect.state = 9;
     }
@@ -413,8 +515,22 @@
     }
   });
 }  
+function updateRectColors3() {  
+  adjustedRects3.value.forEach(rect => {  
+    if (rect.glassId === glassId) {  
+      rect.state = 8;
+    }
+  });
+}  
 function updateRectColors2() {  
   adjustedRects2.value.forEach(rect => {  
+    if (rect.glassId === glassId) {  
+      rect.state = 8;
+    }
+  });  
+}
+function updateRectColors4() {  
+  adjustedRects4.value.forEach(rect => {  
     if (rect.glassId === glassId) {  
       rect.state = 8;
     }
@@ -431,6 +547,26 @@
   }
 } 
 function getRectColor2(state) {
+  switch (state) {  
+    case 2:  
+      return 'lightblue';
+    case 8:
+      return '#911005';
+    case 9:
+      return '#4682B4';
+  }
+}
+function getRectColor3(state) {
+  switch (state) {  
+    case 2:  
+      return 'lightblue';
+    case 8:
+      return '#911005';
+    case 9:
+      return '#4682B4';
+  }
+}
+function getRectColor4(state) {
   switch (state) {  
     case 2:  
       return 'lightblue';
@@ -466,12 +602,19 @@
       return '#4682B4'; 
   }  
 }
+// 瀹氫箟瀵艰埅鍒版柊椤甸潰鐨勬柟娉�
+const navigateToPrintPage = () => {
+  // 浣跨敤璺敱瀹炰緥鐨� push 鏂规硶瀵艰埅鍒版柊椤甸潰
+  router.push('/PurchaseReturn/purchaseprint');
+};
 function showDialog1(rect) {
   const index = adjustedRects1.value.findIndex(r => r.glassId === rect.glassId);  
   if (index !== -1) {  
     adjustedRects1.value[index].isActive = true;  
   }  
   currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
   currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
   blind1.value = true;  
   currentRect.value = rect;
@@ -481,9 +624,41 @@
     canSelectProject1.value = true;
   }
   if (currentRect.value.state == 9) {
-    cantakea.value = false;
+    alla.value = false;
   } else if (currentRect.value.state !== 9) {
     cantakea.value = true;
+  } 
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
+  } 
+} 
+function showDialog3(rect) {
+  const index = adjustedRects3.value.findIndex(r => r.glassId === rect.glassId);  
+  if (index !== -1) {  
+    adjustedRects3.value[index].isActive = true;  
+  }  
+  currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
+  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
+  blind3.value = true;  
+  currentRect.value = rect;
+  if (currentRect.value.state == 8) {
+    canSelectProject3.value = false;
+  } else if (currentRect.value.state !== 8) {
+    canSelectProject3.value = true;
+  }
+  if (currentRect.value.state == 9) {
+    alla.value = false;
+  } else if (currentRect.value.state !== 9) {
+    cantakea.value = true;
+  } 
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
   } 
 } 
 function showDialog2(rect) {
@@ -492,6 +667,8 @@
     adjustedRects2.value[index].isActive = true;  
   }  
   currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
   currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
   blind2.value = true;  
   currentRect.value = rect;
@@ -505,6 +682,38 @@
   } else if (currentRect.value.state !== 9) {
     cantakea.value = true;
   }
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
+  } 
+} 
+function showDialog4(rect) {
+  const index = adjustedRects4.value.findIndex(r => r.glassId === rect.glassId);  
+  if (index !== -1) {  
+    adjustedRects4.value[index].isActive = true;  
+  }  
+  currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
+  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
+  blind4.value = true;  
+  currentRect.value = rect;
+  if (currentRect.value.state == 8) {
+    canSelectProject4.value = false;
+  } else if (currentRect.value.state !== 8) {
+    canSelectProject4.value = true;
+  }
+  if (currentRect.value.state == 9) {
+    cantakea.value = false;
+  } else if (currentRect.value.state !== 9) {
+    cantakea.value = true;
+  }
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
+  } 
 } 
 function showDialoga(rect) {
   const index = adjustedRectsa.value.findIndex(r => r.glassId === rect.glassId);  
@@ -512,6 +721,8 @@
     adjustedRectsa.value[index].isActive = true;  
   }  
   currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
   currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
   blinda.value = true; 
   currentRect.value = rect;
@@ -530,6 +741,11 @@
   } else if (currentRect.value.state == 0) {
     canona.value = true;
   } 
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
+  } 
 } 
 function showDialogb(rect) {
   const index = adjustedRectsb.value.findIndex(r => r.glassId === rect.glassId);  
@@ -537,6 +753,8 @@
     adjustedRectsb.value[index].isActive = true;  
   }  
   currentGlassId.value = rect.glassId;  
+  currentengineerId.value = rect.engineerId;  
+  currenttemperingLayoutId.value = rect.temperingLayoutId;  
   currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
   blindb.value = true;  
   currentRect.value = rect;
@@ -555,6 +773,11 @@
   } else if (currentRect.value.state !== 3) {
     canonb.value = true;
   } 
+  if (currentRect.value.state > 5) {
+    cantakeall.value = false;
+  } else{
+    cantakeall.value = true;
+  } 
 } 
   const handleDialogClose1 = () => {  
   adjustedRects1.value.forEach(rect => {  
@@ -562,8 +785,20 @@
   });  
   blind1.value = false; 
 };  
+  const handleDialogClose3 = () => {  
+  adjustedRects3.value.forEach(rect => {  
+    rect.isActive = false;  
+  });  
+  blind1.value = false; 
+};  
   const handleDialogClose2 = () => {  
   adjustedRects2.value.forEach(rect => {  
+    rect.isActive = false;  
+  });  
+  blind2.value = false; 
+};  
+  const handleDialogClose4 = () => {  
+  adjustedRects4.value.forEach(rect => {  
     rect.isActive = false;  
   });  
   blind2.value = false; 
@@ -626,6 +861,51 @@
     console.error(error);
   }
 }
+const handleDamage3 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+    glassId: currentGlassId.value,
+    // temperingFeedSequence: currenttemperingFeedSequence.value,
+    line: 4001,
+    status: 8,
+    workingProcedure: '閽㈠寲',
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind3.value = false;
+      updateRectColors3();
+    } else {
+      // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handleDamage4 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+    glassId: currentGlassId.value,
+    line: 4001,
+    status: 8,
+    workingProcedure: '閽㈠寲',
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind4.value = false;
+      updateRectColors4();
+    } else {
+      // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
 // 杩涚倝鍓嶇牬鎹�
 const handleDamagea = async () => {
   try  {
@@ -641,6 +921,26 @@
       updateRectColorsa();
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+// 杩涚倝鍓嶅叏閮ㄦ嬁璧�
+const handletakeall3 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blinda.value = false;
+    } else {
       ElMessage.error(response.message);
     }
 }
@@ -695,6 +995,101 @@
     console.error(error);
   }
 }
+const handletakeall1 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind1.value = false;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handletakeall33 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind3.value = false;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handletakeall2 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind2.value = false;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handletakeall44 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind4.value = false;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handletakeall4 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', {
+    temperingLayoutId: currenttemperingLayoutId.value,
+    engineerId: currentengineerId.value,
+    state: 9,
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind4.value = false;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
 // 杩涚倝涓汉宸ユ嬁璧�
 const takeoutc = async () => {
   try  {
@@ -718,7 +1113,53 @@
     console.error(error);
   }
 }
-// 杩涚倝zhong浜哄伐鎷胯蛋
+// 杩涚倝涓汉宸ユ嬁璧�3
+const takeout3 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+    glassId: currentGlassId.value,
+    line: 4001,
+    status: 9,
+    workingProcedure: '閽㈠寲',
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind3.value = false;
+      updateoutColors3();
+    } else {
+      // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+// 杩涚倝涓汉宸ユ嬁璧�4
+const takeout4 = async () => {
+  try  {
+  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+    glassId: currentGlassId.value,
+    line: 4001,
+    status: 9,
+    workingProcedure: '閽㈠寲',
+    })
+    if (response.code == 200) {
+      ElMessage.success('鎴愬姛锛�');
+      blind4.value = false;
+      updateoutColors4();
+    } else {
+      // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+// 杩涚倝涓汉宸ユ嬁璧�
 const takeoutd = async () => {
   try  {
   const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
@@ -835,17 +1276,69 @@
         {{ $t('processCard.print') }}
       </el-button>
       <div v-if="dialogFormVisible">
-        <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;"
+        <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 1000px;"
                  v-loading="loading">
-          <div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;">
-            <div v-if="adjustedRects1.length > 0">
-              <!-- <div style="text-align: center;">鐐夊彿锛歿{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
-              <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{
-                  adjustedRects1[0].engineerId
-                }}-{{ adjustedRects1[0].temperingLayoutId }}
-              </div>
+                 
+   <div style="width: 845px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
+     <div v-if="adjustedRects3.length > 0">
+       <!-- <div style="text-align: center;">鐐夊彿3锛歿{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
+       <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{ adjustedRects3[0].engineerId }}-{{ adjustedRects3[0].temperingLayoutId }} </div>
     <el-scrollbar height="430px" style="background-color: #e9e9eb;">
     <div  style="position: relative;max-width: 1400px;">  
+      <div  
+      v-for="(rect, index) in adjustedRects3"
+      :key="index"  
+      @click="showDialog3(rect)"  
+      class="rect"
+      :style="{ position: 'absolute', 
+       top: `${rect.ycoordinate}px`, 
+       left: `${rect.xcoordinate}px`,
+        width: `${rect.width}px`, 
+        height: `${rect.height}px`,
+        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor3(rect.state) }">
+     <div  class="centered-text">
+    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>  
+    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>  
+    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
+  </div>
+  </div>
+   </div>
+   </el-scrollbar>
+   </div>
+          </div>
+        <div style="width: 845px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
+    <div v-if="adjustedRects4.length > 0">
+    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{ adjustedRects4[0].engineerId }}-{{ adjustedRects4[0].temperingLayoutId }} </div>
+    <!-- <div style="text-align: center;">鐐夊彿4锛歿{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
+    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
+    <div  style="position: relative;max-width: 1400px;">  
+      <div  
+      v-for="(rect, index) in adjustedRects4"
+      :key="index"
+      @click="showDialog4(rect)"  
+      class="rect"
+      :style="{ position: 'absolute', 
+       top: `${rect.ycoordinate}px`, 
+       left: `${rect.xcoordinate}px`, 
+       width: `${rect.width}px`, 
+       height: `${rect.height}px`,
+        backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor4(rect.state) }">
+     <div  class="centered-text">
+    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>  
+    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>  
+    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
+  </div>
+  </div>
+   </div>
+   </el-scrollbar>
+   </div>
+        </div>
+ <div style="width: 845px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
+   <div v-if="adjustedRects1.length > 0">
+              <!-- <div style="text-align: center;">鐐夊彿1锛歿{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
+     <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div>
+    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
+    <div  style="position: relative;">  
       <div  
       v-for="(rect, index) in adjustedRects1"
       :key="index"  
@@ -866,11 +1359,11 @@
    </div>
    </el-scrollbar>
    </div>
-  </div>
-<div style="width: 50%;float: left;background-color: #f4f4f5;height: 430px;">
+    </div>
+     <div style="width: 845px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;">
     <div v-if="adjustedRects2.length > 0">
     <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div>
-    <!-- <div style="text-align: center;">鐐夊彿锛歿{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
+    <!-- <div style="text-align: center;">鐐夊彿2锛歿{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
     <el-scrollbar height="430px" style="background-color: #e9e9eb;">
     <div  style="position: relative;max-width: 1400px;">  
       <div  
@@ -893,7 +1386,7 @@
    </div>
    </el-scrollbar>
    </div>
-</div>
+        </div>
    </el-card>
     </div>
 <div v-if="dialogFormVisiblea">
@@ -957,9 +1450,8 @@
     <div style="display: flex; flex-direction: row; align-items: center; margin-top: 5px;margin-left: 10px;">  
     <el-input :placeholder="$t('processCard.projectnumber')" v-model="engineerId" autocomplete="off" style="width: 300px;"/>
     <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button>
-    <el-button type="info" style="margin-left: 10px;" @click="printing()">{{ $t('processCard.printing') }}</el-button>
+    <el-button type="info" style="margin-left: 10px;" @click="navigateToPrintPage">{{ $t('processCard.printing') }}</el-button>
   </div>
- 
     <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
       <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
     <el-table
@@ -989,6 +1481,9 @@
           <el-icon class="el-icon--right"><Upload /></el-icon>
           {{ $t('order.takeaway') }}
         </el-button>
+        <el-button type="info" plain @click="handletakeall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
+        </el-button>
   </el-dialog>  
 <el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2">
         <el-button :disabled="!canSelectProject2" type="warning" plain :icon="Delete" @click="handleDamage2"  style="width: 150px;margin-left: 10px;">
@@ -997,6 +1492,33 @@
         <el-button :disabled="!cantakea" type="danger" plain @click="takeoutd"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
           <el-icon class="el-icon--right"><Upload /></el-icon>
           {{ $t('order.takeaway') }}
+        </el-button>
+        <el-button type="info" plain @click="handletakeall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
+        </el-button>
+  </el-dialog>  
+<el-dialog v-model="blind3" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose3">
+        <el-button :disabled="!canSelectProject3" type="warning" plain :icon="Delete" @click="handleDamage3"  style="width: 150px;margin-left: 10px;">
+          {{ $t('order.dilapidation') }}
+        </el-button>
+        <el-button :disabled="!cantakea" type="danger" plain @click="takeout3"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          <el-icon class="el-icon--right"><Upload /></el-icon>
+          {{ $t('order.takeaway') }}
+        </el-button>
+        <el-button type="info" plain @click="handletakeall33" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
+        </el-button>
+  </el-dialog>  
+<el-dialog v-model="blind4" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose4">
+        <el-button :disabled="!canSelectProject4" type="warning" plain :icon="Delete" @click="handleDamage4"  style="width: 150px;margin-left: 10px;">
+          {{ $t('order.dilapidation') }}
+        </el-button>
+        <el-button :disabled="!cantakea" type="danger" plain @click="takeout4"  style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          <el-icon class="el-icon--right"><Upload /></el-icon>
+          {{ $t('order.takeaway') }}
+        </el-button>
+        <el-button type="info" plain @click="handletakeall44" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
         </el-button>
   </el-dialog>  
   <!-- 杩涚倝鍓� -->
@@ -1011,6 +1533,9 @@
         <el-button type="success" plain :icon="Edit" @click="takeona" :disabled="!canona" style="width: 150px;margin-left: 10px;margin-top: 10px;">
           {{ $t('order.takeon') }}
         </el-button>
+        <el-button type="info" plain @click="handletakeall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
+        </el-button>
   </el-dialog>  
   <!-- 宸插嚭鐐� -->
 <el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb">
@@ -1021,34 +1546,13 @@
           <el-icon class="el-icon--right"><Upload /></el-icon>
           {{ $t('order.takeaway') }}
         </el-button>
+        <el-button type="info" plain @click="handletakeall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;">
+          {{ $t('order.takeall') }}
+        </el-button>
         <!-- <el-button type="success" plain :icon="Edit" @click="takeonb" :disabled="!canonb" style="width: 150px;margin-left: 10px;margin-top: 10px;">
           {{ $t('order.takeon') }}
         </el-button> -->
   </el-dialog> 
-  <el-dialog  
-      v-model="dialogVisible"
-      width="100%" 
-      top="0vh"
-      :show-close="false"
-      >  
-      <div class="custom-title" style="text-align: center; margin-bottom: 20px;">  
-      {{ $t('processCard.glasstakeout') }}  
-    </div>  
-      <el-table  
-        :data="tableData"  
-        style="width: 100%;height: 760px"  
-      >
-        <el-table-column prop="flowCardId" :label="$t('processCard.flowcard')" width="140" align="center"/>
-        <el-table-column prop="layer" :label="$t('processCard.layer')" align="center" width="52"/>
-        <el-table-column prop="engineerId" :label="$t('processCard.project')" align="center" width="110"/>
-        <el-table-column prop="temperingLayoutId" :label="$t('processCard.temperinglayout')" align="center" width="52"/>
-        <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center"
-                         width="52"/>
-        <el-table-column prop="width" :label="$t('processCard.width')" align="center" width="80"/>
-        <el-table-column prop="height" :label="$t('processCard.height')" align="center" width="80"/>
-        <el-table-column prop="thickness" :label="$t('processCard.thickness')" align="center" width="52"/>
-      </el-table>
-  </el-dialog>
     </div>
   </div>
 </template>
@@ -1135,5 +1639,21 @@
 .custom-title {  
   font-size: 20px;
   font-weight: bold;
-} 
+}
+/* @media print {
+  .el-table {
+    page-break-inside: avoid;
+  }
+} */
+@media print {
+    body {
+        margin: 0;
+        padding: 0;
+    }
+    .el-table {
+        width: 100%;
+        break-inside: avoid; /* 閬垮厤琛ㄦ牸鍦ㄦ墦鍗版椂琚媶鍒� */
+    }
+    /* 鏍规嵁闇�瑕佹坊鍔犳洿澶氭牱寮� */
+}
 </style>
\ No newline at end of file
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseprint.vue b/UI-Project/src/views/PurchaseReturn/purchaseprint.vue
new file mode 100644
index 0000000..81b6f59
--- /dev/null
+++ b/UI-Project/src/views/PurchaseReturn/purchaseprint.vue
@@ -0,0 +1,178 @@
+<template>
+  <div style="margin-left: 10%;margin-top: 10px;">
+    <el-input :placeholder="$t('processCard.projectnumber')" v-model="engineerId" autocomplete="off" style="width: 300px;"/>
+    <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button>
+    <el-button type="info" @click="printTable">{{ $t('processCard.printing') }}</el-button>
+    <!-- 琛ㄦ牸 -->
+    <el-table
+      :data="tableData"
+      style="width: 100%; height: 700px;margin-top: 10px;"
+      ref="tableRef"
+      border
+    >
+      <el-table-column
+        prop="flowCardId"
+        :label="$t('processCard.flowcard')"
+        width="140"
+        align="center"
+      />
+      <el-table-column
+        prop="layer"
+        :label="$t('processCard.layer')"
+        align="center"
+        width="80"
+      />
+      <el-table-column
+        prop="engineerId"
+        :label="$t('processCard.project')"
+        align="center"
+        width="110"
+      />
+      <el-table-column
+        prop="temperingLayoutId"
+        :label="$t('processCard.temperinglayout')"
+        align="center"
+        width="80"
+      />
+      <el-table-column
+        prop="temperingFeedSequence"
+        :label="$t('processCard.temperingfeed')"
+        align="center"
+        width="80"
+      />
+      <el-table-column
+        prop="width"
+        :label="$t('processCard.width')"
+        align="center"
+        width="80"
+      />
+      <el-table-column
+        prop="height"
+        :label="$t('processCard.height')"
+        align="center"
+        width="80"
+      />
+      <el-table-column
+        prop="thickness"
+        :label="$t('processCard.thickness')"
+        align="center"
+        width="52"
+      />
+    </el-table>
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import request from "@/utils/request"
+import { ElMessage } from 'element-plus';
+const {t} = useI18n()
+const engineerId = ref('')
+// 澹版槑鍝嶅簲寮忔暟鎹�
+const tableData = ref<any[]>([]);
+const tableRef = ref<InstanceType<typeof import('element-plus').ElTable> | null>(null);
+  const selectReportData = async () => {
+  let postData = {  
+    type: 9,  
+    workingProcedure: '閽㈠寲',  
+    ...(engineerId.value !== '' && { engineerId: engineerId.value }),  
+  };  
+  const response = await request.post("/loadGlass/damage/selectDamagePrint", postData)
+  if (response.code === 200) {
+    tableData.value = response.data;
+    ElMessage.success(response.message);
+  } else {
+    ElMessage.error(response.message);
+  }
+};
+const fetchData = async () => {
+  try {let postData = {  
+    type: 9,  
+    workingProcedure: '閽㈠寲',  
+    ...(engineerId.value !== '' && { engineerId: engineerId.value }),  
+  };  
+    const response = await request.post('/loadGlass/damage/selectDamagePrint',postData)
+    tableData.value = response.data;
+  } catch (error) {
+    ElMessage.error('鑾峰彇鏁版嵁澶辫触');
+    console.error(error);
+  }
+};
+// 鎵撳嵃琛ㄦ牸鍐呭
+const printTable = () => {
+  if (!tableRef.value) {
+    ElMessage.warning('琛ㄦ牸鏈姞杞藉畬鎴愶紝璇风◢鍚庡啀璇�');
+    return;
+  }
+  // 鍒涘缓涓�涓墦鍗扮獥鍙�
+  const printWindow = window.open('', '_blank');
+  if (!printWindow) {
+    ElMessage.error('鏃犳硶鎵撳紑鎵撳嵃绐楀彛');
+    return;
+  }
+  // 鍐欏叆琛ㄦ牸HTML鍒版墦鍗扮獥鍙�
+  printWindow.document.write(`
+    <html>
+      <head>
+        <title>鐜荤拑鎷胯蛋娓呭崟</title>
+        <style>
+          /* 鏍规嵁闇�瑕佹坊鍔犳牱寮� */
+          table {
+            width: 100%;
+            border-collapse: collapse;
+          }
+          th, td {
+            border: 1px solid #ddd;
+            padding: 8px;
+            text-align: center;
+          }
+          th {
+            background-color: #f2f2f2;
+          }
+        </style>
+      </head>
+      <body>
+        <table>
+          <thead>
+            <tr>
+            <th>娴佺▼鍗�</th>
+            <th>灞傚彿</th>
+            <th>宸ョ▼鍙�</th>
+            <th>鐐夊彿</th>
+            <th>鐗囧簭</th>
+            <th>瀹�</th>
+            <th>楂�</th>
+            <th>鍘�</th>
+            </tr>
+          </thead>
+          <tbody>
+            ${tableData.value.map(item => `
+              <tr>
+                <td>${item.flowCardId}</td>
+                <td>${item.layer}</td>
+                <td>${item.engineerId}</td>
+                <td>${item.temperingLayoutId}</td>
+                <td>${item.temperingFeedSequence}</td>
+                <td>${item.width}</td>
+                <td>${item.height}</td>
+                <td>${item.thickness}</td>
+              </tr>
+            `).join('')}
+          </tbody>
+        </table>
+      </body>
+    </html>
+  `);
+  // 鍏抽棴鏂囨。娴佸苟鎵撳嵃
+  printWindow.document.close();
+  printWindow.focus(); // 纭繚鏂扮獥鍙h幏寰楃劍鐐�
+  printWindow.print();
+  printWindow.close(); // 鎵撳嵃瀹屾垚鍚庡叧闂獥鍙o紙鍙�夛級
+};
+// 鍦ㄧ粍浠舵寕杞藉悗鑾峰彇鏁版嵁
+onMounted(() => {
+  fetchData();
+});
+</script>
+<style scoped>
+/* 鏍峰紡鍙互鏍规嵁闇�姹傝皟鏁� */
+</style>
\ No newline at end of file
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
index b62a160..7679be6 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
@@ -53,4 +53,5 @@
      */
     List<TemperingGlassInfo> selectGlassInfoById(Integer id);
 
+    boolean updateTemperingStateAll(TemperingGlassInfo glassinfo);
 }
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
index 3c358ef..8117246 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.temperingglass.mapper.TemperingGlassInfoMapper;
 import com.mes.temperingglass.service.TemperingGlassInfoService;
@@ -125,4 +126,13 @@
         }
         return result;
     }
+
+    @Override
+    public boolean updateTemperingStateAll(TemperingGlassInfo glassinfo) {
+        UpdateWrapper<TemperingGlassInfo> wrapper = new UpdateWrapper<>();
+        wrapper.eq("engineer_id", glassinfo.getEngineerId())
+                .eq("tempering_layout_id", glassinfo.getTemperingLayoutId())
+                .set("state", glassinfo.getState());
+        return update(wrapper);
+    }
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
index 220c807..c317fe4 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
@@ -47,13 +47,18 @@
         List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
         //杩涚倝涓殑鐜荤拑
         if (!layoutId.isEmpty()) {
-            List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
-            jsonObject.append("intoGlass", intoGlass);
-            //杩涚倝涓殑绗簩涓増鍥�
-            if (layoutId.size() > 1) {
-                List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1));
-                jsonObject.append("intoGlass2", intoGlass2);
+            for (int i = 0; i < layoutId.size(); i++){
+                List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(i));
+                jsonObject.append("intoGlass"+(i+1), intoGlass);
             }
+//            List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
+//            jsonObject.append("intoGlass", intoGlass);
+//            //杩涚倝涓殑绗簩涓増鍥�
+//            if (layoutId.size() > 1) {
+//                List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1));
+//                jsonObject.append("intoGlass2", intoGlass2);
+//            }
+
         }
         //鍑虹倝鍚庣殑鐜荤拑
         List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass();
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
index cb9a49f..e9242ce 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
@@ -56,6 +56,12 @@
 //        }
         return Result.build(200, "鐮存崯鎴愬姛", result);
     }
+    @ApiOperation("//鏁寸増鎷胯蛋")
+    @PostMapping("/updateTemperingStateAll") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
+    public Result <Boolean> updateTemperingStateAll(@RequestBody  TemperingGlassInfo glassinfo) {
 
+        boolean result=temperingGlassInfoService.updateTemperingStateAll(glassinfo);
+        return Result.build(200, "鐮存崯鎴愬姛", result);
+    }
 
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-dev.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-dev.yml
index 530267b..156c7eb 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-dev.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-dev.yml
@@ -11,6 +11,7 @@
           driver-class-name: com.mysql.cj.jdbc.Driver
         salve_hangzhoumes:
           url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+#          url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
index 5e4b546..db80863 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
   port: 8084
 spring:
   profiles:
-    active: prod
+    active: cz
   application:
     name: temperingGlass
   liquibase:

--
Gitblit v1.8.0