|
@@ -619,7 +619,10 @@
|
|
</c:if>
|
|
</c:if>
|
|
</td>
|
|
</td>
|
|
<td style="width: 275px;">
|
|
<td style="width: 275px;">
|
|
- 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}" pattern="0.00" maxFractionDigits="2" />
|
|
|
|
|
|
+ 单价:¥<span class="price"><fmt:formatNumber type="number"
|
|
|
|
+ value="${newOrderProduct.price}"
|
|
|
|
+ pattern="0.00"
|
|
|
|
+ maxFractionDigits="2"/></span>
|
|
<c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
|
|
<c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
|
|
</td>
|
|
</td>
|
|
<c:if test="${order.organizeID != 4}">
|
|
<c:if test="${order.organizeID != 4}">
|
|
@@ -708,7 +711,10 @@
|
|
<font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
|
|
<font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
|
|
</td>
|
|
</td>
|
|
<td style="width: 275px;">
|
|
<td style="width: 275px;">
|
|
- 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}" pattern="0.00" maxFractionDigits="2" />
|
|
|
|
|
|
+ 单价:¥<span class="price"><fmt:formatNumber type="number"
|
|
|
|
+ value="${newOrderProduct.price}"
|
|
|
|
+ pattern="0.00"
|
|
|
|
+ maxFractionDigits="2"/></span>
|
|
</td>
|
|
</td>
|
|
<c:if test="${order.organizeID != 4}">
|
|
<c:if test="${order.organizeID != 4}">
|
|
<td>
|
|
<td>
|
|
@@ -790,8 +796,10 @@
|
|
<font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
|
|
<font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
|
|
</td>
|
|
</td>
|
|
<td style="width: 275px;">
|
|
<td style="width: 275px;">
|
|
- 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}"
|
|
|
|
- pattern="0.00" maxFractionDigits="2"/>
|
|
|
|
|
|
+ 单价:¥<span class="price"><fmt:formatNumber type="number"
|
|
|
|
+ value="${newOrderProduct.price}"
|
|
|
|
+ pattern="0.00"
|
|
|
|
+ maxFractionDigits="2"/></span>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
折扣 :${newOrderProduct.discount}%
|
|
折扣 :${newOrderProduct.discount}%
|
|
@@ -1082,7 +1090,6 @@
|
|
|
|
|
|
//本次退货和本次取消
|
|
//本次退货和本次取消
|
|
$('body').on('input','.refundGoodsInput, .cancelGoodsInput,.refundGoodsInput1',function() {
|
|
$('body').on('input','.refundGoodsInput, .cancelGoodsInput,.refundGoodsInput1',function() {
|
|
- debugger
|
|
|
|
var receiptStatus = $('#receiptStatus').val(),
|
|
var receiptStatus = $('#receiptStatus').val(),
|
|
refundFee = 0,
|
|
refundFee = 0,
|
|
originalAmount = getTotalAmount(); // 所有商品原始总金额
|
|
originalAmount = getTotalAmount(); // 所有商品原始总金额
|
|
@@ -1127,17 +1134,23 @@
|
|
|
|
|
|
function getTotalAmount() {
|
|
function getTotalAmount() {
|
|
var originalAmount = 0; // 所有商品原始总金额
|
|
var originalAmount = 0; // 所有商品原始总金额
|
|
- $('.shopOrderTable').each(function() {
|
|
|
|
|
|
+ $('.shopOrderTable').each(function () {
|
|
var innerTable = $(this).find('.table');
|
|
var innerTable = $(this).find('.table');
|
|
- innerTable.each(function() {
|
|
|
|
|
|
+ innerTable.each(function () {
|
|
// 某个商品原始金额 = 单个折后单价 * (单个退货数量+单个取消数量)
|
|
// 某个商品原始金额 = 单个折后单价 * (单个退货数量+单个取消数量)
|
|
var refundVal = Number($(this).find('.refundGoodsInput').val()),
|
|
var refundVal = Number($(this).find('.refundGoodsInput').val()),
|
|
cancelVal = Number($(this).find('.cancelGoodsInput').val()),
|
|
cancelVal = Number($(this).find('.cancelGoodsInput').val()),
|
|
|
|
+ price = Number($(this).find('.price').text()),
|
|
discountPrice = Number($(this).find('.discountPrice').text()),
|
|
discountPrice = Number($(this).find('.discountPrice').text()),
|
|
addedValueTax = Number($(this).find('.addedValueTax').text());
|
|
addedValueTax = Number($(this).find('.addedValueTax').text());
|
|
var presentNum = Number($(this).find('.refundGoodsInput').attr('presentNum'));
|
|
var presentNum = Number($(this).find('.refundGoodsInput').attr('presentNum'));
|
|
- if((refundVal != 0 || cancelVal != 0)){
|
|
|
|
- originalAmount += (discountPrice * (refundVal + cancelVal - presentNum)+(refundVal + cancelVal - presentNum)*addedValueTax);
|
|
|
|
|
|
+
|
|
|
|
+ if ((refundVal != 0 || cancelVal != 0)) {
|
|
|
|
+ if (${order.organizeID != 4}) {
|
|
|
|
+ originalAmount += (discountPrice * (refundVal + cancelVal - presentNum) + (refundVal + cancelVal - presentNum) * addedValueTax);
|
|
|
|
+ } else {
|
|
|
|
+ originalAmount += (price * (refundVal + cancelVal - presentNum));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -1145,8 +1158,8 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- (function(){
|
|
|
|
- $('body').click(function(e) {
|
|
|
|
|
|
+ (function () {
|
|
|
|
+ $('body').click(function (e) {
|
|
var target = $(e.target),
|
|
var target = $(e.target),
|
|
$block = $('.operation-block');
|
|
$block = $('.operation-block');
|
|
if(target.is('.operation-btn')) {
|
|
if(target.is('.operation-btn')) {
|
|
@@ -1195,6 +1208,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
function setApplicationReturnedNum(a,b){
|
|
function setApplicationReturnedNum(a,b){
|
|
|
|
+ debugger
|
|
var refundType = $("#refundType").val();
|
|
var refundType = $("#refundType").val();
|
|
var num = $("#applicationReturnedNum"+a+b).val();
|
|
var num = $("#applicationReturnedNum"+a+b).val();
|
|
var max = Number($("#shipped"+a+b).html() - $("#returning"+a+b).html() - $("#returned"+a+b).html());
|
|
var max = Number($("#shipped"+a+b).html() - $("#returning"+a+b).html() - $("#returned"+a+b).html());
|
|
@@ -1203,13 +1217,14 @@
|
|
alertx("退货数量不能大于已发货数量(之前已退不算)!");
|
|
alertx("退货数量不能大于已发货数量(之前已退不算)!");
|
|
$("#applicationReturnedNum"+a+b).val(0)
|
|
$("#applicationReturnedNum"+a+b).val(0)
|
|
}
|
|
}
|
|
- if (num !== max && ${returnOnline}){
|
|
|
|
|
|
+ if (num != max && ${returnOnline}){
|
|
alertx("退货数量只能等于已发货数量(之前已退不算)!");
|
|
alertx("退货数量只能等于已发货数量(之前已退不算)!");
|
|
$("#applicationReturnedNum"+a+b).val(0)
|
|
$("#applicationReturnedNum"+a+b).val(0)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
function setApplicationCancelNum(a,b){
|
|
function setApplicationCancelNum(a,b){
|
|
|
|
+ debugger
|
|
var refundType = $("#refundType").val();
|
|
var refundType = $("#refundType").val();
|
|
var num = $("#applicationCancelNum"+a+b).val();
|
|
var num = $("#applicationCancelNum"+a+b).val();
|
|
var max = Number($("#toBeShipped"+a+b).html());
|
|
var max = Number($("#toBeShipped"+a+b).html());
|
|
@@ -1218,7 +1233,7 @@
|
|
alertx("取消数量不能大于待发数量,请重新填写!");
|
|
alertx("取消数量不能大于待发数量,请重新填写!");
|
|
$("#applicationCancelNum"+a+b).val(0)
|
|
$("#applicationCancelNum"+a+b).val(0)
|
|
}
|
|
}
|
|
- if (num !== max && ${returnOnline}){
|
|
|
|
|
|
+ if (num != max && ${returnOnline}){
|
|
alertx("取消数量只能等于待发数量,请重新填写!");
|
|
alertx("取消数量只能等于待发数量,请重新填写!");
|
|
$("#applicationCancelNum"+a+b).val(0)
|
|
$("#applicationCancelNum"+a+b).val(0)
|
|
}
|
|
}
|