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
72475254
Commit
72475254
authored
Mar 02, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fix了一半bug
parent
94eb6b17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
edit-organization-modal.ctrl.js
...s/edit-organization-modal/edit-organization-modal.ctrl.js
+19
-6
edit-organization-modal.html
...rols/edit-organization-modal/edit-organization-modal.html
+4
-10
No files found.
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.ctrl.js
View file @
72475254
...
...
@@ -99,6 +99,20 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
this
.
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
;
var
hasSpecialChar
=
window
.
PWC
.
hasSpecialChar
(
$scope
.
editOrgModel
.
name
);
if
(
hasSpecialChar
)
{
$scope
.
editOrgModel
.
nameError
=
$translate
.
instant
(
'SpecialChar'
);
...
...
@@ -941,19 +955,15 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
changeInternational
=
function
()
{
// $('.local').attr('hidden','hidden');
// $('.international').removeAttr('hidden');
$scope
.
isLocal
=
false
;
$scope
.
isInternational
=
true
;
$
(
'.localRequired'
).
removeAttr
(
"required"
);
};
$scope
.
changeLocal
=
function
()
{
// $('.international').attr('hidden','hidden');
// $('.local').removeAttr('hidden');
$scope
.
isLocal
=
true
;
$scope
.
isInternational
=
false
;
$
(
'.localRequired'
).
attr
(
"required"
,
"true"
);
$
(
'.localRequired'
).
attr
(
"required"
,
true
);
};
// 强制刷新机构控件里的机构
...
...
@@ -982,7 +992,10 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
regStatusList
=
constant
.
RegStatusList
;
$scope
.
architectureTypeList
=
constant
.
ArchitectureTypeList
;
$scope
.
trueFalse
=
constant
.
trueFalse
;
$
(
'.localRequired'
).
attr
(
"required"
,
"true"
);
debugger
;
$
(
'.localRequired'
).
attr
(
"required"
,
true
);
// $('.localRequired').attr("required","true"); required="required"
};
// 省改变时联动市
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.html
View file @
72475254
...
...
@@ -47,9 +47,10 @@
| translate}}:
</label>
<div
class=
"col-sm-9"
ng-class=
"{'has-error':orgControlForm.name.$invalid && (orgControlForm.name.$dirty || orgControlForm.$submitted)}"
>
<!--<input class="form-control localRequired" id="name" ng-model="editOrgModel.name"-->
<input
class=
"form-control localRequired"
id=
"name"
ng-model=
"editOrgModel.name"
name=
"name"
placeholder=
"{{resources.OrganizationName}}"
ng-keyup=
"nameKeyUp()"
maxlength=
"100"
>
ng-keyup=
"nameKeyUp()"
maxlength=
"100"
>
<p
ng-show=
"orgControlForm.name.$error.required && (orgControlForm.name.$dirty || orgControlForm.$submitted)"
class=
"has-error label"
>
{{resources.OrganizationMsgNameRequired}}
</p>
<p
ng-show=
"editOrgModel.nameError"
class=
"has-error label"
>
...
...
@@ -131,10 +132,10 @@
| translate}}:
</label>
<div
class=
"col-sm-9"
ng-class=
"{'has-error':orgControlForm.registrationCapital.$invalid && (orgControlForm.registrationCapital.$dirty || orgControlForm.$submitted)}"
>
<input
class=
"form-control
localRequired
"
name=
"registrationCapital"
<input
class=
"form-control"
name=
"registrationCapital"
id=
"registrationCapital"
ng-model=
"editOrgModel.registrationCapital"
placeholder=
"{{resources.RegistrationCapital}}"
maxlength=
"50"
>
placeholder=
"{{resources.RegistrationCapital}}"
maxlength=
"50"
required
>
</div>
</div>
...
...
@@ -480,15 +481,8 @@
</div>
</div>
</div>
<div
style=
"clear: both;"
></div>
</div>
<div
class=
"international"
hidden=
"hidden"
>
</div>
</form>
</div>
...
...
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