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

---
 springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java |    9 ++--
 springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java     |    6 +-
 springboot-vue3/src/main/java/MyGenerator.java                                       |    2 
 Albania_Mes-ui/src/lang/locales/en-US.json                                           |    4 ++
 Albania_Mes-ui/src/views/home/index.vue                                              |   35 +++++++++--------
 springboot-vue3/src/main/resources/application.properties                            |    2 
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java          |   38 +++++++++---------
 7 files changed, 51 insertions(+), 45 deletions(-)

diff --git a/Albania_Mes-ui/src/lang/locales/en-US.json b/Albania_Mes-ui/src/lang/locales/en-US.json
index 38a0ed7..c15415c 100644
--- a/Albania_Mes-ui/src/lang/locales/en-US.json
+++ b/Albania_Mes-ui/src/lang/locales/en-US.json
@@ -1,4 +1,8 @@
 {
+  "Customer":"Customer",
+  "Tier":"Tier",
+  "Matching":"Matching",
+  "Productname":"Productname",
   "All Out":"All Out",
   "Operation failed":"Operation canceled",
   "Flowcard":"Flowcard",
diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue
index 66c61af..a992f95 100644
--- a/Albania_Mes-ui/src/views/home/index.vue
+++ b/Albania_Mes-ui/src/views/home/index.vue
@@ -448,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">
                         <el-button type="primary" @click="importData()">淇濆瓨</el-button>
-                    </div>
-                    <div class="inp">
+
                         <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>
@@ -475,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>
@@ -499,7 +500,7 @@
                             <td>{{ item.productname }}</td>
                         </tr>
                     </tbody>
-                </table>
+                </table> -->
             </div>
         </el-dialog>
 
@@ -1098,7 +1099,7 @@
 
         },
         importData() {
-
+            alert(1);
             //let tbdata=JSON.stringify(this.dataList);
             let tbdata=this.dataList;
             console.log(tbdata);
diff --git a/springboot-vue3/src/main/java/MyGenerator.java b/springboot-vue3/src/main/java/MyGenerator.java
index f5a219f..9343999 100644
--- a/springboot-vue3/src/main/java/MyGenerator.java
+++ b/springboot-vue3/src/main/java/MyGenerator.java
@@ -18,7 +18,7 @@
 public class MyGenerator {
 
     /** 鏁版嵁婧愰厤缃�*/
-    private static final String jdbc = "jdbc:mysql://192.168.10.99:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai";
+    private static final String jdbc = "jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai";
     private static final String driverName = "com.mysql.cj.jdbc.Driver";
 
     private static final String username = "root";
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index c0a1c85..65d9ed9 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -121,10 +121,10 @@
                 // double width=Double.valueOf(plcmes.getPlcParameter("Height").getValue());//瀹�
                 // double height=Double.valueOf(plcmes.getPlcParameter("width").getValue());//楂�
 
-                String PlcRequest=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+"";
-                double width=Double.parseDouble(S7control.getinstance().ReadWord("DB14.28", 1).get(0)+"");
-                double height=Double.parseDouble(S7control.getinstance().ReadWord("DB14.30", 1).get(0)+"");
-                String MesSend=S7control.getinstance().ReadWord("DB14.170", 1).get(0)+"";
+                // String PlcRequest=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+"";
+                // double width=Double.parseDouble(S7control.getinstance().ReadWord("DB14.28", 1).get(0)+"");
+                // double height=Double.parseDouble(S7control.getinstance().ReadWord("DB14.30", 1).get(0)+"");
+                // String MesSend=S7control.getinstance().ReadWord("DB14.170", 1).get(0)+"";
 
                 //鑾峰彇娴嬮噺鐨勯暱锛屽
                 
@@ -143,23 +143,23 @@
                 // double width = 402;
                 // double height = 402;
                 
-                //鍖归厤
-                //System.err.println(PlcRequest+","+MesSend+","+width+","+height);
-                if ("0".equals(PlcRequest)) {
-                    S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 0);
-                }
-                if ("1".equals(PlcRequest)&&"0".equals(MesSend)) {
-                    boolean is=HomeService.Normal(width, height, "1");
-                    if (is) {
-                        // 娴嬮噺鎴愬姛
-                        S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
+                // //鍖归厤
+                // //System.err.println(PlcRequest+","+MesSend+","+width+","+height);
+                // if ("0".equals(PlcRequest)) {
+                //     S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 0);
+                // }
+                // if ("1".equals(PlcRequest)&&"0".equals(MesSend)) {
+                //     boolean is=HomeService.Normal(width, height, "1");
+                //     if (is) {
+                //         // 娴嬮噺鎴愬姛
+                //         S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
 
-                    }else{
-                        // 閲嶆柊娴嬮噺
-                        S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 4);
-                    }
+                //     }else{
+                //         // 閲嶆柊娴嬮噺
+                //         S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 4);
+                //     }
 
-                }
+                // }
                 Queue LastQueue= QueueMapper.selectLastQueue();
                 // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16));
                 // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14));
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index c7bc287..40f05a3 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -16,11 +16,11 @@
         // TODO Auto-generated method stub
         //
         System.out.println("鍚姩瀹屾垚");
