From 3e82c2c5fcb1095266ba9a92d4a7c564c988aa97 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 09 十月 2024 15:37:47 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/views/Slicecage/slicecage.vue |  163 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 155 insertions(+), 8 deletions(-)

diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 75c4a83..686a171 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -16,6 +16,7 @@
 const dialogFormVisiblea = ref(false)
 const dialogFormVisibleb = ref(false)
 const dialogFormVisiblec = ref(false)
+const dialogFormVisibles = ref(false)
 const tableData = ref([])
 const tableDatagh = ref([])
 const tableDatab = ref([])
@@ -24,6 +25,7 @@
 const tableDataf = ref([])
 const tableDatae = ref([])
 const tableDatax = ref([])
+const tableDatas = ref([])
 const carPosition = ref([])
 const ganghua = ref('')
 const adjustedRects = ref([]);
@@ -77,6 +79,8 @@
 const selectedRow = ref(null); // 瀛樺偍閫変腑鐨勮鏁版嵁  
 const temperingtotal = ref(0);
 const glasstotal = ref(0);
+const fulltotals = ref(0);
+const temperingengineerId=ref('');
     // 褰撳墠椤电爜鍜屾瘡椤垫樉绀虹殑鏉℃暟
     const currentPage = ref(1);
     const itemsPerPage = computed(() => {
@@ -384,6 +388,85 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 }; 
+ // 鎸囧畾宸ョ▼
+ const brokek = async(row) => {  
+  try {
+    const confirmResult = await ElMessageBox.confirm(  
+      t('searchOrder.specifytemperinga'), 
+      t('searchOrder.prompt'),  
+      {  
+        confirmButtonText: t('searchOrder.yes'), 
+        cancelButtonText: t('searchOrder.cancel'),
+        type: 'warning',  
+      } 
+    ); 
+    if (confirmResult === 'confirm') {  
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointEngineerId",{
+        engineerId: row.engineer_id
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      } else {  
+      ElMessage.error(response.message);
+      }  
+    }  
+  } catch (error) {  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+}; 
+// 鎸囧畾宸ョ▼
+const broked = async() => {  
+  try {
+    const confirmResult = await ElMessageBox.confirm(  
+      t('searchOrder.specifytemperinga'), 
+      t('searchOrder.prompt'),  
+      {  
+        confirmButtonText: t('searchOrder.yes'), 
+        cancelButtonText: t('searchOrder.cancel'),
+        type: 'warning',  
+      } 
+    ); 
+    if (confirmResult === 'confirm') {  
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointEngineerId",{
+        engineerId: ""
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      } else {  
+      ElMessage.error(response.message);
+      }  
+    }  
+  } catch (error) {  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+}; 
+ // 鎸囧畾娴佺▼鍗�
+ const brokes = async(row) => {  
+  try {
+    const confirmResult = await ElMessageBox.confirm(  
+      t('searchOrder.specifytemperinga'), 
+      t('searchOrder.prompt'),  
+      {  
+        confirmButtonText: t('searchOrder.yes'), 
+        cancelButtonText: t('searchOrder.cancel'),
+        type: 'warning',  
+      } 
+    ); 
+    if (confirmResult === 'confirm') { 
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointFlowCard",{
+        flowCardId: row.flow_card_id,
+        layer: row.layer,
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      } else {  
+      ElMessage.error(response.message);
+      }  
+    }  
+  } catch (error) {  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+}; 
 // 鍑虹墖闃熷垪鎷胯蛋
 const brokeb = async(row) => {  
   try {
@@ -518,7 +601,23 @@
   } catch (error) {  
     // console.error('Error fetching rects :', error);  
   }  
+
+  
 }); 
