| | |
| | | YesDriverInfoDlg.checkBox = function(){ |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | changeLine(); |
| | | $("#lineDiv").show(); |
| | | } else { |
| | | $("#lineDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | |
| | | function changeLine(){ |
| | | var companyType = $('input[name="companyType"]:checked').val(); |
| | | var companyId = null; |
| | | if(companyType == 2){ |
| | | companyId = $('#twoId').val(); |
| | | if(null == companyId){ |
| | | companyId = $('#oneId').val(); |
| | | } |
| | | }else{ |
| | | companyId = 1; |
| | | } |
| | | if(null == companyId){ |
| | | Feng.error("请选选择所属攻速"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/getCompanyLine", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择关联线路</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#selectLineId").html(content); |
| | | } |
| | | }); |
| | | ajax.set("companyId",companyId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#twoId").empty().append(content); |
| | | changeLine() |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | |
| | | YesDriverInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | changeLine() |
| | | } else if (2 == e){ |
| | | changeLine() |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |