| | |
| | | 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){ |
| | |
| | | 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){ |
| | |
| | | |
| | | //提交信息 |
| | | 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){ |
| | |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | }else{ |
| | | console.log("走这里") |
| | | Feng.error(data.msg); |
| | | return; |
| | | } |
| | | |
| | | },function(data){ |
| | |
| | | |
| | | } |
| | | TGoodsInfoDlg.addSubmit1 = function() { |
| | | console.log("看看进入") |
| | | let company = 3; |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | var cityIds = []; |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | |
| | | 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(); |
| | |
| | | ajax.set("limit",100); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | TGoodsInfoDlg.timeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/timeChange", function(data){ |