Commit de581a4c authored by 刘丹's avatar 刘丹

搜索

parent 9e89b2bf
......@@ -54,7 +54,6 @@
<th>门店名</th>
<th>区域</th>
<th>注册时间</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
......@@ -63,7 +62,7 @@
</tbody>
</table>
<!-- 列表底部按钮 -->
<div class="paginations" id="pagediv">
<div class="paginations text-right" id="pagediv">
</div>
</div>
</div>
......@@ -187,6 +186,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">角色选择:</label>
<select name="status" class="form-control btn6" id="User_add">
<option>你还没有勾选,无法选择,请返回!</option>
<!--<option value="0">正常</option>-->
<!--<option value="1" >冻结</option>-->
<!--<option value="2">离职</option>-->
......
......@@ -23,6 +23,25 @@
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form id="form_search">
<!-- 搜索框 -->
<div class="col-xs-12 col-sm-3 clearfix fl margin-top-ld">
<form class="form form-inline" method="get" action="/admin.php/admin/user/index.html">
<div class="form-group">
<div class="input-group search-form">
<input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID">
<span class="input-group-btn">
<button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button>
</span>
</div>
</div>
</form>
</div>
</form>
</td>
</tr>
<tr>
<th width="50" class="checkbox-toggle"><div class="icheckbox_minimal-blue" style="position: relative;" aria-checked="false" aria-disabled="false"><input type="checkbox" class="check-all" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div><!-- <span class="checkbox-toggle" style="color:#ddd;font-size:23px;cursor:pointer;"><i class="fa fa-square-o"></i></span> --></th>
<th>ID</th>
......
......@@ -22,12 +22,31 @@
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form id="form_search">
<!-- 搜索框 -->
<div class="col-xs-12 col-sm-3 clearfix fl margin-top-ld">
<form class="form form-inline" method="get" action="/admin.php/admin/user/index.html">
<div class="form-group">
<div class="input-group search-form">
<input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID/用户名/昵称">
<span class="input-group-btn">
<button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button>
</span>
</div>
</div>
</form>
</div>
</form>
</td>
</tr>
<tr>
<th class="text-center">ID</th>
<th class="text-center">角色名</th>
<th class="text-center">描述</th>
<th class="text-center">状态</th>
<th class="text-center">操作</th>
</tr>
</thead>
......
......@@ -110,21 +110,14 @@
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
<div class="page-cla">
<ul class="pagination">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
</div>
</div>
</div>
......
......@@ -25,15 +25,52 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
agent.Edit_add();
});
$ (document).delegate (".User_add", "click", function () {//点击变更
//var user_check=$("input[name=ids]").is(":checked");
agent.User_add();
var use_checkde=$("input[name=ids]").is(":checked");
if(use_checkde==true){
agent.User_add();
}else{
return false;
}
});
$ (document).delegate (".submit_user", "click", function () {//提交变更
agent.Submit_user();
agent.getList();
});
$ (document).delegate (".is_show", "click", function () {//点击禁用
if (!confirm('是否继续?')) {
return ;
}
agent.id = $ (this).attr ("data-id");
var params ={
};
params.id = $ (this).attr ("data-id");
var str = $.trim($(this).html());
if (str === "正常") {
params.type = 1;
$(this).html('冻结');
} else if (str === "冻结"){
params.type = 0;
$(this).html('正常');
}else{
params.type = 2;
}
$.ajax({//禁用
'type': 'POST',
'url' : '/index/updateStatus',
data: {"ids":agent.id,"status":params.type},
dataType: "json",
success: function(data){
if(data.code == 200){
if (data.data) {
}
} else {
alert("禁用失败!")
}
}
});
});
},
Submit_user:function(){//提交变更的信息
var v='';
......@@ -72,6 +109,7 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
}
});
},
Edit_add:function(){
$.ajax({
url: '/index/getAuth2',
......
......@@ -9,6 +9,9 @@ define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagina
auth.event ();
},
event: function () {
$ (document).delegate ("#search", "click", function () {//点击编辑
auth.getList(1);
});
$ (document).delegate (".edit", "click", function () {//点击编辑
auth.house_id = $ (this).attr ("data-id");
auth.Edit();
......@@ -24,6 +27,42 @@ define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagina
$ (document).delegate (".submit_power", "click", function () {//点击提交权限
auth.Submit_power();
});
$ (document).delegate (".is_show", "click", function () {//点击禁用
if (!confirm('是否继续?')) {
return ;
}
auth.id = $ (this).attr ("data-id");
var params ={
};
params.id = $ (this).attr ("data-id");
var str = $.trim($(this).html());
if (str === "正常") {
params.type = 1;
$(this).html('冻结');
} else if (str === "冻结"){
params.type = 0;
$(this).html('正常');
}else{
params.type = 2;
}
$.ajax({//禁用
'type': 'POST',
'url' : '/index/updateGroup',
data: {"ids":auth.id,"status":params.type},
dataType: "json",
success: function(data){
if(data.code == 200){
if (data.data) {
}
} else {
alert("禁用失败!")
}
}
});
});
},
Edit:function(){//获取
$.ajax({
......@@ -101,7 +140,7 @@ define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagina
var params = {};
params.pageNo = auth.pageNo;
params.pageSize = auth.pageSize;
params.search = $("input[name='search']").val();
$.ajax ({
url: '/index/getAuth.html',//列表数据
type: 'GET',
......
......@@ -9,6 +9,9 @@ authRule={
authRule.event();
},
event:function () {
$ (document).delegate ("#search", "click", function () {//点击编辑
authRule.getList(1);
});
$ (document).delegate (".edit", "click", function () {//点击编辑
authRule.house_id = $ (this).attr ("data-id");
authRule.Edid_add();
......@@ -83,6 +86,7 @@ authRule={
var params ={};
params.pageNo =authRule.pageNo;
params.pageSize=authRule.pageSize;
params.search = $("input[name='search']").val();
$.ajax({
url: '/index/AuthRulelist.html',
type: 'GET',
......
......@@ -23,11 +23,18 @@
<td>[%= it[item]["store_name"] %]</td>
<td>[%= it[item]["district_name"] %]</td>
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["status"] %]</td>
<!--<td><span class="fa fa-check text-success"></span></td>-->
<td>
<a class="btn1 btn-success edit" href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>编辑</a>
<a style="margin-right:6px;" href="" class="btn btn-warning btn-xs ajax-get confirm" title="禁用">禁用</a>
[% if(it[item]["status"] == 0) { %]
<a class="btn1 btn-info is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]'>正常</a>
[% }else if(it[item]["status"] == 1) { %]
<a class="btn1 btn-info is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]'>冻结</a>
[% }else{ %]
<a class="btn1 btn-default" data-toggle="modal" data-id='[%= it[item]["id"] %]'>离职</a>
[% } %]
</td>
</tr>
[% } %]
......
......@@ -9,10 +9,16 @@
[%= it[item]['description'] %]
[% } %]
</td>
<td>[%= it[item]["status"] %]</td>
<td>
<a class="btn1 btn-success edit" href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>编辑</a>
<a class="btn btn-info btn-xs power" href="#modal-power" data-toggle="modal" data-id='[%= it[item]["id"] %]'>权限分配</a>
[% if(it[item]["status"] == 0) { %]
<a class="btn1 btn-info is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]'>正常</a>
[% }else if(it[item]["status"] == 1) { %]
<a class="btn1 btn-info is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]'>冻结</a>
[% }else{ %]
<a class="btn1 btn-default" data-toggle="modal" data-id='[%= it[item]["id"] %]'>离职</a>
[% } %]
</td>
</tr>
[% } %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment