ganxiaomao 4 år sedan
förälder
incheckning
00fd17d108

+ 9 - 1
src/main/java/com/agent/action/audit/AuditDetailController.java

@@ -1693,7 +1693,9 @@ public class AuditDetailController extends AbstractController{
 			log.info("更新为已审核待上架");
 			displaceAuditBean.setAuditStatus("4");
 
-
+			//icegan--新增,上传设备有报价,增加2000积分
+			log.info("用户账号:"+user.getUserAccount()+",微信号:"+user.getUserWxh()+",上传设备并且有报价,增加2000积分");
+			this.saleBeanService.updateIntegralByWxOpenId(user.getUserWxh(), 2000);
 
         	// 补充信息
     	    boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
@@ -1826,6 +1828,12 @@ public class AuditDetailController extends AbstractController{
                     pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1",ConfigConstants.XXLB_SBSJ,
                 			appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
                     list.add(pushRecord);
+
+                    //icegan--销售员如果有交担保金,则升级为贵宾会员
+					if(salesBean.getDeposit()>0){
+						saleBeanService.updateMemberLevelBySaleId(saleId, 1);
+					}
+					//icegan-判断销售人员
             	}
             }
 

+ 87 - 0
src/main/java/com/agent/action/record/SaleRecordController.java

@@ -0,0 +1,87 @@
+package com.agent.action.record;
+
+import com.agent.action.common.AbstractController;
+import com.agent.constans.ConfigConstants;
+import com.agent.model.bms.bean.UserBean;
+import com.agent.model.common.bean.ResultBean;
+import com.agent.model.record.service.RecordService;
+import com.agent.model.usermanage.service.UserManageService;
+import com.agent.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+@Controller()
+@RequestMapping("/salerecord")
+public class SaleRecordController extends AbstractController {
+
+    private final String RECORD="record/saleRecord";
+    private final String STATE_1 = "1";
+    private final String SURPE_ADMIN="1";
+
+    @Autowired
+    private RecordService recordService;
+
+    @Autowired
+    private UserManageService userManageService;
+
+    @RequestMapping("/showRecord.do")
+    public ModelAndView showGift(HttpServletRequest request,
+                                 HttpServletResponse response) throws Exception {
+        HttpSession session = request.getSession();
+
+        //页面跳转
+        ModelAndView mv;
+        //获取登录信息
+
+        mv=super.createJspView(RECORD);
+        return mv;
+    }
+
+    @RequestMapping(value = "/showGiftlist.do",method = RequestMethod.POST,produces = "application/json; charset=utf-8")
+    @ResponseBody
+    public String showSaleGiftlist(HttpServletRequest request,
+                               HttpServletResponse response) throws Exception {
+        UserBean userBean=super.getSessionUser(request,response);
+        String agent=userManageService.findAgent(userBean.getId());
+        if ( userBean.getIsAdmin().equals(SURPE_ADMIN)){
+            int page=Integer.parseInt(request.getParameter("page"));
+            int pagesize=Integer.parseInt(request.getParameter("pagesize"));
+            String result = recordService.queryFlListByPageAll(ConfigConstants.SBPP,page,pagesize);
+            int allPage=10;
+            return result;
+        }else {
+            int page=Integer.parseInt(request.getParameter("page"));
+            int pagesize=Integer.parseInt(request.getParameter("pagesize"));
+            String result = recordService.querySaleFlListByPage(ConfigConstants.SBPP,page,pagesize,agent);
+            int allPage=10;
+            return result;
+        }
+    }
+
+    /**
+     * 根据id删除兑换记录
+     */
+    @RequestMapping("/deleteRe.do")
+    public void deleteRe(HttpServletRequest request, HttpServletResponse response,@RequestParam(value="id", required=true) String id){
+        int ids=Integer.parseInt(id);
+        ResultBean resultBean = new ResultBean(ResultBean.SUCCESS_CODE, "成功!");
+        if (StringUtils.isNotBlank(id)){
+            int a=recordService.deleteRe(ids);
+            resultBean.setResult(a);
+
+        }
+
+        super.printResult(request, response, resultBean.toString());
+
+
+    }
+}

+ 10 - 0
src/main/java/com/agent/model/record/bean/RecordBean.java

