nickchange
2023-12-08 044aff7d85f7a9e1dfc41c4ebdd9e24882ac4089
cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js
@@ -299,12 +299,25 @@
        Feng.info("请选择课包名称")
        return;
    }
    var selectElement = document.getElementById('coursePackageName');
    var selectedOption = selectElement.options[selectElement.selectedIndex];
    console.log("插入")
    var type = selectedOption.getAttribute('data-type');
    console.log('type----------'+type)
if (type==1) {
    if (role == 1) {
        if ($("#courseTime").val() == '') {
            Feng.info("请选择课时规格")
            return;
        }
    }
}else {
    data.classHours = 0
}
    if($("#cashPayment").val()==''){
        Feng.info("请输入支付金额")
        return;
@@ -322,7 +335,7 @@
        courseTimeId=0;
    }
    $.ajax({
        url: Feng.ctxPath + "/cpPayment/addCoursePackagePayment/"+ courseTimeId,
        url: Feng.ctxPath + "/cpPayment/addCoursePackagePayment",
        type: "POST",
        contentType: "application/json", // 设置请求头的 Content-Type
        data: JSON.stringify(data), // 将数据转换为 JSON 字符串
@@ -361,7 +374,8 @@
        if(data!=null){
            $.each(data, function(k,v) {
                content += "<option value='"+v.id+"'>"+v.name+"</option>";
                // content += "<option value='"+v.id+"'>"+v.name+"</option>";
                content += "<option value='"+v.id+"'  data-type='"+v.type+"'>"+v.name+"</option>";
            });
            $("#coursePackageName").empty().append(content);
        }
@@ -532,7 +546,7 @@
                            maxmin: true,
                            content: Feng.ctxPath + '/appUser/add'
                        });
                        layer.closeAll('page');
                        // layer.closeAll('page');
                    },
                    btn2:function () {
                    }
@@ -570,7 +584,7 @@
                                    maxmin: true,
                                    content: Feng.ctxPath + '/appUser/addStudent/'+appUserId
                                });
                                layer.closeAll('page');
                                // layer.closeAll('page');
                            },
                        });
                    }