nickchange
2023-10-27 200acf9283ff06e75874df263b1e125a71e76215
cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -358,10 +358,12 @@
    }
    if ($('#userType').val()==1) {
    // 说明
    var illustrate = $('#illustrate').val();
    if (illustrate === undefined || illustrate === '' || illustrate === null){
        return Feng.error('优惠券说明不能为空');
        }
    }
    // 发放方式
    let distributionMethod = $(":radio[name='distributionMethod']:checked").val();
@@ -390,6 +392,7 @@
    if (periodOfValidity === undefined || periodOfValidity === '' || periodOfValidity === null){
        return Feng.error('有效期不能为空');
    }
    if ($('#userType').val()==1){
    // 兑换方式
    let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val();
    if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){
@@ -413,9 +416,10 @@
            return Feng.error('所需现金不能为空');
        }
    }
    }
    let company = $(':radio[name="company"]:checked').val();
    var cts = "";
    if ($('#userType').val()==1) {
    if (company === '2'){
        var myselect=document.getElementById('cityData');
        var seCity = myselect.options[myselect.selectedIndex].value;
@@ -434,7 +438,7 @@
            cts = cityIds.join(',');
        }
    }
    }
    const commaSeparatedString = this.goodsPicArray.join(',');
    var stores = "";
@@ -454,14 +458,15 @@
    }, function (data) {
        Feng.error("添加失败!" + data.responseJSON.message + "!");
    });
    ajax.set("userType",1);
    ajax.set("cityManagerId",1);
    ajax.set("userType",$('#userType').val());
    ajax.set("cityManagerId",0);
    ajax.set("couponName",couponName);
    ajax.set("prescription",prescription);
    ajax.set("condition",conditionalAmount);
    ajax.set("subtraction",deductionAmount);
    ajax.set("discount",voucherAmount);
    ajax.set("experience",experienceName);
    var illustrate = $('#illustrate').val();
    ajax.set("illustrate",illustrate);
    ajax.set("distributionMethod",distributionMethod);
    ajax.set("requiredPoints",requiredPoints);
@@ -470,7 +475,13 @@
    ajax.set("quantityIssued",quantityIssued);
    ajax.set("pickUpQuantity",pickUpQuantity);
    ajax.set("periodOfValidity",periodOfValidity);
    if ($('#userType').val()==2) {
        ajax.set("exchangeMethod",1);
    }else{
        let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val();
    ajax.set("exchangeMethod",exchangeMethod);
    }
    ajax.set("goodImg",this.goodsCover);
    ajax.set("goodImgs",commaSeparatedString);
    ajax.set("company",company);