lisy
2023-07-31 e4ac47bce328ccabbcc65c789979f57330512b3c
管理后台前端字段变更
2个文件已修改
252 ■■■■ 已修改文件
cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js 204 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
@@ -35,7 +35,7 @@
                                   onclick="radio2()"
                                   style="margin-left: 24.7%;">
                            <label class="col-sm-1" style="margin-left: -17px;width: 20%;">代金券: 可抵</label>
                            <input class="col-sm-1" id="discountAmount" onkeyup="value=value.replace(/\D/g,'')"/>
                            <input class="col-sm-1" id="voucherAmount" onkeyup="value=value.replace(/\D/g,'')"/>
                            <label class="col-sm-1">元</label>
                        </div>
                    </div>
@@ -67,14 +67,14 @@
                    <div class="form-group">
                        <div class="initialLevel col-sm-12 control-label form-group">
                            <label class="col-sm-3 control-label"><font  style="color:red">*</font>发放方式: </label>
                            <input class="col-sm-1 control-label" onclick="checkCompany()" name="company" type="radio"
                                   value="0" style="margin-top: 10px"/>
                            <input class="col-sm-1 control-label" onclick="distributionMethod1()" name="distributionMethod" type="radio"
                                   value="1" style="margin-top: 10px"/>
                            <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分购买</label>
                            <input class="col-sm-1 control-label" name="company" onclick="checkCompany2()" type="radio"
                                   value="1" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <input class="col-sm-1 control-label" name="distributionMethod" onclick="distributionMethod2()" type="radio"
                                   value="2" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 16%;margin-top: 7px">注册赠送</label>
                            <input class="col-sm-1 control-label" name="company" onclick="checkCompany2()" type="radio"
                                   value="1" checked style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/>
                            <input class="col-sm-1 control-label" name="distributionMethod" onclick="distributionMethod3()" type="radio"
                                   value="3" checked style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 16%;margin-top: 7px">自动发券</label>
                        </div>
                    </div>
@@ -86,12 +86,15 @@
                    <div class="form-group">
                        <div class="initialLevel col-sm-12 control-label form-group">
                            <label class="col-sm-3 control-label"><font  style="color:red">*</font>兑换方式: </label>
                            <input class="col-sm-1 control-label" onclick="checkCompany()" name="company" type="radio"
                                   value="0" style="margin-top: 10px"/>
                            <input class="col-sm-1 control-label" onclick="exchangeMethod1()" name="exchangeMethod" type="radio"
                                   value="1" style="margin-top: 10px"/>
                            <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分</label>
                            <input class="col-sm-1 control-label" name="company" onclick="checkCompany2()" type="radio"
                                   value="1" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod2()" type="radio"
                                   value="2" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金+积分</label>
                            <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod3()" type="radio"
                                   value="2" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金</label>
                        </div>
                    </div>
                </div>
@@ -120,14 +123,14 @@
                    <div class="form-group">
                        <div class="initialLevel col-sm-12 control-label form-group">
                            <label class="col-sm-3 control-label"><font  style="color:red">*</font>用户人群: </label>
                            <input class="col-sm-1 control-label" onclick="userGroup1()" name="company" type="radio"
                                   value="0" style="margin-top: 10px"/>
                            <input class="col-sm-1 control-label" onclick="userGroup1()" name="userGroup" type="radio"
                                   value="1" style="margin-top: 10px"/>
                            <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label>
                            <input class="col-sm-1 control-label" name="company" onclick="userGroup2()" type="radio"
                                   value="1" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <input class="col-sm-1 control-label" name="userGroup" onclick="userGroup2()" type="radio"
                                   value="2" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label>
                            <input class="col-sm-1 control-label" name="company" onclick="userGroup3()" type="radio"
                                   value="1" checked style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/>
                            <input class="col-sm-1 control-label" name="userGroup" onclick="userGroup3()" type="radio"
                                   value="3" checked style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/>
                            <label class="col-sm-1" style="width: 25%;margin-top: -16px">已有学员用户</label>
                        </div>
                    </div>
