From 7d691c873261fc73ea412f20f42eb12560d6ca7b Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 05 十二月 2024 13:39:04 +0800
Subject: [PATCH] 中空接口及样式调整

---
 UI-Project/src/lang/zh.js                                                                                         |    4 +
 UI-Project/src/views/hollow/hollowequipment.vue                                                                   |  175 +++++++++++++++++++++++++++++++++----------
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java |    2 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml                            |    6 
 hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/application.yml                             |    4 
 5 files changed, 142 insertions(+), 49 deletions(-)

diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 87e0e5a..041e4ef 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -671,5 +671,9 @@
         pforcedfilming: '鏄惁寮哄埗鍑虹墖锛�',
         brokenpieces: '鐮存崯鐗囨暟',
         realpieces: '瀹為檯鐗囨暟',
+        route: '璺嚎锛�',
+        croute: '璇烽�夋嫨璺嚎',
+        pairQuantity: '鎬婚厤瀵规暟閲忥細',
+        cpairQuantity: '璇疯緭鍏ユ�婚厤瀵规暟閲�',
     }
 }
\ No newline at end of file
diff --git a/UI-Project/src/views/hollow/hollowequipment.vue b/UI-Project/src/views/hollow/hollowequipment.vue
index 429e3f5..bc8e25f 100644
--- a/UI-Project/src/views/hollow/hollowequipment.vue
+++ b/UI-Project/src/views/hollow/hollowequipment.vue
@@ -56,6 +56,7 @@
       </div>
     </el-card>
   </div>
+  <!-- 鍒涘缓浠诲姟 -->
   <el-dialog v-model="dialogFormVisiblea" top="5vh" width="85%">
     <el-table ref="table" style="margin-top: 20px;height: 500px;"
               :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -70,18 +71,85 @@
       <!-- <el-table-column prop="lackCount" align="center" :label="$t('hellow.missingnumber')" min-width="80"/> -->
       <el-table-column fixed="right" :label="$t('hellow.operate')" align="center" width="270">
         <template #default="scope">
-          <el-button size="mini" type="text" plain @click="finisha(scope.row)">{{ $t('hellow.claimquest') }}</el-button>
+          <el-button size="mini" type="text" plain @click="handletake(scope.row)">{{ $t('hellow.claimquest') }}</el-button>
           <el-button size="mini" type="text" plain @click="handleBindRack(scope.row)">{{
               $t('hellow.missingfilms')
             }}
           </el-button>
-          <el-button size="mini" type="text" plain @click="finishb(scope.row)">{{
+          <el-button size="mini" type="text" plain @click="handleout(scope.row)">{{
               $t('hellow.forcedfilming')
             }}
           </el-button>
         </template>
       </el-table-column>
     </el-table>
+  </el-dialog>
+  <!-- 棰嗗彇浠诲姟 -->
+  <el-dialog v-model="dialogFormVisiblec" top="21vh" width="40%" :title="$t('hellow.claimquest')">
+    <div style="margin-left: 20px;margin-top: 10px;margin-bottom: 10px;">
+      <el-form size="mini" label-width="100px">
+        <el-form label-width="210px" label-position="right">
+          <el-form-item :label="$t('hellow.pairQuantity')" :required="true" style="width: 25vw">
+            <el-input :placeholder="$t('hellow.cpairQuantity')" v-model="totalPairQuantity" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('hellow.route')" :required="true" style="width: 25vw;">
+            <el-select 
+            :placeholder="$t('hellow.croute')"
+             style="width: 270px"  
+             v-model="cell">
+               <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+          </el-select>
+          </el-form-item>
+        </el-form>
+      </el-form>
+    </div>
+    <template #footer>
+      <div id="dialog-footer">
+        <el-button type="primary" @click="finisha">
+          {{ $t('reportWork.sure') }}
+        </el-button>
+        <el-button @click="dialogFormVisiblec = false">{{ $t('reportWork.cancel') }}</el-button>
+      </div>
+    </template>
+  </el-dialog>
+  
+  <!-- 寮哄埗鍑虹墖 -->
+  <el-dialog v-model="dialogFormVisibled" top="21vh" width="40%" :title="$t('hellow.forcedfilming')">
+    <div style="margin-left: 20px;margin-top: 10px;margin-bottom: 10px;">
+      <el-form size="mini" label-width="100px">
+        <el-form label-width="210px" label-position="right">
+          <el-form-item :label="$t('hellow.pairQuantity')" :required="true" style="width: 25vw">
+            <el-input :placeholder="$t('hellow.cpairQuantity')" v-model="totalPairQuantity" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('hellow.route')" :required="true" style="width: 25vw;">
+            <el-select 
+            :placeholder="$t('hellow.croute')"
+             style="width: 270px"  
+             v-model="cell">
+               <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+          </el-select>
+          </el-form-item>
+        </el-form>
+      </el-form>
+    </div>
+    <template #footer>
+      <div id="dialog-footer">
+        <el-button type="primary" @click="finishb">
+          {{ $t('reportWork.sure') }}
+        </el-button>
+        <el-button @click="dialogFormVisibled = false">{{ $t('reportWork.cancel') }}</el-button>
+      </div>
+    </template>
   </el-dialog>
   <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500">
     <div style="margin-top: -20px;text-align: center;margin-left: 400px;">
@@ -103,6 +171,7 @@
       </div>
     </el-table>
   </el-dialog>
+  <!-- 寮�濮嬩换鍔� -->
   <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('hellow.pstarttask')">
     <template #footer>
       <div id="dialog-footer">
@@ -113,6 +182,7 @@
       </div>
     </template>
   </el-dialog>
+  <!-- 鍋滄浠诲姟 -->
   <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('hellow.pstoptask')">
     <template #footer>
       <div id="dialog-footer">
@@ -137,10 +207,27 @@
 const tableDatab = ref([])
 const tableDatac = ref([])
 const flowCard = ref('')
+const cell = ref('')
+const totalPairQuantity = ref('')
 const dialogFormVisiblea = ref(false)
 const dialogFormVisibleb = ref(false)
+const dialogFormVisiblec = ref(false)
+const dialogFormVisibled = ref(false)
 const currentRow = reactive({}); // 褰撳墠琛岀殑鏁版嵁 
-
+const options = [
+  {
+    value: 930,
+    label: 930,
+  },
+  {
+    value: 931,
+    label: 931,
+  },
+  {
+    value: 932,
+    label: 932,
+  }
+]
 let socket = null;
 // const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
 // const handleMessage = (data) => {
@@ -175,9 +262,19 @@
 };
 const handleBindRack = (row) => {
   const { flowCardId, layer } = row;
-  currentRow.flowCardId  = row.flowCardId; // 鐩存帴璁剧疆鍝嶅簲寮忓睘鎬�  
+  currentRow.flowCardId  = row.flowCardId;
   dialogFormVisibleb.value = true;
   fetchFlowBind(flowCardId, layer);
+};
+// 棰嗗彇浠诲姟
+const handletake = (row) => {
+  window.localStorage.setItem('flowCardId', row.flowCardId)
+  dialogFormVisiblec.value = true;
+};
+// 寮哄埗鍑虹墖
+const handleout = (row) => {
+  window.localStorage.setItem('flowCardId', row.flowCardId)
+  dialogFormVisibled.value = true;
 };
 // 鍒涘缓浠诲姟
 const fetchFlowCardId = async () => {
@@ -237,53 +334,41 @@
   }
 }
 // 棰嗗彇浠诲姟
