From b6389bbd7709d5c1ab216c1ec2adc4713be0507f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 08 十一月 2022 08:26:14 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/cstmr/cstmr_more.html |   78 ++++++++++++++++++++++++++++++++++----
 1 files changed, 69 insertions(+), 9 deletions(-)

diff --git a/src/main/webapp/views/cstmr/cstmr_more.html b/src/main/webapp/views/cstmr/cstmr_more.html
index fc8fcc5..72fed02 100644
--- a/src/main/webapp/views/cstmr/cstmr_more.html
+++ b/src/main/webapp/views/cstmr/cstmr_more.html
@@ -86,8 +86,8 @@
                 </div>
             </div>
         </div>
-        <!-- 鍩烘湰淇℃伅 -->
         <div class="layui-row">
+            <!-- 鍩烘湰淇℃伅 -->
             <div class="layui-col-md9">
                 <div class="layui-card">
                     <div class="layui-card-header">
@@ -178,11 +178,12 @@
                     </div>
                 </div>
             </div>
+            <!-- 璺熻繘浜� -->
             <div class="layui-col-md3" style="width: 24%;margin-left: 1%">
                 <div class="layui-card">
                     <div class="layui-card-header">
                         <span>璺熻繘浜�</span>
-                        <span style="float: right;cursor: pointer;">
+                        <span class="follower-add" style="float: right;cursor: pointer;">
                             <i class="layui-icon" style="font-size: 20px;color: #1890ff;">&#xe61f;</i>
                         </span>
                     </div>
@@ -200,6 +201,24 @@
     </div>
 
 </form>
+<!-- 璺熻繘浜� -->
+<script type="text/html" id="followerEditDialog">
+    <form id="matEditForm" lay-filter="matEditForm" class="layui-form model-form">
+        <input name="experimentId" type="hidden"/>
+        <div class="layui-form-item" style="">
+            <label class="layui-form-label">閫夋嫨鎴愬憳</label>
+            <div class="layui-input-block">
+                <div id="mat" name="mat">
+                </div>
+            </div>
+        </div>
+        <div class="layui-form-item text-right" style="">
+            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+            <button class="layui-btn" lay-filter="matEditSubmit" lay-submit>淇濆瓨</button>
+        </div>
+    </form>
+</script>
+
 <script>
     var cstmrId = top.cstmrByMore;
     $('.layui-layer-close').hide();
@@ -207,12 +226,13 @@
         base: baseUrl + "/static/layui/lay/modules/"
     }).extend({
         notice: 'notice/notice',
-    }).use(['form', 'table', 'laydate', 'notice'], function () {
+    }).use(['form', 'table', 'laydate', 'notice', 'xmSelect'], function () {
         var $ = layui.jquery;
         var form = layui.form;
         var table = layui.table;
         var laydate = layui.laydate;
         var notice = layui.notice;
+        var xmSelect = layui.xmSelect;
 
         form.render('select');
 
@@ -266,7 +286,7 @@
                 where: {
                     cstmrId: cstmrId
                 },
-                height: 'full-100',
+                // height: 'full-100',
                 headers: {token: localStorage.getItem('token')},
                 request: {
                     pageName: 'curr',
@@ -283,11 +303,6 @@
                 response: {
                     statusCode: 200
                 },
-                toolbar: ['<p>',
-                    '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon">&#xe654;</i>娣诲姞</button>&nbsp;',
-                    '<button lay-event="edit" class="layui-btn layui-btn-sm layui-btn-warm icon-btn"><i class="layui-icon">&#xe642;</i>淇敼</button>&nbsp;',
-                    '<button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon">&#xe640;</i>鍒犻櫎</button>',
-                    '</p>'].join(''),
                 defaultToolbar: [],
                 cols: [[
                     {field: 'id', title: '缂栧彿', width: 70, align: 'center'},
@@ -300,6 +315,51 @@
             });
         }
 
+        // 娣诲姞璺熻繘浜�
+        $(document).on('click', ".follower-add", function () {
+            admin.open({
+                type: 1,
+                offset: '150px',
+                area: '400px',
+                title: '娣诲姞璺熻繘浜�',
+                content: $('#followerEditDialog').html(),
+                success: function (layero, dIndex) {
+                    // let selectList = matXmSelect.getValue();
+                    // 娓叉煋鐗╂枡閫夋嫨
+                    var matXmSelect = xmSelect.render({
+                        el: '#mat',
+                        style: {
+                            width: '280px',
+                        },
+                        autoRow: true,
+                        toolbar: { show: true },
+                        filterable: true,
+                        remoteSearch: true,
+                        remoteMethod: function(val, cb, show){
+                            $.ajax({
+                                url: baseUrl+"/mat/all/get/kv",
+                                headers: {'token': localStorage.getItem('token')},
+                                data: {
+                                    condition: val
+                                },
+                                method: 'POST',
+                                success: function (res) {
+                                    if (res.code === 200){
+                                        cb(res.data)
+                                    } else {
+                                        cb([]);
+                                        layer.msg(res.msg, {icon: 2});
+                                    }
+                                }
+                            });
+                        }
+                    })
+                    // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+                    $(layero).children('.layui-layer-content').css('overflow', 'visible');
+                    layui.form.render('select');
+                }
+            })
+        })
 
         /* 鐩戝惉琛ㄥ崟鎻愪氦 */
         form.on('submit(refresh)', function (data) {

--
Gitblit v1.9.1