Commit 26b318ea authored by frank.xa.zhang's avatar frank.xa.zhang

fixed page issue -- frank

parent 79bd35d6
commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', function ($scope, $log, ackUibModal) {
commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', '$translate', function ($scope, $log, ackUibModal, $translate) {
'use strict';
$scope.isShow = false;
......@@ -10,24 +10,150 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
'edit-organization-director-modal.html',
'edit-organization-director-modal',
null, 'static', function () {
$scope.isShow = false;
$scope.isShowD = false;
ackMessageBox.close();
});
$scope.modalInstance.open();
},
close: function () {
$scope.isShow = false;
$scope.modalInstance.close();
},
cancel: function () {
$scope.isShow = false;
$scope.onClose();
$scope.modalInstance.cancel();
}
}
};
var now = new Date();
var initParams = function () {
$scope.editModel={};
$scope.dropdownDatasource = {
otherRolesTypeList: constant.organizationHK.OtherRoles,
executiveTypeList: constant.organizationHK.executiveType
};
$scope.textOptions = {
directorNameOption: {
bindingOptions: {
value: 'editModel.directorName'
},
maxLength: 100,
placeholder: $translate.instant('directorName'),
width: 300
},
residencyOption: {
bindingOptions: {
value: 'editModel.residency'
},
maxLength: 100,
placeholder: $translate.instant('residency'),
width: 300
},
dateOfAppointmentOption: {
bindingOptions: {
value: 'editModel.dateOfAppointment'
},
type: "date",
value: now,
width: 300
},
dateOfResignationOption: {
bindingOptions: {
value: 'editModel.dateOfResignation'
},
type: "date",
value: now,
width: 300
},
executiveOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.executiveTypeList',
value: 'editModel.executive'
},
onSelectionChanged: function (args) {
$scope.editModel.executive = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
otherRolesOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.otherRolesTypeList',
value: 'editModel.otherRoles'
},
onSelectionChanged: function (args) {
$scope.editModel.otherRoles = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
}
};
$scope.validateOption = {
directorNameOption: {
validationRules: [
{
type: "required",
message: $translate.instant('directorName')
}
]
},
residencyOption: {
validationRules: [
{
type: "required",
message: $translate.instant('residency')
}
]
},
dateOfAppointmentOption: {
validationRules: [
{
type: "required",
message: $translate.instant('dateOfAppointment')
}
]
},
dateOfResignationOption: {
validationRules: [
{
type: "required",
message: $translate.instant('dateOfResignation')
}
]
},
executiveOption: {
validationRules: [
{
type: "required",
message: $translate.instant('executive')
}
]
},
otherRolesOption: {
validationRules: [
{
type: "required",
message: $translate.instant('otherRoles')
}
]
}
};
};
var init = function () {
......
......@@ -4,7 +4,7 @@
<h4 class="modal-title" style="margin-top: 5px;" ng-if="isAdd">{{'addDirector' | translate}}</h4>
<h4 class="modal-title" style="margin-top: 5px;" ng-if="!isAdd">{{'editDirector' | translate}}</h4>
</div>
<div class="modal-body" id="modal-body" style="height:628px;">
<div class="modal-body" id="modal-body" style="height:335px;width:600px">
<!--add director-->
<div>
<form class="form-horizontal" id="orgControlForm" name="orgControlForm">
......@@ -12,69 +12,43 @@
<div class="bottom-row">
<!--directorName-->
<div class="form-group">
<label for="directorName" class="col-sm-3 control-label"><span class="must-input">*</span>{{'directorName' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.directorName.$invalid && (orgControlForm.directorName.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="directorName"
ng-model="editOrgModel.directorName" name="directorName"
placeholder="{{resources.directorName}}" ng-keyup="directorNameKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'directorName' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-text-box="textOptions.directorNameOption" dx-validator="validateOption.directorNameOption">
</div>
</div>
<!--residency-->
<div class="form-group">
<label for="residency" class="col-sm-3 control-label"><span class="must-input">*</span>{{'residency' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.residency.$invalid && (orgControlForm.residency.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="residency"
ng-model="editOrgModel.residency" name="residency"
placeholder="{{resources.residency}}" ng-keyup="residencyKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'residency' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-text-box="textOptions.residencyOption" dx-validator="validateOption.residencyOption">
</div>
</div>
<!--dateOfAppointment-->
<div class="form-group">
<label for="dateOfAppointment" class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfAppointment' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.dateOfAppointment.$invalid && (orgControlForm.dateOfAppointment.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="dateOfAppointment"
ng-model="editOrgModel.dateOfAppointment" name="dateOfAppointment"
placeholder="{{resources.dateOfAppointment}}" ng-keyup="dateOfAppointmentKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfAppointment' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-date-box="textOptions.dateOfAppointmentOption" dx-validator="validateOption.dateOfAppointmentOption">
</div>
</div>
<!--dateOfResignation-->
<div class="form-group">
<label for="dateOfResignation" class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfResignation' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.dateOfResignation.$invalid && (orgControlForm.dateOfResignation.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="dateOfResignation"
ng-model="editOrgModel.dateOfResignation" name="dateOfResignation"
placeholder="{{resources.dateOfResignation}}" ng-keyup="dateOfResignationKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfResignation' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-date-box="textOptions.dateOfResignationOption" dx-validator="validateOption.dateOfResignationOption">
</div>
</div>
<!--executive-->
<div class="form-group">
<label class="col-sm-3 control-label" for="executive"><span class="must-input">*</span>{{'executive' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.executive.$invalid && (orgControlForm.executive.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='executive'
name="executive" ng-model="editOrgModel.executive"
ng-options="item for item in executiveTypeList">
<option value="">{{resources.executive}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'executive' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" dx-select-box="textOptions.executiveOption" dx-validator="validateOption.executiveOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--otherRoles-->
<div class="form-group">
<label class="col-sm-3 control-label" for="otherRoles"><span class="must-input">*</span>{{'otherRoles' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.otherRoles.$invalid && (orgControlForm.otherRoles.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='otherRoles'
name="otherRoles" ng-model="editOrgModel.otherRoles"
ng-options="item for item in otherRolesTypeList">
<option value="">{{resources.otherRoles}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'otherRoles' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" dx-select-box="textOptions.otherRolesOption" dx-validator="validateOption.otherRolesOption" style="width: 300px;margin-left: 20px">
</div>
</div>
</div>
......
......@@ -9,7 +9,8 @@ commonModule.directive('editOrganizationDirectorModal', ['$log', function ($log)
scope: {
isShowD: '=?',
parentPage: '@',
editModel: '=?'
editModel: '=?',
onClose:'&'
},
link: function (scope, element) {
}
......
......@@ -19,10 +19,12 @@
}
.modal-dialog {
width: 80% !important;
width: 653px;
height: 409px;
.modal-body {
height: 100%;
width:100%;
.row {
height: 100%;
......@@ -54,6 +56,17 @@
.right-container {
}
.local{
.bottom-row{
.form-group{
.margin-left-20{
margin-left: 20px;
}
}
}
}
}
.modal-footer {
......
commonModule.controller('editOrganizationModalController', ['$scope', '$log', '$translate', 'uiGridConstants', '$location', '$timeout', '$interval', '$filter', 'SweetAlert', 'orgHKService','ackUibModal',
function ($scope, $log, $translate, uiGridConstants, $location, $timeout, $interval, $filter, SweetAlert, orgHKService,ackUibModal) {
commonModule.controller('editOrganizationModalController', ['$scope', '$log', '$translate', 'uiGridConstants', '$location', '$timeout', '$interval', '$filter', 'SweetAlert', 'orgHKService', 'ackUibModal',
function ($scope, $log, $translate, uiGridConstants, $location, $timeout, $interval, $filter, SweetAlert, orgHKService, ackUibModal) {
var selectedModel = '.addOrgControlPop'; //'#addOrgControlPop' + $scope.dimensionId;
......@@ -77,11 +77,11 @@
// $scope.selfDimensionModel = getAddOrgSetDimension();
// initIsCheckedServiceList();
// resetErrorStatus();
if ($scope.isShow) {
$scope.orgControlForm.$setPristine();
$('#orgControlTab a:first').tab('show');
// $(selectedModel).modal('show');
}
// if ($scope.isShow) {
// $scope.orgControlForm.$setPristine();
// $('#orgControlTab a:first').tab('show');
// // $(selectedModel).modal('show');
// }
// $scope.advancedControlForm.$setPristine();
// set first active page is basic info
// $('#orgModalFooter').css('padding-left','139px');
......@@ -238,11 +238,6 @@
$scope.selectRegionID = defaultData;
};
// 基础数据初始化
var init = function () {
initDatePicker();
};
// 验证开始时间
$scope.checkStartDate = function (row) {
......@@ -253,17 +248,12 @@
row.startDateError = null;
}
if (!row.enterpriseAccountSetSelectID && !row.startDate && !row.endDate) {
if (!row.startDate) {
row.startDateError = $scope.resources.EffectiveDateRequired;
} else {
row.startDateError = null;
return;
}
// if (!row.startDate) {
// row.startDateError = $scope.resources.EffectiveDateRequired;
// } else {
// row.startDateError = null;
// }
if (row.startDate && row.endDate) {
if (!validateDate(row.startDate, row.endDate)) {
......@@ -276,14 +266,6 @@
// 验证结束时间
$scope.checkEndDate = function (row) {
// if (!row.endDate) {
// row.endDateError = $scope.resources.ExpiredDateRequired;
// } else {
// row.endDateError = null;
// }
if (row.endDate && !window.PWC.checkMonth(row.endDate)) {
row.endDateError = $scope.resources.DateMonthFormatError;
return;
......@@ -296,9 +278,7 @@
return;
}
if (row.startDate && row.endDate) {
if (!validateDate(row.startDate, row.endDate)) {
row.startDateError = $scope.resources.EffectiveDateAreaProblem;
} else {
......@@ -415,14 +395,15 @@
$scope.architectureTypeList = constant.ArchitectureTypeList;
$scope.nationalEconomicIndustryList = constant.NationalEconomicIndustryList;
$scope.trueFalse = constant.trueFalse;
$scope.countryCNList = constant.countryCNList;
$scope.legalFormTypeList = constant.organizationHK.legalFormTypeList;
$scope.entityLevelTypeList = constant.organizationHK.EntityLevel;
$scope.jurisdictionOfFormationTypeList = constant.organizationHK.JurisdictionOfFormation;
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$('.localRequired').attr("required", true);
$('.orgAreaRequired').attr("required", true);
$scope.dropdownDatasource = {
countryCNList: constant.countryCNList,
legalFormTypeList: constant.organizationHK.legalFormTypeList,
entityLevelTypeList: constant.organizationHK.EntityLevel,
jurisdictionOfFormationTypeList: constant.organizationHK.JurisdictionOfFormation,
ownershipFormTypeList: constant.organizationHK.OwnershipForm
};
var now = new Date();
$scope.equityGridOptions = {
bindingOptions: {
dataSource: 'shareholderDatasource'
......@@ -643,26 +624,262 @@
}
}
};
};
var initDatePicker = function () {
var ele = $(".startDatepicker");
ele.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: 'yyyy/mm/dd' //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
});
ele.datepicker("setDate", new Date().formatDateTime('yyyy/mm/dd'));
$scope.textBoxOption = {
nameOption: {
bindingOptions: {
value: 'editOrgModel.name'
},
maxLength: 100,
placeholder: $translate.instant('OrganizationName')
},
codeOption: {
bindingOptions: {
value: 'editOrgModel.code'
},
maxLength: 100,
placeholder: $translate.instant('OrganizationCode')
},
legalFormOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.legalFormTypeList',
value: 'editOrgModel.legalForm'
},
onSelectionChanged: function (args) {
$scope.editOrgModel.legalForm = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
registerAddressOption: {
bindingOptions: {
value: 'editOrgModel.registerAddress'
},
maxLength: 100,
placeholder: $translate.instant('registerAddress')
},
authorisedCapitalOption: {
bindingOptions: {
value: 'editOrgModel.authorisedCapital'
},
maxLength: 100,
placeholder: $translate.instant('authorisedCapital')
},
issuedCapitalOption: {
bindingOptions: {
value: 'editOrgModel.issuedCapital'
},
maxLength: 100,
placeholder: $translate.instant('issuedCapital')
},
industryOption: {
bindingOptions: {
value: 'editOrgModel.industry'
},
maxLength: 100,
placeholder: $translate.instant('industry')
},
businessLicenseOption: {
bindingOptions: {
value: 'editOrgModel.businessLicense'
},
maxLength: 100,
placeholder: $translate.instant('businessLicense')
},
entityLevelOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.entityLevelTypeList',
value: 'editOrgModel.entityLevel'
},
onSelectionChanged: function (args) {
$scope.editOrgModel.entityLevel = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
jurisdictionOfFormationOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.jurisdictionOfFormationTypeList',
value: 'editOrgModel.jurisdictionOfFormation'
},
onSelectionChanged: function (args) {
$scope.editOrgModel.jurisdictionOfFormation = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
financialYearEndOption: {
bindingOptions: {
value: 'editOrgModel.financialYearEnd'
},
maxLength: 100,
placeholder: $translate.instant('financialYearEnd')
},
registeredAgentOption: {
bindingOptions: {
value: 'editOrgModel.registeredAgent'
},
maxLength: 100,
placeholder: $translate.instant('registeredAgent')
},
ownershipFormOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.ownershipFormTypeList',
value: 'editOrgModel.ownershipFormType'
},
onSelectionChanged: function (args) {
$scope.editOrgModel.ownershipFormType = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
dateOfIncorporationOption:{
bindingOptions: {
value: 'editOrgModel.dateOfIncorporation'
},
type: "date",
value: now
}
};
$scope.validateOption = {
nameOption: {
validationRules: [
{
type: "required",
message: $translate.instant('OrganizationName')
}
]
},
codeOption: {
validationRules: [
{
type: "required",
message: $translate.instant('OrganizationCode')
}
]
},
legalFormOption: {
validationRules: [
{
type: "required",
message: $translate.instant('LegalForm')
}
]
},
registerAddressOption: {
validationRules: [
{
type: "required",
message: $translate.instant('registerAddressOption')
}
]
},
authorisedCapitalOption: {
validationRules: [
{
type: "required",
message: $translate.instant('authorisedCapital')
}
]
},
issuedCapitalOption: {
validationRules: [
{
type: "required",
message: $translate.instant('issuedCapital')
}
]
},
industryOption: {
validationRules: [
{
type: "required",
message: $translate.instant('industry')
}
]
},
businessLicenseOption: {
validationRules: [
{
type: "required",
message: $translate.instant('businessLicense')
}
]
},
entityLevelOption: {
validationRules: [
{
type: "required",
message: $translate.instant('OrganizationName')
}
]
},
jurisdictionOfFormationOption: {
validationRules: [
{
type: "required",
message: $translate.instant('jurisdictionOfFormation')
}
]
},
financialYearEndOption: {
validationRules: [
{
type: "required",
message: $translate.instant('financialYearEnd')
}
]
},
registeredAgentOption: {
validationRules: [
{
type: "required",
message: $translate.instant('registeredAgent')
}
]
},
ownershipFormOption: {
validationRules: [
{
type: "required",
message: $translate.instant('ownershipForm')
}
]
}
}
};
$scope.isShow = false;
$scope.closeSharehoder = function () {
$scope.isShowShareholderModal = false;
};
$scope.closeDirector = function () {
$scope.isShowDirectorModal = false;
};
//模态框管理
$scope.modalManage = {
editOrgModal: {
......@@ -672,6 +889,8 @@
'edit-organization-modal-wrapper',
$scope.parentPage, 'static', function () {
$scope.isShow = false;
$scope.isShowShareholderModal = false;
$scope.isShowDirectorModal = false;
ackMessageBox.close();
});
$scope.modalInstance.open();
......@@ -696,7 +915,6 @@
$scope.maxdropLength = 20;
$scope.maxTitleLength = 10;
initParams();
init();
})();
}
]);
......@@ -34,196 +34,98 @@
<!--机构名称-->
<div class="form-group">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'OrganizationName' | 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" name="name"
placeholder="{{resources.OrganizationName}}" 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">-->
<!--{{editOrgModel.nameError}}</p>-->
</div>
<div class="form-control col-sm-9" dx-text-box="textBoxOption.nameOption" dx-validator="validateOption.nameOption"></div>
</div>
<!--Internal Entity Code-->
<div class="form-group">
<label class="col-sm-3 control-label"></span>{{'EntityCode' | translate}}:</label>
<div class="col-sm-9">
<input class="form-control" id="entityCode"
ng-model="editOrgModel.code" name="entityCode"
placeholder="{{resources.EntityCode}}"
ng-keyup="nameKeyUp()" maxlength="100">
<div class="form-control col-sm-9" dx-text-box="textBoxOption.codeOption" dx-validator="validateOption.codeOption">
</div>
</div>
<!--Legal Form-->
<div class="form-group">
<label for="legalForm" class="col-sm-3 control-label"><span
class="must-input">*</span>{{'OrganizationLegalForm' | translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.legalForm.$invalid && (orgControlForm.legalForm.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='legalForm'
name="legalForm" ng-model="editOrgModel.legalForm"
ng-options="item.type as item.type for item in legalFormTypeList">
<option value="">{{resources.LegalForm}}</option>
</select>
<!--<p ng-show="orgControlForm.clientCode.$error.required && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label">-->
<!--{{resources.OrganizationMsgClientCodeRequired}}</p>-->
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'OrganizationLegalForm' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textBoxOption.legalFormOption" dx-validator="validateOption.legalFormOption">
</div>
</div>
<!--registerAddress-->
<div class="form-group">
<label for="registerAddress"
class="col-sm-3 control-label">{{'RegistrationLocation' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registerAddress.$invalid && (orgControlForm.registerAddress.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="registerAddress" id="registerAddress"
ng-model="editOrgModel.registerAddress"
placeholder="{{resources.registrationLocation}}" maxlength="100">
<!--<p ng-show="orgControlForm.architectureType.$error.required && (orgControlForm.architectureType.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label">-->
<!--{{resources.OrganizationMsgArchitectureTypeRequired}}</p>-->
<label class="col-sm-3 control-label">{{'RegistrationLocation' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.registerAddressOption" dx-validator="validateOption.registerAddressOption">
</div>
</div>
<!--authorisedCapital-->
<div class="form-group">
<label for="authorisedCapital" class="col-sm-3 control-label">{{'authorisedCapital' | translate}}</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.authorisedCapital.$invalid && (orgControlForm.authorisedCapital.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="authorisedCapital" id="authorisedCapital"
ng-model="editOrgModel.authorisedCapital"
placeholder="{{resources.authorisedCapital}}" maxlength="100">
<label class="col-sm-3 control-label">{{'authorisedCapital' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.authorisedCapitalOption" dx-validator="validateOption.authorisedCapitalOption">
</div>
</div>
<!--issuedCapital-->
<div class="form-group">
<label for="issuedCapital" class="col-sm-3 control-label">{{'issuedCapital' | translate}}</label>
<!-- <div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registrationCapital.$invalid && (orgControlForm.registrationCapital.$dirty || orgControlForm.$submitted)}"> -->
<div class="col-sm-9">
<input class="form-control" name="issuedCapital"
id="issuedCapital" ng-model="editOrgModel.issuedCapital"
placeholder="{{resources.issuedCapital}}" maxlength="50">
<label class="col-sm-3 control-label">{{'issuedCapital' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.issuedCapitalOption" dx-validator="validateOption.issuedCapitalOption">
</div>
</div>
<!--industry-->
<div class="form-group">
<label for="industry" class="col-sm-3 control-label">{{'industry' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.industry.$invalid && (orgControlForm.industry.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="industry"
id="industry" ng-model="editOrgModel.industry"
placeholder="{{resources.industry}}" maxlength="50">
<label class="col-sm-3 control-label">{{'industry' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.industryOption" dx-validator="validateOption.industryOption">
</div>
</div>
</div>
<div class="quarter-div rightUp">
<!--businessLicense-->
<div class="form-group">
<label for="businessLicense" class="col-sm-3 control-label"><span class="must-input">*</span>{{'businessLicense' | translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.businessLicense.$invalid && (orgControlForm.businessLicense.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" name="businessLicense"
id="businessLicense" ng-model="editOrgModel.businessLicense"
maxlength="50" placeholder="{{resources.businessLicense}}">
<!--<p ng-show="orgControlForm.businessLicense.$error.taxPayerNumberUnique && (orgControlForm.businessLicense.$dirty || orgControlForm.$submitted)"-->
<!--class="has-error label">-->
<!--{{resources.OrganizationMsgTaxPayerNumberUnique}}</p>-->
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'businessLicense' | translate}}:</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.businessLicenseOption" dx-validator="validateOption.businessLicenseOption">
</div>
</div>
<!--entityLevel-->
<div class="form-group">
<label for="entityLevel" class="col-sm-3 control-label"><span
class="must-input">*</span>{{'entityLevel' | translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.entityLevel.$invalid && (orgControlForm.entityLevel.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='entityLevel'
name="entityLevel" ng-model="editOrgModel.entityLevel"
ng-options="item.type as item.type for item in entityLevelTypeList">
<option value="">{{resources.entityLevel}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'entityLevel' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textBoxOption.entityLevelOption" dx-validator="validateOption.entityLevelOption">
</div>
</div>
<!--dateOfIncorporation-->
<div class="form-group">
<label for="dateOfIncorporation" class="col-sm-3 control-label">{{'dateOfIncorporation' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.dateOfIncorporation.$invalid && (orgControlForm.dateOfIncorporation.$dirty || orgControlForm.$submitted)}">
<div class="input-daterange startDatepicker">
<input type="text" id="dateOfIncorporation" class="input-sm form-control" name="dateOfIncorporation" ng-model="editOrgModel.dateOfIncorporation"
required="required" placeholder="{{resources.dateOfIncorporation}}"/>
</div>
<!-- <p ng-show="orgControlForm.regStatus.$error.required && (orgControlForm.regStatus.$dirty || orgControlForm.$submitted)"
class="has-error label">
{{resources.OrganizationMsgRegStatusRequired}}</p> -->
<label class="col-sm-3 control-label">{{'dateOfIncorporation' | translate}}</label>
<div class="col-sm-9 form-control" dx-date-box="textBoxOption.dateOfIncorporationOption">
</div>
</div>
<!--jurisdictionOfFormation-->
<div class="form-group">
<label for="jurisdictionOfFormation" class="col-sm-3 control-label"><span class="must-input">*</span>{{'jurisdictionOfFormation' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.jurisdictionOfFormation.$invalid && (orgControlForm.jurisdictionOfFormation.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='jurisdictionOfFormation'
name="jurisdictionOfFormation" ng-model="editOrgModel.jurisdictionOfFormation"
ng-options="item.type as item.type for item in jurisdictionOfFormationTypeList">
<option value="">{{resources.jurisdictionOfFormation}}</option>
</select>
<!-- <p ng-show="orgControlForm.code.$error.required && (orgControlForm.name.$dirty || orgControlForm.$submitted)"
class="has-error label">{{resources.OrganizationMsgCodeRequired}}</p>
<p ng-show="orgControlForm.code.$error.maxlength"
class="has-error label">
{{resources.OrganizationMsgCodeMaxLength}}</p>
<p ng-show="orgControlForm.code.$error.pattern" class="has-error label">
{{resources.OrganizationMsgCodePattern}}</p>
<p ng-show="orgControlForm.code.$error.codeUnique"
class="has-error label">{{resources.OrganizationMsgCodeUnique}}</p> -->
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'jurisdictionOfFormation' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textBoxOption.jurisdictionOfFormationOption" dx-validator="validateOption.jurisdictionOfFormationOption">
</div>
</div>
<!--financialYearEnd-->
<div class="form-group">
<label for="financialYearEnd" class="col-sm-3 control-label">{{'financialYearEnd' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.financialYearEnd.$invalid && (orgControlForm.financialYearEnd.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="financialYearEnd" id="financialYearEnd" ng-model="editOrgModel.financialYearEnd"
placeholder="{{resources.financialYearEnd}}" maxlength="50">
<label class="col-sm-3 control-label">{{'financialYearEnd' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.financialYearEndOption" dx-validator="validateOption.financialYearEndOption">
</div>
</div>
<!--registeredAgent-->
<div class="form-group">
<label for="registeredAgent" class="col-sm-3 control-label">{{'registeredAgent' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registeredAgent.$invalid && (orgControlForm.registeredAgent.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="registeredAgent" id="registeredAgent" ng-model="editOrgModel.registeredAgent" placeholder="{{resources.registeredAgent}}" maxlength="50">
<label class="col-sm-3 control-label">{{'registeredAgent' | translate}}</label>
<div class="col-sm-9 form-control" dx-text-box="textBoxOption.registeredAgentOption" dx-validator="validateOption.registeredAgentOption">
</div>
</div>
<!--ownershipForm-->
<div class="form-group">
<label for="ownershipForm"
class="col-sm-3 control-label">{{'ownershipForm' | translate}}</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.ownershipForm.$invalid && (orgControlForm.ownershipForm.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='ownershipForm'
name="ownershipForm"
ng-model="editOrgModel.ownershipForm"
ng-options="item.type as item.type for item in ownershipFormTypeList">
<option value="">{{resources.ownershipForm}}
</option>
</select>
<!-- <p ng-show="orgControlForm.engageNationalProhibitIndustry.$error.required && (orgControlForm.engageNationalProhibitIndustry.$dirty || orgControlForm.$submitted)"
class="has-error label">
{{resources.OrganizationMsgEngageNationalProhibitIndustryRequired}}
</p> -->
<label class="col-sm-3 control-label">{{'ownershipForm' | translate}}</label>
<div class="col-sm-9 form-control" dx-select-box="textBoxOption.ownershipFormOption" dx-validator="validateOption.ownershipFormOption">
</div>
</div>
</div>
......@@ -267,7 +169,8 @@
</button>
</span>
</div>
<edit-organization-shareholder-modal is-show-s="isShowShareholderModal" parent-page=".edit-organization-modal-wrapper" edit-model="editShareholder"></edit-organization-shareholder-modal>
<edit-organization-director-modal is-show-d="isShowDirectorModal" parent-page=".edit-organization-modal-wrapper" edit-model="editDirector"></edit-organization-director-modal>
<edit-organization-shareholder-modal is-show-s="isShowShareholderModal" parent-page=".edit-organization-modal-wrapper" edit-model="editShareholder"
on-close="closeSharehoder()"></edit-organization-shareholder-modal>
<edit-organization-director-modal is-show-d="isShowDirectorModal" parent-page=".edit-organization-modal-wrapper" edit-model="editDirector" on-close="closeDirector()"></edit-organization-director-modal>
</script>
</div>
\ No newline at end of file
......@@ -72,7 +72,7 @@
}
input {
width: 250px;
//width: 250px;
height: 33px;
}
......@@ -104,7 +104,7 @@
form .col-sm-9 {
width: 65%;
margin-left: -20px;
//margin-left: -20px;
}
form input[type='radio'] {
......
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal', function ($scope, $log, ackUibModal) {
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal','$translate', function ($scope, $log, ackUibModal,$translate) {
'use strict';
$scope.isShow = false;
......@@ -10,23 +10,109 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
'edit-organization-shareholder-modal.html',
'edit-organization-shareholder-modal-wrapper',
null, 'static', function () {
$scope.isShow = false;
$scope.isShowS = false;
ackMessageBox.close();
});
$scope.modalInstance.open();
},
close: function () {
$scope.isShow = false;
$scope.modalInstance.close();
},
cancel: function () {
$scope.isShow = false;
$scope.onClose();
$scope.modalInstance.cancel();
}
}
};
var initParams = function () {
$scope.editOrgModel = {};
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B'];
$scope.dropdownDatasource = {
investmentEntityTypeList: [],
ownershipFormTypeList: constant.organizationHK.OwnershipForm,
commonOrPreferredTypeList: [{id: 1, name: 'Commmon'}, {id: 2, name: 'Preferred'}],
classOfSharesTypeList: [{id: 1, name: 'A'}, {id: 2, name: 'B'}]
};
$scope.textboxOption = {
investmentEntityOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.investmentEntityTypeList',
value: 'editModel.investmentEntity'
},
onSelectionChanged: function (args) {
$scope.editModel.investmentEntity = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
ownershipFormOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.ownershipFormTypeList',
value: 'editModel.ownershipForm'
},
onSelectionChanged: function (args) {
$scope.editModel.ownershipForm = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
commonOrPreferredOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.commonOrPreferredTypeList',
value: 'editModel.commonOrPreferred'
},
onSelectionChanged: function (args) {
$scope.editModel.commonOrPreferred = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
classOfSharesOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.classOfSharesTypeList',
value: 'editModel.classOfShares'
},
onSelectionChanged: function (args) {
$scope.editModel.classOfShares = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
votingPercentageOption: {
bindingOptions: {
value: 'editModel.votingPercentage'
},
maxLength: 100,
placeholder: $translate.instant('votingPercentage'),
width: 300
}
}
};
......
......@@ -4,7 +4,7 @@
<h4 class="modal-title" style="margin-top: 5px;" ng-if="isAdd">{{'addShardholder' | translate}}</h4>
<h4 class="modal-title" style="margin-top: 5px;" ng-if="!isAdd">{{'editShardholder' | translate}}</h4>
</div>
<div class="modal-body" id="modal-body" style="height:628px;">
<div class="modal-body" id="modal-body" style="height:280px;width:641px">
<!--add director-->
<div>
<form class="form-horizontal" id="shareholderControlForm" name="shareholderControlForm">
......@@ -12,60 +12,36 @@
<div class="bottom-row">
<!--investmentEntity-->
<div class="form-group">
<label for="investmentEntity" class="col-sm-3 control-label"><span class="must-input">*</span>{{'investmentEntity' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.name.$invalid && (shareholderControlForm.name.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='investmentEntity'
name="investmentEntity" ng-model="editOrgModel.investmentEntity"
ng-options="item for item in investmentEntityTypeList">
<option value="">{{resources.investmentEntity}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'investmentEntity' | translate}}:</label>
<div class="col-sm-9" dx-select-box="textboxOption.investmentEntityOption" dx-validator="validateOption.investmentEntityOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--ownershipForm-->
<div class="form-group">
<label for="ownershipForm" class="col-sm-3 control-label"><span class="must-input">*</span>{{'ownershipForm' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.ownershipForm.$invalid && (shareholderControlForm.ownershipForm.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='ownershipForm'
name="ownershipForm" ng-model="editOrgModel.ownershipForm"
ng-options="item for item in ownershipFormTypeList">
<option value="">{{resources.ownershipForm}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'ownershipForm' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.ownershipFormOption" dx-validator="validateOption.ownershipFormOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--commonOrPreferred-->
<div class="form-group">
<label for="commonOrPreferred" class="col-sm-3 control-label"><span class="must-input">*</span>{{'commonOrPreferred' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.commonOrPreferred.$invalid && (shareholderControlForm.commonOrPreferred.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='commonOrPreferred'
name="commonOrPreferred" ng-model="editOrgModel.commonOrPreferred"
ng-options="item for item in commonOrPreferredTypeList">
<option value="">{{resources.commonOrPreferred}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'commonOrPreferred' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.commonOrPreferredOption" dx-validator="validateOption.commonOrPreferredOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--classOfShares-->
<div class="form-group">
<label for="classOfShares" class="col-sm-3 control-label"><span class="must-input">*</span>{{'classOfShares' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.classOfShares.$invalid && (shareholderControlForm.classOfShares.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='classOfShares'
name="classOfShares" ng-model="editOrgModel.classOfShares"
ng-options="item for item in classOfSharesTypeList">
<option value="">{{resources.classOfShares}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'classOfShares' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.classOfSharesOption" dx-validator="validateOption.classOfSharesOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--votingPercentage-->
<div class="form-group">
<label class="col-sm-3 control-label" for="votingPercentage"><span class="must-input">*</span>{{'votingPercentage' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.votingPercentage.$invalid && (shareholderControlForm.votingPercentage.$dirty || shareholderControlForm.$submitted)}">
<input class="form-control localRequired" id="votingPercentage"
ng-model="editOrgModel.votingPercentage" name="votingPercentage"
placeholder="{{resources.votingPercentage}}" ng-keyup="votingPercentageKeyUp()"
maxlength="100" ng-pattern="/^[0-9]+$/">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'votingPercentage' | translate}}:</label>
<div class="col-sm-9 form-control" dx-text-box="textboxOption.votingPercentageOption" dx-validator="validateOption.votingPercentageOption" style="margin-left: 20px">
</div>
</div>
</div>
......
......@@ -9,7 +9,8 @@ commonModule.directive('editOrganizationShareholderModal', ['$log', function ($l
scope: {
isShowS: '=?',
parentPage: '@',
editModel: '=?'
editModel: '=?',
onClose:'&'
},
link: function (scope, element) {
}
......
......@@ -18,11 +18,12 @@
}
.modal-dialog {
width: 50% !important;
width: 653px;
height: 409px;
.modal-body {
height: 100%;
width:100%;
.row {
height: 100%;
margin-bottom: 20px;
......
......@@ -1689,34 +1689,38 @@ constant.EnumTaxEventType = {
constant.organizationHK = {
legalFormTypeList: [
{code: 1, type: "Limited Partnership"},
{code: 2, type: "Limited Company"},
{code: 3, type: "Trustee"}
{id: 1, name: "Limited Partnership"},
{id: 2, name: "Limited Company"},
{id: 3, name: "Trustee"}
],
EntityLevel: [
{code: 1, type: "Investment Fund"},
{code: 2, type: "Investment Holding"},
{code: 3, type: "Portfolio Company"}
{id: 1, name: "Investment Fund"},
{id: 2, name: "Investment Holding"},
{id: 3, name: "Portfolio Company"}
],
JurisdictionOfFormation: [
{code: 1, type: "Hong Kong"},
{code: 2, type: "British Virgin Islands"},
{code: 3, type: "Cayman Islands"}
{id: 1, name: "Hong Kong"},
{id: 2, name: "British Virgin Islands"},
{id: 3, name: "Cayman Islands"}
],
OwnershipForm: [
{code: 1, type: "Ordinary Shares"},
{code: 2, type: "Preference Shares"}
{id: 1, name: "Ordinary Shares"},
{id: 2, name: "Preference Shares"}
],
BoardMeetingRequirement: [
{code: 1, type: "Annual"},
{code: 2, type: "Semi Qnnual"},
{code: 3, type: "Quarter"},
{code: 4, type: "Monthly"}
{id: 1, name: "Annual"},
{id: 2, name: "Semi Qnnual"},
{id: 3, name: "Quarter"},
{id: 4, name: "Monthly"}
],
OtherRoles: [
{code: 1, type: "CEO"},
{code: 2, type: "CFO"},
{code: 3, type: "NA"}
{id: 1, name: "CEO"},
{id: 2, name: "CFO"},
{id: 3, name: "NA"}
],
executiveType:[
{id: 1, name: "Y"},
{id: 2, name: "N"}
]
};
/************************************************cit constant end*************************************************/
\ No newline at end of file
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