Commit d9948c46 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed page issue -- frank

parent 26b318ea
...@@ -21,6 +21,12 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -21,6 +21,12 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
cancel: function () { cancel: function () {
$scope.onClose(); $scope.onClose();
$scope.modalInstance.cancel(); $scope.modalInstance.cancel();
},
save:function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#directorControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) {
}
} }
} }
}; };
...@@ -28,7 +34,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -28,7 +34,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
var now = new Date(); var now = new Date();
var initParams = function () { var initParams = function () {
$scope.editModel={}; $scope.editModel = {};
$scope.dropdownDatasource = { $scope.dropdownDatasource = {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="modal-body" id="modal-body" style="height:335px;width:600px"> <div class="modal-body" id="modal-body" style="height:335px;width:600px">
<!--add director--> <!--add director-->
<div> <div>
<form class="form-horizontal" id="orgControlForm" name="orgControlForm"> <form class="form-horizontal" id="directorControlForm" name="directorControlForm" dx-validation-group="{}">
<div class="local"> <div class="local">
<div class="bottom-row"> <div class="bottom-row">
<!--directorName--> <!--directorName-->
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<span style="float:right"> <span style="float:right">
<button class="btn btn-primary" type="button" ng-click="save()" translate="Submit"></button> <button class="btn btn-primary" type="button" ng-click="modalManage.directorModal.save()" translate="Submit"></button>
<button class="btn btn-third" type="button" ng-click="modalManage.directorModal.cancel()" translate="Cancel"></button> <button class="btn btn-third" type="button" ng-click="modalManage.directorModal.cancel()" translate="Cancel"></button>
</span> </span>
</div> </div>
......
...@@ -99,39 +99,13 @@ ...@@ -99,39 +99,13 @@
// 保存机构 // 保存机构
$scope.saveOrg = function () { $scope.saveOrg = function () {
saveLocalOrg(); var dxResult = DevExpress.validationEngine.validateGroup($('#orgControlForm').dxValidationGroup("instance")).isValid;
}; if (dxResult) {
saveLocalOrg();
var saveVerify = function () {
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;
}
});
} }
$('.orgAreaRequired').each(function (index, ele) {
if (null == ele.innerText || "" === ele.innerText) {
SweetAlert.error("请检查必填项");
fail = true;
return false;
}
});
return fail;
}; };
var saveLocalOrg = function () { var saveLocalOrg = function () {
$scope.orgControlForm.$setSubmitted();
console.log(saveVerify());
if (saveVerify()) return;
var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name); var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
if (hasSpecialChar) { if (hasSpecialChar) {
$scope.editOrgModel.nameError = $translate.instant('SpecialChar'); $scope.editOrgModel.nameError = $translate.instant('SpecialChar');
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<div id="myTabContent" class="tab-content"> <div id="myTabContent" class="tab-content">
<div id="basicdata" class="tab-pane in active"> <div id="basicdata" class="tab-pane in active">
<form class="form-horizontal" id="orgControlForm" name="orgControlForm"> <form class="form-horizontal" id="orgControlForm" name="orgControlForm" dx-validation-group="{}">
<div class="local"> <div class="local">
<div style="margin-left: 20px;margin-top: 20px"> <div style="margin-left: 20px;margin-top: 20px">
<span style="font-weight: bold;font-size: large;">{{'EntityInfo'|translate}}</span> <span style="font-weight: bold;font-size: large;">{{'EntityInfo'|translate}}</span>
......
...@@ -21,12 +21,18 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -21,12 +21,18 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
cancel: function () { cancel: function () {
$scope.onClose(); $scope.onClose();
$scope.modalInstance.cancel(); $scope.modalInstance.cancel();
},
save:function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#shareholderControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) {
}
} }
} }
}; };
var initParams = function () { var initParams = function () {
$scope.editOrgModel = {}; $scope.editModel = {};
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm; $scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred']; $scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B']; $scope.classOfSharesTypeList = ['A', 'B'];
...@@ -111,9 +117,50 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -111,9 +117,50 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
placeholder: $translate.instant('votingPercentage'), placeholder: $translate.instant('votingPercentage'),
width: 300 width: 300
} }
} };
$scope.validateOption = {
investmentEntityOption: {
validationRules: [
{
type: "required",
message: $translate.instant('investmentEntity')
}
]
},
ownershipFormOption: {
validationRules: [
{
type: "required",
message: $translate.instant('ownershipForm')
}
]
},
commonOrPreferredOption: {
validationRules: [
{
type: "required",
message: $translate.instant('commonOrPreferred')
}
]
},
classOfSharesOption: {
validationRules: [
{
type: "required",
message: $translate.instant('classOfShares')
}
]
},
votingPercentageOption: {
validationRules: [
{
type: "required",
message: $translate.instant('votingPercentage')
}
]
}
};
}; };
var init = function () { var init = function () {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="modal-body" id="modal-body" style="height:280px;width:641px"> <div class="modal-body" id="modal-body" style="height:280px;width:641px">
<!--add director--> <!--add director-->
<div> <div>
<form class="form-horizontal" id="shareholderControlForm" name="shareholderControlForm"> <form class="form-horizontal" id="shareholderControlForm" name="shareholderControlForm" dx-validation-group="{}">
<div class="local"> <div class="local">
<div class="bottom-row"> <div class="bottom-row">
<!--investmentEntity--> <!--investmentEntity-->
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<span style="float:right"> <span style="float:right">
<button class="btn btn-primary" type="button" ng-click="save()" translate="Submit"></button> <button class="btn btn-primary" type="button" ng-click="modalManage.shareholderModal.save()" translate="Submit"></button>
<button class="btn btn-third" type="button" ng-click="modalManage.shareholderModal.cancel()" translate="Cancel"></button> <button class="btn btn-third" type="button" ng-click="modalManage.shareholderModal.cancel()" translate="Cancel"></button>
</span> </span>
</div> </div>
......
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