| | |
| | | Feng.info("请填写原价") |
| | | return; |
| | | } |
| | | let type = document.querySelector('input[name="redemptionMethod"]:checked').value; |
| | | if(type==''){ |
| | | Feng.info("请选择兑换方式") |
| | | return; |
| | |
| | | return; |
| | | } |
| | | |
| | | let company = document.querySelector('input[name="company"]:checked').value; |
| | | |
| | | var cityIds = []; |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | | if (seCity === null || seCity === undefined || seCity === ''){ |
| | | return Feng.error('请选中一个省市'); |
| | | } |
| | | cityIds.push(seCity); |
| | | if (num > 0){ |
| | | for (let i = 1; i <= num; i++) { |
| | | var insSelect=document.getElementById('cityData'+i); |
| | | var inData = insSelect.options[insSelect.selectedIndex].value; |
| | | if (inData !== undefined || inData !== null || inData !== ''){ |
| | | cityIds.push(inData); |
| | | } |
| | | } |
| | | cts = cityIds.join(','); |
| | | }else { |
| | | cts = cityIds |
| | | } |
| | | } |
| | | // var myselect=document.getElementById('cityData'); |
| | | // var seCity = myselect.options[myselect.selectedIndex].value; |
| | | // if (seCity === null || seCity === undefined || seCity === ''){ |
| | | // return Feng.error('请选中一个省市'); |
| | | // } |
| | | // cityIds.push(seCity); |
| | | // if (num > 0){ |
| | | // for (let i = 1; i <= num; i++) { |
| | | // var insSelect=document.getElementById('cityData'+i); |
| | | // var inData = insSelect.options[insSelect.selectedIndex].value; |
| | | // if (inData !== undefined || inData !== null || inData !== ''){ |
| | | // cityIds.push(inData); |
| | | // } |
| | | // } |
| | | // cts = cityIds.join(','); |
| | | // }else { |
| | | // cts = cityIds |
| | | // } |
| | | |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | | if (company === '3'){ |
| | | console.log('3---this.storeIds',this.storeIds); |
| | | if (TGoodsInfoDlg.storeIds.length === 0 ){ |
| | | return Feng.error('请至少选择一个门店'); |
| | | } |
| | | stores = this.storeIds.join(','); |
| | | console.log('stores--===--',stores) |
| | | } |
| | | |
| | | |
| | | let text = TGoodsInfoDlg.editor.getContent(); |
| | | console.log(text) |
| | |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("name",name); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("type",3); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("useScope",company); |
| | | ajax.set("useScope",1); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | ajax.set("storeIds",""); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.set("cardType",document.querySelector('input[name="type"]:checked').value); |