From f5df017deac69032a31b6f637c3ce80cd1c414cb Mon Sep 17 00:00:00 2001
From: zhaoxiaohao <279049017@qq.com>
Date: Wed, 03 Mar 2021 10:42:10 +0800
Subject: [PATCH] 将查看套餐的开始时间和结束时间与h端对应

---
 kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html |   64 +++++++++++++++-----------------
 1 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html
index 24705db..8bcc46f 100644
--- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html
+++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html
@@ -8,9 +8,9 @@
     </div>
     <div class="layui-card-body">
         <div class="layui-form toolbar">
-            <input id="app-edit-search" class="layui-input search-input" type="text" placeholder="请输入公司名称" />&emsp;
+            <input id="app-edit-search" class="layui-input search-input" type="text" placeholder="按公司名称" />&emsp;
             <button id="app-btn-search" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
-            <button id="user-btn-add" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
+            <button id="user-btn-add" class="layui-btn icon-btn permissions" permissions="syscompany-edit"><i class="layui-icon">&#xe654;</i>添加</button>
         </div>
 
         <!-- 数据表格 -->
@@ -21,8 +21,8 @@
 <!-- 表格操作列 -->
 <script type="text/html" id="company-table-bar">
     <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a>
-    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
-    <a class="layui-btn layui-btn-xs" lay-event="del">删除</a>
+    <a class="layui-btn layui-btn-xs permissions" permissions="syscompany-edit" lay-event="edit">编辑</a>
+    <a class="layui-btn layui-btn-xs permissions" permissions="syscompany-del"  lay-event="del">删除</a>
 </script>
 <!-- 表格状态列 -->
 <script type="text/html" id="company-tpl-state">
@@ -31,7 +31,7 @@
 </script>
 <!-- 表单弹窗 -->
 <script type="text/html" id="app-model">
-    <form id="app-form" lay-filter="app-form" class="layui-form model-form">
+    <form id="app-form" lay-filter="app-form" class="layui-form model-form" autocomplete="off" >
         <input name="id" type="hidden"/>
         <div class="layui-form-item">
             <label class="layui-form-label">租户</label>
@@ -106,7 +106,7 @@
         </div>
         <div class="layui-form-item model-form-footer">
             <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
-            <button class="layui-btn" id="sure" lay-filter="user-form-submit" lay-submit>保存</button>
+            <button class="layui-btn permissions" permissions="syscompany-edit"  id="sure" lay-filter="user-form-submit" lay-submit>保存</button>
         </div>
     </form>
 </script>
@@ -141,7 +141,7 @@
                 })
                 form.render();
             } else {
-                layer.msg(data.msg, { icon: 2, time: 500 });
+                layer.msg(data.msg, { icon: 2, time: 2000 });
             }
         }, 'Post');
 
@@ -164,16 +164,19 @@
             page: true,
             cols: [[
                 { type: 'numbers' },
-                { field: 'companyName', width: 180, sort: true, title: '公司名称' },
-                { field: 'companyProvince', width: 200, sort: true, title: '省' },
-                { field: 'companyCity', width: 180, sort: true, title: '市' },
-                { field: 'companyArea', width: 300, sort: true, title: '区县' },
-                { field: 'companyTel', width: 250, align: 'center', sort: true, title: '联系方式' },
-                { field: 'tenantId', width: 250, align: 'center', sort: true, title: '应用' },
-                { field: 'enabled', width: 250, align: 'center', templet: '#company-tpl-state', sort: true, title: '状态' },
-                { field: 'createTime', width: 250, sort: true, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy年MM月dd日 HH:mm:ss')}}</div>" },
-                { field: 'id', width: 250, align: 'center', toolbar: '#company-table-bar', sort: true, title: '操作' },
-            ]]
+                { field: 'companyName', width: 180, title: '公司名称' },
+                { field: 'companyProvince', width: 200, title: '省' },
+                { field: 'companyCity', width: 180, title: '市' },
+                { field: 'companyArea', width: 300, title: '区县' },
+                { field: 'companyTel', width: 250, align: 'center', title: '联系方式' },
+                { field: 'tenantId', width: 250, align: 'center', title: '应用' },
+                { field: 'enabled', width: 250, align: 'center', templet: '#company-tpl-state', title: '状态' },
+                { field: 'createTime', width: 250, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy-MM-dd HH:mm')}}</div>" },
+                { field: 'id', width: 250, align: 'center', toolbar: '#company-table-bar', title: '操作' },
+            ]],
+            done:function(res){
+                permissionsInput(res,config);
+            }
         });
 
         // 修改company状态
@@ -185,10 +188,10 @@
             }, function (data) {
                 layer.closeAll('loading');
                 if (data.code == 0) {
-                    layer.msg(data.msg, { icon: 1, time: 500 });
-                    //table.reload('table-user', {});
+                    layer.msg(data.msg, { icon: 1, time: 2000 });
+                    table.reload('table-user', {});
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                     $(obj.elem).prop('checked', !obj.elem.checked);
                     form.render('checkbox');
                 }
@@ -207,14 +210,9 @@
                     let selected = false;
                     clientsAll = data.data;
                     sheng = data.data;
-
-                    console.log(checkValue);
                     $.each(data.data, function (index, item) {
-                        // console.log( item.areaName);
                         if (checkValue == item.areaName) {
                             selected = true;
-                            console.log(item.areaName);
-                            console.log(selected);
                         } else {
                             selected = false;
                         }
@@ -223,7 +221,7 @@
                     })
                     form.render('select', id);
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                 }
             }, 'GET');
         }
@@ -283,7 +281,7 @@
                     })
                     form.render();
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                 }
             }, 'GET');
         }
@@ -309,7 +307,7 @@
                     })
                     form.render();
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                 }
             }, 'GET');
         }
@@ -332,7 +330,7 @@
                     })
                     form.render();
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                 }
             }, 'GET');
         }
@@ -351,10 +349,10 @@
                     admin.req('api-user/syscompany/' + obj.data.id, {}, function (data) {
                         layer.closeAll('loading');
                         if (data.code == 0) {
-                            layer.msg(data.msg, { icon: 1, time: 500 });
+                            layer.msg(data.msg, { icon: 1, time: 2000 });
                             table.reload('app-table', {});
                         } else {
-                            layer.msg(data.msg, { icon: 2, time: 500 });
+                            layer.msg(data.msg, { icon: 2, time: 2000 });
                         }
                     }, 'delete');
                 });
@@ -439,13 +437,11 @@
                         }
                         var shiId = "";
 
-                        console.log(shi_name)
                         $.each(shi_name, function (index, item) {
                             if (data.companyCity === item.areaName) {
                                 shiId = item.id;
                             }
                         })
-                        console.log(data.companyArea)
                         if (data.companyArea) {
                             getShi_and_xian(shiId, "xian", data.companyArea)
                         }
@@ -465,7 +461,7 @@
                     layer.closeAll();
                     table.reload('app-table', {});
                 } else {
-                    layer.msg(data.msg, { icon: 2, time: 500 });
+                    layer.msg(data.msg, { icon: 2, time: 2000 });
                 }
             }, "POST");
             return false;

--
Gitblit v1.8.0