|
|
@@ -13,11 +13,16 @@
|
|
|
<%@ page import="system.DBRecordsPack" %>
|
|
|
<%@ page import="net.sf.json.JSONObject" %>
|
|
|
<%@ page import="org.jooq.*" %>
|
|
|
+<%@ page import="static jooq.Tables.DATATYPEINFO" %>
|
|
|
+<%@ page import="net.sf.json.JSONArray" %>
|
|
|
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page"/>
|
|
|
<%
|
|
|
String operator = ExtendString.getDBStr(request.getParameter("operator"));
|
|
|
out.clear();
|
|
|
DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
|
|
|
+ JSONArray areas = JSONArray.fromObject(DBRecordsPack.Pack(ctx.select().from(DATATYPEINFO).where(DATATYPEINFO.TYPENAME.equal("地区")).fetch()));
|
|
|
+ JSONArray levels = JSONArray.fromObject(DBRecordsPack.Pack(ctx.select().from(DATATYPEINFO).where(DATATYPEINFO.TYPENAME.equal("会员等级")).fetch()));
|
|
|
+
|
|
|
if (operator.equals("query")) {
|
|
|
response.setContentType("application/json");
|
|
|
int PageIndex = Integer.parseInt(request.getParameter("PageIndex"));
|
|
|
@@ -37,7 +42,7 @@
|
|
|
if (StringUtils.isNotEmpty(keyword)) {
|
|
|
select.and(a.TEL.containsIgnoreCase(keyword)).or(a.PET.containsIgnoreCase(keyword).or(a.PHONE.containsIgnoreCase(keyword)));
|
|
|
}
|
|
|
- select.orderBy(a.ID.desc()).limit((PageIndex - 1) * 10, 10);
|
|
|
+ select.orderBy(a.PK.desc()).limit((PageIndex - 1) * 10, 10);
|
|
|
System.out.println(select.getSQL(true));
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("data", DBRecordsPack.Pack(select.fetch()));
|
|
|
@@ -67,9 +72,8 @@
|
|
|
}
|
|
|
|
|
|
%>
|
|
|
-
|
|
|
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
-<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
<head>
|
|
|
<base href="${pageContext.request.contextPath}"/>
|
|
|
<title>会员查询</title>
|
|
|
@@ -82,9 +86,27 @@
|
|
|
<el-button @click="getData" type="primary" size="small">查询</el-button>
|
|
|
</div>
|
|
|
<el-table :data="tableData">
|
|
|
- <el-table-column prop="Pet" label="姓名"></el-table-column>
|
|
|
- <el-table-column prop="Tel" label="账号"></el-table-column>
|
|
|
- <el-table-column prop="count" label="邀请数量"></el-table-column>
|
|
|
+ <el-table-column prop="Tel" label="账号" width="120"></el-table-column>
|
|
|
+ <el-table-column prop="Pet" label="昵称"></el-table-column>
|
|
|
+ <el-table-column prop="Area" label="地区" :formatter="areaFormatter" width="60"></el-table-column>
|
|
|
+ <el-table-column prop="MembClass" label="会员等级" :formatter="levelFormatter" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="introModelNum" label="邀请模特" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="introMemberNum" label="邀请会员" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_A" label="余额" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_I" label="冲值" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_OR" label="红包支付" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_OV" label="聊天支付" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_OS" label="订单支付" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_O" label="提现支出" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="coin_OI" label="预支币额" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="MDate" label="注册日期" width="200" :formatter="dateFormatter"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="200" fixed="right">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button size="small" type="text" @click="inviteList(row)">邀请列表</el-button>
|
|
|
+ <el-button size="small" type="text" @click="sendMsg(row)">发消息</el-button>
|
|
|
+ <el-button size="small" type="text" @click="del(row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
background
|
|
|
@@ -104,7 +126,9 @@
|
|
|
invitor: '${param["invitor"]}',
|
|
|
keyword: '',
|
|
|
tableData: [],
|
|
|
- total: 0
|
|
|
+ total: 0,
|
|
|
+ areas: JSON.parse('<%=areas%>' || '[]'),
|
|
|
+ levels: JSON.parse('<%=levels%>' || '[]')
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
|
@@ -131,6 +155,53 @@
|
|
|
currentChange: function (page) {
|
|
|
this.page = page;
|
|
|
this.getData();
|
|
|
+ },
|
|
|
+ areaFormatter: function (row, column, cellValue, index) {
|
|
|
+ var i;
|
|
|
+ for (i = 0; i < this.areas.length; i++) {
|
|
|
+ if (cellValue == this.areas[i].PK) {
|
|
|
+ return this.areas[i].Name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ levelFormatter: function (row, column, cellValue, index) {
|
|
|
+ var i;
|
|
|
+ for (i = 0; i < this.levels.length; i++) {
|
|
|
+ if (cellValue == this.levels[i].PK) {
|
|
|
+ return this.areas[i].Name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dateFormatter: function (row, column, cellValue, index) {
|
|
|
+ return new Date(cellValue.time).toLocaleString()
|
|
|
+ },
|
|
|
+ del: function (row) {
|
|
|
+ if (confirm("确认删除?")) {
|
|
|
+ $.post({
|
|
|
+ url: '${pageContext.request.contextPath}${pageContext.request.servletPath}',
|
|
|
+ data: {
|
|
|
+ operator: 'delete',
|
|
|
+ memberpk: row.PK
|
|
|
+ },
|
|
|
+ success: function () {
|
|
|
+ this.getData()
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ inviteList: function (row) {
|
|
|
+ this.showIframe({
|
|
|
+ url: '${pageContext.request.contextPath}/system/memberInfo.jsp?invitor=' + row.PK,
|
|
|
+ title: '邀请列表'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sendMsg: function (row) {
|
|
|
+ this.showIframe({
|
|
|
+ url: '${pageContext.request.contextPath}/system/sendMsg.jsp?memberpk=' + row.PK,
|
|
|
+ title: '发消息',
|
|
|
+ width: 400,
|
|
|
+ height: 300
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
watch: {}
|