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

---
 src/main/webapp/views/dept/dept.html |   65 ++++++++++++++++----------------
 1 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/src/main/webapp/views/dept/dept.html b/src/main/webapp/views/dept/dept.html
index ef03e88..28d0c6a 100644
--- a/src/main/webapp/views/dept/dept.html
+++ b/src/main/webapp/views/dept/dept.html
@@ -70,19 +70,16 @@
                 </div>
 
                 <div class="layui-form-item">
-                    <label class="layui-form-label">绫诲瀷</label>
+                    <label class="layui-form-label">閭</label>
                     <div class="layui-input-block">
-                        <select name="type" lay-vertype="tips">
-                            <option value="">璇烽�夋嫨绫诲瀷</option>
-                            <option value="0">鍏朵粬</option>
-                        </select>
+                        <input name="email" placeholder="璇疯緭鍏ラ偖绠�" class="layui-input">
                     </div>
                 </div>
 
                 <div class="layui-form-item">
-                    <label class="layui-form-label">璐熻矗浜�</label>
+                    <label class="layui-form-label">鑱旂郴鐢佃瘽</label>
                     <div class="layui-input-block">
-                        <input name="leading" placeholder="璇疯緭鍏ヨ礋璐d汉" class="layui-input">
+                        <input name="phone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" class="layui-input">
                     </div>
                 </div>
 
@@ -91,9 +88,9 @@
             <div class="layui-col-md6">
 
                 <div class="layui-form-item">
-                    <label class="layui-form-label layui-form-required">褰掔被鍚嶇О</label>
+                    <label class="layui-form-label layui-form-required">閮ㄩ棬鍚嶇О</label>
                     <div class="layui-input-block">
-                        <input name="name" placeholder="璇疯緭鍏ュ綊绫诲悕绉�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+                        <input name="name" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
                     </div>
                 </div>
 
@@ -158,13 +155,13 @@
                 ,{type: 'numbers'}
                 ,{field: 'name', align: 'left',title: '鍚嶇О', minWidth: 150}
                 // ,{field: 'uuid', align: 'center',title: '缂栧彿'}
-                ,{field: 'type$', align: 'center',title: '绫诲瀷'}
-                ,{field: 'leading', align: 'center',title: '璐熻矗浜�'}
+                ,{field: 'email', align: 'center',title: '閭'}
+                ,{field: 'phone', align: 'center',title: '鑱旂郴鐢佃瘽'}
                 ,{field: 'img', align: 'center',title: '鍥剧墖', hide: true}
                 // ,{field: 'brief', align: 'center',title: '绠�瑕佹弿杩�'}
                 // ,{field: 'count', align: 'center',title: '鏁伴噺'}
                 ,{field: 'sort', align: 'center',title: '鎺掑簭'}
-                ,{field: 'status$', align: 'center',title: '鐘舵��'}
+                // ,{field: 'status$', align: 'center',title: '鐘舵��'}
                 ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
                 ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
                 ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
@@ -220,7 +217,9 @@
                     form.val('detail', mData);
                     // 琛ㄥ崟鎻愪氦浜嬩欢
                     form.on('submit(editSubmit)', function (data) {
-                        data.field.parentId = insXmSel.getValue('valueStr');
+                        if(insXmSel != null){
+                            data.field.parentId = insXmSel.getValue('valueStr');
+                        }
                         var loadIndex = layer.load(2);
                         $.ajax({
                             url: baseUrl+"/dept/"+(mData?'update':'add')+"/auth",
@@ -243,25 +242,27 @@
                         return false;
                     });
                     // 娓叉煋涓嬫媺鏍�
-                    var insXmSel = xmSelect.render({
-                        el: '#deptParentSel',
-                        height: '250px',
-                        data: insTb.options.data,
-                        initValue: mData ? [mData.parentId] : [],
-                        model: {label: {type: 'text'}},
-                        prop: {
-                            name: 'name',
-                            value: 'id'
-                        },
-                        radio: true,
-                        clickClose: true,
-                        tree: {
-                            show: true,
-                            indent: 15,
-                            strict: false,
-                            expandedKeys: true
-                        }
-                    });
+                    if(mData == null || mData.parentId != null ) {//闈為《绾ф牴鑺傜偣锛屼笖鏄慨鏀�
+                        var insXmSel = xmSelect.render({
+                            el: '#deptParentSel',
+                            height: '250px',
+                            data: insTb.options.data,
+                            initValue: mData ? [mData.parentId] : [],
+                            model: {label: {type: 'text'}},
+                            prop: {
+                                name: 'name',
+                                value: 'id'
+                            },
+                            radio: true,
+                            clickClose: true,
+                            tree: {
+                                show: true,
+                                indent: 15,
+                                strict: false,
+                                expandedKeys: true
+                            }
+                        });
+                    }
                     // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
                     $(layero).children('.layui-layer-content').css('overflow', 'visible');
                     layui.form.render('select');

--
Gitblit v1.9.1