@@ -31,6 +31,8 @@ public class RecordBean implements Serializable {
 
     private String agentName;
 
+    private Integer userType;//icegan--新增,用户类型,默认为1,车商;2,销售员
+
     public String getAgentName() {
         return agentName;
     }
@@ -126,4 +128,12 @@ public class RecordBean implements Serializable {
     public void setPrice(Integer price) {
         this.price = price;
     }
+
+    public Integer getUserType() {
+        return userType;
+    }
+
+    public void setUserType(Integer userType) {
+        this.userType = userType;
+    }
 }

+ 12 - 0
src/main/java/com/agent/model/record/bpo/RecordBpo.java

@@ -19,4 +19,16 @@ public class RecordBpo {
     public String queryFlListByPageAll(String sbpp, int page, int pagesize) {
         return recordDao.queryFlListByPageAll(sbpp,page,pagesize);
     }
+
+    /**
+     * icegan--新增,销售员礼品记录
+     * @param sbpp
+     * @param page
+     * @param pagesize
+     * @param addId
+     * @return
+     */
+    public String querySaleFlListByPage(String sbpp, int page, int pagesize,String addId){
+        return recordDao.querySaleFlListByPage(sbpp, page, pagesize, addId);
+    }
 }

+ 46 - 2
src/main/java/com/agent/model/record/dao/RecordDao.java

@@ -14,7 +14,7 @@ import java.util.List;
 @Repository("RecordDao")
 public class RecordDao <BaseBean> extends BaseDaoImpl<BaseBean> {
     public String queryFlListByPage(String sbpp, int page, int pagesize,String addId) {
-        String sql="select id,present_name,user_name,member_level,phone,address,exchange_time,integral,price,add_id,agent_name from tb_integral_record where add_id=? order by exchange_time  desc LIMIT ?,?";
+        String sql="select id,present_name,user_name,member_level,phone,address,exchange_time,integral,price,add_id,agent_name from tb_integral_record where add_id=? and user_type=1 order by exchange_time  desc LIMIT ?,?";
         List<RecordBean> list= this.getJdbcTemplate().query(sql, new RowMapper<RecordBean>() {
 
 
@@ -38,7 +38,7 @@ public class RecordDao <BaseBean> extends BaseDaoImpl<BaseBean> {
                 addId,(page-1)*pagesize,pagesize,
         });
         StringBuffer sql1=new StringBuffer();
-        sql1.append("select count(*) from tb_integral_record where add_id='"+addId+"'");
+        sql1.append("select count(*) from tb_integral_record where user_type=1 and add_id='"+addId+"'");
        // sql="select count(*) from tb_integral_record ";
         int all= this.getJdbcTemplate().queryForObject(sql1.toString(),Integer.class);
         JSONObject js=new JSONObject();
@@ -89,4 +89,48 @@ public class RecordDao <BaseBean> extends BaseDaoImpl<BaseBean> {
         js.put("totalList",list);
         return js.toJSONString();
     }
+
+    /**
+     * icegan--新增,销售员礼品记录
+     * @param sbpp
+     * @param page
+     * @param pagesize
+     * @param addId
+     * @return
+     */
+    public String querySaleFlListByPage(String sbpp, int page, int pagesize,String addId) {
+        String sql="select id,present_name,user_name,member_level,phone,address,exchange_time,integral,price,add_id,agent_name,user_type from tb_integral_record where add_id=?  and user_type=2 order by exchange_time  desc LIMIT ?,?";
+        List<RecordBean> list= this.getJdbcTemplate().query(sql, new RowMapper<RecordBean>() {
+
+
+            @Override
+            public RecordBean mapRow(ResultSet rs, int i) throws SQLException {
+                RecordBean b=new RecordBean();
+                b.setId(rs.getInt("id"));
+                b.setPresentName(rs.getString("present_name"));
+                b.setUserName(rs.getString("user_name"));
+                b.setMemberLevel(rs.getInt("member_level"));
+                b.setPhone(rs.getString("phone"));
+                b.setAddress(rs.getString("address"));
+                b.setExchangeTime(rs.getString("exchange_time"));
+                b.setIntegral(rs.getInt("integral"));
+                b.setPrice(rs.getInt("price"));
+                b.setAddId(rs.getString("add_id"));
+                b.setAgentName(rs.getString("agent_name"));
+                b.setUserType(rs.getInt("user_type"));//icegan--新增
+                return b;
+            };
+        } ,new Object[]{
+                addId,(page-1)*pagesize,pagesize,
+        });
+        StringBuffer sql1=new StringBuffer();
+        sql1.append("select count(*) from tb_integral_record where user_type=2 and add_id='"+addId+"'");
+        // sql="select count(*) from tb_integral_record ";
+        int all= this.getJdbcTemplate().queryForObject(sql1.toString(),Integer.class);
+        JSONObject js=new JSONObject();
+        js.put("totalNum",all);
+        js.put("totalList",list);
+        return js.toJSONString();
+
+    }
 }

+ 12 - 0
src/main/java/com/agent/model/record/service/RecordService.java

@@ -19,4 +19,16 @@ public class RecordService {
     public String queryFlListByPageAll(String sbpp, int page, int pagesize) {
         return recordBpo.queryFlListByPageAll(sbpp,page,pagesize);
     }
+
+    /**
+     * icegan--新增获取销售员积分礼品兑换记录
+     * @param sbpp
+     * @param page
+     * @param pagesize
+     * @param addId
+     * @return
+     */
+    public String querySaleFlListByPage(String sbpp, int page, int pagesize,String addId){
+        return recordBpo.querySaleFlListByPage(sbpp, page, pagesize, addId);
+    }
 }

+ 10 - 0
src/main/java/com/agent/model/sale/bpo/SaleBeanBpo.java

@@ -83,6 +83,16 @@ public class SaleBeanBpo {
     }
 
     /**
+     * icegan--更新销售员的积分
+     * @param wxOpenId
+     * @param integral
+     * @return
+     */
+    public boolean updateIntegralByWxOpenId(String wxOpenId, int integral){
+        return saleBeanDao.updateIntegralByWxOpenId(wxOpenId, integral);
+    }
+
+    /**
      * icegan--更新销售员的会员等级
      * @param id
      * @param level

+ 21 - 1
src/main/java/com/agent/model/sale/dao/SaleBeanDao.java

@@ -219,7 +219,7 @@ public class SaleBeanDao<BaseBean> extends BaseDaoImpl<BaseBean> {
         }else{
             StringBuffer sql=new  StringBuffer();
             sql.append("update "+CommonConstants.TB_SALES);
-            sql.append(" set integral = ? where id= ?");
+            sql.append(" set integral =integral+? where id= ?");
             int  state=this.getJdbcTemplate().update(sql.toString(),new Object[]{integral,id});
             if(state>0)
                 return true;
@@ -228,6 +228,26 @@ public class SaleBeanDao<BaseBean> extends BaseDaoImpl<BaseBean> {
     }
 
     /**
+     * icegan--更新销售员的积分
+     * @param wxOpenId
+     * @param integral
+     * @return
+     */
+    public boolean updateIntegralByWxOpenId(String wxOpenId, int integral){
+        if(Strings.isNullOrEmpty(wxOpenId)){
+            return false;
+        }else{
+            StringBuffer sql=new  StringBuffer();
+            sql.append("update "+CommonConstants.TB_SALES);
+            sql.append(" set integral =integral+? where id= ?");
+            int  state=this.getJdbcTemplate().update(sql.toString(),new Object[]{integral,wxOpenId});
+            if(state>0)
+                return true;
+        }
+        return false;
+    }
+
+    /**
      * icegan--更新销售员的会员等级
      * @param id
      * @param level

+ 28 - 0
src/main/java/com/agent/model/sale/service/SaleBeanService.java

@@ -255,6 +255,16 @@ public class SaleBeanService{
     }
 
     /**
+     * icegan--更新销售员的积分
+     * @param wxOpenId
+     * @param integral
+     * @return
+     */
+    public boolean updateIntegralByWxOpenId(String wxOpenId, int integral){
+        return saleBeanBpo.updateIntegralByWxOpenId(wxOpenId, integral);
+    }
+
+    /**
      * icegan--更新销售员的会员等级
      * @param id
      * @param level
@@ -283,4 +293,22 @@ public class SaleBeanService{
     public boolean updateDeposite(String saleId, Integer deposit){
         return saleBeanBpo.updateDeposite(saleId, deposit);
     }
+
+    /**
+     * icegan-处理销售员会员等级升级
+     * @param saleId
+     * @param memberLevel
+     * @return
+     */
+    public boolean updateMemberLevelBySaleId(String saleId, int memberLevel){
+        SalesBean salesBean = getSaleBean(saleId);
+        if(salesBean != null){
+            int nowLevel = salesBean.getMemberLevel();
+            if(memberLevel>nowLevel){
+                //更新
+                return updateMemberLevel(salesBean.getId(), memberLevel+"");
+            }
+        }
+        return false;
+    }
 }

+ 13 - 12
src/main/resources/config.properties

@@ -27,13 +27,13 @@ qiniu.bucket=weigongcheng
 domain=https://www.weigongcheng.net
 
 #\u5FAE\u4FE1appid
-#��ʵ����
+#\uFFFD\uFFFD\u02B5\uFFFD\uFFFD\uFFFD\uFFFD
 wx.appID=wxfcb75e7b0d8ceeff
 #\u5FAE\u4FE1appsecret
-#��ʵ����
+#\uFFFD\uFFFD\u02B5\uFFFD\uFFFD\uFFFD\uFFFD
 wx.appsecret=2f9e7883915e5dc053c9b2eb7c2ab2a4
 
-#�������ݹ��ں�appid
+#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0779\uFFFD\uFFFD\u06BA\uFFFDappid
 #wx.appID=wxa4d9420bbbbb693e
 
 #wx.appsecret=6748ffc213b385f63e4c2b6b146447ce
@@ -65,24 +65,25 @@ wx.url.app.login.success=https://www.weigongcheng.net/agentPlat/views/appAudit/t
 #app\u767B\u5F55\u5931\u8D25\u8DF3\u8F6C\u9875\u9762
 #wx.url.app.login.error=https://www.weigongcheng.net/agentPlat/views/wx/loginError.html
 wx.url.app.login.error=https://www.weigongcheng.net/agentPlat/views/wx/loginError.html
-#�û�Ȩ��
+#\uFFFD\u00FB\uFFFD\u0228\uFFFD\uFFFD
 menu.is_audits=1001
-#���۹���
+#\uFFFD\uFFFD\uFFFD\u06F9\uFFFD\uFFFD\uFFFD
 menu.is_offer=1002
-#����Ȩ��
+#\uFFFD\uFFFD\uFFFD\uFFFD\u0228\uFFFD\uFFFD
 menu.is_deposit=1005
-#����Ա
+#\uFFFD\uFFFD\uFFFD\uFFFD\u0531
 menu.is_sales=1004
-#��֤��
+#\uFFFD\uFFFD\u05A4\uFFFD\uFFFD
 menu.is_digger=1003
-#�˻�
+#\uFFFD\u02FB\uFFFD
 menu.is_user=1008
-#����Ա
+#\uFFFD\uFFFD\uFFFD\uFFFD\u0531
 menu.is_admin_user=1010
-#�̼�
+#\uFFFD\u033C\uFFFD
 menu.is_agent_user=1011
 
-
+#\u7CBE\u54C1\u673A\u5DE5\u53F7
+jpjgh=ZHXTCS
 
 wgcId=WGC000
 

+ 266 - 0
src/main/webapp/WEB-INF/views/record/saleRecord.jsp

@@ -0,0 +1,266 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: icega
+  Date: 2019/9/24
+  Time: 19:34
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page language="java" contentType="text/html; charset=utf-8"
+         pageEncoding="utf-8"%>
+<%@ include file="../../taglibs/taglibs.jsp"%>
+<%pageContext.setAttribute("root", request.getContextPath()); %>
+<!doctype html>
+<html>
+<head>
+    <title>新后台</title>
+    <meta http-equiv="Cache-Control" content="no-siteapp">
+    <meta http-equiv="Cache-Control" content="no-transform">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/netstyle/css/main.css"/>
+    <script src="${root}/resources/js/jquery-1.7.js" type="text/javascript"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/sessionout.js"></script>
+    <script src="${root}/resources/js/laydate/laydate.js"></script>
+
+    <script type="text/javascript">
+        var ctx = "${root}";
+    </script>
+    <script
+            src="${root}/resources/js/ajaxfileupload.js"></script>
+    <style type="text/css">
+        .username {
+            text-align: left;
+            margin: 20px 0 20px 50px;
+        }
+
+        .targetname {
+            height: 23px;
+            line-height: 24px;
+            position: relative;
+            border: 1px solid #ccc;
+            text-decoration: none;
+            color: #888;
+            display: inline-block;
+            width: 600px
+        }
+    </style>
+
+</head>
+<body>
+<div>
+    <p class="main_r_t cc"><span class="span2">当前位置:</span><span>积分管理&gt</span><span>兑换记录</span>
+    </p>
+    <form id="queryOfferList">
+        <div class="act_list">
+
+            <div style="margin-top: 20px;margin-left: 25px">
+
+
+            </div>
+            <div id="appendId" class="overflow_main">
+                <table class="price_table" id="showArea">
+                    <tr style="background-color: #0c91d0;height: 50px;">
+                        <td id="gId" style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">序号</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px"> 代理商名称</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px"> 礼品名称</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">用户</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">会员等级</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">手机号码</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">收件地址</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">兑换时间</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">消费积分</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">消费金额</td>
+                        <td style="background: #688fa2;color: #ffffff;padding: 8px 5px;;font-size: 16px">操作</td>
+                    </tr>
+
+                </table>
+                <div class="list_fy cc"><span>每页显示</span><div class="list_fy_choose down">
+                    <span id="pageSize" >10</span>
+
+                    <ul id="choseSize">
+                        <li onclick="chouseSize(this)">10</li>
+                        <li onclick="chouseSize(this)">11</li>
+                        <li onclick="chouseSize(this)">12</li>
+                        <li onclick="chouseSize(this)">13</li>
+                        <li onclick="chouseSize(this)">14</li>
+                        <li onclick="chouseSize(this)">15</li>
+                        <li onclick="chouseSize(this)">16</li>
+                        <li onclick="chouseSize(this)">17</li>
+                        <li onclick="chouseSize(this)">18</li>
+                        <li onclick="chouseSize(this)">19</li>
+                        <li onclick="chouseSize(this)">20</li>
+                    </ul></div><span>条,</span>
+                    <span id="currentPage" class="ys_num">1</span>
+                    <span>/</span><span id="totalPage">22</span>
+                    <span class="right" onclick="toNextPage()">GO</span>
+                    <input class="right" type="text" id="tooPage" name="toPage"><span class="right" id="lastpage">末页</span>
+                    <span class="right" id="nextPage">下一页</span>
+                    <span class="right" id="beforePage">上一页</span>
+                    <span class="right" id="firstPage">首页</span>
+                </div>
+            </div>
+        </div>
+    </form>
+    <c:set var="obj" value="${ppList}"></c:set>
+
+    <div class="tc_newts" id="tishialert">
+        <div class="tcnewts_main">
+            <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+            <h3>温馨提示</h3>
+            <p id="tishiwens"></p>
+            <div class="newts_btn" style="text-align:center;"	><a class="btn2" onclick="qx_tan($('#tishialert'));" style="text-align: center;margin-right:0px;">我知道了</a></div>
+        </div>
+    </div>
+    <div class="tc_newts" id="tishitc">
+        <div class="tcnewts_main">
+            <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+            <h3>温馨提示</h3>
+            <p id="tishiwen"></p>
+            <div class="newts_btn"><a onclick="qx_tan($('#tishitc'));">取消</a><a class="btn2" id="tishiqr">确认</a></div>
+        </div>
+    </div>
+    <div class="public_prompt" id="tsalert">您输入的信息有误,请确认后重新输入</div>
+</body>
+<script src="${root}/resources/js/index.js"
+        type="text/javascript"></script>
+<%--<script src="${root}/resources/js/offer/offer.js"--%>
+<%--type="text/javascript"></script>--%>
+<script src="${root}/resources/netstyle/js/page.js" type="text/javascript"></script>
+<%-- <script
+	src="${root}/resources/js/laydate/laydate.js"></script> --%>
+<script type="text/javascript">
+    var allPage=10;
+    $(function(){
+
+        show(1,10);
+    })
+    var pagesize;
+
+    function show(page,pageAcounts) {
+        pagesize=pageAcounts;
+        if(allPage>=page&&page>0){
+            $("#showArea").find("tr").each(function(index){
+                if(index>0){
+                    $(this).remove()
+                }
+
+            })
+            $.post("${root}/salerecord/showGiftlist.do",{"page":page,"pagesize":pagesize},function(data){
+                allPage=Math.ceil((data.totalNum)/pagesize);
+                var list =data.totalList;
+                for(var i=0;i<list.length;i++){
+                    var aa;
+                    if(list[i].memberLevel==0){aa="普通会员"}
+                    if(list[i].memberLevel==1){aa="贵宾会员"}
+                    if(list[i].memberLevel==2){aa="金尊会员"}
+                    if(list[i].memberLevel==3){aa="至尊会员"}
+                    $("#showArea").append(" <tr style=\"height:40px \" >\n" +
+                        "                        <td>"+(i+1)+"</td>\n" +
+                        "                        <td>"+list[i].agentName+"</td>\n" +
+                        "                        <td>"+list[i].presentName+"</td>\n" +
+                        "                        <td>"+list[i].userName+"</td>\n" +
+                        "                        <td>"+aa+"</td>\n" +
+                        "                        <td>"+list[i].phone+"</td>\n" +
+                        "                        <td>"+list[i].address+"</td>\n" +
+                        "                        <td>"+list[i].exchangeTime+"</td>\n" +
+                        "                        <td>"+list[i].integral+"</td>\n" +
+                        "                        <td>"+list[i].price+"</td>\n" +
+                        "<td><span><b class=\"td_b2\" onclick=\"suredeleteShop('"+list[i].id+"')\">删除</b></span></td>"+
+                        "                    </tr>\n")
+                }
+                $("#lastpage").attr("onclick","show("+allPage+","+pagesize+")");
+                $("#nextPage").attr("onclick","show("+(page+1)+","+pagesize+")");
+                $("#beforePage").attr("onclick","show("+(page-1)+","+pagesize+")");
+                $("#firstPage").attr("onclick","show(1,"+pagesize+")");
+                $("#totalPage").text(allPage);
+                $("#currentPage").text(page);
+
+            });
+        }
+    }
+    function chouseSize(ele){
+        show(1,ele.innerHTML)
+    }
+
+    function toNextPage() {
+        var toPage=$("#tooPage").val();
+        if(toPage.replace(/\s+/g,"")!=""&&toPage.replace(/\s+/g,"")!=null){
+            if(toPage.replace(/\s+/g,"")>allPage){
+                alert("页数过大啊")
+            }else{
+                show(toPage.replace(/\s+/g,""),pagesize);
+            }
+
+        }else{
+            alert("未填写")
+        }
+
+    }
+
+    function deleteRe(id) {
+        $.ajax({
+            type: "POST",
+            url:  ctx+'/salerecord/deleteRe.do',
+            data:{id:id},
+            async: false,
+            dataType: "json",
+            success: function(data){
+                tsalert(data.message);
+                show(1,10)
+                qx_tan($('#tishitc'));
+            }
+        })
+    }
+
+    function suredeleteShop(para){
+        var ids=para;
+
+
+        if(!ids){
+            tsalert("请选择要删除的禮品!");
+            return;
+        }
+        tanKuangMsg($("#tishitc"),"确定删除吗");
+        $("#tishitc").find("#tishiqr").unbind().click(function(){
+            deleteRe(ids);
+        });
+    }
+    function tsalert(content){
+        $("#tsalert").html(content);
+        setTimeout(function(){
+            $("#tsalert").fadeIn();
+        },300);
+        setTimeout(function(){
+            $("#tsalert").fadeOut();
+        },2300);
+    }
+
+</script>
+<style type="text/css">
+    .list_act_main span b {
+        font-weight: 400;
+        color: #038bcb;
+        cursor: pointer;
+        display: inline-block;
+        text-align: center;
+    }
+    #copy {
+        position: absolute;
+        top: 0;
+        left: 0;
+        opacity: 0;
+        z-index: -10;}
+    span input{
+        display:inline-block;
+        *zoom:1;
+        *display:inline;
+        vertical-align:middle;
+        height:24px;
+        line-height:24px;
+        padding:0 10px;
+        width:60%;
+        margin-right:10px;
+        border:1px solid #ccc;}
+</style>
+</html>
+