| | |
| | | * 打开区域选择页面新增 |
| | | */ |
| | | TBranchOffice.areaAdd = function () { |
| | | |
| | | var area = $("#area").val(); |
| | | var areaId = $("#areaId").val(); |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '区域选择', |
| | | area: ['1000px', '270px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tBranchOffice/areaPageAdd' |
| | | content: Feng.ctxPath + '/tBranchOffice/areaPageAdd?area='+area+'&areaId='+areaId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | |
| | | var city = document.getElementById('city'); |
| | | var cityIndex= city.selectedIndex ; |
| | | var id = city.options[cityIndex].value; |
| | | var id = city.options[cityIndex].id; |
| | | if(id == ""){ |
| | | id = city.options[cityIndex].value; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/areaCity?parentId="+id, function (data) { |
| | | for(var i=0,n=data.length;i<n;i++){//对区数据进行遍历,动态生成 |
| | | $("#district").append('<option value="'+data[i].id+'">'+data[i].name+'</option>'); |
| | |
| | | parent.$("#area").val(provinceName+'/'+cityName+'/'+districtName) |
| | | parent.$("#areaId").val(provinceId+'/'+cityId+'/'+districtId) |
| | | } |
| | | console.log() |
| | | TBranchOfficeInfoDlg.close(); |
| | | } |
| | | |