| | |
| | | return ; |
| | | } |
| | | |
| | | const quantityIssuedInput = document.getElementById('quantityIssued'); |
| | | const pickUpQuantityInput = document.getElementById('pickUpQuantity'); |
| | | |
| | | const quantityIssued2 = Number(quantityIssuedInput.value); |
| | | 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() |
| | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | var selectElement = document.getElementById("coursePackageId"); |
| | | var selectedText = selectElement.options[selectElement.selectedIndex].text; |
| | | |
| | | ajax.set("name",selectedText); |
| | | |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | |
| | | |
| | | const quantityIssuedInput = document.getElementById('quantityIssued'); |
| | | const pickUpQuantityInput = document.getElementById('pickUpQuantity'); |
| | | |
| | | const quantityIssued1 = Number(quantityIssuedInput.value); |
| | | const pickUpQuantity1 = Number(pickUpQuantityInput.value); |
| | | |
| | | if (isNaN(quantityIssued1) || isNaN(pickUpQuantity1)) { |
| | | Feng.error("优惠卷数量必须为数字") |
| | | console.log('Both quantityIssued and pickUpQuantity must be numbers.'); |
| | | } else if (quantityIssued1 >= pickUpQuantity1) { |
| | | |
| | | console.log('quantityIssued is greater than pickUpQuantity.'); |
| | | } else { |
| | | |
| | | Feng.error("发放数量必须大于限领数量") |
| | | console.log('quantityIssued is not greater than pickUpQuantity.'); |
| | | } |
| | | var imgOne =""; |
| | | console.log(goodImgs) |
| | | console.log(goodImgs.length) |
| | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TGoodsInfoDlg.oneChange = function () { |
| | | TGoodsInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | } |
| | | TGoodsInfoDlg.storeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/storeChange", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/queryStore", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择门店</option>'; |
| | |
| | | $("#storeId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.set("cityCode",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.packageChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/packageChange", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCoursePackageLists", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择课包</option>'; |
| | |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | $.each(data.rows, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#coursePackageId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.set("coursePackageTypeId",oneId); |
| | | ajax.set("order","desc"); |
| | | ajax.set("offset",0); |
| | | ajax.set("limit",100); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.timeChange = function (e) { |
| | |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.classHours+"</option>"; |
| | | content += "<option value='"+v+"'>"+v+"</option>"; |
| | | }); |
| | | $("#coursePackageConfigId").empty().append(content); |
| | | } |