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', '$
cancel: function () {
$scope.onClose();
$scope.modalInstance.cancel();
},
save:function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#directorControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) {
}
}
}
};
......@@ -28,7 +34,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
var now = new Date();
var initParams = function () {
$scope.editModel={};
$scope.editModel = {};
$scope.dropdownDatasource = {
......
......@@ -7,7 +7,7 @@
<div class="modal-body" id="modal-body" style="height:335px;width:600px">
<!--add director-->
<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="bottom-row">
<!--directorName-->
......@@ -58,7 +58,7 @@
</div>
<div class="modal-footer">
<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>
</span>
</div>
......
......@@ -99,39 +99,13 @@
// 保存机构
$scope.saveOrg = function () {
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;
}
});
var dxResult = DevExpress.validationEngine.validateGroup($('#orgControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) {
saveLocalOrg();
}
$('.orgAreaRequired').each(function (index, ele) {
if (null == ele.innerText || "" === ele.innerText) {
SweetAlert.error("请检查必填项");
fail = true;
return false;
}
});
return fail;
};
var saveLocalOrg = function () {
$scope.orgControlForm.$setSubmitted();
console.log(saveVerify());
if (saveVerify()) return;
var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
if (hasSpecialChar) {
$scope.editOrgModel.nameError = $translate.instant('SpecialChar');
......
......@@ -24,7 +24,7 @@
</div>
<div id="myTabContent" class="tab-content">
<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 style="margin-left: 20px;margin-top: 20px">
<span style="font-weight: bold;font-size: large;">{{'EntityInfo'|translate}}</span>
......
......@@ -21,12 +21,18 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
cancel: function () {
$scope.onClose();
$scope.modalInstance.cancel();
},
save:function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#shareholderControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) {
}
}
}
};
var initParams = function () {
$scope.editOrgModel = {};
$scope.editModel = {};
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B'];
......@@ -111,9 +117,50 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
placeholder: $translate.instant('votingPercentage'),
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 () {
......
......@@ -7,7 +7,7 @@
<div class="modal-body" id="modal-body" style="height:280px;width:641px">
<!--add director-->
<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="bottom-row">
<!--investmentEntity-->
......@@ -51,7 +51,7 @@
</div>
<div class="modal-footer">
<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>
</span>
</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