From 23d7909b52e22eb42900a506c7d8b72f58f28944 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 03 七月 2023 17:36:21 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pda/index.html |   60 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/src/main/webapp/views/pda/index.html b/src/main/webapp/views/pda/index.html
index 55f229b..8199ff8 100644
--- a/src/main/webapp/views/pda/index.html
+++ b/src/main/webapp/views/pda/index.html
@@ -5,6 +5,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
     <title>PDA棣栭〉</title>
     <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+    <script type="text/javascript" src="../../static/js/common.js"></script>
     <style>
         * {
             margin: 0;
@@ -100,39 +101,31 @@
             <div id="combAgv" onclick="nav(this.id)" class="nav-font-size">灏忚溅缁勬墭鍏ュ簱</div>
         </td>
         <td>
-            <div id="comb" onclick="nav(this.id)" class="nav-font-size">绔嬪簱缁勬墭鍏ュ簱</div>
+            <div id="combProAgv" onclick="nav(this.id)" class="nav-font-size">灏忚溅鍏宠仈缁勬墭</div>
         </td>
     </tr>
     <tr>
+        <td>
+            <div id="comb" onclick="nav(this.id)" class="nav-font-size">绔嬪簱缁勬墭鍏ュ簱</div>
+        </td>
         <td>
             <div id="combPro" onclick="nav(this.id)" style="font-size: 15px">绔嬪簱浠诲姟鍗曞叆搴�</div>
         </td>
-        <td>
-            <div id="stockIn" onclick="nav(this.id)" class="nav-font-size">绔嬪簱閰嶄欢鍏ュ簱</div>
-        </td>
     </tr>
     <tr>
-        <td>
-            <div id="stockOut" onclick="nav(this.id)" class="nav-font-size">绔嬪簱閰嶄欢鍑哄簱</div>
-        </td>
         <td>
             <div id="locNormalIn1" onclick="nav(this.id)" class="nav-font-size">骞充粨鏉愭枡鍏ュ簱</div>
         </td>
-    </tr>
-    <tr>
         <td>
             <div id="locNormalOut1" onclick="nav(this.id)" class="nav-font-size">骞充粨鏉愭枡鍑哄簱</div>
         </td>
-        <td>
-            <div id="locNormalIn" onclick="nav(this.id)" class="nav-font-size">骞充粨鎴愬搧鍏ュ簱</div>
-        </td>
     </tr>
     <tr>
         <td>
-            <div id="locNormalOut" onclick="nav(this.id)" class="nav-font-size">骞充粨鎴愬搧鍑哄簱</div>
+            <div id="locNormalIn" onclick="nav(this.id)" class="nav-font-size">骞充粨鎴愬搧鍏ュ簱</div>
         </td>
         <td>
-            <div id="locNormalMove" onclick="nav(this.id)" class="nav-font-size">骞充粨鎴愬搧绉诲簱</div>
+            <div id="locNormalOut" onclick="nav(this.id)" class="nav-font-size">骞充粨鎴愬搧鍑哄簱</div>
         </td>
     </tr>
 </table>
@@ -143,6 +136,43 @@
 
 </body>
 <script>
+    $(function(){
+        $.ajax({
+            url: baseUrl+"/user/roleId/auth",
+            headers: {'token': localStorage.getItem('token')},
+            method: 'GET',
+            success: function (res) {
+                if (res.code === 200){
+                    console.log(res)
+                    if (res.data.code === 'a') {
+                        $("#combAgv").parent().hide();
+                        $("#combProAgv").parent().hide();
+                        $("#comb").parent().hide();
+                        $("#combPro").parent().hide();
+                        $("#locNormalIn").parent().hide();
+                        $("#locNormalOut").parent().hide();
+                    } else if (res.data.code === 'b') {
+                        $("#locNormalIn1").parent().hide();
+                        $("#locNormalOut1").parent().hide();
+                        // $("#locNormalIn").parent().hide();
+                        // $("#locNormalOut").parent().hide();
+                    } else if (res.data.code === 'c') {
+                        $("#combAgv").parent().hide();
+                        $("#combProAgv").parent().hide();
+                        $("#comb").parent().hide();
+                        $("#combPro").parent().hide();
+                        $("#locNormalIn1").parent().hide();
+                        $("#locNormalOut1").parent().hide();
+                    }
+                } else if (res.code === 403){
+                    top.location.href = baseUrl+"/";
+                }else {
+                    layer.msg(res.msg, {icon: 2});
+                }
+            }
+        })
+    });
+
     // 瀵艰埅鏍�
     function nav(id) {
 //        $('.nav-select').attr("class", "nav-unselect");
@@ -164,4 +194,4 @@
         $('#content').css('display', 'none');
     }
 </script>
-</html>
\ No newline at end of file
+</html>

--
Gitblit v1.9.1