-        new PLCAutoMes().start();
+        // new PLCAutoMes().start();
         // new PlcHold().start();
-        new PlcHoldNew().start();
+        // new PlcHoldNew().start();
 
-        //new Plchome().start();
+        new Plchome().start();
         // new PlcLayout().start();
         // new Plcalarm().start();
         // new Plcsign().start();
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
index f1fa40e..1b0eb51 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -284,9 +284,9 @@
     // 鏌ヨ璁㈠崟浠诲姟
     public List<FlowCard> SelectOrderTask() {
         List<FlowCard> OrderTask = homeMapper.SelectOrderTask();
-        // for (FlowCard flowcard : OrderTask) {
-        //     flowcard.setglassinfo(homeMapper.SelectOrderView(flowcard.getFlowcard()));
-        // }
+        for (FlowCard flowcard : OrderTask) {
+            flowcard.setglassinfo(homeMapper.SelectOrderView(flowcard.getFlowcard()));
+        }
         return OrderTask;
     }
 
@@ -401,12 +401,13 @@
                 glasstype = Integer.valueOf(value);
             }
             homeMapper.AddGlassinfo(map.get("order").toString(), glasstype,
-                    Integer.parseInt(map.get("glasstype").toString()) // 闇�瑕佽绠� 閰嶇墖ID
+                    Integer.parseInt(map.get("matching").toString()) // 闇�瑕佽绠� 閰嶇墖ID
                     , glasstype+"" // 闇�瑕佽绠� 鐜荤拑ID
                     , Integer.parseInt(map.get("tier").toString()), map.get("films").toString(),
                     Double.parseDouble(map.get("base").toString()), Double.parseDouble(map.get("height").toString()),
                     Double.parseDouble(map.get("thickness").toString()),
                     Integer.parseInt(map.get("quantity").toString()),groupby.get(tierkey));// 闇�瑕佽绠楁�诲眰鏁�
+            
         }
         Map<String, Object> ResultCode = new HashMap<>();
         ResultCode.put("message", "200");
diff --git a/springboot-vue3/src/main/resources/application.properties b/springboot-vue3/src/main/resources/application.properties
index d1ef623..5f6b5f7 100644
--- a/springboot-vue3/src/main/resources/application.properties
+++ b/springboot-vue3/src/main/resources/application.properties
@@ -6,7 +6,7 @@
 #\u6570\u636E\u5E93\u9A71\u52A8
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 #\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
-spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
 #\u6570\u636E\u5E93\u7528\u6237\u540D
 spring.datasource.username=root
 #\u6570\u636E\u5E93\u7528\u6237\u5BC6\u7801  

--
Gitblit v1.8.0