From 564bf7ab6a639c2c4557d35b8fd9b51dca60a738 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 22 八月 2023 13:32:34 +0800
Subject: [PATCH] #规则完善

---
 src/main/webapp/views/cstmr/cstmr_more.html |   76 ++++++++++---------------------------
 1 files changed, 21 insertions(+), 55 deletions(-)

diff --git a/src/main/webapp/views/cstmr/cstmr_more.html b/src/main/webapp/views/cstmr/cstmr_more.html
index 8240b4c..08e4c2a 100644
--- a/src/main/webapp/views/cstmr/cstmr_more.html
+++ b/src/main/webapp/views/cstmr/cstmr_more.html
@@ -22,27 +22,18 @@
         background-color: #fff;
         box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
     }
-    .cool-divider {
-        float: left;
-        margin: 4px 18px;
-        display: inline-block;
-        height: 32px;
-        width: 1px;
-        vertical-align: middle;
-        position: relative;
-        top: -.06em;
-        box-sizing: border-box;
-        -webkit-tap-highlight-color: transparent;
-        margin-top: 5px !important;
-        margin-bottom: 5px !important;
-        background: #c8d1dabd;
-    }
 
     .card-body-item {
         display: inline-block;
         border-right: 1px solid #e0e0e0;
         width: 250px;
         padding: 0 30px 0 10px;
+    }
+    .header-desc {
+        overflow:hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        -o-text-overflow:ellipsis;
     }
 
 </style>
@@ -51,10 +42,11 @@
     <div class="layui-fluid" style="padding-bottom: 75px;">
         <!-- 鏍囬 -->
         <div class="layui-card">
-            <div class="layui-card-header">
+            <div class="layui-card-header" style="padding-top: 5px; padding-bottom: 5px">
                 <div>
                     <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold">&#xe68e;</i>
                     <span id="form-name" style="margin: 0 6px;font-size: 18px;font-weight: bold;letter-spacing: 1px"></span>
+                    <span style="opacity: .5;font-size: small;margin-left: 5px">鐢叉柟鍗曚綅</span>
                 </div>
             </div>
             <div class="layui-card-body">
@@ -67,7 +59,7 @@
                     </div>
                 </div>
 
-                <div class="card-body-item">
+                <div class="card-body-item" style="width: 400px">
                     <div class="header-sub">
                         璇︾粏鍦板潃
                     </div>
@@ -183,7 +175,7 @@
                 <div class="layui-card">
                     <div class="layui-card-header">
                         <span>璺熻繘浜�</span>
-                        <span id="follower-add" style="float: right;cursor: pointer;">
+                        <span lay-filter="followerAdd" lay-submit style="float: right;cursor: pointer;">
                             <i class="layui-icon" style="font-size: 20px;color: #1890ff;">&#xe61f;</i>
                         </span>
                     </div>
@@ -197,7 +189,6 @@
 
     <div class="form-group-bottom text-right">
         <button class="layui-btn" lay-filter="refresh" lay-submit><i class="layui-icon">&#xe666;</i>&emsp;鍒锋柊&emsp;</button>
-        <button class="layui-btn layui-btn-normal" lay-filter="save" lay-submit><i class="layui-icon">&#xe654;</i>&emsp;淇濆瓨&emsp;</button>
     </div>
 
 </form>
@@ -255,7 +246,7 @@
                         top.cstmrByMore = null;
                         $("#form-name").html(cstmr.name);
                         if (cstmr.tel) {$("#form-tel").html(cstmr.tel);}
-                        if (cstmr.addr) {$("#form-addr").html(cstmr.addr);}
+                        if (cstmr.addr) {$("#form-addr").html(cstmr.addr);$("#form-addr").attr("title", cstmr.addr);}
                         if (cstmr.director$) {$("#form-director").html(cstmr.director$);}
                         // 璁惧鏄庣粏
                         form.val('formAdvForm', cstmr);
@@ -297,6 +288,8 @@
                         var follTab = table.render({
                             elem: '#followersTable',
                             data: res.data,
+                            limit: 999,
+                            height: 'full-408',
                             cols: [[
                                 {field: 'userName', title: '宸ヤ綔浜哄憳'},
                                 {fixed: 'right', title:'', align: 'center', toolbar: '#followerTabOperate', width: 70}
@@ -344,7 +337,7 @@
 
         // 娣诲姞璺熻繘浜�
         var followerLayer;
-        $(document).on('click', "#follower-add", function () {
+        form.on('submit(followerAdd)', function (data) {
             if (followerLayer) {return;}
             followerLayer = admin.open({
                 type: 1,
@@ -360,6 +353,7 @@
                             layer.msg("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�", {icon: 3});
                             return false;
                         }
+                        let loadIndex = layer.load(2);
                         $.ajax({
                             url: baseUrl+"/cstmr/followers/add/auth",
                             headers: {'token': localStorage.getItem('token')},
@@ -372,6 +366,7 @@
                             method: 'POST',
                             success: function (res) {
                                 if (res.code === 200){
+                                    layer.close(loadIndex);
                                     initFollowers(cstmrId);
                                 } else if (res.code === 403){
                                     top.location.href = baseUrl+"/";
@@ -414,47 +409,18 @@
                     // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
                     $(layero).children('.layui-layer-content').css('overflow', 'visible');
                     layui.form.render('select');
+                },
+                end: function () {
+                    followerLayer = null;
                 }
             })
-        })
+        });
 
         /* 鐩戝惉琛ㄥ崟鎻愪氦 */
         form.on('submit(refresh)', function (data) {
             init();
             return false;
         });
-        form.on('submit(save)', function (elem) {
-            let data = elem.field;
-            notice.msg('姝e湪鎷煎懡淇敼鏁版嵁......', {icon: 4, position: "topRight"});
-            $.ajax({
-                url: baseUrl + "/issue/process/auth",
-                headers: {'token': localStorage.getItem('token')},
-                contentType: 'application/json;charset=UTF-8',
-                method: 'POST',
-                data: JSON.stringify({
-                    id: Number(data.id),
-                    uuid: data.uuid,
-                    dealer: data.dealer,
-                    settle: Number(data.settle),
-                    endTime: top.strToDate(data.endTime$),
-                    // lastTime: data.lastTime,
-                    reason: data.reason,
-                    deal: data.deal,
-                }),
-                success: function (res) {
-                    notice.destroy();
-                    if (res.code === 200) {
-                        notice.success({title: '娑堟伅閫氱煡', message: res.msg});
-                        $('.layui-layer-close').click();
-                    } else if (res.code === 403) {
-                        top.location.href = baseUrl + "/";
-                    } else {
-                        notice.error({title: '娑堟伅閫氱煡', message: res.msg});
-                    }
-                }
-            })
-            return false;
-        });
 
-    });
+    })
 </script>

--
Gitblit v1.9.1