Commit 4e36583b authored by neo's avatar neo

[DEV] when approval agree and can add manual data

parent f017d515
...@@ -873,10 +873,6 @@ public class ReportServiceImpl { ...@@ -873,10 +873,6 @@ public class ReportServiceImpl {
public OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId) { public OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId) {
OperationResultDto operationResultDto = new OperationResultDto(); OperationResultDto operationResultDto = new OperationResultDto();
String status = periodApprovalMapper.getStatusByProjectIdAndPeriod(projectId, data.getPeriod());
MyAsserts.assertTrue(status == null || status.equals(Constant.APPROVAL_DISAGREED), Exceptions.REPORT_IN_PROCESS_OR_AGREED_EXCEPTION);
try { try {
if (data.getCellId() == null) { if (data.getCellId() == null) {
//todo: insert celldata for manual datasource //todo: insert celldata for manual datasource
......
...@@ -1493,6 +1493,10 @@ ...@@ -1493,6 +1493,10 @@
//单元格详细信息点击确定时执行 //单元格详细信息点击确定时执行
$scope.confirm = function () { $scope.confirm = function () {
vatApproveService.approvalStatus(vatSessionService.project.id,vatSessionService.project.period).success(function(result){
if(result&&result=='committed'){
SweetAlert.error('报表提审中!');
}else{
$scope.handInputModel.name = $scope.taxCellDetail.inputMemo; $scope.handInputModel.name = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.amount = $scope.taxCellDetail.inputValue; $scope.handInputModel.amount = $scope.taxCellDetail.inputValue;
$scope.handInputModel.description = $scope.taxCellDetail.inputMemo; $scope.handInputModel.description = $scope.taxCellDetail.inputMemo;
...@@ -1522,6 +1526,8 @@ ...@@ -1522,6 +1526,8 @@
} }
return $q.reject(); return $q.reject();
});
}; };
...@@ -2554,7 +2560,7 @@ ...@@ -2554,7 +2560,7 @@
vatSessionService.project.period=vatSessionService.month; vatSessionService.project.period=vatSessionService.month;
vatApproveService.approvalStatus(vatSessionService.project.id,vatSessionService.project.period).success(function(result){ vatApproveService.approvalStatus(vatSessionService.project.id,vatSessionService.project.period).success(function(result){
if(result&&result=='committed'){ if(result&&result=='committed'){
SweetAlert.error('报表提审中或审核已通过!'); SweetAlert.error('报表提审中!');
}else{ }else{
SweetAlert.swal({ SweetAlert.swal({
title: "warning!", title: "warning!",
...@@ -2685,7 +2691,7 @@ ...@@ -2685,7 +2691,7 @@
vatSessionService.project.period=vatSessionService.month; vatSessionService.project.period=vatSessionService.month;
vatApproveService.approvalStatus(vatSessionService.project.id,vatSessionService.project.period).success(function(result){ vatApproveService.approvalStatus(vatSessionService.project.id,vatSessionService.project.period).success(function(result){
if(result&&result=='committed'){ if(result&&result=='committed'){
SweetAlert.error('报表提审中或审核已通过!'); SweetAlert.error('报表提审中!');
}else{ }else{
var text= $(".li").find(".active").text(); var text= $(".li").find(".active").text();
$log.debug(text); $log.debug(text);
......
...@@ -96,13 +96,9 @@ ...@@ -96,13 +96,9 @@
data.dataSourceType = enums.cellDataSourceType.KeyIn; data.dataSourceType = enums.cellDataSourceType.KeyIn;
return $q.when(data); return $q.when(data);
},function (data) { },function (data) {
if(data.status==412){
SweetAlert.error('报表提审中或审核已通过!');
}else{
logInfo.UpdateState = $translate.instant('ManualInputFail'); logInfo.UpdateState = $translate.instant('ManualInputFail');
SweetAlert.error($translate.instant('PleaseContactAdministrator')); SweetAlert.error($translate.instant('PleaseContactAdministrator'));
return vatOperationLogService.addOperationLog(logInfo); return vatOperationLogService.addOperationLog(logInfo);
}
}); });
}, },
deleteCellVoucher: function (voucherId, datasourceId) { deleteCellVoucher: function (voucherId, datasourceId) {
......
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