|
@@ -13750,6 +13750,7 @@ appFormly.config(function config(formlyConfigProvider) {
|
13750
|
13750
|
$scope.title = "新增报修人";
|
13751
|
13751
|
$scope.requester = {};
|
13752
|
13752
|
$scope.searchData = {};
|
|
13753
|
+ $scope.isRoom = sessionStorage.getItem('ifRoom') == 1;
|
13753
|
13754
|
if (angular.isDefined($stateParams.model) && $stateParams.model != "") {
|
13754
|
13755
|
var paramsModel = JSON.parse($stateParams.model)
|
13755
|
13756
|
//来电-添加报修人-回显电话
|
|
@@ -13862,6 +13863,26 @@ appFormly.config(function config(formlyConfigProvider) {
|
13862
|
13863
|
}
|
13863
|
13864
|
});
|
13864
|
13865
|
};
|
|
13866
|
+ // 修改地点
|
|
13867
|
+ $scope.requesterPlaceid = "";
|
|
13868
|
+ $scope.onChangePlace = function (item) {
|
|
13869
|
+ $scope.requesterPlaceid = item.id;
|
|
13870
|
+ api_user_data
|
|
13871
|
+ .fetchDataList("room", {
|
|
13872
|
+ room: {
|
|
13873
|
+ place: {
|
|
13874
|
+ id: item.id,
|
|
13875
|
+ },
|
|
13876
|
+ },
|
|
13877
|
+ idx: 0,
|
|
13878
|
+ sum: 1000,
|
|
13879
|
+ })
|
|
13880
|
+ .then(function (response) {
|
|
13881
|
+ if (response.status == 200) {
|
|
13882
|
+ $scope.rooms = response.list;
|
|
13883
|
+ }
|
|
13884
|
+ });
|
|
13885
|
+ };
|
13865
|
13886
|
$scope.refresh = function (searchVal) {
|
13866
|
13887
|
var faildata = {};
|
13867
|
13888
|
if ($scope.requesterAreaid) {
|
|
@@ -13891,6 +13912,32 @@ appFormly.config(function config(formlyConfigProvider) {
|
13891
|
13912
|
delete $scope.requester.placeDTO;
|
13892
|
13913
|
});
|
13893
|
13914
|
};
|
|
13915
|
+ // 初始化房间号
|
|
13916
|
+ $scope.refreshPlace = function () {
|
|
13917
|
+ var faildata = {};
|
|
13918
|
+ if ($scope.requesterPlaceid) {
|
|
13919
|
+ faildata = {
|
|
13920
|
+ idx: 0,
|
|
13921
|
+ sum: 1000,
|
|
13922
|
+ room: {
|
|
13923
|
+ place: {id:$scope.requesterPlaceid},
|
|
13924
|
+ },
|
|
13925
|
+ };
|
|
13926
|
+ } else {
|
|
13927
|
+ faildata = {
|
|
13928
|
+ idx: 0,
|
|
13929
|
+ sum: 1000,
|
|
13930
|
+ room: {
|
|
13931
|
+ place: {id:$scope.requesterPlaceid},
|
|
13932
|
+ },
|
|
13933
|
+ };
|
|
13934
|
+ }
|
|
13935
|
+ api_user_data
|
|
13936
|
+ .fetchDataList("room", faildata)
|
|
13937
|
+ .then(function (response) {
|
|
13938
|
+ $scope.rooms = response.list;
|
|
13939
|
+ });
|
|
13940
|
+ };
|
13894
|
13941
|
$scope.refreshDepts = function (key) {
|
13895
|
13942
|
var filterData = {
|
13896
|
13943
|
idx: 0,
|
|
@@ -13970,7 +14017,7 @@ appFormly.config(function config(formlyConfigProvider) {
|
13970
|
14017
|
newObj;
|
13971
|
14018
|
}
|
13972
|
14019
|
}
|
13973
|
|
- ); //lmm
|
|
14020
|
+ );
|
13974
|
14021
|
console.log($scope.requester);
|
13975
|
14022
|
$modalInstance.close($scope.requester);
|
13976
|
14023
|
}
|
|
@@ -14097,6 +14144,9 @@ appFormly.config(function config(formlyConfigProvider) {
|
14097
|
14144
|
if (selectedItem.houseNumber) {
|
14098
|
14145
|
options.model.houseNumber = selectedItem.houseNumber;
|
14099
|
14146
|
}
|
|
14147
|
+ if (selectedItem.room) {
|
|
14148
|
+ options.model.room.id = selectedItem.room.id;
|
|
14149
|
+ }
|
14100
|
14150
|
// if (selectedItem.id) {
|
14101
|
14151
|
options.model.account = selectedItem.account;
|
14102
|
14152
|
// 找到表单报修人组件,并使用组件内部方法重新获取增加报修人后的报修人下拉选项
|
|
@@ -20742,6 +20792,8 @@ appFormly.controller("CustomformCtrl", [
|
20742
|
20792
|
var formKey = "";
|
20743
|
20793
|
var pdKey = "";
|
20744
|
20794
|
var modelWatch = "";
|
|
20795
|
+ // 房间号是否显示
|
|
20796
|
+ vm.model.isRoom = sessionStorage.getItem('ifRoom') == 1;
|
20745
|
20797
|
if (angular.isDefined($stateParams.model) && $stateParams.model != "") {
|
20746
|
20798
|
modelWatch = JSON.parse($stateParams.model);
|
20747
|
20799
|
// console.log("modelWatch:"+ JSON.stringify(modelWatch));
|