@@ -193,7 +196,7 @@
                </div>
            </div>
            <div class="row">
            <div class="row" id="citySelect">
                <div class="col-sm-5">
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><font  style="color:red">*</font>指定城市: </label>
@@ -202,11 +205,16 @@
                        <select id="city"></select>
                        <label class="col-sm-1" style="width: 16%;margin-top: 7px">市</label>
                        <select id="County"></select>
                        <div class="col-sm-1">
                            <label name="addBranch" class="form-control" onclick="couponInfoDlg.addBranch()" style="border: 0px;cursor: pointer"><i class="fa fa-plus-circle"></i></label>
                            <label name="addBranch" class="form-control" onclick="couponInfoDlg.delete()" style="border: 0px;cursor: pointer"><i class="fa fa-trash"></i></label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
            <div class="row" id="storeSelect">
                <div class="col-sm-5">
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><font  style="color:red">*</font>指定门店: </label>
cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -37,13 +37,13 @@
 * 关闭此对话框
 */
couponInfoDlg.close = function () {
    parent.layer.close(window.parent.CouponServer.layerIndex);
    parent.layer.close(window.parent.TCoupon.layerIndex);
}
function ajax(serverCouponId, value, remark) {
    var ajax = new $ax(Feng.ctxPath + "/couponServer/examine", function (data) {
        Feng.success("审核成功!");
        window.parent.CouponServer.table.refresh();
        window.parent.TCoupon.table.refresh();
        couponInfoDlg.close();
    }, function (data) {
        Feng.error("审核失败!" + data.responseJSON.message + "!");
@@ -56,43 +56,195 @@
    ajax.start();
}
function refush() {
    $("#detailBox").show()
}
function agree() {
    $("#detailBox").hide()
}
function checkCompany() {
/**
 * 发放方式1
 */
function distributionMethod1() {
    $("#demo2").hide()
}
function checkCompany2() {
/**
 * 发放方式2
 */
function distributionMethod2() {
    $("#demo2").hide()
}
/**
 * 发放方式3
 */
function distributionMethod3() {
    $("#demo2").hide()
}
/**
 * 兑换方式1
 */
function exchangeMethod1() {
    $("#demo2").show()
}
/**
 * 兑换方式2
 */
function exchangeMethod2() {
    $("#demo2").show()
}
/**
 * 兑换方式3
 */
function exchangeMethod3() {
    $("#demo2").show()
}
/**
 * 全部用户
 */
function userGroup1() {
    $("#demo2").show()
}
/**
 * 年度会员
 */
function userGroup2() {
    $("#demo2").show()
}
/**
 * 已有学员用户
 */
function userGroup3() {
    $("#demo2").show()
}
/**
 * 全国通用
 */
function scopeOfApplication1() {
    $("#storeSelect").hide()
    $("#citySelect").hide()
}
/**
 * 指定城市
 */
function scopeOfApplication2() {
    $("#demo2").show()
}
/**
 * 指定门店
 */
function scopeOfApplication3() {
    $("#demo2").show()
}
/**
 * 满减券
 */
function radio1() {
    $("#time").val('')
    // document.getElementById("time").readOnly = true;
    $("#time").attr('disabled', 'disabled');
    $("#createTime").removeAttr("disabled");
    $("#conditionalAmount").removeAttr("disabled");
    $("#deductionAmount").removeAttr("disabled");
    $("#voucherAmount").val('')
    $("#voucherAmount").attr('disabled', 'disabled');
    $("#experienceName").val('')
    $("#experienceName").attr('disabled', 'disabled');
}
/**
 * 代金券
 */
function radio2() {
    $("#createTime").val('')
    // document.getElementById("time").readOnly = false;
    $("#time").removeAttr("disabled");
    $("#createTime").attr('disabled', 'disabled');
    $("#voucherAmount").removeAttr("disabled");
    $("#conditionalAmount").val('')
    $("#deductionAmount").val('')
    $("#deductionAmount").attr('disabled', 'disabled');
    $("#conditionalAmount").attr('disabled', 'disabled');
    $("#experienceName").val('')
    $("#experienceName").attr('disabled', 'disabled');
}
/**
 * 体验券
 */
function radio3() {
    $("#time").val('')
    $("#createTime").val('')
    //document.getElementById("createTime").readOnly = true;
    // document.getElementById("time").readOnly = true;
    $("#createTime").attr('disabled', 'disbled');
    $("#time").attr('disabled', 'disabled');
    $("#experienceName").removeAttr("disabled");
    $("#conditionalAmount").val('')
    $("#deductionAmount").val('')
    $("#deductionAmount").attr('disabled', 'disabled');
    $("#conditionalAmount").attr('disabled', 'disabled');
    $("#voucherAmount").val('')
    $("#voucherAmount").attr('disabled', 'disabled');
}
couponInfoDlg.addBranch = function () {
    let companies = [];
    let brands = [];
    $.ajax({
        url : Feng.ctxPath + "/tbMemberTag/getCompanyAndBranch",
        method:'POST',
        success:function (res) {
            companies = res.companies;
            brands = res.brands;
            var str = "                            <div class=\"col-sm-12\">\n" +
                "                                <label class=\"col-sm-1\">公司</label>\n" +
                "                                <select class=\"col-sm-2\" id=\"brandCompany\" name='brandCompany' style=\"width: 88px\">\n" +
                "                                    <option value=\"\">全部公司</option>\n";
            if (companies.length > 0) {
                for (let i = 0; i < companies.length; i++) {
                    str += '<option value="'+companies[i].id+'">'+companies[i].name+'</option>'
                }
            }
            str+= "                                </select>\n" +
                "                                <label class=\"col-sm-1\">品牌</label>\n" +
                "                                <select class=\"col-sm-2\" id=\"brandName\" name='brandName' style=\"width: 88px\">\n" +
                "                                    <option value=\"\">全部品牌</option>\n";
            if (brands.length > 0) {
                for (let i = 0; i < brands.length; i++) {
                    str += '<option value="' + brands[i].id + '">' + brands[i].name + '</option>';
                }
            }
            str += "                                </select>\n" +
                "                                <div class=\"col-sm-2\">\n" +
                "                                    <input class=\"form-control\" id=\"brandDays\" name='brandDays' placeholder=\"近30天\" type=\"number\" min=\"1\"\n" +
                "                                           max=\"31\">\n" +
                "                                </div>\n" +
                "                                <select class=\"col-sm-2\" id=\"brandSymbol\" name='brandSymbol' style=\"width: 88px\">\n" +
                "                                    <option value=\"1\"> =</option>\n" +
                "                                    <option value=\"2\"> ></option>\n" +
                "                                    <option value=\"3\"> <</option>\n" +
                "                                </select>\n" +
                "                                <div class=\"col-sm-2\">\n" +
                "                                    <input class=\"form-control\" id=\"brandCount\" name='brandCount' placeholder=\"次\">\n" +
                "                                </div>\n" +
                "                                <div class=\"col-sm-1\">\n" +
                "                                    <label id=\"addBranch\" onclick='TbMemberTagInfoDlg.addBranch()' class=\"form-control\" style=\"border: 0px;cursor: pointer\"><i class=\"fa fa-plus\"></i></label>\n" +
                "                                </div>\n" +
                "                                <div class=\"col-sm-1\">\n" +
                "                                    <label id=\"addBranch\" onclick='TbMemberTagInfoDlg.subtract(this)' class=\"form-control\" style=\"border: 0px;cursor: pointer\"><i class=\"fa fa-minus\"></i></label>\n" +
                "                                </div>\n" +
                "                            </div>";
            $("#branch").append($(str));
        }
    })
}
couponInfoDlg.delete = function () {
}
/**