+const fetchFlows = async () => {
+  try {  
+    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache');
+    if (response.code === 200) {  
+      tableDatas.value = response.data
+    } else {  
+      ElMessage.warning(response.msg)
+    }  
+  } catch (error) {  
+    // console.error('Error fetching rects :', error);  
+  } 
+}
+ 
+
 const fetchFlow = async () => {
   try  {
     const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass')
@@ -526,11 +625,17 @@
       ElMessage.success(response.message);
       tableDatagh.value = response.data
       temperingtotal.value = response.data.length
-      let totalCount = 0;  
+      let totalCount = 0;
+      let fullCount = 0;
       response.data.forEach(item => { 
-        totalCount += item.count || 0;
+        totalCount += item.count1 || 0;
+        if(item.count2-item.count1-item.count4==0){
+          fullCount+=1;
+        }
       });
       glasstotal.value = totalCount;
+      fulltotals.value = fullCount;
+
     } else {
       ElMessage.error(response.message);
     }
@@ -544,8 +649,8 @@
 const fetchFlowCardId = async () => {
   try  {
     const response = await request.post('/cacheVerticalGlass/work_assignment/selectWorkAssignment',{
-      line: 2001,
-      workingProcedure : '鍐峰姞宸�'
+      line: 4001,
+      workingProcedure : '閽㈠寲'
     })
     if (response.code == 200) {
       ElMessage.success(response.message);
@@ -597,6 +702,10 @@
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
+  //褰撳墠鎸囧畾宸ョ▼
+  if(data.bigStorageCageDetailsOutTask!=null){
+    temperingengineerId.value=data.temperingengineerId[0];
+  }
   // 鏇存柊 tableData 鐨勬暟鎹�
   if(data.bigStorageCageDetailsOutTask!=null){
     tableDatac.value = data.bigStorageCageDetailsOutTask[0]
@@ -775,6 +884,7 @@
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
+    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">闈為挗鍖栨祦绋嬪崱鏌ヨ</el-button>
     <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
     <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: 100px;">
@@ -1239,7 +1349,7 @@
     <el-table  
           :data="paginatedUsers" 
           @row-click="handleRowClick" 
-          height="500"
+          height="700"
           @expand-change="handleExpandChange"  
           row-key="id" 
           default-expand-all
@@ -1351,7 +1461,7 @@
     <el-button style="margin-left: 10px;size: mini;" type="danger">鍋滄</el-button>
     <el-button style="margin-left: 10px;size: mini;" type="primary">娣诲姞</el-button>
   </div> -->
-    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
+    <el-table  ref="table" style="margin-top: 20px;height: 700px;"
         :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
           <!-- <el-table-column prop="id" fixed align="center" :label="$t('searchOrder.sheetID')" min-width="150"/>
             -->
@@ -1419,6 +1529,25 @@
               </el-form-item>
               </div>
           </el-col>
+          <el-col :span="4">
+              <div id="dt" style="font-size: 15px;">
+              <el-form-item :label="$t('婊$倝鏁伴噺')"  style="width: 14vw">
+                {{ fulltotals }}
+              </el-form-item>
+              </div>
+          </el-col>
+          <el-col :span="4">
+              <div id="dt" style="font-size: 15px;">
+              <el-form-item :label="$t('褰撳墠鎸囧畾宸ョ▼')"  style="width: 14vw">
+                {{ temperingengineerId }}
+              </el-form-item>
+              </div>
+          </el-col>
+          <el-col :span="4">
+              <div id="dt" style="font-size: 15px;">
+                <el-button size="mini" type="text" plain @click="broked()">{{ $t('鍙栨秷鎸囧畾') }}</el-button>
+              </div>
+          </el-col>
         </el-row>
       </el-form>
     </div>
@@ -1426,11 +1555,16 @@
         :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
           <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/>
           <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
-          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" />
-          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150">
+          <el-table-column prop="count2" align="center" :label="$t('鎬绘暟閲�')" min-width="150" />
+          <el-table-column prop="count1" align="center" :label="$t('绗煎瓙鍐呮暟閲�')" min-width="150" />
+          <el-table-column prop="count3" align="center" :label="$t('缂哄皯鏁伴噺')" min-width="150" />
+          <el-table-column prop="count4" align="center" :label="$t('鐮存崯/鎷胯蛋鏁伴噺')" min-width="150" />
+          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="250">
             <template #default="scope">
               <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button>
+              <el-button size="mini" type="text" plain @click="brokek(scope.row)">{{ $t('searchOrder.specifyengineerid') }}</el-button>
             </template>
+            
         </el-table-column>
         </el-table>
 </el-dialog>
@@ -1459,6 +1593,19 @@
       </div>
     </template>
 </el-dialog>
+<el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
+        :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+          <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/>
+          <el-table-column prop="layer" align="center" label="灞�" />
+          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" />
+          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" >
+            <template #default="scope">
+              <el-button size="mini" type="text" plain @click="brokes(scope.row)">鎸囧畾娴佺▼鍗�</el-button>
+            </template>
+        </el-table-column>
+        </el-table>
+</el-dialog>
 </template>
 <style scoped>
 #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}

--
Gitblit v1.8.0