Преглед изворни кода

Merge branch 'master' of http://git.iamberry.com/liuzhiwei/iamberry-common-tooth

wangxiaoming пре 6 година
родитељ
комит
5c41587bc4

+ 9 - 0
tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChannelRebate.java

@@ -56,6 +56,7 @@ public class ChannelRebate  implements  Serializable{
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date endDate;//结束时间
 
+    private String[] rebates;//返利id集合
 
     public Integer getRebateId(){
         return rebateId;
@@ -208,4 +209,12 @@ public class ChannelRebate  implements  Serializable{
     public void setEndDate(Date endDate) {
         this.endDate = endDate;
     }
+
+    public String[] getRebates() {
+        return rebates;
+    }
+
+    public void setRebates(String[] rebates) {
+        this.rebates = rebates;
+    }
 }

+ 3 - 3
tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChildChannel.java

@@ -50,7 +50,7 @@ public class ChildChannel  implements  Serializable{
 
     private String mainChannelName;
 
-    private String rebackAmount;//账户余额
+    private Integer rebackAmount;//账户余额
 
     public Integer getChildChannelId(){
         return childChannelId;
@@ -188,11 +188,11 @@ public class ChildChannel  implements  Serializable{
         this.mainChannelName = mainChannelName;
     }
 
-    public String getRebackAmount() {
+    public Integer getRebackAmount() {
         return rebackAmount;
     }
 
-    public void setRebackAmount(String rebackAmount) {
+    public void setRebackAmount(Integer rebackAmount) {
         this.rebackAmount = rebackAmount;
     }
 }

+ 3 - 3
tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/MainChannel.java

@@ -44,7 +44,7 @@ public class MainChannel  implements  Serializable{
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date mainChannelUpdateTime;
 
-    private String rebackAmount;//账户余额
+    private Integer rebackAmount;//账户余额
     public Integer getMainChannelId(){
         return mainChannelId;
     }
@@ -157,11 +157,11 @@ public class MainChannel  implements  Serializable{
         this.mainChannelQrcode = mainChannelQrcode;
     }
 
-    public String getRebackAmount() {
+    public Integer getRebackAmount() {
         return rebackAmount;
     }
 
-    public void setRebackAmount(String rebackAmount) {
+    public void setRebackAmount(Integer rebackAmount) {
         this.rebackAmount = rebackAmount;
     }
 }

+ 6 - 0
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChannelRebateService.java

@@ -48,4 +48,10 @@ public interface ChannelRebateService {
      * @return Integer
      */
     Integer updateRebackStatus(ChannelRebate channelRebate);
+    /**
+     * 获取选中的返利总额
+     * @param
+     * @return Integer
+     */
+    Integer getChannelRebateSum(ChannelRebate channelRebate);
 }

+ 5 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChannelRebateServiceImpl.java

@@ -70,4 +70,9 @@ public class ChannelRebateServiceImpl  implements ChannelRebateService {
     public Integer updateRebackStatus(ChannelRebate channelRebate) {
         return channelRebateMapper.updateRebackStatus(channelRebate);
     }
+
+    @Override
+    public Integer getChannelRebateSum(ChannelRebate channelRebate) {
+        return channelRebateMapper.getChannelRebateSum(channelRebate);
+    }
 }

+ 6 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChannelRebateMapper.java

@@ -40,4 +40,10 @@ public interface ChannelRebateMapper {
      * @return Integer
      */
     Integer updateRebackStatus(ChannelRebate channelRebate);
+    /**
+     * 获取选中的返利总额
+     * @param
+     * @return Integer
+     */
+    Integer getChannelRebateSum(ChannelRebate channelRebate);
 }

+ 16 - 8
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelRebateMapper.xml

@@ -128,14 +128,22 @@
 
     <update id="updateRebackStatus" parameterType="ChannelRebate" >
         update
-        tb_iamberry_channel_rebate
-        <set >
-            <if test="rebackStatus != null ">
+        tb_iamberry_channel_rebate t
+        SET
                 reback_status = 3
-            </if >
-        </set >
-        where reback_channel_id= #{rebackChannelId}
-        AND reback_channel_type = #{rebackChannelType}
-        AND reback_status = 2
+        where t.rebate_id IN(
+        <foreach collection="rebates" item="item" separator=",">
+            ${item}
+        </foreach>)
     </update>
+
+    <select id="getChannelRebateSum" resultType="Integer" parameterType="ChannelRebate" >
+         select
+        (CASE WHEN SUM(t.reback_amount) is NULL THEN 0 ELSE SUM(t.reback_amount) END) rebackAmount
+        from tb_iamberry_channel_rebate t
+        where t.rebate_id IN(
+        <foreach collection="rebates" item="item" separator=",">
+            ${item}
+        </foreach>)
+    </select>
 </mapper>

+ 24 - 9
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/childChannelMapper.xml

@@ -53,15 +53,21 @@
         t.child_channel_create_time,
         t.child_channel_update_time,
         mt.main_channel_name,
-        SUM(cr.reback_amount) rebackAmount
+        (CASE WHEN cr.rebackAmount is NULL THEN 0 ELSE cr.rebackAmount END) rebackAmount
         from tb_iamberry_child_channel t
         left JOIN tb_iamberry_main_channel mt
         ON t.main_channel_id = mt.main_channel_id
-        left JOIN tb_iamberry_channel_rebate cr
+        left JOIN (
+        SELECT
+        c.reback_channel_id reback_channel_id,
+        SUM(c.reback_amount) rebackAmount
+        FROM
+        tb_iamberry_channel_rebate c
+        WHERE
+        c.reback_channel_type = 2
+        AND c.reback_status = 2
+        ) cr
         on t.child_channel_id = cr.reback_channel_id
-        where cr.reback_channel_type = 2 AND
-        cr.reback_status = 3
-        GROUP BY child_channel_id
         <where>
             <if test="childChannelId != null ">
                 AND t.child_channel_id = #{childChannelId}
@@ -91,16 +97,25 @@
                 AND t.child_channel_status = #{childChannelStatus}
             </if >
         </where>
+        GROUP BY child_channel_id
     </select>
     <select id="getChildChannelById" resultMap="BaseResultMap" parameterType="Integer" >
         select
         <include refid="Base_List" />,
-        SUM(cr.reback_amount) rebackAmount
+        (CASE WHEN cr.rebackAmount is NULL THEN 0 ELSE cr.rebackAmount END) rebackAmount
         from tb_iamberry_child_channel t
-        left JOIN tb_iamberry_channel_rebate cr
+        LEFT JOIN (
+        SELECT
+        c.reback_channel_id reback_channel_id,
+        SUM(c.reback_amount) rebackAmount
+        FROM
+        tb_iamberry_channel_rebate c
+        WHERE
+        c.reback_channel_type = 2
+        AND c.reback_status = 2
+        ) cr
         on t.child_channel_id = cr.reback_channel_id
-        where cr.reback_channel_type = 2 AND
-        cr.reback_status = 3 AND
+        where
         t.child_channel_id= #{childChannelId}
         GROUP BY t.child_channel_id
     </select>

+ 25 - 10
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/mainChannelMapper.xml

@@ -37,13 +37,18 @@
     <select id="getMainChannelList" resultType="MainChannel" parameterType="MainChannel" >
         select
         <include refid="Base_List" />,
-        SUM(cr.reback_amount) rebackAmount
+        (CASE WHEN cr.rebackAmount is NULL THEN 0 ELSE cr.rebackAmount END) rebackAmount
         from tb_iamberry_main_channel t
-        left JOIN tb_iamberry_channel_rebate cr
-        on t.main_channel_id = cr.reback_channel_id
-        where cr.reback_channel_type = 1 AND
-        cr.reback_status = 3
-        GROUP BY t.main_channel_id
+        LEFT JOIN (
+        SELECT
+        c.reback_channel_id reback_channel_id,
+        SUM(c.reback_amount) rebackAmount
+        FROM
+        tb_iamberry_channel_rebate c
+        WHERE
+        c.reback_channel_type = 1
+        AND c.reback_status = 2
+        ) cr ON t.main_channel_id = cr.reback_channel_id
         <where>
             <if test="mainChannelId != null ">
                 AND t.main_channel_id = #{mainChannelId}
@@ -64,16 +69,26 @@
                 AND t.main_channel_status = #{mainChannelStatus}
             </if >
         </where>
+        GROUP BY
+        t.main_channel_id
     </select>
     <select id="getMainChannelById" resultType="MainChannel" parameterType="Integer" >
         select
         <include refid="Base_List" />,
-        SUM(cr.reback_amount) rebackAmount
+        (CASE WHEN cr.rebackAmount is NULL THEN 0 ELSE cr.rebackAmount END) rebackAmount
         from tb_iamberry_main_channel t
-        left JOIN tb_iamberry_channel_rebate cr
+        LEFT JOIN (
+        SELECT
+        c.reback_channel_id reback_channel_id,
+        SUM(c.reback_amount) rebackAmount
+        FROM
+        tb_iamberry_channel_rebate c
+        WHERE
+        c.reback_channel_type = 1
+        AND c.reback_status = 2
+        ) cr
         on t.main_channel_id = cr.reback_channel_id
-        where cr.reback_channel_type = 1 AND
-        cr.reback_status = 3 AND
+        where
         t.main_channel_id= #{mainChannelId}
         GROUP BY t.main_channel_id
     </select>

+ 18 - 12
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/channel/AdminChannelHandler.java

@@ -181,22 +181,29 @@ public class AdminChannelHandler {
 	@RequestMapping("/settlement")
 	public ResultMsg settlement(HttpServletRequest request) {
 		ResultMsg rm = ResultMsg.getSuccess();
-		String rebackChannelId = request.getParameter("rebackChannelId");
-		String rebackChannelType = request.getParameter("rebackChannelType");
-		if(rebackChannelId == null || rebackChannelId.equals("")|| rebackChannelType == null || rebackChannelType.equals("")){
+		String[] rebates = request.getParameterValues("rebates");
+		String channelId = request.getParameter("channelId");//渠道id
+		String channelType = request.getParameter("channelType");//渠道id
+		if(rebates == null || channelId == null || channelType == null ||
+				channelId.equals("")||channelType.equals("")	){
 			rm.setStatus(false);
 			return rm;
 		}
-		if(rebackChannelType.equals("1")){
-			MainChannel mainChannel = mainChannelService.getMainChannelById(Integer.valueOf(rebackChannelId));
+		ChannelRebate channelRebate = new ChannelRebate();
+		channelRebate.setRebates(rebates);
+		int sum = channelRebateService.getChannelRebateSum(channelRebate);
+		if (channelType.equals("1")){
+			MainChannel mainChannel = mainChannelService.getMainChannelById(Integer.valueOf(channelId));
 			rm.setStatus(true);
-			rm.setData(mainChannel);
-		}
-		if(rebackChannelType.equals("2")){
-			ChildChannel childChannel = childChannelService.getChildChannelById(Integer.valueOf(rebackChannelId));
+			mainChannel.setRebackAmount(sum);
+			rm.addData("channel",mainChannel);
+		}else {
+			ChildChannel childChannel = childChannelService.getChildChannelById(Integer.valueOf(channelId));
 			rm.setStatus(true);
-			rm.setData(childChannel);
+			childChannel.setRebackAmount(sum);
+			rm.addData("channel",childChannel);
 		}
+		rm.addData("rebates",rebates);
 		return rm;
 	}
 
@@ -210,8 +217,7 @@ public class AdminChannelHandler {
 	@RequestMapping("/updateRebackStatus")
 	public ResultMsg updateRebackStatus(ChannelRebate channelRebate, HttpServletRequest request) throws Exception {
 		ResultMsg msg = new ResultMsg();
-		if(channelRebate.getRebackChannelId() == null  || channelRebate.getRebackChannelType() == null || "".equals(channelRebate.getRebackChannelId())
-				|| channelRebate.getRebackChannelType() == null){
+		if(channelRebate.getRebates() == null){
 			msg.setMessage(NameUtils.getConfig("ERRORCODE"));
 			msg.setResultCode(ResultInfo.ERRORCODE);
 			msg.setStatus(false);

+ 153 - 7
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/channelRebate_list.jsp

@@ -36,12 +36,15 @@
 </nav>
 <div class="pd-20">
     <form action="${pageContext.request.contextPath }/admin/channel/listChannelRebate" method="post" style="margin-bottom: 20px;text-align: center;">
+        <button name=""  class="btn btn-success" type="button" onclick="getChannel();" style="margin-left: -50px;margin-right: 100px;">
+            <i class="Hui-iconfont"></i>结算
+        </button>
         <span class="select-box" style="width: 150px">
 					<select id="rebackStatus" name="rebackStatus" class="select">
                         <option value="">返利状态</option>
 						<option ${rebackStatus==1?'selected':'' } value="1">待返利</option>
-						<option ${rebackStatus==2?'selected':'' } value="2">已返利待打款</option>
-						<option ${rebackStatus==3?'selected':'' } value="3">已返利已打款</option>
+						<option ${rebackStatus==2?'selected':'' } value="2">已返利待打款</option>
+						<option ${rebackStatus==3?'selected':'' } value="3">已返利已打款</option>
 						<option ${rebackStatus==4?'selected':'' } value="4">已取消</option>
 					</select>
 		</span>
@@ -51,15 +54,17 @@
        <button name="" id="submitBtn" class="btn btn-success" type="submit">
             <i class="Hui-iconfont"></i> 搜索
         </button>
-
+        <input type="hidden" name="rebackChannelType" value="${rebackChannelType}">
+        <input type="hidden" name="rebackChannelId" value="${rebackChannelId}">
     </form>
     <form id="goodsform" >
         <table class="table table-border table-bordered table-bg">
             <thead>
             <tr>
-                <th scope="col" colspan="10">积分记录列表</th>
+                <th scope="col" colspan="11">积分记录列表</th>
             </tr>
             <tr class="text-c">
+                <th width="150"></th>
                 <th width="150">订单编号</th>
                 <th width="150">订单金额</th>
                 <th width="90">支付金额</th>
@@ -76,6 +81,11 @@
             <c:if test="${! (empty page.dataList) }">
             <c:forEach items="${page.dataList }" var="infolist">
             <tr class="text-c">
+                <td>
+                    <c:if test="${infolist.rebackStatus == 2 }">
+                        <input type="checkbox" name="rebates" value="${infolist.rebateId}">
+                    </c:if>
+                </td>
                 <td>${infolist.salesOrderid }</td>
                 <td>${infolist.salesAmount }</td>
                 <td>${infolist.salesYetAmount }</td>
@@ -83,11 +93,11 @@
                 <td>${infolist.colorName}</td>
                 <td>${infolist.itemNum}</td>
                 <td>${infolist.rebackAmount}</td>
-                <td>${infolist.rebackStatus==1?'待返利':''}${infolist.rebackStatus==2?'已返利待打款':''}${infolist.rebackStatus==3?'已返利已打款':''}${infolist.rebackStatus==4?'已取消':''}</td>
+                <td>${infolist.rebackStatus==1?'待返利':''}${infolist.rebackStatus==2?'已返利待打款':''}${infolist.rebackStatus==3?'已返利已打款':''}${infolist.rebackStatus==4?'已取消':''}</td>
                 <td><fmt:formatDate value="${infolist.rebackTime}" pattern="yyyy-MM-dd"/></td>
                 <td>
                     <c:if test="${infolist.rebackStatus == 2 }">
-                        <a onclick="update_status(${infolist.rebateId})">标记已返利</a>
+                        <a onclick="update_status(${infolist.rebateId})">标记已打款</a>
                     </c:if>
                 </td>
                 </c:forEach>
@@ -101,6 +111,60 @@
             <%@include file="/common/other/paper/pager.jsp"%>
         </div>
     </form>
+    <input type="hidden" value="${rebackChannelId }" id="channelId">
+    <input type="hidden" value="${rebackChannelType }" id="channelType">
+    <input type="hidden" value="" id="rebates">
+    <div class="layui-layer layui-anim layui-layer-iframe" id="layui-layer4" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 550px; height: 360px; position: absolute; top: 100px; left: 379px;">
+        <div class="layui-layer-title" id="sendOrderNote" style="cursor: move;" move="ok">结算</div>
+        <br>
+        <div class="row cl">
+            <label class="form-label col-2">&nbsp;&nbsp;渠道名称:</label>
+            <div class="formControls col-3">
+                <b><span id="channelName">
+
+					</span></b>
+            </div>
+        </div>
+        <div class="row cl" style="margin-top: 10px;">
+            <label class="form-label col-2">&nbsp;&nbsp;本次金额:</label>
+            <div class="formControls col-3">
+                        <span id="rebackAmount">
+
+                        </span>
+            </div>
+        </div>
+        <br>
+        <div class="row cl">
+            <div class="formControls col-5">
+                <table class="table table-border table-bordered table-bg" style="width: 450px;margin-left: 10px;">
+                    <thead>
+                    <tr class="text-c">
+                        <th width="150" >账户银行</th>
+                        <th width="150" >收款账号</th>
+                        <th width="150" >开户名称</th>
+                        <th width="90">开户支行</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr class="text-c">
+                        <td id="channelBank"></td>
+                        <td id="channelBankAccount"></td>
+                        <td id="channelBankName"></td>
+                        <td id="channelBankBranch"></td>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        <br>
+        <span style="margin-left: 10px;">请在打款后,点击”确认已结算“按钮,系统将对应的返利记录标记为已打款。</span>
+        <div class="col-9 col-offset-3" style="margin-top: 10px;">
+            <input class="btn btn-danger" type="button" onclick="update_statuss()" value="&nbsp;&nbsp;确认已结算&nbsp;&nbsp;">
+        </div>
+        <span class="layui-layer-setwin">
+			<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="exitWindowsDiv(this)" href="javascript:;"></a>
+		</span>
+        <input type="hidden" value="" id="rebackChannelId">
+    </div>
 </div>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
@@ -110,6 +174,81 @@
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
 
+    function getChannel(){
+        var rebates = "";
+        $('input:checkbox[name=rebates]:checked').each(function(i){
+            if(0==i){
+                rebates = $(this).val();
+            }else{
+                rebates += (","+$(this).val());
+            }
+        });
+        var channelId = $("#channelId").val();
+        var channelType = $("#channelType").val();
+        if(rebates == "" || channelId == "" || channelType == ""){
+            layer.msg("请至少选中一项返利记录",{icon: 5,time:2000});
+            return;
+        }
+        $.ajax({
+            url: '${pageContext.request.contextPath }/admin/channel/settlement',
+            type: "POST",
+            dataType: "json",
+            data: {rebates : rebates,channelId : channelId,channelType : channelType},
+            error:function(data){
+                layer.msg(data.status,{icon: 5,time:2000});
+            },
+            success:  function(data){
+                if(data.status){
+                    $("#layui-layer4").show();
+                    if(channelType == 1){
+                        $("#channelName").html(data.data.channel.mainChannelName);
+                        $("#rebackAmount").html(data.data.channel.rebackAmount+"元");
+                        $("#channelBank").html(data.data.channel.mainChannelBank);
+                        $("#channelBankAccount").html(data.data.channel.mainChannelBankAccount);
+                        $("#channelBankName").html(data.data.channel.mainChannelBankName);
+                        $("#channelBankBranch").html(data.data.channel.mainChannelBankBranch);
+                    }
+                    if(channelType == 2){
+                        $("#channelName").html(data.data.channel.childChannelName);
+                        $("#rebackAmount").html(data.data.channel.rebackAmount+"元");
+                        $("#channelBank").html(data.data.channel.childChannelBank);
+                        $("#channelBankAccount").html(data.data.channel.childChannelBankAccount);
+                        $("#channelBankName").html(data.data.channel.childChannelBankName);
+                        $("#channelBankBranch").html(data.data.channel.childChannelBankBranch);
+                    }
+                    $("#rebates").val(data.data.rebates);
+                }else{
+                    layer.msg("操作失败",{icon: 5,time:2000});
+                }
+
+            }
+        });
+    }
+
+    function update_statuss(){
+        var rebates = $("#rebates").val();
+        $.ajax({
+            url: '${pageContext.request.contextPath }/admin/channel/updateRebackStatus',
+            type: "POST",
+            dataType: "json",
+            data: {rebates : rebates},
+            error:function(data){
+                layer.msg(data.status,{icon: 5,time:2000});
+            },
+            success:  function(data){
+                if(data.status){
+                    $("#layui-layer4").hide();
+                    layer.msg("状态已修改为已返利,已打款",{icon: 1,time:2000},function () {
+                        location.replace(location.href);
+                    });
+
+                }else{
+                    layer.msg("修改状态失败",{icon: 5,time:2000});
+                }
+
+            }
+        });
+    }
     function update_status(id){
         layer.confirm('确认要修改返利状态吗?',function(index){
                 $.ajax({
@@ -122,7 +261,10 @@
                     },
                     success:  function(data){
                         if(data.status){
-                            layer.msg("已修改为已返利,待打款",{icon: 1,time:2000});
+                            layer.msg("已修改为已返利,已打款",{icon: 1,time:2000},function () {
+                                location.replace(location.href);
+                            });
+
                         }else{
                             layer.msg("修改状态失败",{icon: 5,time:2000});
                         }
@@ -133,6 +275,10 @@
         );
 
     }
+    // 关闭窗口
+    function exitWindowsDiv(_this) {
+        $(_this).parent().parent().hide();
+    }
 </script>
 </body>
 </html>

+ 4 - 5
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/child_channel_list.jsp

@@ -42,7 +42,6 @@
        <button name="" id="submitBtn" class="btn btn-success" type="submit">
             <i class="Hui-iconfont"></i> 搜索
         </button>
-
     </form>
     <form id="goodsform" >
         <table class="table table-border table-bordered table-bg">
@@ -82,12 +81,12 @@
                 <td><fmt:formatDate value="${infolist.childChannelCreateTime}" pattern="yyyy-MM-dd"/></td>
                 <td>
                     <a onclick="toRebateList(${infolist.mainChannelId})">查看明细</a>
-                    <a href="#" onclick="getChannel(${infolist.childChannelId});">结算</a>
+                    <a href="#" onclick="toRebateList(${infolist.mainChannelId})">结算</a>
                 </td>
                 </c:forEach>
                 </c:if>
                 <c:if test="${empty page.dataList}">
-                    <tr align="center"><td colspan="11" style="text-align: center;">未查询到该类数据!</td></tr>
+                    <tr align="center"><td colspan="12" style="text-align: center;">未查询到该类数据!</td></tr>
                 </c:if>
             </tbody>
         </table>
@@ -153,7 +152,7 @@
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
-    function getChannel(id){
+    /*function getChannel(id){
         $.ajax({
             url: '${pageContext.request.contextPath }/admin/channel/settlement',
             type: "POST",
@@ -177,7 +176,7 @@
 
             }
         });
-    }
+    }*/
     /*function update_status(id){
         layer.confirm('确认要修改返利状态吗?',function(index){
                 $.ajax({

+ 3 - 81
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/main_channel_list.jsp

@@ -80,7 +80,7 @@
                 <td><fmt:formatDate value="${infolist.mainChannelCreateTime}" pattern="yyyy-MM-dd"/></td>
                 <td>
                     <a onclick="toRebateList(${infolist.mainChannelId})">查看明细</a><br>
-                    <a href="#" onclick="getChannel(${infolist.mainChannelId});">结算</a>
+                    <a href="#" onclick="toRebateList(${infolist.mainChannelId})">结算</a>
                 </td>
                 </c:forEach>
                 </c:if>
@@ -93,57 +93,7 @@
             <%@include file="/common/other/paper/pager.jsp"%>
         </div>
     </form>
-    <div class="layui-layer layui-anim layui-layer-iframe" id="layui-layer4" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 550px; height: 360px; position: absolute; top: 100px; left: 379px;">
-        <div class="layui-layer-title" id="sendOrderNote" style="cursor: move;" move="ok">结算</div>
-        <br>
-        <div class="row cl">
-            <label class="form-label col-2">&nbsp;&nbsp;渠道名称:</label>
-            <div class="formControls col-3">
-                <b><span id="channelName">
 
-					</span></b>
-            </div>
-        </div>
-        <div class="row cl" style="margin-top: 10px;">
-            <label class="form-label col-2">&nbsp;&nbsp;本次金额:</label>
-            <div class="formControls col-3">
-                        <span id="rebackAmount">
-
-                        </span>
-            </div>
-        </div>
-        <br>
-        <div class="row cl">
-            <div class="formControls col-5">
-            <table class="table table-border table-bordered table-bg" style="width: 450px;margin-left: 10px;">
-                <thead>
-                <tr class="text-c">
-                    <th width="150" >账户银行</th>
-                    <th width="150" >收款账号</th>
-                    <th width="150" >开户名称</th>
-                    <th width="90">开户支行</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr class="text-c">
-                    <td id="channelBank"></td>
-                    <td id="channelBankAccount"></td>
-                    <td id="channelBankName"></td>
-                    <td id="channelBankBranch"></td>
-                </tbody>
-            </table>
-            </div>
-        </div>
-        <br>
-        <span style="margin-left: 10px;">请在打款后,点击”确认已结算“按钮,系统将对应的返利记录标记为已打款。</span>
-        <div class="col-9 col-offset-3" style="margin-top: 10px;">
-            <input class="btn btn-danger" type="button" onclick="update_status()" value="&nbsp;&nbsp;确认已结算&nbsp;&nbsp;">
-        </div>
-        <span class="layui-layer-setwin">
-			<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="exitWindowsDiv(this)" href="javascript:;"></a>
-		</span>
-        <input type="hidden" value="" id="rebackChannelId">
-    </div>
 </div>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
@@ -152,35 +102,7 @@
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
-
-    function getChannel(id){
-                $.ajax({
-                    url: '${pageContext.request.contextPath }/admin/channel/settlement',
-                    type: "POST",
-                    dataType: "json",
-                    data: {rebackChannelId : id,rebackChannelType : 1},
-                    error:function(data){
-                        layer.msg(data.status,{icon: 5,time:2000});
-                    },
-                    success:  function(data){
-                        if(data.status){
-                            $("#layui-layer4").show();
-                            $("#channelName").html(data.data.mainChannelName);
-                            $("#rebackAmount").html(data.data.rebackAmount+"元");
-                            $("#channelBank").html(data.data.mainChannelBank);
-                            $("#channelBankAccount").html(data.data.mainChannelBankAccount);
-                            $("#channelBankName").html(data.data.mainChannelBankName);
-                            $("#channelBankBranch").html(data.data.mainChannelBankBranch);
-                            $("#rebackChannelId").html(data.data.mainChannelId);
-                        }else{
-                            layer.msg("操作失败",{icon: 5,time:2000});
-                        }
-
-                    }
-                });
-    }
-
-   function update_status(){
+   /*function update_status(){
         var rebackChannelId = $("#rebackChannelId").val();
                 $.ajax({
                     url: '${pageContext.request.contextPath }/admin/channel/updateRebackStatus',
@@ -199,7 +121,7 @@
 
                     }
                 });
-    }
+    }*/
     function toRebateList(id) {
         window.location.href = '${pageContext.request.contextPath }/admin/channel/listChannelRebate?rebackChannelType=1&rebackChannelId='+id;
     }