From 8b7ae914554652266b31f3bb4237106f1b220cc7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 20 十月 2025 16:02:11 +0800
Subject: [PATCH] 阿尔及利亚代码逻辑修改,页面布局修改

---
 UI-Project/src/views/GlassStorage/rawfilmstorage2.vue |   82 +++++++++++++++++++++++++++++++----------
 1 files changed, 62 insertions(+), 20 deletions(-)

diff --git a/UI-Project/src/views/GlassStorage/rawfilmstorage2.vue b/UI-Project/src/views/GlassStorage/rawfilmstorage2.vue
index 8065916..4c40694 100644
--- a/UI-Project/src/views/GlassStorage/rawfilmstorage2.vue
+++ b/UI-Project/src/views/GlassStorage/rawfilmstorage2.vue
@@ -88,7 +88,7 @@
 const value = ref('')
 const options = [
   {
-    value: 101,
+    value: 99,
     label: t('film.warehousing1'),
   },
 ]
@@ -117,8 +117,10 @@
   window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
 }
 onMounted(() => {
+  console.log("onMounted 閽╁瓙宸茶Е鍙�");
   socket = initializeWebSocket(socketUrl, handleMessage);
   parseAndSetTime();
+  getListRawGlassTask();
 });
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/rawGlass`;
@@ -295,6 +297,38 @@
 const handleBinde = (row) => {
   dialogFormVisiblee.value = true;
 };
+
+// 鏌ヨ鍘熺墖浠撳偍浠诲姟璇︽儏
+const getListRawGlassTask = async (row) => {
+  try {
+    console.log("[getListRawGlassTask] 鍑芥暟宸茶璋冪敤锛屽紑濮嬫墽琛�"); 
+    var url = "/glassStorage/rawGlassStorageTask/listRawGlassTask";
+    const response = await request.post(url)
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      // 鏇存柊tableDataa鏁版嵁
+      if (response.data && response.data.tasks && response.data.tasks[0]) {
+        const formattedTasks = response.data.tasks[0].map(task => {
+          if (task && task.createTime) {
+            return { ...task, createTime: formatTimestamp(task.createTime) };
+          }
+          return task;
+        });
+        tableDataa.value = formattedTasks;
+      }
+      // 鏇存柊tableDatab鏁版嵁锛岀‘淇濋〉闈㈣兘鍙婃椂鏄剧ず浠诲姟
+      if (response.data && response.data.rawStationDetailsList && response.data.rawStationDetailsList[0]) {
+        tableDatab.value = response.data.rawStationDetailsList[0];
+      }
+    } else {
+      ElMessage.error(response.msg);
+    }
+  } catch (error) {
+    console.error('鏌ヨ鍘熺墖浠撳偍浠诲姟璇︽儏澶辫触:', error);
+  }
+};
+
+
 // 鍒犻櫎 
 const deleteWarehousing = async (row) => {
   try {
@@ -353,14 +387,18 @@
     const response = await request.post(url)
     if (response.code == 200) {
       ElMessage.success(response.message);
-      dialogFormVisiblec.value = false;
       leftingStation.value = '';
+      // 璋冪敤鑾峰彇浠诲姟璇︽儏鐨勬帴鍙o紝纭繚鏁版嵁鍙婃椂鏇存柊
+      await getListRawGlassTask();
+      dialogFormVisiblec.value = false;
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
       ElMessage.error(response.msg);
     }
   }
   catch (error) {
+    dialogFormVisiblec.value = false;
+    console.error('鍏ュ簱璇锋眰澶辫触:', error);
   }
 }
 // 鍑哄簱璇锋眰
@@ -587,7 +625,7 @@
 function getStatusText1(taskType) {
   switch (taskType) {
     case 1:
-      return t('sorter.advancetask');//杩涚墖浠诲姟
+      return t('sorter.warehouseReturntasks');//鍥炲簱浠诲姟
     case 2:
       return t('sorter.outputtasks');//鍑虹墖浠诲姟
     case 3:
@@ -595,27 +633,31 @@
     case 4:
       return t('sorter.advancerequests');//杩涚墖璇锋眰
     case 5:
-      return t('sorter.releaserequest');//鍑虹墖璇锋眰
+      return t('sorter.warehouseReturntasks');//鍥炲簱璇锋眰
   }
 }
 function getStatusType2(taskState) {
   switch (taskState) {
     case 0:
       return 'info';
-    case 2:
-      return 'warning';
     case 1:
+      return 'warning';
+    case 2:
       return 'success';
+    case 3:
+      return 'danger';
   }
 }
 function getStatusText2(taskState) {
   switch (taskState) {
     case 0:
       return t('film.built');//鏂板缓
-    case 2:
-      return t('film.fail');//澶辫触
     case 1:
+      return t('film.execution');//鎵ц涓�
+    case 2:
       return t('film.finish');//瀹屾垚
+    case 3:
+      return t('film.fail');//澶辫触
   }
 }
 onBeforeUnmount(() => {
@@ -632,10 +674,10 @@
         {{ $t('film.warehousing') }}
       </el-button>
       <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handleBindc">
-        {{ $t('film.pwarehousing') }}
+        {{ $t('film.emptyShelfPosition') }}
       </el-button>
       <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handleBinde">{{
-        $t('film.pwareout')
+        $t('film.warehouseReturn')
       }}
       </el-button>
       <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handlehistorical">{{
@@ -645,17 +687,17 @@
       <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="datetimerange" format="YYYY/MM/DD HH:mm:ss"
         value-format="YYYY-MM-DD HH:mm:ss" :start-placeholder="$t('film.starttime')"
         :end-placeholder="$t('film.endtime')" :default-time="defaultTime" />
-      <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px;">
+      <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px; width: 200px;">
         <el-option :label="$t('film.built')" value="0"></el-option>
         <el-option :label="$t('film.finish')" value="1"></el-option>
         <el-option :label="$t('film.fail')" value="2"></el-option>
       </el-select>
-      <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('film.tasktype')" style="margin-left: 10px;">
+      <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('film.tasktype')" style="margin-left: 10px; width: 200px;">
         <el-option :label="$t('sorter.advancetask')" value="1"></el-option>
         <el-option :label="$t('sorter.outputtasks')" value="2"></el-option>
         <el-option :label="$t('sorter.schedulingtasks')" value="3"></el-option>
         <el-option :label="$t('sorter.advancerequests')" value="4"></el-option>
-        <el-option :label="$t('sorter.releaserequest')" value="5"></el-option>
+        <el-option :label="$t('sorter.warehouseReturntasks')" value="5"></el-option>
       </el-select>
       <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('film.inquire')
       }}</el-button>
@@ -685,9 +727,9 @@
           <el-table-column prop="createTime" align="center" :label="$t('film.createtime')" />
           <el-table-column fixed="right" :label="$t('film.operate')" align="center">
             <template #default="scope">
-              <el-button :disabled="(scope.row.taskState !== 0)" type="text" plain @click="successfull(scope.row)">{{
+              <el-button :disabled="(scope.row.taskState == 0 && scope.row.taskType == 1)" type="text" plain @click="successfull(scope.row)">{{
                 $t('searchOrder.successfullyprocessed') }}</el-button>
-              <el-button :disabled="(scope.row.taskState !== 0)" type="text" plain @click="handleptask(scope.row)">{{
+              <el-button :disabled="(scope.row.taskState == 0 && scope.row.taskType == 1)" type="text" plain @click="handleptask(scope.row)">{{
                 $t('searchOrder.taskfailure') }}</el-button>
             </template>
           </el-table-column>
@@ -757,7 +799,7 @@
     <el-dialog v-model="dialogFormVisiblea" top="5vh" width="85%">
       <el-table ref="table" style="margin-top: 20px;height: 700px;" :data="tableDatab"
         :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
-        <el-table-column prop="deviceId" fixed align="center" :label="$t('film.station')" min-width="80" />
+        <!-- <el-table-column prop="deviceId" fixed align="center" :label="$t('film.station')" min-width="80" /> -->
         <el-table-column prop="slot" fixed align="center" :label="$t('film.slot')" min-width="80" />
         <el-table-column prop="patternWidth" align="center" :label="$t('film.width')" min-width="80" />
         <el-table-column prop="patternHeight" align="center" :label="$t('film.height')" min-width="80" />
@@ -865,11 +907,11 @@
         </div>
       </template>
     </el-dialog>
-    <el-dialog v-model="dialogFormVisiblec" top="24vh" width="30%" :title="$t('film.pwarehousing')">
+    <el-dialog v-model="dialogFormVisiblec" top="24vh" width="30%" :title="$t('film.emptyShelfPosition')">
       <div style="margin-left: 50px;margin-bottom: 10px;">
         <el-form-item :label="$t('film.position')" :required="true">
           <el-select v-model="leftingStation" clearable :placeholder="$t('film.cposition')" style="margin-left: 20px;">
-            <el-option :label="$t('film.position1')" value="101"></el-option>
+            <el-option :label="$t('film.position1')" value="99"></el-option>
           </el-select>
         </el-form-item>
       </div>
@@ -882,11 +924,11 @@
         </div>
       </template>
     </el-dialog>
-    <el-dialog v-model="dialogFormVisiblee" top="24vh" width="30%" :title="$t('film.pwareout')">
+    <el-dialog v-model="dialogFormVisiblee" top="24vh" width="30%" :title="$t('film.warehouseReturn')">
       <div style="margin-left: 50px;margin-bottom: 10px;">
         <el-form-item :label="$t('film.position')" :required="true">
           <el-select v-model="leftingStation" clearable :placeholder="$t('film.cposition')" style="margin-left: 20px;">
-            <el-option :label="$t('film.position1')" value="101"></el-option>
+            <el-option :label="$t('film.position1')" value="99"></el-option>
           </el-select>
         </el-form-item>
       </div>

--
Gitblit v1.8.0