From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 05 二月 2024 11:56:52 +0800 Subject: [PATCH] 更新bug修改 --- cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js | 46 ++++++++++++++++++++++++---------------------- 1 files changed, 24 insertions(+), 22 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js index c5579c2..1a40591 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js @@ -247,10 +247,6 @@ this.clearData(); this.collectData(); - if(!this.validate()){ - return ; - } - const quantityIssuedInput = document.getElementById('quantityIssued'); const pickUpQuantityInput = document.getElementById('pickUpQuantity'); @@ -258,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() @@ -397,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){ @@ -573,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){ @@ -591,7 +593,9 @@ window.parent.TPointProducts.table.refresh(); TGoodsInfoDlg.close(); }else{ + console.log("走这里") Feng.error(data.msg); + return; } },function(data){ @@ -625,9 +629,6 @@ let company = 3; this.clearData(); this.collectData(); - if(!this.validate()){ - return ; - } var cityIds = []; var cts = ""; if (company === '2'){ @@ -943,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(); @@ -1022,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){ -- Gitblit v1.7.1