diff --git a/component/pear/modules/tab.js b/component/pear/modules/tab.js index e6784c8..edc1f91 100644 --- a/component/pear/modules/tab.js +++ b/component/pear/modules/tab.js @@ -471,7 +471,6 @@ layui.define(['jquery', 'element'], function(exports) { }else{ layer.msg("当前页面不允许关闭",{icon:3,time:800}) } - }) $("body .layui-tab[lay-filter='" + option.elem + "']").on("click", "#closeOther", function() { diff --git a/view/document/area.html b/view/document/area.html index 2034f88..2ba4dab 100644 --- a/view/document/area.html +++ b/view/document/area.html @@ -60,6 +60,35 @@ +
+
+
+ 基本使用 +
+
+
+
+
网点地址
+
+ +
+
+ +
+
+ +
+
+
+
+
+
@@ -99,6 +128,14 @@ console.log(res); } }); + + area.render({ + elem: '#area-picker-copy', + change: function(res) { + //选择结果 + console.log(res); + } + }); }); diff --git a/view/document/table.html b/view/document/table.html index e246e7d..28b0929 100644 --- a/view/document/table.html +++ b/view/document/table.html @@ -1,40 +1,40 @@ - - - - - - -
-
-
-
- -
- + + + + + + +
+
+ +
+ +
+ +
+ +
+ +
+ +
- -
- -
- - -
- + +
-
-
-
-
+
+
+
+
-
- + - -
-
-

上侧弹层内容...

+ + +
+
+
+

上侧弹层内容...

+
+ + + + - - - + form.on('switch(user-enable)', function(obj) { + layer.tips(this.value + ' ' + this.name + ':' + obj.elem.checked, obj.othis); + }); + + window.add = function() { + drawer.open({ + direction: "top", + dom: ".layer-top", + distance: "30%" + }); + } + + window.edit = function(obj) { + layer.msg("修改"); + } + + window.remove = function(obj) { + layer.confirm('确定要删除该用户', { + icon: 3, + title: '提示' + }, function(index) { + layer.close(index); + let loading = layer.load(); + $.ajax({ + url: MODULE_PATH + "remove/" + obj.data['userId'], + dataType: 'json', + type: 'delete', + success: function(result) { + layer.close(loading); + if (result.success) { + layer.msg(result.msg, { + icon: 1, + time: 1000 + }, function() { + obj.del(); + }); + } else { + layer.msg(result.msg, { + icon: 2, + time: 1000 + }); + } + } + }) + }); + } + + window.batchRemove = function(obj) { + let data = table.checkStatus(obj.config.id).data; + if (data.length === 0) { + layer.msg("未选中数据", { + icon: 3, + time: 1000 + }); + return false; + } + let ids = ""; + for (let i = 0; i < data.length; i++) { + ids += data[i].userId + ","; + } + ids = ids.substr(0, ids.length - 1); + layer.confirm('确定要删除这些用户', { + icon: 3, + title: '提示' + }, function(index) { + layer.close(index); + let loading = layer.load(); + $.ajax({ + url: MODULE_PATH + "batchRemove/" + ids, + dataType: 'json', + type: 'delete', + success: function(result) { + layer.close(loading); + if (result.success) { + layer.msg(result.msg, { + icon: 1, + time: 1000 + }, function() { + table.reload('user-table'); + }); + } else { + layer.msg(result.msg, { + icon: 2, + time: 1000 + }); + } + } + }) + }); + } + + window.refresh = function(param) { + table.reload('user-table'); + } + }) + +