Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
c6bee104
Commit
c6bee104
authored
Mar 15, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixbug
parent
cc4c112b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
14 deletions
+95
-14
OrganizationDto.java
...o/src/main/java/pwc/taxtech/atms/dpo/OrganizationDto.java
+10
-0
edit-organization-modal.ctrl.js
...s/edit-organization-modal/edit-organization-modal.ctrl.js
+85
-14
No files found.
atms-dao/src/main/java/pwc/taxtech/atms/dpo/OrganizationDto.java
View file @
c6bee104
...
...
@@ -117,6 +117,8 @@ public class OrganizationDto {
private
Boolean
oversea
;
private
String
country
;
public
List
<
EnterpriseAccountSetOrgDto
>
enterpriseAccountSetOrgList
;
public
List
<
OrganizationServiceTemplateGroupDto
>
organizationServiceTemplateGroupList
;
public
List
<
DimensionValueOrgDto
>
dimensionValueOrgList
;
...
...
@@ -671,6 +673,14 @@ public class OrganizationDto {
this
.
oversea
=
oversea
;
}
public
String
getCountry
()
{
return
country
;
}
public
void
setCountry
(
String
country
)
{
this
.
country
=
country
;
}
public
List
<
EnterpriseAccountSetOrgDto
>
getEnterpriseAccountSetOrgList
()
{
return
enterpriseAccountSetOrgList
;
}
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.ctrl.js
View file @
c6bee104
...
...
@@ -98,21 +98,88 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 保存机构
$scope
.
saveOrg
=
function
()
{
debugger
;
if
(
$scope
.
isInternational
){
saveInternationalOrg
();
}
else
{
saveLocalOrg
();
}
};
this
.
orgControlForm
.
$setSubmitted
();
var
saveInternationalOrg
=
function
()
{
$scope
.
orgControlForm
.
$setSubmitted
();
var
fail
=
false
;
/*if(!$scope.isInternational){
if($('.localRequired').attr("required")==="required"){
$('.localRequired').each( function (index,ele){
if(null==ele.value||""===ele.value){
SweetAlert.error("请检查必填项");
fail = true;
return false;
}
var
editModel
=
$scope
.
editOrgModel
;
// 是否为境外企业
editModel
.
oversea
=
$scope
.
isInternational
;
if
(
$scope
.
isAdd
)
{
editModel
.
isActive
=
true
;
orgService
.
addOrg
(
editModel
).
success
(
function
(
orgId
)
{
if
(
orgId
&&
!
orgId
.
result
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
orgId
.
resultMsg
));
return
;
}
$
(
selectedModel
).
modal
(
'hide'
);
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
refreshOrg
();
$scope
.
operateType
=
null
;
$scope
.
isUpdate
=
true
;
});
}
else
{
if
(
editModel
.
parentID
&&
$scope
.
selectedOrganization
.
suborgList
)
{
if
(
editModel
.
parentID
===
editModel
.
id
)
{
SweetAlert
.
warning
(
'上级机构不能为机构本身'
);
return
;
}
var
subOrg
=
_
.
find
(
$scope
.
selectedOrganization
.
suborgList
,
function
(
row
)
{
return
row
.
id
===
editModel
.
parentID
;
});
if
(
subOrg
)
{
SweetAlert
.
warning
(
'不能将当前机构的下级机构设置为其上级公司'
);
return
;
}
}
}*/
editModel
.
isActive
=
!
editModel
.
isActive
;
orgService
.
updateOrg
(
editModel
).
success
(
function
(
data
)
{
if
(
data
&&
!
data
.
result
)
{
//SweetAlert.info("Disable", orgId);
SweetAlert
.
warning
(
$translate
.
instant
(
data
.
resultMsg
));
return
;
}
$
(
selectedModel
).
modal
(
'hide'
);
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
refreshOrg
();
$scope
.
operateType
=
null
;
$scope
.
isUpdate
=
true
;
});
}
};
var
saveLocalOrg
=
function
()
{
$scope
.
orgControlForm
.
$setSubmitted
();
var
fail
=
false
;
if
(
$
(
'.localRequired'
).
attr
(
"required"
)
===
"required"
){
$
(
'.localRequired'
).
each
(
function
(
index
,
ele
){
if
(
null
==
ele
.
value
||
""
===
ele
.
value
){
SweetAlert
.
error
(
"请检查必填项"
);
fail
=
true
;
return
false
;
}
});
}
if
(
fail
)
return
;
...
...
@@ -123,7 +190,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
return
false
;
}
if
(
this
.
orgControlForm
.
$invalid
)
{
if
(
$scope
.
orgControlForm
.
$invalid
)
{
$scope
.
isShowBasic
=
true
;
return
;
}
else
{
...
...
@@ -137,8 +204,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
isShowAdvanced
=
false
;
}
//
this
.advancedControlForm.$setSubmitted();
//if (
this
.advancedControlForm.$invalid) {
//
$scope
.advancedControlForm.$setSubmitted();
//if (
$scope
.advancedControlForm.$invalid) {
// $scope.isShowAdvanced = true;
// return;
//} else {
...
...
@@ -424,6 +491,10 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
});
if
(
$scope
.
isInternational
){
$
(
'.localRequired'
).
removeAttr
(
"required"
);
}
// set first active page is basic info
$
(
'#orgControlTab a:first'
).
tab
(
'show'
);
// $('#orgModalFooter').css('padding-left','139px');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment