From 4185a44f983c7aa3cf45ec03a65eece9e847e229 Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期四, 16 五月 2024 13:22:44 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/views/StockBasicData/stockBasicData.vue |  270 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 156 insertions(+), 114 deletions(-)

diff --git a/UI-Project/src/views/StockBasicData/stockBasicData.vue b/UI-Project/src/views/StockBasicData/stockBasicData.vue
index b4e4821..efba1a1 100644
--- a/UI-Project/src/views/StockBasicData/stockBasicData.vue
+++ b/UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -3,99 +3,136 @@
 import {reactive} from "vue";
 import {useRouter} from "vue-router"
 const router = useRouter()
+const adda = ref(false)
 
-import { ref } from 'vue'
+import request from "@/utils/request"
+import { ref, onMounted } from "vue";
+// import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
+//  import LanguageMixin from './lang/LanguageMixin'
 
-const tableData = [
-  {
-    id: '1',
-    long: '1005',
-    wide: '183.6',
-    thick: '1991',
-    type: '寰呰瘑鍒�',
-    typea: '1',
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-]
-const open = () => {
-  ElMessageBox.confirm(
-    '鏄惁鍒犻櫎璇ユ潯淇℃伅?',
-    '鎻愮ず',
-    {
-      confirmButtonText: '鏄�',
-      cancelButtonText: '鍙栨秷',
-      type: 'warning',
-    }
-  )
-    .then(() => {
-      ElMessage({
-        type: 'success',
-        message: '鍒犻櫎鎴愬姛锛�',
-      })
+const tableData = ref([])
+const slot = ref('')
+  
+
+request.post("/cacheGlass/taskCache/selectEdgTask").then((res) => {
+          if (res.code == 200) {
+            
+          console.log(res.data);
+          tableData.value = res.data
+          console.log(res.data[0].slot);
+          } else {
+          ElMessage.warning(res.msg)
+        
+          }
+          });
+
+//   const getTableRow = (row,type) =>{
+//   switch (type) {
+//     case 'delete':{
+//       let flowData = ref({
+//         id:0,
+//         slot:row.slot
+//       })
+//       request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass",flowData.value).then((res) => {
+//         if(res.code==200){
+//           ElMessage.success(t('searchOrder.msgDeleteSuccess'))
+//           router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}})
+//         }else{
+//           ElMessage.warning(res.msg)
+//           router.push("/login")
+//         }
+//       })
+
+//       return
+//     }
+//   }
+// }
+// let slots = ref({
+//   id:0,
+//    slot: slot.value
+// })
+const open = async(row) => {  
+  try {  
+    const confirmResult = await ElMessageBox.confirm(  
+      '鏄惁鍒犻櫎璇ユ潯淇℃伅?',  
+      '鎻愮ず',  
+      {  
+        confirmButtonText: '鏄�',  
+        cancelButtonText: '鍙栨秷',  
+        type: 'warning',  
+      }  
+    );  
+    if (confirmResult === 'confirm') {  
+      // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛  
+      const deleteResponse = await request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass", {
+        id:0,
+        slot: row.slot
     })
-    .catch(() => {
-      ElMessage({
-        type: 'info',
-        message: '鍒犻櫎澶辫触',
-      })
-    })
-}
-const getTableRow = (row,type) =>{
-  switch (type) {
-    case 'edit' :{
-      //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
-      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
-      break
-    }
-    case 'delete':{
-      alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
-      break
-    }
-  }
-}
-const dialogForm = () => {
-  ElMessageBox.confirm(
-    '鏄惁鐮存崯?',
-    '鎻愮ず',
-    {
-      confirmButtonText: '鏄�',
-      cancelButtonText: '鍙栨秷',
-      type: 'warning',
-    }
-  )
-  .then(() => {
-    // this.boxa = true
-    // this.box = false
-      
-    })
-}
-const dialogForma = () => {
-  ElMessageBox.confirm(
-    '鏄惁鍒犻櫎璇ユ潯淇℃伅?',
-    '鎻愮ず',
-    {
-      confirmButtonText: '鏄�',
-      cancelButtonText: '鍙栨秷',
-      type: 'warning',
-    }
-  )
-}
+      if (response.code == 200) {  
+        // 鍒犻櫎鎴愬姛锛屾偍鍙互鏍规嵁闇�瑕佸鐞嗘垚鍔熺殑鎯呭喌  
+        alert('鍒犻櫎鎴愬姛锛�');  
+      } else {  
+        // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛  
+        alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);  
+      }  
+    }  
+  } catch (error) {  
+    // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+};  
+// const open = () => {
+//   ElMessageBox.confirm(
+//     '鏄惁鍒犻櫎璇ユ潯淇℃伅?',
+//     '鎻愮ず',
+//     {
+//       confirmButtonText: '鏄�',
+//       cancelButtonText: '鍙栨秷',
+//       type: 'warning',
+//     }
+//   )
+//     .then(() => {
+//       ElMessage({
+//         type: 'success',
+//         message: '鍒犻櫎鎴愬姛锛�',
+//       })
+//     })
+//     .catch(() => {
+//       ElMessage({
+//         type: 'info',
+//         message: '鍒犻櫎澶辫触',
+//       })
+//     })
+// }
+// 鍒犻櫎
+// const handleBindRacka = (row) => {
+//   adda.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+// };
+// // 鍒犻櫎
+// const handleConfirma = async () => {
+//   try {
+//       window.localStorage.setItem('slot', res.data.slot)
+//     let slot = window.localStorage.getItem('slot')
+//     const response = await request.post('/cacheGlass/edgStorageCage/edgStorageCageGlass', {
+//       slot: slot.value,
+//       id: 0
+//     }); 
+ 
+//     if (response.code == 200) {
+//       // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
+//       ElMessage.success(response.message);
+//       adda.value = false;
+//     } else {
+//       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+//       ElMessage.error(response.msg);
+//     }
+//   } catch (error) {
+//     // 澶勭悊閿欒
+//     console.error(error);
+//   }
+// };
+
 const gridOptions = reactive({
   border:  "full",//琛ㄦ牸鍔犺竟妗�
   keepSource: true,//淇濇寔婧愭暟鎹�
@@ -131,36 +168,48 @@
       'wide': '1005',
       'thick': '183.6',
     }
-  ],
+  ]
+ 
 })
