Authored by jianhui_wang

用户

... ... @@ -96,10 +96,8 @@ public class UserRegisterBuyInfoserviceImpl implements IUserRegisterBuyInfoServi
for (int k = 0; k < userInfoList.size(); k++) {
if (userRegisterBuyVO.getRegister().equals(null)||userRegisterBuyVO.getBuy().equals(null)) {
if (userRegisterBuyVO.getRegister()==null||userRegisterBuyVO.getBuy()==null) {
if ("2".equals(userRegisterBuyVO.getRegister())||"2".equals(userRegisterBuyVO.getBuy())) {
getuserInfoList.add(userInfoList.get(k));
}
}
if ("0".equals(userRegisterBuyVO.getRegister())) {
if ("未注册".equals(userInfoList.get(k).getRegister())) {
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/union/js/include.js"></script>
<script src="/union/js/ajaxfileupload.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div id="search" region="north" style="height: 170px;" class="xsdvideogl">
<script>
document.write(addHead('运营管理', '用户信息列表'));
</script>
<div style="margin-left: 30px;margin-top: 20px;">
<a id="exportButton" class="easyui-linkbutton btn-primary" style="margin-right:20px"
data-options="iconCls:'icon-more'">批量导出</a>
<!--<button>Export</button>-->
<input id="register" class="easyui-combobox" value="1" data-options="
editable: false,
valueField: 'id',
textField: 'text',
data: [{id: '1',text: '已注册'},
{id: '0',text: '未注册'}]"/>
<input id="buy" class="easyui-combobox" value="0" data-options="
editable: false,
valueField: 'id',
textField: 'text',
data: [{id: '0',text: '未购买'},
{id: '1',text: '已购买'}]"/>
<a id="searchLinkbutton" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-search'">查询</a>
</div>
</div>
<div region="center" id="productBuyLimitListDiv">
<table id="userListTable" style="widght: 600px;"></table>
</div>
<script type="text/javascript">
// 获取搜索参数
function getParams() {
var register = $("#register").combobox('getValue');
var buy = $("#buy").combobox("getValue");
var param = {};
if (undefined !== register && null !== register && "" !== register) {
param.register = register;
}
if (undefined !== buy && null !== buy && "" !== buy) {
param.buy = buy;
}
return param;
}
$("#searchLinkbutton").linkbutton({
onClick: function () {
$("#userListTable").myDatagrid({
fit: true,
fitColumns: true,
nowrap: false,
// queryParams: getParams(),
url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList?&register=" + getParams().register + "&buy=" + getParams().buy,
method: 'GET',
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "序号",
field: "id",
width: 20,
align: "center"
}, {
title: "手机号",
field: "mobile",
width: 45,
align: "center"
}, {
title: "uid",
field: "uid",
width: 65,
align: "center"
}, {
title: "是否注册",
field: "register",
width: 30,
align: "center"
}, {
title: "注册时间",
field: "registerTime",
width: 60,
align: "center"
}, {
title: "是否购买",
field: "buy",
width: 30,
align: "center"
}]],
cache: false,
pagination: true,
pageSize: 10,
pageList: [10],
idField: "mobile",
singleSelect: true,
checkOnSelect: false,
onLoadSuccess: function () {
}
});
}
});
$("#exportButton").linkbutton({
onClick: function () {
window.open(contextPath + "/batch/export.do?type=userRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify(getParams()));
}
});
</script>
</body>
</html>
\ No newline at end of file
... ... @@ -5,7 +5,7 @@
<title>Yoho!Buy运营平台</title>
<script src="/union/js/include.js"></script>
<script src="/union/js/ajaxfileupload.js"></script>
<script src="/union/js/jquery.table2excel.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div id="search" region="north" style="height: 170px;" class="xsdvideogl">
... ... @@ -14,35 +14,24 @@
</script>
<div style="margin-left: 30px;margin-top: 20px;">
<a id="batchProgram" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 20px"></a>
<a id="exportButton" class="easyui-linkbutton btn-primary" style="margin-right:20px"
data-options="iconCls:'icon-more'">批量导出</a>
<!--<button>Export</button>-->
<input id="isReplyCombobox" class="easyui-combobox" value="1" data-options="
<input id="register" class="easyui-combobox" value="1" data-options="
editable: false,
valueField: 'id',
textField: 'text',
data: [{
id: '1',
text: '已注册'
}, {
id: '2',
text: '未注册'
}]"/>
<input id="isDeleteCombobox" class="easyui-combobox" value="1" data-options="
data: [{id: '1',text: '已注册'},
{id: '0',text: '未注册'}]"/>
<input id="buy" class="easyui-combobox" value="0" data-options="
editable: false,
valueField: 'id',
textField: 'text',
data: [{
id: '1',
text: '未购买'
}, {
id: '0',
text: '已购买'
}]"/>
data: [{id: '0',text: '未购买'},
{id: '1',text: '已购买'}]"/>
<a id="searchLinkbutton" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-search'">查询</a>
<a id="exportButton" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 20px"
data-options="iconCls:'icon-more'">导出</a>
<a id="exportAllButton" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 0"
data-options="iconCls:'icon-more'">全部导出</a>
</div>
</div>
... ... @@ -51,20 +40,21 @@
</div>
<script type="text/javascript">
// 获取搜索参数
function getParams() {
var isRegister = $("#isRegister").combobox('getValue');
var isBuy = $("#isBuy").combobox("getValue");
var register = $("#register").combobox('getValue');
var buy = $("#buy").combobox("getValue");
var param = {};
if (undefined !== isRegister && null !== isRegister && "" !== isRegister) {
param.isRegister = isRegister;
if (undefined !== register && null !== register && "" !== register) {
param.register = register;
}
if (undefined !== isBuy && null !== isBuy && "" !== isBuy) {
param.isBuy = isBuy;
if (undefined !== buy && null !== buy && "" !== buy) {
param.buy = buy;
}
return param;
}
$(function () {
$("#batchProgram").linkbutton({
text: "批量导入",
... ... @@ -78,8 +68,8 @@
fit: true,
fitColumns: true,
nowrap: false,
// url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList",
// method: 'POST',
// url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList?&register=" + getParams().register + "&buy=" + getParams().buy,
method: 'GET',
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp.rows = temp.list;
... ... @@ -119,16 +109,11 @@
cache: false,
pagination: true,
pageSize: 10,
// pageList: [10],
// idField: "mobile",
singleSelect: true,
checkOnSelect: false,
onLoadSuccess: function () {
}
checkOnSelect: false
});
});
function batchProgramDialog() {
var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body));
$(div).myDialog({
... ... @@ -140,20 +125,14 @@
cache: false
});
}
// linkbutton点击事件注册
/**
* searchLinkbutton
*/
$("#searchLinkbutton").linkbutton({
onClick: function () {
$("#userListTable").myDatagrid({
$("#productBuyLimitListTable").myDatagrid({
fit: true,
fitColumns: true,
nowrap: false,
queryParams: getParams(),
url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList",
//?&register=" + getParams().isRegister + "&buy=" + getParams().isBuy,
// queryParams: getParams(),
url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList?&register=" + getParams().register + "&buy=" + getParams().buy,
method: 'GET',
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
... ... @@ -201,30 +180,30 @@
onLoadSuccess: function () {
}
});
// $("#productBuyLimitListTable").datagrid('loadData', data);
}
});
// $("#searchLinkbutton").linkbutton({
// onClick: function () {
// $('#productBuyLimitListTable').datagrid('load', getParams());
//
// }
// });
$("#exportButton").linkbutton({
onClick: function () {
onclick=window.open("http://localhost:8083/union/html/getUserInfo/search.html")
// window.open(contextPath + "/batch/export.do?type=UserRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify(getParams()));
window.open(contextPath + "/batch/export.do?type=userRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify(getParams()));
}
});
//数据导出
// $("#exportButton").click(function () {
// $("#productBuyLimitListTable").table2excel({
// exclude: ".noExl",
// name: "Excel Document Name",
// filename: "用户注册购买统计表",
// exclude_img: true,
// exclude_links: true,
// exclude_inputs: true
// });
// });
$("#exportAllButton").linkbutton({
onClick: function () {
window.open(contextPath + "/batch/export.do?type=userRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify({
register: 2,
buy: 2
}));
}
});
</script>
</body>
... ...
<!DOCTYPE html>
<table style="width: 500px;padding: 30px 30px 0px 30px">
<tbody>
<tr>
<td style="font-size: large">上传EXCEL:</td>
<td>
<div id="batchImportDiv"></div>
</td>
</tr>
<tr>
<td style="font-size: large">批量导入:</td>
<td style="font-size: large">
1、上传文件必须是<span style="color: red">.xlsx</span>文件<br>
2、Excel表头为:<span style="color: blue">mobile、uid</span><br>
3、第一行为表头内容,第二行开始为正式内容<br>
4、每个文件控制在***行以内<br>
5、<a id="importA" style="margin-left: 30px" href="">下载样例.xlsx</a><br>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
$(function () {
$("#importA").attr("href", contextPath + "/common/userinfo.xlsx");
$("#batchImportDiv").fileUpload({
text: "请选择文件", //按钮文字
uploadInputName: "file", //上传文件的控件名称
url: contextPath + "/batch/import", //提交到后端的url
queryParams: {
type: "MobileUidImport", //spring-web-context.xml 文件配置实现类 <entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/>
args: "import"
}, //提交到后端额外参数
showFileName: false, //上传成功后,是否显示文件名
onLoadSuccess: function (fileName, data) {
$("#productBuyLimitListTable").myDatagrid("reload");
$("#batchProgramDialogDiv").dialog("close");
$.messager.show({
title: "提示",
msg: "导入成功!",
height: 200
});
$("#productBuyLimitListTable").datagrid('loadData', data);
}
});
});
</script>
... ...