Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
8e51c33d
Commit
8e51c33d
authored
Jan 19, 2021
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aidea product update by Strive Date 2020-01-19
parent
ded26f20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
414 additions
and
419 deletions
+414
-419
userlist.html
...eb/src/main/webapp/WEB-INF/views/manageuser/userlist.html
+414
-419
No files found.
sys-module-web/src/main/webapp/WEB-INF/views/manageuser/userlist.html
View file @
8e51c33d
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
<!-- AdminLTE Skins. Choose a skin from the css/skins
...
@@ -38,437 +38,432 @@
...
@@ -38,437 +38,432 @@
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]-->
</head>
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<section
class=
"content-header"
>
<h1>
<h1>
用户管理
用户管理
<small>
用户信息
</small>
<small>
用户信息
</small>
</h1>
</h1>
<!-- <ol class="breadcrumb"> -->
<!-- <ol class="breadcrumb"> -->
<!-- <li><a href="#springUrl('/page/user/showstatics')"><i class="fa fa-dashboard"></i>首页</a></li> -->
<!-- <li><a href="#springUrl('/page/user/showstatics')"><i class="fa fa-dashboard"></i>首页</a></li> -->
<!-- <li><a class="active">用户列表</a></li> -->
<!-- <li><a class="active">用户列表</a></li> -->
<!-- </ol> -->
<!-- </ol> -->
</section>
</section>
<input
style=
"display: none"
id=
"storeBindId"
>
<input
style=
"display: none"
id=
"storeBindId"
>
<input
style=
"display: none"
id=
"storeBindName"
>
<input
style=
"display: none"
id=
"storeBindName"
>
<!-- Main content -->
<!-- Main content -->
<section
class=
"content"
>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/manageuser/userlist')"
method=
"get"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/manageuser/userlist')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
value=
"$!{user.username}"
name=
"username"
placeholder=
"用户名称"
>
<input
type=
"text"
class=
"form-control required"
value=
"$!{user.username}"
<input
type=
"text"
name=
"fansid"
id=
"fansid"
name=
"username"
placeholder=
"用户名称"
>
value=
"$!{activityName}"
<input
type=
"text"
name=
"fansid"
id=
"fansid"
class=
"form-control"
style=
"display: none"
/>
value=
"$!{activityName}"
<input
type=
"text"
id=
"fansopenid"
class=
"form-control"
style=
"display: none"
/>
name=
"fansopenid"
value=
""
<input
type=
"text"
id=
"fansopenid"
class=
"form-control"
style=
"display: none"
>
name=
"fansopenid"
value=
""
</div>
class=
"form-control"
style=
"display: none"
>
<div
class=
"col-xs-5"
>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
<div
class=
"col-xs-5"
>
#if($shiro.hasPermission("sys:user:edit"))
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
<!--<a href="#springUrl('/a/manageuser/userform')" class="btn btn-primary">新增</a>-->
#if($shiro.hasPermission("sys:user:edit"))
#end
<!--<a href="#springUrl('/a/manageuser/userform')" class="btn btn-primary">新增</a>-->
</div>
#end
</form>
</div>
</div>
<!-- /.box-header -->
</form>
<div
class=
"box-body"
>
</div>
<!-- /.box-header -->
<table
id=
"example2"
class=
"table table-bordered table-striped"
>
<div
class=
"box-body"
>
<thead>
<table
id=
"example2"
class=
"table table-bordered table-striped"
>
<tr>
<thead>
<td
hidden=
"true"
>
Id
</td>
<tr>
<th>
用户名
</th>
<td
hidden=
"true"
>
Id
</td>
<th>
邮箱
</th>
<th>
用户名
</th>
<th>
描述
</th>
<th>
邮箱
</th>
<th>
创建日期
</th>
<th>
描述
</th>
<th>
操作
</th>
<th>
创建日期
</th>
</tr>
<th>
操作
</th>
</thead>
</tr>
<tbody
id=
"tablebody"
>
</thead>
</tbody>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</table>
</div>
<!-- /.box -->
</div>
<!-- /.box-body -->
</div>
<!-- /.col -->
</div>
<!-- /.box -->
</div>
<!-- /.row -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!-- AdminLTE App -->
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"dist/js/app.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"dist/js/template7.js"
></script>
<script
src=
"dist/js/template7.js"
></script>
<script>
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
</script>
<script>
<script>
function
formatDates
(
now
)
{
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
+
minute
+
":"
+
second
;
}
}
function
seachTable
()
{
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/manageuser/userlist/fetchdata')"
;
var
sSource
=
"#springUrl('/a/manageuser/userlist/fetchdata')"
;
var
aoData
=
{
var
aoData
=
{
iDisplayStart
:
1
,
iDisplayStart
:
1
,
iDosplayLength
:
10
iDosplayLength
:
10
}
}
// if("$!{member.name}"!=null && "$!{member.name}"!=""){
// if("$!{member.name}"!=null && "$!{member.name}"!=""){
// sSource+="?name=$!{member.name}";
// sSource+="?name=$!{member.name}";
// }
// }
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input,.select2"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
var
val
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
tmpInf
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
aoData
.
push
(
val
);
aoData
.
push
(
tmpInf
);
// alert(JSON.stringify(aoData));
$
.
ajax
({
"type"
:
"POST"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#example2'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"username"
},{
"mData"
:
"email"
},
{
"mData"
:
"description"
},
{
"mData"
:
"createtime"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
4
],
"mData"
:
"createtime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
formatDates
(
a
.
time
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
,{
"aTargets"
:
[
5
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
var
html
=
'#if($shiro.hasPermission("sys:user:edit"))'
;
html
+=
'<a href="#springUrl("/a/manageuser/userfromDetail?id='
+
a
+
'")" data-id="'
+
a
+
'" data-action="view" class="btn green">修改</a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>#end'
;
return
html
;
}
}]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
var
bindStoreSubmit
=
"#springUrl('/a/storeUser/formData')"
;
//选择门店
$
(
"#example2"
).
on
(
"click"
,
".bindStore"
,
function
()
{
var
userId
=
$
(
this
).
attr
(
"data-id"
);
var
bindStoreList
=
"#springUrl('/a/store/listData?sortStoreUser=')"
+
userId
;
$
(
"#seachTableForm input,.select2"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
var
val
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
tmpInf
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
aoData
.
push
(
val
);
aoData
.
push
(
tmpInf
);
// alert(JSON.stringify(aoData));
$
.
ajax
({
"type"
:
"POST"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#example2'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[{
"mData"
:
"id"
},
{
"mData"
:
"username"
},
{
"mData"
:
"email"
},
{
"mData"
:
"description"
},
{
"mData"
:
"createtime"
}],
"aoColumnDefs"
:
[{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
4
],
"mData"
:
"createtime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
formatDates
(
a
.
time
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
5
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
var
html
=
'#if($shiro.hasPermission("sys:user:edit"))'
;
html
+=
'<a href="#springUrl("/a/manageuser/userfromDetail?id='
+
a
+
'")" data-id="'
+
a
+
'" data-action="view" class="btn green">修改</a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>#end'
;
return
html
;
}
}]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
var
bindStoreSubmit
=
"#springUrl('/a/storeUser/formData')"
;
//选择门店
$
(
"#example2"
).
on
(
"click"
,
".bindStore"
,
function
()
{
var
userId
=
$
(
this
).
attr
(
"data-id"
);
var
bindStoreList
=
"#springUrl('/a/store/listData?sortStoreUser=')"
+
userId
;
$
.
ajax
({
"type"
:
"Post"
,
"url"
:
"#springUrl('/a/storeuser/listData')"
,
"dataType"
:
"json"
,
"data"
:
{
iDisplayStart
:
0
,
iDisplayLength
:
0
,
userId
:
userId
},
//以json格式传递
"success"
:
function
(
data
)
{
var
stores
=
""
;
if
(
data
&&
data
.
aaData
)
{
for
(
var
i
=
0
;
i
<
data
.
aaData
.
length
;
i
++
)
{
stores
+=
data
.
aaData
[
i
].
storeId
+
","
;
}
$
(
"#storeBindId"
).
val
(
stores
);
Cfapp
.
f7
({
dataUrl
:
bindStoreList
,
checkType
:
'multi'
,
// 多选为multi
title
:
"选择门店"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'门店名称'
,
'门店地址'
,
'联系人姓名'
,
'联系人电话'
],
isSearch
:
'0'
,
searchColumns
:
[
"name"
,
'address'
,
'contactsName'
,
'contactsPhone'
],
//搜索的字段名称
searchColumnsRemarks
:
[
'门店名称'
,
"门店地址"
,
"联系人姓名"
,
"联系人电话"
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"name"
},
{
"mData"
:
"address"
},
{
"mData"
:
"contactsName"
},
{
"mData"
:
"contactsPhone"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input type="checkbox" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
name
+
'">'
;
}
}],
success
:
function
()
{
var
stores
=
$
(
"#storeBindId"
).
val
();
$
.
ajax
({
"type"
:
"Post"
,
"url"
:
"#springUrl('/a/storeuser/bindStore')"
,
"dataType"
:
"json"
,
"data"
:
{
userId
:
userId
,
stores
:
stores
},
//以json格式传递
"success"
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"分配门店成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"分配门店失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
}
});
},
cancel
:
function
()
{
},
storeFields
:
'storeBindId'
,
// 储存的字段
displayFields
:
'storeBindName'
})
}
}
});
})
});
//抽取 所有用户
function
removeData
(
id
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
$
.
ajax
({
"type"
:
"Post"
,
"type"
:
"post"
,
"url"
:
"#springUrl('/a/storeuser/listData')"
,
"url"
:
"#springUrl('/a/manageuser/removeUser')"
,
"dataType"
:
"json"
,
"dataType"
:
"json"
,
"data"
:
{
iDisplayStart
:
0
,
iDisplayLength
:
0
,
userId
:
userId
},
//以json格式传递
"data"
:
{
id
:
id
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
){
"success"
:
function
(
data
)
{
var
stores
=
""
;
if
(
data
.
errorNo
==
0
)
{
if
(
data
&&
data
.
aaData
){
Cfapp
.
alert
({
for
(
var
i
=
0
;
i
<
data
.
aaData
.
length
;
i
++
){
message
:
"删除成功"
,
stores
+=
data
.
aaData
[
i
].
storeId
+
","
;
btntext
:
"确定"
,
}
$
(
"#storeBindId"
).
val
(
stores
);
Cfapp
.
f7
({
dataUrl
:
bindStoreList
,
checkType
:
'multi'
,
// 多选为multi
title
:
"选择门店"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'门店名称'
,
'门店地址'
,
'联系人姓名'
,
'联系人电话'
],
isSearch
:
'0'
,
searchColumns
:
[
"name"
,
'address'
,
'contactsName'
,
'contactsPhone'
],
//搜索的字段名称
searchColumnsRemarks
:
[
'门店名称'
,
"门店地址"
,
"联系人姓名"
,
"联系人电话"
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"name"
},
{
"mData"
:
"address"
},
{
"mData"
:
"contactsName"
},
{
"mData"
:
"contactsPhone"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input type="checkbox" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
name
+
'">'
;
}
}],
success
:
function
()
{
success
:
function
()
{
var
stores
=
$
(
"#storeBindId"
).
val
();
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
$
.
ajax
({
}
"type"
:
"Post"
,
})
"url"
:
"#springUrl('/a/storeuser/bindStore')"
,
}
else
{
"dataType"
:
"json"
,
Cfapp
.
alert
({
"data"
:
{
userId
:
userId
,
stores
:
stores
},
//以json格式传递
message
:
"删除失败"
,
"success"
:
function
(
data
){
btntext
:
"确定"
,
if
(
data
.
errorNo
==
0
){
success
:
function
()
{
Cfapp
.
alert
({
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
message
:
"分配门店成功"
,
}
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"分配门店失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
}
});
},
cancel
:
function
()
{
},
storeFields
:
'storeBindId'
,
// 储存的字段
displayFields
:
'storeBindName'
})
})
}
}
}
});
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
})
}
//绑定粉丝
function
selectfans
(
id
)
{
//alert("a")
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/managefanss/fanss/fetchdata')"
,
checkType
:
'single'
,
// 多选为multi
title
:
"粉丝绑定"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'粉丝头像'
,
'性别'
,
'昵称'
,
'openid'
],
isSearch
:
'0'
,
searchColumns
:
[
"nickname"
],
//搜索的字段名称
searchColumnsRemarks
:
[
'粉丝昵称'
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"headimgurl"
},
{
"mData"
:
"sex"
},
{
"mData"
:
"nickname"
},
{
"mData"
:
"openid"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
openid
+
'">'
;
}
},
{
"aTargets"
:
[
1
],
"mData"
:
"headimgurl"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
'<img width="45px" height="45px" src="'
+
a
+
'" />'
;
}
},
{
"aTargets"
:
[
2
],
"mData"
:
"sex"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
0
)
{
return
'女'
;
}
else
{
return
'男'
;
}
}
});
}
}],
success
:
function
()
{
var
fansopenid
=
$
(
"#fansopenid"
).
val
();
// alert(fansopenid);
$
.
ajax
({
"type"
:
"Post"
,
"url"
:
"#springUrl('/a/manageuser/selectfans')"
,
"dataType"
:
"json"
,
"data"
:
{
id
:
id
,
fansopenid
:
fansopenid
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
)
{
if
(
data
.
errorNo
==
1
)
{
Cfapp
.
alert
({
message
:
"绑定成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"绑定失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
}
})
},
cancel
:
function
()
{
},
storeFields
:
'fansid'
,
// 储存的字段
displayFields
:
'fansopenid'
})
}
</script>
})
</body>
});
//抽取 所有用户
function
removeData
(
id
){
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
(){
$
.
ajax
({
"type"
:
"post"
,
"url"
:
"#springUrl('/a/manageuser/removeUser')"
,
"dataType"
:
"json"
,
"data"
:
{
id
:
id
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
){
if
(
data
.
errorNo
==
0
){
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"删除失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
}
});
},
cancel
:
function
(){
$
(
".modal-backdrop"
).
fadeOut
();
}
})
}
//绑定粉丝
function
selectfans
(
id
){
//alert("a")
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/managefanss/fanss/fetchdata')"
,
checkType
:
'single'
,
// 多选为multi
title
:
"粉丝绑定"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'粉丝头像'
,
'性别'
,
'昵称'
,
'openid'
],
isSearch
:
'0'
,
searchColumns
:
[
"nickname"
],
//搜索的字段名称
searchColumnsRemarks
:
[
'粉丝昵称'
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"headimgurl"
},
{
"mData"
:
"sex"
},{
"mData"
:
"nickname"
},{
"mData"
:
"openid"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
openid
+
'">'
;
}
},
{
"aTargets"
:
[
1
],
"mData"
:
"headimgurl"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
'<img width="45px" height="45px" src="'
+
a
+
'" />'
;
}
},{
"aTargets"
:[
2
],
"mData"
:
"sex"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
0
){
return
'女'
;
}
else
{
return
'男'
;
}
}
}],
success
:
function
()
{
var
fansopenid
=
$
(
"#fansopenid"
).
val
();
// alert(fansopenid);
$
.
ajax
({
"type"
:
"Post"
,
"url"
:
"#springUrl('/a/manageuser/selectfans')"
,
"dataType"
:
"json"
,
"data"
:
{
id
:
id
,
fansopenid
:
fansopenid
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
){
if
(
data
.
errorNo
==
1
){
Cfapp
.
alert
({
message
:
"绑定成功"
,
btntext
:
"确定"
,
success
:
function
(){
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"绑定失败"
,
btntext
:
"确定"
,
success
:
function
(){
location
.
href
=
"#springUrl('/a/manageuser/userlist')"
;
}
})
}
}
})
},
cancel
:
function
()
{
},
storeFields
:
'fansid'
,
// 储存的字段
displayFields
:
'fansopenid'
})
}
</script>
</body>
</html>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment