From 5c1c0b9de58edb54443e43edf8a141b8231563e6 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 25 三月 2024 14:19:49 +0800
Subject: [PATCH] 修改导入订单表格样式

---
 Albania_Mes-ui/src/views/home/index.vue |  143 ++++++++++++++++++++++++++++++++++-------------
 1 files changed, 104 insertions(+), 39 deletions(-)

diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue
index 5cedf67..a992f95 100644
--- a/Albania_Mes-ui/src/views/home/index.vue
+++ b/Albania_Mes-ui/src/views/home/index.vue
@@ -302,12 +302,23 @@
     margin-top: -150px;
     margin-left: -200px;
 }
+
+.cells {
+    height: 100%;
+}
 </style>
 <template>
     <el-container>
         <!-- <el-header style="padding: 10px;"></el-header> -->
         <el-main>
-            <div class="box" @click="dialogFormVisible2 = true">
+            <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
+                <el-table :data="this.alarm" border style="width: 100%;font-size: 25px;">
+                    <el-table-column prop="id" :label="$t('id')"></el-table-column>
+                    <el-table-column prop="content" :label="$t('content')"></el-table-column>
+                    <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column>
+                </el-table>
+            </el-dialog>
+            <div class="box" @click="dialogFormVisible2 = true" style="z-index: 999;">
                 <div class="text">
                     <!-- Alarm: -->
                     {{ this.text }}
@@ -333,28 +344,52 @@
                     {{ $t('Task queue') }}</el-button>
 
             </div>
-            <div style="display: flex;align-items: center;">
+            <div style="display: flex;align-items: center;overflow: hidden;">
                 <div class="blocks" style="position: relative;width: 100%;">
-                    <div class="blocks-img" :style="'z-index:999;left:150px;top:555px;'">
+                    <div class="blocks-img" :style="'z-index:99;left:150px;top:555px;'">
 
                     </div>
                     <div
-                        :style="'position: absolute;z-index:999;left:271px;top:987px;width:210px;height:38px;background-color:' + ShowDeviceList(0) + ';;'">
+                        :style="'position: absolute;z-index:99;left:271px;top:987px;width:210px;height:38px;background-color:' + ShowDeviceList(0) + ';'">
                     </div>
                     <div
-                        :style="'position: absolute;z-index:999;left:553px;top:956px;width:110px;height:74px;background-color:' + ShowDeviceList(0) + ';;'">
+                        :style="'position: absolute;z-index:99;left:553px;top:956px;width:110px;height:74px;background-color:' + ShowDeviceList(0) + ';'">
                     </div>
                     <div
-                        :style="'position: absolute;z-index:999;left:800px;top:450px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';;'">
+                        :style="'position: absolute;z-index:99;left:800px;top:450px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'">
                     </div>
                     <div
-                        :style="'position: absolute;z-index:999;left:800px;top:675px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';;'">
+                        :style="'position: absolute;z-index:99;left:800px;top:675px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'">
                     </div>
-                    <div
-                        :style="'position: absolute;z-index:999;left:740px;top:930px;width:230px;height:90px;background-color:' + ShowDeviceList(0) + ';;'">
-                        <div v-for="item in cagelist1" :key="item['number']">
-                            <div v-for="(num) in item['number']" :key="num">
-                                1
+                    <div :style="'position: absolute;z-index:1000;left:740px;top:507px;width:230px;height:114px;'">
+                        <div v-for="item in cagelist4" :key="item['id']"
+                            :style="'display:flex;height:4.55px;position: relative;'">
+                            <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
+                ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
+                            </div>
+                        </div>
+                    </div>
+                    <div :style="'position: absolute;z-index:1000;left:740px;top:730px;width:230px;height:90px;'">
+                        <div v-for="item in cagelist3" :key="item['id']"
+                            :style="'display:flex;height:2.25px;position: relative;'">
+                            <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
+                ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
+                            </div>
+                        </div>
+                    </div>
+                    <div :style="'position: absolute;z-index:1000;left:740px;top:830px;width:230px;height:90px;'">
+                        <div v-for="item in cagelist2" :key="item['id']"
+                            :style="'display:flex;height:2.25px;position: relative;'">
+                            <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
+                ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
+                            </div>
+                        </div>
+                    </div>
+                    <div :style="'position: absolute;z-index:1000;left:740px;top:930px;width:230px;height:90px;'">
+                        <div v-for="item in cagelist1" :key="item['id']"
+                            :style="'display:flex;height:2.25px;position: relative;'">
+                            <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
+                ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
                             </div>
                         </div>
                     </div>
@@ -413,16 +448,28 @@
         </el-main>
         <el-dialog :visible.sync="Importorder" :title="$t('Import order')" top="5vh">
             <!--鏂囦欢瀵煎叆鏁版嵁椤甸潰-->
-            <div id="fileinput" class="container">
+            <div id="" class="container">
                 <div class="header">
                     <div class="btn">
