From 1863e6353f0de84082a21738f5d0a28f3cfeadc0 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 22 十一月 2023 19:33:49 +0800 Subject: [PATCH] 后台bug修改 --- cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 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 5ceee15..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 @@ -254,16 +254,10 @@ 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){ @@ -390,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){ @@ -566,15 +567,21 @@ //提交信息 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=="5009"){ - Feng.info("有效期开始时间不应小于假期课开始时间"); - }else if (data=="5008"){ - Feng.info("有效期结束时间不应大于假期课结束时间"); + 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("添加成功!"); @@ -586,7 +593,9 @@ window.parent.TPointProducts.table.refresh(); TGoodsInfoDlg.close(); }else{ + console.log("走这里") Feng.error(data.msg); + return; } },function(data){ -- Gitblit v1.7.1