| | |
| | | ajax.start(); |
| | | }; |
| | | TSite.oneChangeYys = function(e){ |
| | | |
| | | var oneId = $(e).val(); |
| | | |
| | | var checkbox = document.querySelector('input[name="pt"]'); |
| | | if (checkbox.checked) { |
| | | oneId=0; |
| | | console.log("选中是平台"); |
| | | } else { |
| | | }else{ |
| | | oneId = 1; |
| | | console.log("运营商"); |
| | | console.log(oneId) |
| | | } |
| | | if (oneId == "1"){ |
| | | oneId = $("#yys").val() |
| | | if (oneId==""){ |
| | | oneId = 1 |
| | | } |
| | | console.log("看看选择之后") |
| | | console.log(oneId) |
| | | var button = document.getElementById("yys"); |
| | | button.removeAttribute("disabled"); |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ |
| | | if(data!=null){ |
| | |
| | | $("#yys").prop('disabled', false); |
| | | } |
| | | |
| | | console.log("看看返回数据") |
| | | console.log(data) |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | |
| | | } |
| | | }); |
| | | |
| | | if (oneId == "1"){ |
| | | console.log("===============") |
| | | oneId = $("#yys").val() |
| | | var button = document.getElementById("yys"); |
| | | button.removeAttribute("disabled"); |
| | | } |
| | | |
| | | |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |