nickchange
2023-11-15 331ae50b1cdcb31a4a0c182abb82aec5c1b12f83
cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/coursePackageDiscount.js
@@ -14,8 +14,39 @@
CoursePackageDiscount.close = function () {
    parent.layer.close(window.parent.CoursePackage.layerIndex);
};
CoursePackageDiscount.close1 = function () {
    parent.layer.close(window.parent.TCompetition.layerIndex);
};
CoursePackageDiscount.audit = function () {
    var id = $("#id").val();
    let audit = document.querySelector('input[name="r1"]:checked').value;
    let text = $("#text").val()
    if(audit==3){
        if(text==''){
            Feng.info("请输入拒绝理由")
            return false;
        }
    }
    var ajax = new $ax(Feng.ctxPath + "/tDiscount/auditDiscount", function (data) {
        if (data.code == 200) {
            Feng.success("操作成功!");
            window.parent.TCompetition.table.refresh();
            CoursePackageDiscount.close1();
        } else if(data=="repeat"){
            Feng.error("请勿重复操作");
        }else {
            return  Feng.error(data.msg);
        }
    }, function (data) {
        return   Feng.error("操作失败!");
    });
    ajax.set("id", id);
    ajax.set("audit", audit);
    ajax.set("text", text);
    ajax.start();
    layer.closeAll();
}
/**
 * 提交修改
 */