| | |
| | | } |
| | | |
| | | |
| | | if ($('#userType').val()==1) { |
| | | // 说明 |
| | | var illustrate = $('#illustrate').val(); |
| | | if (illustrate === undefined || illustrate === '' || illustrate === null){ |
| | | return Feng.error('优惠券说明不能为空'); |
| | | } |
| | | } |
| | | // 发放方式 |
| | | let distributionMethod = $(":radio[name='distributionMethod']:checked").val(); |
| | |
| | | if (periodOfValidity === undefined || periodOfValidity === '' || periodOfValidity === null){ |
| | | return Feng.error('有效期不能为空'); |
| | | } |
| | | if ($('#userType').val()==1){ |
| | | // 兑换方式 |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){ |
| | |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | let company = $(':radio[name="company"]:checked').val(); |
| | | var cts = ""; |
| | | if ($('#userType').val()==1) { |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | |
| | | cts = cityIds.join(','); |
| | | } |
| | | } |
| | | |
| | | } |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("userType",1); |
| | | ajax.set("cityManagerId",1); |
| | | ajax.set("userType",$('#userType').val()); |
| | | ajax.set("cityManagerId",0); |
| | | ajax.set("couponName",couponName); |
| | | ajax.set("prescription",prescription); |
| | | ajax.set("condition",conditionalAmount); |
| | | ajax.set("subtraction",deductionAmount); |
| | | ajax.set("discount",voucherAmount); |
| | | ajax.set("experience",experienceName); |
| | | var illustrate = $('#illustrate').val(); |
| | | ajax.set("illustrate",illustrate); |
| | | ajax.set("distributionMethod",distributionMethod); |
| | | ajax.set("requiredPoints",requiredPoints); |
| | |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("periodOfValidity",periodOfValidity); |
| | | |
| | | if ($('#userType').val()==2) { |
| | | ajax.set("exchangeMethod",1); |
| | | }else{ |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | ajax.set("exchangeMethod",exchangeMethod); |
| | | } |
| | | ajax.set("goodImg",this.goodsCover); |
| | | ajax.set("goodImgs",commaSeparatedString); |
| | | ajax.set("company",company); |