44323
2023-11-15 f8c9479d2f33515376e5c0d87734edec2e15ad6f
cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -42,6 +42,9 @@
couponInfoDlg.close = function () {
    parent.layer.close(window.parent.TCoupon.layerIndex);
}
couponInfoDlg.close1 = function () {
    parent.layer.close(window.parent.TCouponExamine.layerIndex);
}
/**
@@ -316,7 +319,42 @@
couponInfoDlg.delete = function (o) {
    $(o).parent("div").remove()
}
couponInfoDlg.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 + "/tCouponExamine/examine", function (data) {
        if (data.code == 200) {
            Feng.success("操作成功!");
            window.parent.TCouponExamine.table.refresh();
            couponInfoDlg.close1();
        } else if(data=="repeat"){
            window.location.reload();
            window.parent.layer.closeAll();
            Feng.error("请勿重复操作");
        }else {
            return  Feng.error(data.msg);
        }
    }, function (data) {
        Feng.error("操作失败!")
        window.location.reload();
        window.parent.layer.closeAll();
        return   Feng.error("操作失败!");
    });
    ajax.set("id", id);
    ajax.set("state", audit);
    ajax.set("remark", text);
    ajax.start();
    layer.closeAll();
}
/**
 * 提交
 */