| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | var areaValue = $("#areaId option:selected").attr("tag"); |
| | | if(null == areaValue || "" == areaValue){ |
| | | Feng.info("请选择司机从业地"); |
| | | return; |
| | | } |
| | | var sex = $("input[name='sex']:checked").val(); |
| | | var headImgUrl = $("#headImgUrl").val(); |
| | | if ("" == headImgUrl){ |
| | |
| | | window.parent.YesDriver.table.refresh(); |
| | | YesDriverInfoDlg.close(); |
| | | }else{ |
| | | Feng.error("添加失败!" + data.message + "!"); |
| | | Feng.error("添加失败!" + data + "!"); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | |
| | | ajax.set("lineStr",JSON.stringify(subArr)); |
| | | ajax.set("sex",sex); |
| | | ajax.set("roleType",roleType); |
| | | ajax.set("placeOfEmployment",areaValue); |
| | | if (1 == roleType){ |
| | | ajax.set("companyType",companyType); |
| | | ajax.set("oneId",$("#oneId").val()); |
| | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var areaValue = $("#areaId option:selected").attr("tag"); |
| | | if(null == areaValue || "" == areaValue){ |
| | | Feng.info("请选择司机从业地"); |
| | | return; |
| | | } |
| | | var sex = $("input[name='sex']:checked").val(); |
| | | var headImgUrl = $("#headImgUrl").val(); |
| | |
| | | Feng.error("登录账户已存在,请重新输入"); |
| | | return; |
| | | } |
| | | if(200 == data.code){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.YesDriver.table.refresh(); |
| | | YesDriverInfoDlg.close(); |
| | | }else{ |
| | | Feng.error("修改失败!" + data + "!"); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | ajax.set("lineStr",JSON.stringify(subArr)); |
| | | ajax.set("sex",sex); |
| | | ajax.set("roleType",roleType); |
| | | ajax.set("placeOfEmployment",areaValue); |
| | | if (1 == roleType){ |
| | | ajax.set("companyType",companyType); |
| | | ajax.set("oneId",$("#oneId").val()); |
| | |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 省改变时执行 |
| | | */ |
| | | YesDriverInfoDlg.provinceChange = function () { |
| | | var provinceId = $("#provinceId").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"' tag='" + v.code + "'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cityId").empty().append(content); |
| | | $("#areaId").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("id",provinceId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 市改变时执行 |
| | | */ |
| | | YesDriverInfoDlg.cityChange = function () { |
| | | var cityId = $("#cityId").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择区</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"' tag='" + v.code + "'>"+v.name+"</option>"; |
| | | }); |
| | | $("#areaId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("id",cityId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | $(function() { |
| | | Feng.initValidator("yesDriverInfoForm", YesDriverInfoDlg.validateFields); |
| | | // 初始化图片上传 |