From 7732cac9da04bb75e9f655b6fd7e068e14bfc1cc Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 27 十二月 2024 16:06:19 +0800
Subject: [PATCH] 修改bug
---
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js b/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js
index 00dcfbe..5395b75 100644
--- a/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js
+++ b/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js
@@ -61,23 +61,38 @@
* 删除司机单单返活动
*/
SettlementAllocation.setSettlementAllocation = function () {
- let type = $('input[name="type"]:checked')[0];
+ var type = $($('input[name="type"]:checked')[0]);
if(typeof type == "undefined"){
Feng.error("请选择结算周期");
return
}
- let day = $($(type).siblings('.date')[0]).val();
- if('' == day || null == day){
- Feng.error("请输入有效的结算日期")
+ if(type.val() == '1'){
+ var day = $(type.siblings('.day')[0]).val();
+ if('' == day || null == day){
+ Feng.error("请输入金额上限")
+ return
+ }
+ }else{
+ var day = $(type.siblings('.date')[0]).val();
+ if('' == day || null == day){
+ Feng.error("请输入有效的结算日期")
+ return
+ }
+ }
+ var maxPrice = $('#maxPrice').val();
+ if('1' == type.val()){
+ maxPrice = day;
+ }
+ if('' == maxPrice || null == maxPrice){
+ Feng.error("请输入金额上限")
return
}
- let maxPrice = $('#maxPrice').val();
- if('' == maxPrice || null == maxPrice){
- Feng.error("请输入每日结算金额")
+ if(maxPrice < 0){
+ Feng.error("金额上限不能小于0")
return
}
let json = {
- type: $(type).val(),
+ type: type.val(),
day: day,
maxPrice: maxPrice
}
--
Gitblit v1.7.1