Commit 1ceac98e by unknown

optimize the refund

parent af99cf8b
......@@ -411,8 +411,10 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
}
}
if(StringUtils.isEmpty(playerNum)){
map.addAttribute("message", "退款打球人序号不能为空");
return "error";
/*map.addAttribute("message", "退款打球人序号不能为空");
return "error";*/
quantity = 0;
processBean.setPlayerNum("");
}else{
List<Integer> players = new ArrayList<Integer>();
String[] playerNumArray = playerNum.trim().split(",");
......@@ -427,7 +429,7 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
}
}
for (Integer player : players) {
if(player.intValue() <= 0 || player.intValue()>quantityLimit){
if(player.intValue() <= 0){
invalidNum = true;
break;
}
......@@ -452,7 +454,8 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
processBean.setQuantity(quantityLimit);
} else {
processBean.setOperateType(OrderProcessEnum.REFUND_PART.getOperationCode()); // 部分退款
processDesc = processDesc + "退款金额: " + refundAmount + "元,预付卡退款金额: " + prePayCardRefundAmount + "元,优惠券退款金额: " + thisRefundVoucherAmount + "元";
processDesc = processDesc + "退款金额: " + refundAmount + "元,预付卡退款金额: " + prePayCardRefundAmount + "元,优惠券退款金额: "
+ thisRefundVoucherAmount + "元,退款打球人序号:"+playerNum;
processBean.setQuantity(quantityLimit - quantity);
}
processBean.setOperator(operator);
......
......@@ -89,9 +89,9 @@
var refundUpperLimit_prePayCard = $("#refundUpperLimit_prePayCard").attr("value"); //预付卡退款金额上限
var quantity = $("#orderQuantity").attr("value"); //退单人数
var quantityLimit = $("#orderQuantityLimit").attr("value") //退单人数上限
var quantityLimit = $("#orderQuantityLimit").attr("value"); //退单人数上限
var playerNum = $("#playerNum").attr("value") //退单人数上限
var playerNum = $("#playerNum").attr("value"); //退单打球人序号
if(isNaN(amount)){
alert("退款金额请填入数字");
......@@ -105,6 +105,15 @@
alert("退单人数请填入数字");
}else if(parseInt(quantityLimit)<=parseInt(quantity)){
alert("退单人数大于退单人数上限");
}else if($("#playerNum").is(':visible')){
if(!playerNum){
var bool = window.confirm("退款打球人序号没有填写 ,不需要取消客户的球位吗?");
if(bool){
$("#confirmRefund").submit();
}
}else{
$("#confirmRefund").submit();
}
}else{
$("#confirmRefund").submit();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment