|
@@ -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"> 渠道名称:</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"> 本次金额:</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=" 确认已结算 ">
|
|
|
+ </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>
|