puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
@@ -247,8 +247,6 @@
    this.clearData();
    this.collectData();
    const quantityIssuedInput = document.getElementById('quantityIssued');
    const pickUpQuantityInput = document.getElementById('pickUpQuantity');
@@ -256,20 +254,11 @@
    const pickUpQuantity2 = Number(pickUpQuantityInput.value);
    if (isNaN(quantityIssued2) || isNaN(pickUpQuantity2)) {
        Feng.error("优惠卷数量必须为数字")
        console.log('Both quantityIssued and pickUpQuantity must be numbers.');
    } else if (quantityIssued2 >= pickUpQuantity2) {
        console.log('quantityIssued is greater than pickUpQuantity.');
    } else {
        Feng.error("发放数量必须大于等于限领数量")
        return
        console.log('quantityIssued is not greater than pickUpQuantity.');
    }
    let typeAll = document.querySelector('input[name="type"]:checked').value;
    if(typeAll==2){
        let pCode = $("#pCode").val()
@@ -395,7 +384,14 @@
                console.log("请选择相同运营商门店")
                Feng.info("请选择相同运营商门店");
            }else if(data.code == 200){
            }else if (data==5009){
                Feng.error("有效期开始时间不应小于假期课开始时间");
                return;
            }else if (data==5008){
                Feng.error("有效期结束时间不应大于假期课结束时间");
                return;
            }
            else if(data.code == 200){
                if(language==1){
                    Feng.success("添加成功!");
                }else if(language==2){
@@ -571,14 +567,22 @@
        //提交信息
        var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){
            console.log("看看返回参数")
            console.log(data)
            if(data=="5001"){
                Feng.error("该账号已经存在");
                return;
            }else if(data=="5003"){
                console.log("请选择相同运营商门店")
                Feng.info("请选择相同运营商门店");
            }else
            if(data.code == 200){
                Feng.error("请选择相同运营商门店");
                return;
            }else if (data==5009){
                Feng.error("有效期开始时间不应小于假期课开始时间");
                return;
            }else if (data==5008){
                Feng.error("有效期结束时间不应大于假期课结束时间");
                return;
            } else if(data.code == 200){
                if(language==1){
                    Feng.success("添加成功!");
                }else if(language==2){
@@ -589,7 +593,9 @@
                window.parent.TPointProducts.table.refresh();
                TGoodsInfoDlg.close();
            }else{
                console.log("走这里")
                Feng.error(data.msg);
                return;
            }
        },function(data){
@@ -620,11 +626,9 @@
}
TGoodsInfoDlg.addSubmit1 = function() {
    console.log("看看进入")
    let company = 3;
    this.clearData();
    this.collectData();
    var cityIds = [];
    var cts = "";
    if (company === '2'){
@@ -940,7 +944,6 @@
    TGoodsInfoDlg.editor = UE.getEditor('editor');
    TGoodsInfoDlg.editor1 = UE.getEditor('editor1');
    getProvince(null);
    Feng.initValidator("carInfoForm", TGoodsInfoDlg.validateFields);
    var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto");
    drivingLicensePhoto.setUploadBarId("progressBar");
    drivingLicensePhoto.init();
@@ -1019,6 +1022,8 @@
    ajax.set("limit",100);
    ajax.start();
}
TGoodsInfoDlg.timeChange = function (e) {
    var oneId=$(e).val();
    var ajax = new $ax(Feng.ctxPath + "/tCity/timeChange", function(data){