+
+
 
 </script>
 
 <template>
   <div>
-    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
-      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
-        <el-table height="100%" ref="table" 
+    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
+      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
+        <el-table height="240" ref="table" 
         @selection-change="handleSelectionChange"
         :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
-          <el-table-column prop="id" align="center" label="id" min-width="80" />
-          <el-table-column prop="long" align="center" label="闀�" min-width="120" />
-          <el-table-column prop="wide" align="center" label="瀹�" min-width="120" />
-          <el-table-column prop="wide" align="center" label="鍘氬害" min-width="120" />
-          <el-table-column prop="wide" align="center" label="鑶滅郴" min-width="120" />
-          <el-table-column prop="wide" align="center" label="鍑虹墖椤哄簭" min-width="120" />
-          <el-table-column prop="wide" align="center" label="娴佺▼鍗″彿" min-width="120" />
-          <el-table-column prop="wide" align="center" label="鍏朵粬" min-width="120" />
+          <el-table-column prop="slot" align="center" label="id" min-width="80" />
+          <el-table-column prop="glass_id" align="center" label="闀�" min-width="80" />
+          <el-table-column prop="width" align="center" label="瀹�" min-width="120" />
+          <el-table-column prop="height" align="center" label="鍘氬害" min-width="120" />
+          <el-table-column prop="height" align="center" label="鑶滅郴" min-width="120" />
+          <el-table-column prop="height" align="center" label="鍑虹墖椤哄簭" min-width="120" />
+          <el-table-column prop="height" align="center" label="娴佺▼鍗″彿" min-width="120" />
+          <el-table-column prop="height" align="center" label="鍏朵粬" min-width="120" />
+          <el-table-column
+            align="center"
+            label="鍚敤鐘舵��"
+            min-width="80"
+            prop="enable_state"
+          >
+          <template #default="scope">
+            <el-tag type="success" >{{ scope.row.enable_state==1?"鍚敤":"鏈惎鐢�"  }}</el-tag>
+          </template>
+          </el-table-column>
           <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200">
-            <template #default>
-              <el-button size="mini" type="text" plain  @click="dialogForm">鐮存崯</el-button>
-              <el-button size="mini" type="text" plain  @click="dialogForma">鍒犻櫎</el-button>
+            <template #default="scope">
+              <el-button size="mini" type="text" plain  @click="open(scope.row)">鐮存崯</el-button>
+              <el-button size="mini" type="text" plain  @click="open(scope.row)">鍒犻櫎</el-button>
             </template>
         </el-table-column>
         </el-table>
       </div>
     </el-card>
-   
   </div>
 </template>
 
@@ -182,14 +231,7 @@
    margin-left: 28%;
 }
 #awatch{
-  height: 450px;
-}
-#main-body{
-  margin-top: -20px;
-  margin-left: 300px;
-}
-#main-bodya{
-  margin-top: -10px;
-  margin-left: 100px;
+  height: 460px;
+  /* margin-top: -60px; */
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0