Commit 098ba078 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed page issue -- frank

parent d861941a
......@@ -279,15 +279,15 @@ public class OrganizationHKServiceImpl {
private OperationResultDto checkExist(OrganizationHKDto orgDto) {
Assert.notNull(orgDto, "orgDto null point error");
OrganizationHK queryRoot = null;
OrganizationHKExample example = new OrganizationHKExample();
OrganizationHKExample.Criteria criteria = example.createCriteria();
criteria.andCodeEqualTo(orgDto.getCode());
if (orgDto.getId() != null) {
criteria.andIdNotEqualTo(orgDto.getId());
}
queryRoot = organizationHKMapper.selectByExample(example).stream().findFirst().orElse(null);
OrganizationHKExample example = new OrganizationHKExample();
OrganizationHKExample.Criteria criteria = example.createCriteria();
criteria.andCodeEqualTo(orgDto.getCode());
if (orgDto.getId() != null) {
criteria.andIdNotEqualTo(orgDto.getId());
}
queryRoot = organizationHKMapper.selectByExample(example).stream().findFirst().orElse(null);
if (queryRoot != null && orgDto.getId() != null && orgDto.getId()==0) {
if (queryRoot != null && orgDto.getId() != null && orgDto.getId() == 0) {
return new OperationResultDto(false, OrganizationMessage.ClientCodeIsExist);
}
OperationResultDto operationResult = checkOrgNameOrOrgCode(orgDto);
......
package pwc.taxtech.atms.organization.dpo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.util.List;
public class OrganizationHKDto {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String name;
private String code;
......
......@@ -66,7 +66,9 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
},
type: "date",
value: now,
width: 300
width: 300,
displayFormat: constant.date.dateFormatyyyyMMdd,
dateSerializationFormat: constant.date.dateFormatyyyyMMdd
},
dateOfResignationOption: {
bindingOptions: {
......@@ -74,7 +76,9 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
},
type: "date",
value: now,
width: 300
width: 300,
displayFormat: constant.date.dateFormatyyyyMMdd,
dateSerializationFormat: constant.date.dateFormatyyyyMMdd
},
executiveOption: {
bindingOptions: {
......
......@@ -106,19 +106,19 @@
};
var saveLocalOrg = function () {
var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
if (hasSpecialChar) {
$scope.editOrgModel.nameError = $translate.instant('SpecialChar');
$scope.isShowBasic = true;
return false;
}
// var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
// if (hasSpecialChar) {
// $scope.editOrgModel.nameError = $translate.instant('SpecialChar');
// $scope.isShowBasic = true;
// return false;
// }
if ($scope.orgControlForm.$invalid) {
$scope.isShowBasic = true;
return;
} else {
$scope.isShowBasic = false;
}
// if ($scope.orgControlForm.$invalid) {
// $scope.isShowBasic = true;
// return;
// } else {
// $scope.isShowBasic = false;
// }
var editModel = $scope.editOrgModel;
......@@ -129,10 +129,8 @@
SweetAlert.warning($translate.instant(orgId.resultMsg));
return;
}
$(selectedModel).modal('hide');
$scope.modalManage.editOrgModal.close();
SweetAlert.success($translate.instant('SaveSuccess'));
refreshOrg();
$scope.operateType = null;
$scope.isUpdate = true;
......@@ -140,7 +138,6 @@
} else {
orgHKService.updateOrg(editModel).success(function (data) {
if (data && !data.result) {
//SweetAlert.info("Disable", orgId);
SweetAlert.warning($translate.instant(data.resultMsg));
return;
}
......@@ -157,8 +154,6 @@
// 加载机构
var loadOrg = function (orgId) {
resetRegion();
//清空组织机构,重新获取,达到刷新效果
$scope.editOrgModel = {
TypeLevel: 1
......@@ -182,16 +177,6 @@
$scope.serviceList = [];
$scope.OrgAccountRowIndex = 1;
});
if ($scope.isInternational) {
$('.localRequired').removeAttr("required");
$('.orgAreaRequired').removeAttr("required");
}
// set first active page is basic info
$('#orgControlTab a:first').tab('show');
// $('#orgModalFooter').css('padding-left','139px');
$(selectedModel).modal('show');
};
$scope.removeDisabled = function () {
......@@ -732,7 +717,9 @@
value: 'editOrgModel.dateOfIncorporation'
},
type: "date",
value: now
value: now,
displayFormat: constant.date.dateFormatyyyyMMdd,
dateSerializationFormat: constant.date.dateFormatyyyyMMdd
}
};
......
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