|
|
@@ -1,299 +1,299 @@
|
|
|
-<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
|
|
|
-<%request.setCharacterEncoding("utf-8");%>
|
|
|
-<%@ page language="java" import="java.sql.*,java.util.Arrays" %>
|
|
|
-<%@ page language="java" import="java.util.*, util.*" %>
|
|
|
-<%@ page language="java" import="system.*" %>
|
|
|
-<%@ page language="java" import="util.*" %>
|
|
|
-<%@ page language="java" import="biz.*" %>
|
|
|
-<%@ page language="java" import="net.sf.json.JSONObject" %>
|
|
|
-<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page"/>
|
|
|
-<%
|
|
|
- String path = request.getContextPath();
|
|
|
- String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
|
- String Sess_BrokerPK = ExtendString.getDBStr((String) session.getAttribute("BrokerPK"));
|
|
|
- String userpk = ExtendString.getDBStr((String) session.getAttribute("userpk"));
|
|
|
- String username = ExtendString.getDBStr((String) session.getAttribute("username"));
|
|
|
- String MembType = ExtendString.getDBStr((String) session.getAttribute("MembType"));
|
|
|
- String IsAdmin = ExtendString.getDBStr((String) session.getAttribute("IsAdmin"));
|
|
|
- String sess_MemberPK = ExtendString.getDBStr((String) session.getAttribute("MemberPK"));
|
|
|
- String sess_JiGouPK = ExtendString.getDBStr((String) session.getAttribute("JiGouPK"));
|
|
|
-
|
|
|
- int items_per_page = 10;
|
|
|
- javax.sql.rowset.CachedRowSet rs = null;
|
|
|
- String operator = ExtendString.getDBStr(request.getParameter("operator"));
|
|
|
- String superpk = ExtendString.getDBStr(request.getParameter("superpk")); //机构BrokerInfor.pk
|
|
|
- String sql;
|
|
|
- int rownum = 0;
|
|
|
- if (superpk.equals("")) superpk = "-1";
|
|
|
- if (sess_JiGouPK.length() == 0) sess_JiGouPK = "-1";
|
|
|
- out.clear();
|
|
|
- if (operator.equals("query")) {
|
|
|
- int PageIndex = Integer.parseInt(request.getParameter("PageIndex"));
|
|
|
- String keyword = ExtendString.getDBStr(request.getParameter("keyword"));
|
|
|
-
|
|
|
- String BaseSQL = "select a.pk as brokepk, a.MemberPK, b.Tel, a.Name, a.addr, a.intro, a.linkMan, " +
|
|
|
- " a.IsAdmin, a.Auth, b.MembType, b.Area, a.superPK, C.Name as AreaName, b.Phone, " +
|
|
|
- " d.Name as jigouname, b.qrcode, " +
|
|
|
- " CAST(FORMAT(a.ratio_V,0) as char) as ratio_V, " +
|
|
|
- " CAST(FORMAT(a.ratio_S,0) as char) as ratio_S, " +
|
|
|
- " CAST(FORMAT(a.ratio_L,0) as char) as ratio_L, " +
|
|
|
- " CAST(FORMAT(a.ratio_R,0) as char) as ratio_R, " +
|
|
|
- " DATE_FORMAT(b.MDate,'%Y-%m-%d %H:%i:%s') as MDate, " +
|
|
|
- " (Select count(*) From ModelInfo X, memberinfo Y where X.BrokePK = A.PK and X.memberpk=Y.PK and IfNull(Y.identify,'')<>'删除' ) as ModelCount " +
|
|
|
- "from BrokerInfor a inner Join MemberInfo b on a.MemberPK = b.PK " +
|
|
|
- " Left Join (select PK, Name from datatypeinfo where typeName ='地区') C on b.Area = C.PK " +
|
|
|
- " Left Join BrokerInfor d on a.superPK = d.pk " +
|
|
|
- "where b.MembType = " + thmodel.MEMTYPE_JinJiRen + " ";
|
|
|
- //平台帐号可以查询所有经纪人,其它只能查看本机构(+下属机构)的经纪人
|
|
|
- if (MembType.equals(thmodel.MEMTYPE_PingTai)) {
|
|
|
- //无需添加条件
|
|
|
- } else if (MembType.equals(thmodel.MEMTYPE_JiGou) || MembType.equals(thmodel.MEMTYPE_JinJiRen))
|
|
|
- BaseSQL = BaseSQL + String.format(" and a.BrokePK = %s or a.superPK=%s ", sess_JiGouPK, sess_JiGouPK);
|
|
|
- else //应该不会发生
|
|
|
- BaseSQL = BaseSQL + String.format(" and a.BrokePK = %s ", Sess_BrokerPK);
|
|
|
-
|
|
|
- if (keyword.length() > 0) {
|
|
|
- BaseSQL += String.format(" and (b.Tel like '%%%s%%' or a.Name like '%%%s%%' or d.Name like '%%%s%%') ",
|
|
|
- keyword, keyword, keyword);
|
|
|
- }
|
|
|
- BaseSQL = BaseSQL + "Order by b.MDate Desc ";
|
|
|
-
|
|
|
- if (PageIndex == -1)
|
|
|
- sql = BaseSQL + " LIMIT 0, " + String.valueOf(items_per_page);
|
|
|
- else
|
|
|
- sql = BaseSQL + " LIMIT " + String.valueOf(items_per_page * PageIndex)
|
|
|
- + "," + String.valueOf(items_per_page);
|
|
|
-
|
|
|
- List<JSONObject> jsonList = DBRecordsPack.Pack(db, sql);
|
|
|
- if (PageIndex == -1) {
|
|
|
- rs = db.executeQuery("Select Count(*) C from (" + BaseSQL + ") as t_cc ");
|
|
|
- if ((rs != null) && rs.next()) {
|
|
|
- JSONObject jsonObj = new JSONObject();
|
|
|
- jsonObj.put("result", "CachedRowSet");
|
|
|
- jsonObj.put("recordcount", rs.getInt(1));
|
|
|
- jsonObj.put("pageindex", 0);
|
|
|
- jsonList.add(jsonObj);
|
|
|
- }
|
|
|
- }
|
|
|
- out.clear();
|
|
|
- out.print(jsonList);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
-%>
|
|
|
-
|
|
|
-<!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">
|
|
|
-<head>
|
|
|
- <base href="<%=basePath %>"/>
|
|
|
- <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7"/>
|
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
|
- <link rel="stylesheet" type="text/css" href="<%=basePath%>css/style.css"/>
|
|
|
- <link rel="stylesheet" type="text/css" href="<%=basePath%>css/WdatePicker.css"/>
|
|
|
- <link rel="stylesheet" type="text/css" href="<%=basePath%>css/skin_/table.css"/>
|
|
|
- <link rel="stylesheet" type="text/css" href="<%=basePath%>css/jquery.grid.css"/>
|
|
|
- <title>经纪人查询</title>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<div id="container">
|
|
|
- <div id="hd"></div>
|
|
|
- <div id="bd">
|
|
|
- <div id="main">
|
|
|
- <div class="search-box ue-clear">
|
|
|
- <div class="search-area">
|
|
|
- <div class="kv-item ue-clear">
|
|
|
- <label>关键字:</label>
|
|
|
- <span></span>
|
|
|
- <input type="text" name="keyword" style="width:200px" placeholder="关键字"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="search-button">
|
|
|
- <span></span>
|
|
|
- <input class="button" id="button" type="button" value="搜索一下" onClick="ButtonClick();"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="table">
|
|
|
- <div class="grid"></div>
|
|
|
- <div class="pagination"></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-
|
|
|
-</body>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/global.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/jquery.select.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/core.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/jquery.pagination.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/jquery.grid.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/WdatePicker.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/zDrag.js"></script>
|
|
|
-<script type="text/javascript" src="<%=basePath%>js/zDialog.js"></script>
|
|
|
-<script type="text/javascript">
|
|
|
- $('select').select();
|
|
|
- var head = [
|
|
|
- {
|
|
|
- label: '机构',
|
|
|
- width: 120,
|
|
|
- name: 'jigouname'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '帐号',
|
|
|
- width: 110,
|
|
|
- name: 'Tel'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称',
|
|
|
- width: 90,
|
|
|
- name: 'Name'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '电话',
|
|
|
- width: 110,
|
|
|
- name: 'Phone'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '视频分成(%)',
|
|
|
- width: 50,
|
|
|
- name: 'ratio_V'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '人才服务分成(%)',
|
|
|
- width: 50,
|
|
|
- name: 'ratio_S'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '队长分成(%)',
|
|
|
- width: 80,
|
|
|
- name: 'ratio_L'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '红包分成(%)',
|
|
|
- width: 80,
|
|
|
- name: 'ratio_R'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '模特数',
|
|
|
- width: 80,
|
|
|
- name: 'ModelCount'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '邀请码',
|
|
|
- width: 70
|
|
|
- },
|
|
|
- {
|
|
|
- label: '注册日期',
|
|
|
- width: 150,
|
|
|
- name: 'MDate'
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
- function SetRowsetInfo(rowCount, CurPage) {
|
|
|
- $('.pagination').pagination(rowCount, {
|
|
|
- items_per_page: <%=items_per_page %>,
|
|
|
- current_page: CurPage,
|
|
|
- callback: function (page) {
|
|
|
- DoQuery(page);
|
|
|
- },
|
|
|
- display_msg: false
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- var tbody = new Array();
|
|
|
-
|
|
|
- //superPK
|
|
|
- function DoQuery(PageIndex) {
|
|
|
- $('.grid').Grid('addLoading');
|
|
|
- keyword = document.all.keyword.value;
|
|
|
- $.post("<%=basePath%>member/query_jinjiren.jsp",
|
|
|
- {
|
|
|
- operator: "query",
|
|
|
- keyword: keyword,
|
|
|
- PageIndex: PageIndex
|
|
|
- },
|
|
|
- function (data, status) {
|
|
|
- var obj = eval('(' + data + ')');
|
|
|
- if ((obj.length == 0) || (obj[0].result != "success")) {
|
|
|
- $('.grid').Grid('setData', null, head);
|
|
|
- SetRowsetInfo(1, 0);
|
|
|
- }
|
|
|
- else {
|
|
|
- tbody.length = 0;
|
|
|
- for (var row = 0; row < obj.length; row++) {
|
|
|
- if (obj[row].result == "success") {
|
|
|
- var fields = [];
|
|
|
- fields[0] = obj[row].jigouname;
|
|
|
- fields[1] = obj[row].tel;
|
|
|
- fields[2] = obj[row].name;
|
|
|
- fields[3] = obj[row].phone;
|
|
|
- fields[4] = obj[row].ratio_v;
|
|
|
- fields[5] = obj[row].ratio_s;
|
|
|
- fields[6] = obj[row].ratio_l;
|
|
|
- fields[7] = obj[row].ratio_r;
|
|
|
- fields[8] = obj[row].modelcount;
|
|
|
- fields[9] = obj[row].qrcode;
|
|
|
- fields[10] = obj[row].mdate;
|
|
|
- fields[11] = [
|
|
|
- {
|
|
|
- label: '模特',
|
|
|
- brokepk: obj[row].brokepk,
|
|
|
- memberpk: obj[row].memberpk,
|
|
|
- onclick: function () {
|
|
|
- doViewModel(this.brokepk, this.memberpk);
|
|
|
- }
|
|
|
- }
|
|
|
- ];
|
|
|
- tbody[row] = fields;
|
|
|
- }
|
|
|
- else if (obj[row].result == "CachedRowSet") {
|
|
|
- SetRowsetInfo(obj[row].recordcount, obj[row].pageindex);
|
|
|
- }
|
|
|
- }
|
|
|
- $('.grid').Grid('setData', tbody, head);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- function ButtonClick() {
|
|
|
- DoQuery(-1);
|
|
|
- }
|
|
|
-
|
|
|
- function doViewModel(BrokePK, BMemberPK) {
|
|
|
- var diag = new zDialog();
|
|
|
- diag.Top = 20;
|
|
|
- diag.Width = "90%";
|
|
|
- diag.Height = "90%";
|
|
|
- diag.Title = "模特";
|
|
|
- diag.URL = "<%=basePath%>member/model.jsp?brokepk=" + BrokePK + "&bmemberpk=" + BMemberPK;
|
|
|
- diag.OnClose = function (zWindow) {
|
|
|
- if (zWindow.result == 1)
|
|
|
- DoQuery("", -1);
|
|
|
- }
|
|
|
- diag.show();
|
|
|
- }
|
|
|
-
|
|
|
- H = $(window).height() - $(".grid").offset().top - 100;
|
|
|
- if (H < 200) H = 200;
|
|
|
- $('.grid').Grid({
|
|
|
- thead: head,
|
|
|
- tbody: null,
|
|
|
- height: H,
|
|
|
- operator: {
|
|
|
- type: "normal",
|
|
|
- width: 120
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $('.grid').Grid('addLoading');
|
|
|
- $('.grid').Grid('setData', null, head);
|
|
|
-
|
|
|
- $(function () {
|
|
|
- $("#button").css("height", 28);
|
|
|
- DoQuery(-1);
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
-</script>
|
|
|
-
|
|
|
-</html>
|
|
|
+<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
|
|
|
+<%request.setCharacterEncoding("utf-8");%>
|
|
|
+<%@ page language="java" import="java.sql.*,java.util.Arrays" %>
|
|
|
+<%@ page language="java" import="java.util.*, util.*" %>
|
|
|
+<%@ page language="java" import="system.*" %>
|
|
|
+<%@ page language="java" import="util.*" %>
|
|
|
+<%@ page language="java" import="biz.*" %>
|
|
|
+<%@ page language="java" import="net.sf.json.JSONObject" %>
|
|
|
+<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page"/>
|
|
|
+<%
|
|
|
+ String path = request.getContextPath();
|
|
|
+ String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
|
+ String Sess_BrokerPK = ExtendString.getDBStr((String) session.getAttribute("BrokerPK"));
|
|
|
+ String userpk = ExtendString.getDBStr((String) session.getAttribute("userpk"));
|
|
|
+ String username = ExtendString.getDBStr((String) session.getAttribute("username"));
|
|
|
+ String MembType = ExtendString.getDBStr((String) session.getAttribute("MembType"));
|
|
|
+ String IsAdmin = ExtendString.getDBStr((String) session.getAttribute("IsAdmin"));
|
|
|
+ String sess_MemberPK = ExtendString.getDBStr((String) session.getAttribute("MemberPK"));
|
|
|
+ String sess_JiGouPK = ExtendString.getDBStr((String) session.getAttribute("JiGouPK"));
|
|
|
+
|
|
|
+ int items_per_page = 10;
|
|
|
+ javax.sql.rowset.CachedRowSet rs = null;
|
|
|
+ String operator = ExtendString.getDBStr(request.getParameter("operator"));
|
|
|
+ String superpk = ExtendString.getDBStr(request.getParameter("superpk")); //机构BrokerInfor.pk
|
|
|
+ String sql;
|
|
|
+ int rownum = 0;
|
|
|
+ if (superpk.equals("")) superpk = "-1";
|
|
|
+ if (sess_JiGouPK.length() == 0) sess_JiGouPK = "-1";
|
|
|
+ out.clear();
|
|
|
+ if (operator.equals("query")) {
|
|
|
+ int PageIndex = Integer.parseInt(request.getParameter("PageIndex"));
|
|
|
+ String keyword = ExtendString.getDBStr(request.getParameter("keyword"));
|
|
|
+
|
|
|
+ String BaseSQL = "select a.pk as brokepk, a.MemberPK, b.Tel, a.Name, a.addr, a.intro, a.linkMan, " +
|
|
|
+ " a.IsAdmin, a.Auth, b.MembType, b.Area, a.superPK, C.Name as AreaName, b.Phone, " +
|
|
|
+ " d.Name as jigouname, b.qrcode, " +
|
|
|
+ " CAST(FORMAT(b.broker_ratio_video,0) as char) as ratio_V, " +
|
|
|
+ " CAST(FORMAT(b.broker_ratio_service,0) as char) as ratio_S, " +
|
|
|
+ " CAST(FORMAT(a.ratio_L,0) as char) as ratio_L, " +
|
|
|
+ " CAST(FORMAT(b.broker_ratio_gift,0) as char) as ratio_R, " +
|
|
|
+ " DATE_FORMAT(b.MDate,'%Y-%m-%d %H:%i:%s') as MDate, " +
|
|
|
+ " (Select count(*) From ModelInfo X, memberinfo Y where X.BrokePK = A.PK and X.memberpk=Y.PK and IfNull(Y.identify,'')<>'删除' ) as ModelCount " +
|
|
|
+ "from BrokerInfor a inner Join MemberInfo b on a.MemberPK = b.PK " +
|
|
|
+ " Left Join (select PK, Name from datatypeinfo where typeName ='地区') C on b.Area = C.PK " +
|
|
|
+ " Left Join BrokerInfor d on a.superPK = d.pk " +
|
|
|
+ "where b.MembType = " + thmodel.MEMTYPE_JinJiRen + " ";
|
|
|
+ //平台帐号可以查询所有经纪人,其它只能查看本机构(+下属机构)的经纪人
|
|
|
+ if (MembType.equals(thmodel.MEMTYPE_PingTai)) {
|
|
|
+ //无需添加条件
|
|
|
+ } else if (MembType.equals(thmodel.MEMTYPE_JiGou) || MembType.equals(thmodel.MEMTYPE_JinJiRen))
|
|
|
+ BaseSQL = BaseSQL + String.format(" and a.BrokePK = %s or a.superPK=%s ", sess_JiGouPK, sess_JiGouPK);
|
|
|
+ else //应该不会发生
|
|
|
+ BaseSQL = BaseSQL + String.format(" and a.BrokePK = %s ", Sess_BrokerPK);
|
|
|
+
|
|
|
+ if (keyword.length() > 0) {
|
|
|
+ BaseSQL += String.format(" and (b.Tel like '%%%s%%' or a.Name like '%%%s%%' or d.Name like '%%%s%%') ",
|
|
|
+ keyword, keyword, keyword);
|
|
|
+ }
|
|
|
+ BaseSQL = BaseSQL + "Order by b.MDate Desc ";
|
|
|
+
|
|
|
+ if (PageIndex == -1)
|
|
|
+ sql = BaseSQL + " LIMIT 0, " + String.valueOf(items_per_page);
|
|
|
+ else
|
|
|
+ sql = BaseSQL + " LIMIT " + String.valueOf(items_per_page * PageIndex)
|
|
|
+ + "," + String.valueOf(items_per_page);
|
|
|
+
|
|
|
+ List<JSONObject> jsonList = DBRecordsPack.Pack(db, sql);
|
|
|
+ if (PageIndex == -1) {
|
|
|
+ rs = db.executeQuery("Select Count(*) C from (" + BaseSQL + ") as t_cc ");
|
|
|
+ if ((rs != null) && rs.next()) {
|
|
|
+ JSONObject jsonObj = new JSONObject();
|
|
|
+ jsonObj.put("result", "CachedRowSet");
|
|
|
+ jsonObj.put("recordcount", rs.getInt(1));
|
|
|
+ jsonObj.put("pageindex", 0);
|
|
|
+ jsonList.add(jsonObj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ out.clear();
|
|
|
+ out.print(jsonList);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+%>
|
|
|
+
|
|
|
+<!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">
|
|
|
+<head>
|
|
|
+ <base href="<%=basePath %>"/>
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7"/>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="<%=basePath%>css/style.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="<%=basePath%>css/WdatePicker.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="<%=basePath%>css/skin_/table.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="<%=basePath%>css/jquery.grid.css"/>
|
|
|
+ <title>经纪人查询</title>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div id="container">
|
|
|
+ <div id="hd"></div>
|
|
|
+ <div id="bd">
|
|
|
+ <div id="main">
|
|
|
+ <div class="search-box ue-clear">
|
|
|
+ <div class="search-area">
|
|
|
+ <div class="kv-item ue-clear">
|
|
|
+ <label>关键字:</label>
|
|
|
+ <span></span>
|
|
|
+ <input type="text" name="keyword" style="width:200px" placeholder="关键字"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="search-button">
|
|
|
+ <span></span>
|
|
|
+ <input class="button" id="button" type="button" value="搜索一下" onClick="ButtonClick();"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table">
|
|
|
+ <div class="grid"></div>
|
|
|
+ <div class="pagination"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+</body>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/global.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/jquery.select.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/core.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/jquery.pagination.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/jquery.grid.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/WdatePicker.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/zDrag.js"></script>
|
|
|
+<script type="text/javascript" src="<%=basePath%>js/zDialog.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+ $('select').select();
|
|
|
+ var head = [
|
|
|
+ {
|
|
|
+ label: '机构',
|
|
|
+ width: 120,
|
|
|
+ name: 'jigouname'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '帐号',
|
|
|
+ width: 110,
|
|
|
+ name: 'Tel'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ width: 90,
|
|
|
+ name: 'Name'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '电话',
|
|
|
+ width: 110,
|
|
|
+ name: 'Phone'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '视频分成(%)',
|
|
|
+ width: 50,
|
|
|
+ name: 'ratio_V'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '人才服务分成(%)',
|
|
|
+ width: 50,
|
|
|
+ name: 'ratio_S'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '队长分成(%)',
|
|
|
+ width: 80,
|
|
|
+ name: 'ratio_L'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '红包分成(%)',
|
|
|
+ width: 80,
|
|
|
+ name: 'ratio_R'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '模特数',
|
|
|
+ width: 80,
|
|
|
+ name: 'ModelCount'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '邀请码',
|
|
|
+ width: 70
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '注册日期',
|
|
|
+ width: 150,
|
|
|
+ name: 'MDate'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ function SetRowsetInfo(rowCount, CurPage) {
|
|
|
+ $('.pagination').pagination(rowCount, {
|
|
|
+ items_per_page: <%=items_per_page %>,
|
|
|
+ current_page: CurPage,
|
|
|
+ callback: function (page) {
|
|
|
+ DoQuery(page);
|
|
|
+ },
|
|
|
+ display_msg: false
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ var tbody = new Array();
|
|
|
+
|
|
|
+ //superPK
|
|
|
+ function DoQuery(PageIndex) {
|
|
|
+ $('.grid').Grid('addLoading');
|
|
|
+ keyword = document.all.keyword.value;
|
|
|
+ $.post("<%=basePath%>member/query_jinjiren.jsp",
|
|
|
+ {
|
|
|
+ operator: "query",
|
|
|
+ keyword: keyword,
|
|
|
+ PageIndex: PageIndex
|
|
|
+ },
|
|
|
+ function (data, status) {
|
|
|
+ var obj = eval('(' + data + ')');
|
|
|
+ if ((obj.length == 0) || (obj[0].result != "success")) {
|
|
|
+ $('.grid').Grid('setData', null, head);
|
|
|
+ SetRowsetInfo(1, 0);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ tbody.length = 0;
|
|
|
+ for (var row = 0; row < obj.length; row++) {
|
|
|
+ if (obj[row].result == "success") {
|
|
|
+ var fields = [];
|
|
|
+ fields[0] = obj[row].jigouname;
|
|
|
+ fields[1] = obj[row].tel;
|
|
|
+ fields[2] = obj[row].name;
|
|
|
+ fields[3] = obj[row].phone;
|
|
|
+ fields[4] = obj[row].ratio_v;
|
|
|
+ fields[5] = obj[row].ratio_s;
|
|
|
+ fields[6] = obj[row].ratio_l;
|
|
|
+ fields[7] = obj[row].ratio_r;
|
|
|
+ fields[8] = obj[row].modelcount;
|
|
|
+ fields[9] = obj[row].qrcode;
|
|
|
+ fields[10] = obj[row].mdate;
|
|
|
+ fields[11] = [
|
|
|
+ {
|
|
|
+ label: '模特',
|
|
|
+ brokepk: obj[row].brokepk,
|
|
|
+ memberpk: obj[row].memberpk,
|
|
|
+ onclick: function () {
|
|
|
+ doViewModel(this.brokepk, this.memberpk);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ tbody[row] = fields;
|
|
|
+ }
|
|
|
+ else if (obj[row].result == "CachedRowSet") {
|
|
|
+ SetRowsetInfo(obj[row].recordcount, obj[row].pageindex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $('.grid').Grid('setData', tbody, head);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function ButtonClick() {
|
|
|
+ DoQuery(-1);
|
|
|
+ }
|
|
|
+
|
|
|
+ function doViewModel(BrokePK, BMemberPK) {
|
|
|
+ var diag = new zDialog();
|
|
|
+ diag.Top = 20;
|
|
|
+ diag.Width = "90%";
|
|
|
+ diag.Height = "90%";
|
|
|
+ diag.Title = "模特";
|
|
|
+ diag.URL = "<%=basePath%>member/model.jsp?brokepk=" + BrokePK + "&bmemberpk=" + BMemberPK;
|
|
|
+ diag.OnClose = function (zWindow) {
|
|
|
+ if (zWindow.result == 1)
|
|
|
+ DoQuery("", -1);
|
|
|
+ }
|
|
|
+ diag.show();
|
|
|
+ }
|
|
|
+
|
|
|
+ H = $(window).height() - $(".grid").offset().top - 100;
|
|
|
+ if (H < 200) H = 200;
|
|
|
+ $('.grid').Grid({
|
|
|
+ thead: head,
|
|
|
+ tbody: null,
|
|
|
+ height: H,
|
|
|
+ operator: {
|
|
|
+ type: "normal",
|
|
|
+ width: 120
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $('.grid').Grid('addLoading');
|
|
|
+ $('.grid').Grid('setData', null, head);
|
|
|
+
|
|
|
+ $(function () {
|
|
|
+ $("#button").css("height", 28);
|
|
|
+ DoQuery(-1);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|