liujie
2023-09-25 8c55ab2701c99cec16eff92a26fefdf77fcdd28f
cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -81,8 +81,26 @@
    $("#storeSelect").hide();
    $("#citySelect").hide();
    num = 0;
    //移除指定门店的数据:
    // 找到 tbody 元素
    var tbody = document.getElementById("coun");
    // 移除所有子元素(即行)
    while (tbody.firstChild) {
        tbody.removeChild(tbody.firstChild);
    }
    couponInfoDlg.storeIds = [];
    //移除指城市的数据:
    num = 0;
    var cityDemoDiv = document.getElementById("cityDemo");
    cityDemoDiv.innerHTML = ""; // 将内容置为空字符串
    var provinceSelect = document.getElementById("provinceData");
    var cityDataSelect = document.getElementById("cityData");
    provinceSelect.innerHTML = '<option value="">请选择</option>';
    cityDataSelect.innerHTML = '<option value="">请选择</option>';
    getProvince(null);
}
/**
 * 指定城市
@@ -90,6 +108,18 @@
function scopeOfApplication2() {
    $("#storeSelect").hide();
    $("#citySelect").show();
    //移除指定门店的数据:
    // 找到 tbody 元素
    var tbody = document.getElementById("coun");
    // 移除所有子元素(即行)
    while (tbody.firstChild) {
        tbody.removeChild(tbody.firstChild);
    }
    couponInfoDlg.storeIds = [];
}
/**
 * 指定门店
@@ -97,6 +127,19 @@
function scopeOfApplication3() {
    $("#storeSelect").show();
    $("#citySelect").hide();
    //移除指城市的数据:
    num = 0;
    var cityDemoDiv = document.getElementById("cityDemo");
    cityDemoDiv.innerHTML = ""; // 将内容置为空字符串
    var provinceSelect = document.getElementById("provinceData");
    var cityDataSelect = document.getElementById("cityData");
    provinceSelect.innerHTML = '<option value="">请选择</option>';
    cityDataSelect.innerHTML = '<option value="">请选择</option>';
    getProvince(null);
}
/**
@@ -349,15 +392,15 @@
    }
    // 兑换方式
    let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val();
    if (distributionMethod === '' || distributionMethod === undefined || distributionMethod === null){
    if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){
        return Feng.error('兑换方式不能为空');
    }
    if (distributionMethod === '1'){
    if (exchangeMethod === '1'){
        if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){
            return Feng.error('所需积分不能为空');
        }
    }
    if (distributionMethod === '2'){
    if (exchangeMethod === '2'){
        if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){
            return Feng.error('所需积分不能为空');
        }
@@ -365,7 +408,7 @@
            return Feng.error('所需现金不能为空');
        }
    }
    if (distributionMethod === '3'){
    if (exchangeMethod === '3'){
        if (requiredCash === undefined || requiredCash === '' || requiredCash === null){
            return Feng.error('所需现金不能为空');
        }