Commit e8f51d96 authored by weizhikai's avatar weizhikai

机构地区三级联动选到区县展示问题

parent fc1419ff
......@@ -696,7 +696,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 加载城市信息
var loadCityList = function (regionID) {
regionID = $scope.selectProvince.regionID;
if (regionID !== undefined && regionID !== null) {
areaRegionService.getCities(regionID).success(function (data) {
if (data && data.length > 0) {
......
......@@ -436,35 +436,35 @@
<div class="form-group" ng-show="isLocal">
<label class="col-sm-3 control-label"><span
class="must-input">*</span>{{'AdministrativeRegion' | translate}}:</label>
<div class="col-sm-9 row">
<div class="col-sm-5" style="padding-left: 0px;"
<div class="col-sm-9" style="width: 69%;left: -3%;">
<div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectProvince.$invalid && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectProvince"
style="width: 120px; " ng-change="populateCities()"
<select class="form-control localRequired" style="width: 90px;" name="selectProvince"
ng-change="populateCities()"
ng-model="selectProvince"
ng-options="x.regionName for x in ProvinceList">
<option value="">{{pleaseSelect}}</option>
</select>
<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)"
class="has-error label" style="margin-left: -16px">
{{resources.OrganizationMsgProvinceRequired}}</p>
<!--<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label" style="margin-left: -16px">-->
<!--{{resources.OrganizationMsgProvinceRequired}}</p>-->
</div>
<div class="col-sm-5" style="padding-left: 10px;"
<div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectCity.$invalid && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectCity"
style="width: 120px; " ng-change="populateDistricts()"
<select class="form-control localRequired" name="selectCity"
ng-change="populateDistricts()" style="width: 90px;"
ng-model="selectCity"
ng-options="x.regionName for x in CityList">
<option value="">{{pleaseSelect}}</option>
</select>
<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)"
class="has-error label" style="margin-left: 30px">
{{resources.OrganizationMsgCityRequired}}</p>
<!--<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label" style="margin-left: 30px">-->
<!--{{resources.OrganizationMsgCityRequired}}</p>-->
</div>
<div class="col-sm-5" style="padding-left: 10px;"
<div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectDistrict.$invalid && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectDistrict"
id="selectDistrict" style="width: 119px; "
<select class="form-control localRequired" name="selectDistrict" style="width: 90px;"
id="selectDistrict"
ng-model="selectRegionID">
<option value="">{{pleaseSelect}}</option>
<option ng-repeat="x in DistrictList" value="{{x.regionID}}"
......@@ -472,9 +472,9 @@
limitString:10}}
</option>
</select>
<p ng-show="orgControlForm.selectDistrict.$error.required && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)"
class="has-error label" style="margin-left: 30px">
{{resources.OrganizationMsgCityRequired}}</p>
<!--<p ng-show="orgControlForm.selectDistrict.$error.required && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label" style="margin-left: 30px">-->
<!--{{resources.OrganizationMsgCityRequired}}</p>-->
</div>
</div>
</div>
......
......@@ -19,6 +19,10 @@ function ($http, apiConfig, httpCacheService) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return httpCacheService.get('/areaRegion/getCities?parentID=' + parentID);
},
getCitiesNoCache: function (parentID) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return $http.get('/areaRegion/getCities?parentID=' + parentID);
},
getDistricts: function (parentID) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return httpCacheService.get('/areaRegion/getDistricts?parentID=' + parentID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment