From f85ea638d98b302c590e65f00e6912d91601613c Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期六, 09 十一月 2024 15:53:53 +0800
Subject: [PATCH] 修改bug

---
 ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 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 1457a3d..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,26 +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("请输入有效的结算日期")
-        return
+    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
+        }
     }
-    let maxPrice = $('#maxPrice').val();
-    if(1 == $(type).val()){
+    var maxPrice = $('#maxPrice').val();
+    if('1' == type.val()){
         maxPrice = day;
     }
-    // if('' == maxPrice || null == maxPrice){
-    //     Feng.error("请输入每日结算金额")
-    //     return
-    // }
+    if('' == maxPrice || null == maxPrice){
+        Feng.error("请输入金额上限")
+        return
+    }
+    if(maxPrice < 0){
+        Feng.error("金额上限不能小于0")
+        return
+    }
     let json = {
-        type: $(type).val(),
+        type: type.val(),
         day: day,
         maxPrice: maxPrice
     }

--
Gitblit v1.7.1