Pu Zhibing
2024-11-09 f85ea638d98b302c590e65f00e6912d91601613c
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
    }