|
@@ -120,21 +120,54 @@
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
|
+ var orderProducts = new Array();
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
$("#inputForm").validate({
|
|
$("#inputForm").validate({
|
|
ignore:"",
|
|
ignore:"",
|
|
submitHandler: function(form){
|
|
submitHandler: function(form){
|
|
- var proportional = $("#proportional").val();// 子订单占比
|
|
|
|
- var modifyShouldPayNote = $("#modifyShouldPayNote").val();//备注
|
|
|
|
- if(null == proportional || "" == proportional){
|
|
|
|
- alertx("比例不能为空");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- if(null == modifyShouldPayNote || "" == modifyShouldPayNote){
|
|
|
|
- alertx("请填写备注内容");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ var flag = setOrderProductInfo();
|
|
|
|
+ // var proportional = $("#proportional").val();// 子订单占比
|
|
|
|
+ var modifyShouldPayNote = $("#modifyShouldPayNote").val();//备注
|
|
|
|
+ var shopPostFee = $("#shopPostFee").val();//供应商运费
|
|
|
|
+ var shopOtherFee = $("#shopOtherFee").val();//付第三方
|
|
|
|
+ /*if(null == proportional || "" == proportional){
|
|
|
|
+ alertx("比例不能为空");
|
|
|
|
+ return false;
|
|
|
|
+ }*/
|
|
|
|
+ if(null == modifyShouldPayNote || "" == modifyShouldPayNote){
|
|
|
|
+ alertx("请填写备注内容");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (!flag) {
|
|
|
|
+ top.$.jBox.confirm("每个商品三个比例之和需要等于100%", '提示');
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ console.log('orderProducts',orderProducts)
|
|
loading('正在提交,请稍等...');
|
|
loading('正在提交,请稍等...');
|
|
|
|
+ <%--$.ajax({--%>
|
|
|
|
+ <%-- url: '${ctx}/order/cmPayShop/saveChangePayShopAmount',--%>
|
|
|
|
+ <%-- data: {--%>
|
|
|
|
+ <%-- 'id': ${shopOrderId},--%>
|
|
|
|
+ <%-- 'costType' : 2,--%>
|
|
|
|
+ <%-- 'modifyShouldPayNote' : modifyShouldPayNote,--%>
|
|
|
|
+ <%-- 'newOrderProducts' : orderProducts,--%>
|
|
|
|
+ <%-- 'shopPostFee' : shopPostFee,--%>
|
|
|
|
+ <%-- 'shopOtherFee' : shopOtherFee--%>
|
|
|
|
+ <%-- },--%>
|
|
|
|
+ <%-- type: 'POST',--%>
|
|
|
|
+ <%-- async: false,--%>
|
|
|
|
+ <%-- success: function (data) {--%>
|
|
|
|
+ <%-- loading('修改比例成本失败');--%>
|
|
|
|
+ <%-- setTimeout(function () {--%>
|
|
|
|
+ <%-- window.location.href = "${ctx}/weisha/cmOrganizeProduct/?organizeId=${organizeId}&productName=${cmOrganizeProductFront.productName}&shopName=${cmOrganizeProductFront.shopName}&includedTax=${cmOrganizeProductFront.includedTax}&status=${cmOrganizeProduct.status}";--%>
|
|
|
|
+ <%-- }, 1000);--%>
|
|
|
|
+ <%-- },--%>
|
|
|
|
+ <%-- error: function (json) {--%>
|
|
|
|
+ <%-- alertx('输入有误,请先更正。', function () {--%>
|
|
|
|
+ <%-- window.location.href = "${ctx}/shopOrder/toChangePayShopAmount?costType=2&shopOrderID=${shopOrderId}"--%>
|
|
|
|
+ <%-- });--%>
|
|
|
|
+ <%-- }--%>
|
|
|
|
+ <%--})--%>
|
|
form.submit();
|
|
form.submit();
|
|
},
|
|
},
|
|
errorContainer: "#messageBox",
|
|
errorContainer: "#messageBox",
|
|
@@ -149,6 +182,43 @@
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
});
|
|
|
|
+ function setOrderProductInfo() {
|
|
|
|
+ var flag = true;
|
|
|
|
+ $('.tr_orderProduct').each(function (dom, index) {
|
|
|
|
+ var index = 0;
|
|
|
|
+ var that = $(this)
|
|
|
|
+ var num = that.find('.num').val()
|
|
|
|
+ num.attr('num', 'skuList[' + skuIndex + '].organizeId');
|
|
|
|
+ var presentNum = that.find('.presentNum').val()
|
|
|
|
+ var name = that.find('.name').val()
|
|
|
|
+ var orderProductID = that.find('.orderProductID').val()
|
|
|
|
+ var includedTax = that.find('.includedTax').val()
|
|
|
|
+ var productID = that.find('.productID').val()
|
|
|
|
+ var cmPercent = that.find('.cmPercent').val()
|
|
|
|
+ var organizePercent = that.find('.organizePercent').val()
|
|
|
|
+ var shopPercent = that.find('.shopPercent').val()
|
|
|
|
+ console.log('shopPercent'+shopPercent)
|
|
|
|
+ console.log('organizePercent'+organizePercent)
|
|
|
|
+ console.log('cmPercent'+cmPercent)
|
|
|
|
+ if (100 != (shopPercent*1 + organizePercent*1 + cmPercent*1)) {
|
|
|
|
+ top.$.jBox.confirm("每个商品三个比例之和需要等于100%", '提示');
|
|
|
|
+ flag = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ orderProducts.push({
|
|
|
|
+ 'num': num,
|
|
|
|
+ 'presentNum': presentNum,
|
|
|
|
+ 'name': name,
|
|
|
|
+ 'includedTax': includedTax,
|
|
|
|
+ 'productID': productID,
|
|
|
|
+ 'orderProductID': orderProductID,
|
|
|
|
+ 'shopPercent': shopPercent,
|
|
|
|
+ 'organizePercent': organizePercent,
|
|
|
|
+ 'cmPercent': cmPercent,
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ return flag;
|
|
|
|
+ }
|
|
function page(n,s){
|
|
function page(n,s){
|
|
$("#pageNo").val(n);
|
|
$("#pageNo").val(n);
|
|
$("#pageSize").val(s);
|
|
$("#pageSize").val(s);
|
|
@@ -162,7 +232,7 @@
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
<ul class="nav nav-tabs">
|
|
<ul class="nav nav-tabs">
|
|
- <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
|
|
|
|
|
|
+ <%--<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>--%>
|
|
<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
|
|
<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
|
|
<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=2&shopOrderID=${shopOrderId}">修改应付</a></li>
|
|
<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=2&shopOrderID=${shopOrderId}">修改应付</a></li>
|
|
</ul>
|
|
</ul>
|
|
@@ -182,8 +252,35 @@
|
|
<input id="shopOrderID" type="hidden" name="shopOrderID" value="${newShopOrder.shopOrderID}">
|
|
<input id="shopOrderID" type="hidden" name="shopOrderID" value="${newShopOrder.shopOrderID}">
|
|
<input id="orderID" type="hidden" name="orderID" value="${newShopOrder.orderID}">
|
|
<input id="orderID" type="hidden" name="orderID" value="${newShopOrder.orderID}">
|
|
<input id="productAmount" type="hidden" name="productAmount" value="${newShopOrder.productAmount}">
|
|
<input id="productAmount" type="hidden" name="productAmount" value="${newShopOrder.productAmount}">
|
|
- <table class="table table-striped table-bordered table-condensed" style="width: 450px">
|
|
|
|
- <tr>
|
|
|
|
|
|
+ <table class="table table-striped table-bordered table-condensed" style="width: 80%">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th hidden>订单商品Id</th>
|
|
|
|
+ <th>商品名</th>
|
|
|
|
+ <th>规格</th>
|
|
|
|
+ <th>供应商比例</th>
|
|
|
|
+ <th>集团比例</th>
|
|
|
|
+ <th>采美比例</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ <c:forEach var="product" items="${newShopOrder.newOrderProducts}" varStatus="index">
|
|
|
|
+ <tr class="tr_orderProduct">
|
|
|
|
+ <td hidden><input id="num" name="newOrderProducts[${index.index}].num" class="num" value="${product.num - product.returnedNum}"></td>
|
|
|
|
+ <td hidden><input id="presentNum" name="newOrderProducts[${index.index}].presentNum" class="presentNum" value="${product.presentNum}"></td>
|
|
|
|
+ <td hidden><input id="name" name="newOrderProducts[${index.index}].name" class="name" value="${product.name}"></td>
|
|
|
|
+ <td hidden><input id="orderProductID" name="newOrderProducts[${index.index}].orderProductID" class="orderProductID" value="${product.orderProductID}"></td>
|
|
|
|
+ <td hidden><input id="includedTax${index.index}" class="includedTax" value="${product.includedTax}"></td>
|
|
|
|
+ <td hidden><input id="productID${index.index}" class="productID" value="${product.productID}"></td>
|
|
|
|
+ <td>${product.name}</td>
|
|
|
|
+ <td>${product.productUnit}</td>
|
|
|
|
+ <td><input id="shopPercent" type="number" name="newOrderProducts[${index.index}].shopPercent" class="shopPercent" value="${product.shopPercent}" style="width: 100px"/> %</td>
|
|
|
|
+ <td><input id="organizePercent" type="number" name="newOrderProducts[${index.index}].organizePercent" class="organizePercent" value="${product.organizePercent}" style="width: 100px"/> %</td>
|
|
|
|
+ <td><input id="cmPercent" type="number" name="newOrderProducts[${index.index}].cmPercent" class="cmPercent" value="${product.cmPercent}" style="width: 100px"/> %</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ <%--<tr>
|
|
<td colspan="2">
|
|
<td colspan="2">
|
|
<input type="hidden" id="shopOrderAmount" name="shopOrderAmount" value="${newShopOrder.productAmount}">
|
|
<input type="hidden" id="shopOrderAmount" name="shopOrderAmount" value="${newShopOrder.productAmount}">
|
|
<font color="#6495ed"><b>子订单金额:</b>${newShopOrder.productAmount}</font>
|
|
<font color="#6495ed"><b>子订单金额:</b>${newShopOrder.productAmount}</font>
|
|
@@ -205,7 +302,7 @@
|
|
<td>
|
|
<td>
|
|
<input type="number" id="shopPostFee" name="shopPostFee" onchange="changeShouldPay(this)" value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
|
|
<input type="number" id="shopPostFee" name="shopPostFee" onchange="changeShouldPay(this)" value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
|
|
</td>
|
|
</td>
|
|
- </tr>
|
|
|
|
|
|
+ </tr>--%>
|
|
<%--<tr>
|
|
<%--<tr>
|
|
<td>
|
|
<td>
|
|
<b>付第三方:</b>
|
|
<b>付第三方:</b>
|
|
@@ -219,6 +316,18 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<table>
|
|
<table>
|
|
|
|
+ <td>
|
|
|
|
+ <b>供应商运费:</b>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="number" id="shopPostFee" name="shopPostFee" onchange="changeShouldPay(this)" value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <b>付第三方:</b>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="number" id="shopOtherFee" name="shopOtherFee" onchange="changeShouldPay(this)" value="${newShopOrder.shopOtherFee}" style="margin-left: 20px"/>
|
|
|
|
+ </td>
|
|
<tr>
|
|
<tr>
|
|
<td style="padding-top: 10px;">
|
|
<td style="padding-top: 10px;">
|
|
<b>付供应商:</b><font color="red"><span id="div-supplier-fee">${newShopOrder.shouldPayShopAmount}</span></font>
|
|
<b>付供应商:</b><font color="red"><span id="div-supplier-fee">${newShopOrder.shouldPayShopAmount}</span></font>
|