-                        <button @click="AllAdd">淇濆瓨</button>
-                    </div>
-                    <div class="inp">
+                        <el-button type="primary" @click="importData()">淇濆瓨</el-button>
+
                         <input type="file" id="uploadExcel" multiple @change="Change" />
                     </div>
                 </div>
-                <table id="table">
+                <el-table :data="this.dataList" border style="width: 100%;">
+                    <el-table-column prop="Customer" :label="$t('Customer')"></el-table-column>
+                    <el-table-column prop="order" :label="$t('Order')"></el-table-column>
+                    <el-table-column prop="base" :label="$t('Width')"></el-table-column>
+                    <el-table-column prop="height" :label="$t('Height')"></el-table-column>
+                    <el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column>
+                    <el-table-column prop="films" :label="$t('Films')"></el-table-column>
+                    <el-table-column prop="quantity" :label="$t('No')"></el-table-column>
+                    <el-table-column prop="tier" :label="$t('Tier')"></el-table-column>
+                    <el-table-column prop="matching" :label="$t('Matching')"></el-table-column>
+                    <el-table-column prop="glasstype" :label="$t('Glasstype')"></el-table-column>
+                    <el-table-column prop="productname" :label="$t('Productname')"></el-table-column>
+                </el-table>
+                <!-- <table id="table">
                     <thead>
                         <tr>
                             <th>Customer</th>
@@ -440,17 +487,6 @@
                     </thead>
                     <tbody style="text-align: center">
                         <tr v-for="item in dataList" :key="item.id">
-                            <!-- <td>{{ item[0] }}</td>
-                            <td>{{ item[1] }}</td>
-                            <td>{{ item[2] }}</td>
-                            <td>{{ item[3] }}</td>
-                            <td>{{ item[4] }}</td>
-                            <td>{{ item[5] }}</td>
-                            <td>{{ item[6] }}</td>
-                            <td>{{ item[7] }}</td>
-                            <td>{{ item[8] }}</td>
-                            <td>{{ item[9] }}</td>
-                            <td>{{ item[10] }}</td> -->
                             <td>{{ item.Customer }}</td>
                             <td>{{ item.order }}</td>
                             <td>{{ item.base }}</td>
@@ -464,7 +500,7 @@
                             <td>{{ item.productname }}</td>
                         </tr>
                     </tbody>
-                </table>
+                </table> -->
             </div>
         </el-dialog>
 
@@ -476,7 +512,9 @@
                     <el-button type="primary" @click="ManualMatching()" :disabled="SoftEmergencyStopState"
                         style="z-index: 999;">浜哄伐鍖归厤</el-button>
                     <el-button type="primary" @click="ManualTake()" :disabled="SoftEmergencyStopState"
-                        style="z-index: 999;">浜哄伐鍖归厤</el-button>
+                        style="z-index: 999;">浜哄伐鎷胯蛋</el-button>
+                    <el-button type="primary" @click="AnewMeasure()" :disabled="SoftEmergencyStopState"
+                        style="z-index: 999;">閲嶆柊娴嬮噺</el-button>
                 </div>
                 <!--鏄剧ず-->
                 <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;margin: auto auto;">
@@ -616,11 +654,11 @@
 <script>
 
 import {
-    home, home2, SelectCageInfo,
+    home, SelectCageInfo,
     Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue,
     isAllowReorderings,
 
-    UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue
+    UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue,importData,ManualTake,AnewMeasure
 } from "../../api/home";
 
 
@@ -993,6 +1031,15 @@
                 }
             }
         },
+        //鑾峰彇璁惧鏄剧ず鐘舵��
+        ShowCellList(num) {
+            if (num == null) {
+                return "";
+            } else if (num > 0) {
+                return "gray";
+                // return "rgba(0,0,0,1)";
+            }
+        },
         //鑾峰彇璁惧鐜荤拑id
         ShowGlassIdList(num) {
             if (this.GlassIdList != null && this.GlassIdList.length > 0) {
@@ -1006,7 +1053,21 @@
         },
         //浜哄伐鎷胯蛋
         ManualTake() {
-
+            let s="123";
+            ManualTake(s).then(res => {
+                if (res.data.message == 200) {
+                    console.log(res.data.message);
+                }
+            })
+        },
+        //閲嶆柊娴嬮噺
+        AnewMeasure() {
+            let s="123";
+            AnewMeasure(s).then(res => {
+                if (res.data.message == 200) {
+                    console.log(res.data.message);
+                }
+            })
         },
         Change(event) {
             // 鑾峰彇鍒版枃浠跺す
@@ -1037,12 +1098,16 @@
         Add() {
 
         },
-        Hide() {
-
-        },
-        AllAdd() {
-            //娣诲姞鏁版嵁杩涘悗鍙�
-            console.log(this.dataList);
+        importData() {
+            alert(1);
+            //let tbdata=JSON.stringify(this.dataList);
+            let tbdata=this.dataList;
+            console.log(tbdata);
+            importData(tbdata).then(res => {
+                if (res.data.message == 200) {
+                    //this.$message.success(this.$t('Operation successful'));
+                }
+            });
         },
         del() {
 

--
Gitblit v1.8.0