-const finisha = async (row) => {
+const finisha = async () => {
+  let flowCardId = window.localStorage.getItem('flowCardId')
   try {
-    const confirmResult = await ElMessageBox.confirm(
-        t('hellow.pclaimquest'),
-        t('searchOrder.prompt'),
-        {
-          confirmButtonText: t('searchOrder.yes'),
-          cancelButtonText: t('searchOrder.cancel'),
-          type: 'warning',
+      var url="/hollowGlass/hollowGlassOutRelationInfo/receiveTask?cell="+cell.value + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantity.value;
+      const response = await request.post(url)
+    if (response.code == 200) {
+      ElMessage.success(response.message);
+      dialogFormVisiblec.value = false;
+      cell.value = '';
+      totalPairQuantity.value = '';
+    } else {
+          ElMessage.error(response.message);
         }
-    );
-    if (confirmResult === 'confirm') {
-      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/finishBigStorageCageDetails", row)
-      if (response.code === 200) {
-        ElMessage.success(response.message);
-      } else {
-        ElMessage.error(response.message);
+      } catch (error) {
+        console.error(error);
       }
     }
-  } catch (error) {
-    console.error('鍙戠敓閿欒:', error);
-  }
-};
 // 寮哄埗鍑虹墖
-const finishb = async (row) => {
+const finishb = async () => {
+  let flowCardId = window.localStorage.getItem('flowCardId')
   try {
-    const confirmResult = await ElMessageBox.confirm(
-        t('hellow.pforcedfilming'),
-        t('searchOrder.prompt'),
-        {
-          confirmButtonText: t('searchOrder.yes'),
-          cancelButtonText: t('searchOrder.cancel'),
-          type: 'warning',
+      var url="/hollowGlass/hollowGlassOutRelationInfo/forceOutGlass?cell="+cell.value + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantity.value;
+      const response = await request.post(url)
+    if (response.code == 200) {
+      ElMessage.success(response.message);
+      dialogFormVisibled.value = false;
+      cell.value = '';
+      totalPairQuantity.value = '';
+    } else {
+          ElMessage.error(response.message);
         }
-    );
-    if (confirmResult === 'confirm') {
-      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/finishBigStorageCageDetails", row)
-      if (response.code === 200) {
-        ElMessage.success(response.message);
-      } else {
-        ElMessage.error(response.message);
+      } catch (error) {
+        console.error(error);
       }
     }
-  } catch (error) {
-    console.error('鍙戠敓閿欒:', error);
-  }
-};
 onUnmounted(() => {
   socket.close();
 });
@@ -302,4 +387,8 @@
 });
 </script>
 
-<style scoped></style>
\ No newline at end of file
+<style scoped>
+#dialog-footer {
+  text-align: center;
+  margin-top: -15px;
+}</style>
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
index 6dd056b..9ce199b 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
@@ -55,5 +55,5 @@
 
     boolean pauseTask(String engineerId, Integer state);
 
-    boolean changeTask(String engineerId, Integer state, Integer filmRemove, Integer stationCell);
+//    boolean changeTask(String engineerId, Integer state, Integer filmRemove, Integer stationCell);
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml
index 214b3b3..3aaecf1 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml
@@ -5,17 +5,17 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         pp:
-          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
+          url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         sd:
-          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
+          url: jdbc:mysql://127.0.0.1:3306/sd?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/application.yml
index 56609e7..c16715a 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/application.yml
@@ -3,7 +3,7 @@
 
 spring:
   profiles:
-    active: yw
+    active: dev
   application:
     name: hollowGlass
   liquibase:
@@ -35,7 +35,7 @@
     port: 5000
 kangaroohy:
   milo:
-    enabled: true
+    enabled: false
     primary: default
     config:
       default:

--
Gitblit v1.8.0