Commit 10cf66cf authored by neo's avatar neo

[DEV] add approval comment

parent 9b6b5b87
...@@ -100,9 +100,9 @@ ...@@ -100,9 +100,9 @@
return locateCell(spread, true); return locateCell(spread, true);
}); });
} }
}, function (data) { }, function (data) {
$log.info(data); $log.info(data);
}); });
}; };
var initSpreadExcel = function (reportSpread) { var initSpreadExcel = function (reportSpread) {
......
commonModule.controller('VatReportViewController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q', '$compile', '$state', '$stateParams', commonModule.controller('VatReportViewController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q', '$compile', '$state', '$stateParams',
'apiInterceptor', 'vatExportService', 'SweetAlert', 'BSPLService', 'vatReportService', 'vatReportCacheService', 'vatSessionService', 'apiInterceptor', 'vatExportService', 'SweetAlert', 'BSPLService', 'vatReportService', 'vatReportCacheService', 'vatSessionService',
'loginContext', 'enums', 'vatCommonService', 'vatWorkflowService', 'projectService', '$uibModal', '$cookies', 'Upload', 'vatImportService', 'loginContext', 'enums', 'vatCommonService', 'vatWorkflowService', 'projectService', '$uibModal', '$cookies', 'Upload', 'vatImportService','vatApproveService',
function ($scope, $rootScope, $log, $translate, $timeout, $q, $compile, $state, $stateParams, apiInterceptor, vatExportService, SweetAlert, BSPLService, function ($scope, $rootScope, $log, $translate, $timeout, $q, $compile, $state, $stateParams, apiInterceptor, vatExportService, SweetAlert, BSPLService,
vatReportService, vatReportCacheService, vatSessionService, loginContext, enums, vatCommonService, vatWorkflowService, projectService, vatReportService, vatReportCacheService, vatSessionService, loginContext, enums, vatCommonService, vatWorkflowService, projectService,
$uibModal, $cookies, Upload, vatImportService) { $uibModal, $cookies, Upload, vatImportService, vatApproveService) {
'use strict'; 'use strict';
$log.debug('VatReportViewController.ctor()...'); $log.debug('VatReportViewController.ctor()...');
...@@ -2538,6 +2538,25 @@ ...@@ -2538,6 +2538,25 @@
} }
}; };
$scope.commitApprove = function(){
var approveParam={};
approveParam.projectId = vatSessionService.project.id;
approveParam.periodDate = vatSessionService.project.periodDate;
vatApproveService.commitNewApproval(approveParam);
}
$scope.doApprove = function(){
$("#ApprovalComment").modal('show');
}
$scope.rejectApproval =function(){
$("#ApprovalComment").modal('hide');
}
$scope.agreeApproval =function(){
$("#ApprovalComment").modal('hide');
}
//排序 //排序
function fileSort(i) { function fileSort(i) {
if ($scope.voucherList.length > 0) { if ($scope.voucherList.length > 0) {
......
<div class='vat-report-view'> <div class='vat-report-view'>
<!--Report SpreadJS--> <!--Report SpreadJS-->
<div ng-if="!isDocumentList" class="row"> <div ng-if="!isDocumentList" class="row">
<span ng-click="showOperateLogPop()"><i class="fa fa-file-excel-o" aria-hidden="true"></i>&nbsp;{{'Remarks' | translate}}</span>
<span ng-show="showRemarksBt" ng-click="showRemarks()"><i class="fa fa-lightbulb-o" aria-hidden="true"></i>&nbsp; {{'Memo' | translate}}</span>
<span ng-if="isBSPL" ng-click="exportExcel();"><i class="fa fa-download"></i>&nbsp;{{'ExportExcel' | translate}}</span>
<span ng-if="!isBSPL" ng-click="openExportPop();"><i class="fa fa-download"></i>&nbsp;{{'ExportExcel' | translate}}</span> <span ng-if="!isBSPL" ng-click="openExportPop();"><i class="fa fa-download"></i>&nbsp;{{'ExportExcel' | translate}}</span>
<span ng-click="submitReport(43)" ng-show="submitBtShow"><i class="fa fa-arrow-up" aria-hidden="true"></i>&nbsp;{{'ReportSubmitToApprove' | translate}}</span> <span ng-if="!isBSPL" ng-click="commitApprove();"><i
<span ng-click="withdrawReport(44)" ng-show="showWithdrawBt"><i class="fa fa-arrow-down" aria-hidden="true"></i>&nbsp;{{'ReportWithdrawToApprove' | translate}}</span> class="fa fa-floppy-o"></i>&nbsp;{{'报表提审'}}</span>
<span ng-click="approve(45)" ng-show="approveBtShow && !submitBtShow"><i class="fa fa-check" <span ng-if="!isBSPL" ng-click="doApprove();"><i
aria-hidden="true"></i>&nbsp;{{'ReportApprove' | translate}} {{approveLevelDesc}}</span> class="fa fa-floppy-o"></i>&nbsp;{{'报表审批'}}</span>
<span ng-click="reject(46)" ng-show="approveBtShow && !submitBtShow"><i class="fa fa-times"
aria-hidden="true"></i>&nbsp;{{'ReportReject' | translate}} {{approveLevelDesc}}</span>
<span ng-click="declarationComplete(47)" ng-show="declareCompleteBtShow"><i class="fa fa-check-square"
aria-hidden="true"></i>&nbsp;{{'DeclarationComplete' | translate}}</span>
<span ng-click="uploadCertificate()" ng-show="approveBtShow && !submitBtShow"><i class="fa fa-cloud-upload"
aria-hidden="true"></i>&nbsp;{{'UploadCertificate' | translate}}</span>
<span ng-if="!isBSPL" ng-click="saveReportCache();"><i
class="fa fa-floppy-o"></i>&nbsp;{{'Save' | translate}}</span>
</div> </div>
<div class='report-container' id="reportContainer"> <div class='report-container' id="reportContainer">
...@@ -160,27 +149,30 @@ ...@@ -160,27 +149,30 @@
</div> </div>
</div> </div>
<div class="modal fade" id="EditVoucherCommentsPortal" tabindex="-1" role="dialog" aria-labelledby="myModal" <div class="modal fade" id="ApprovalComment" tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false"> data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="" role="document"> <div class="modal-dialog" style="" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="closeModal()">×</span> <span class="close" data-dismiss="modal" aria-hidden="true" ng-click="closeModal()">×</span>
<span>{{voucherFileName}}</span> <span>{{vatSessionService.project.name}}</span>
</div> </div>
<br/> <br/>
<div class="row" style="margin-left:12px; margin-right:12px;"> <div class="row" style="margin-left:12px; margin-right:12px;">
<div class="col-lg-12 col-md-12 col-sm-12"> <div class="col-lg-12 col-md-12 col-sm-12">
<table class="table"> <table class="table">
<caption>备注</caption> <caption>审核意见</caption>
<tr> <tr>
<td><textarea rows="3" class="form-control" ng-model="voucherComments">{{voucherComments}}</textarea> <td><textarea rows="3" class="form-control" ng-model="voucherComments">{{approvalComment}}</textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="float:right;border-top:none;"> <td style="float:right;border-top:none;">
<button class="btn btn-sm" ng-click="updateEvidencesComments(voucherFileID)">提交 <button class="btn btn-sm" ng-click="rejectApproval()">审核通过
</button>
<button class="btn btn-sm" ng-click="agreeApproval()">审核拒绝
</button> </button>
</td> </td>
</tr> </tr>
......
vatModule.controller('VatLayoutController', ['$scope', '$rootScope', '$q', '$log', '$timeout', '$state', '$translate', 'projectService', 'SweetAlert', 'loginContext' vatModule.controller('VatLayoutController', ['$scope', '$rootScope', '$q', '$log', '$timeout', '$state', '$translate', 'projectService', 'SweetAlert', 'loginContext'
, 'vatSessionService', 'vatCommonService', 'vatWorkflowService', 'application', 'enums', '$uibModal','vatApproveService', , 'vatSessionService', 'vatCommonService', 'vatWorkflowService', 'application', 'enums', '$uibModal',
function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectService, SweetAlert, loginContext function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectService, SweetAlert, loginContext
, vatSessionService, vatCommonService, vatWorkflowService, application, enums, $uibModal, vatApproveService) { , vatSessionService, vatCommonService, vatWorkflowService, application, enums, $uibModal) {
'use strict'; 'use strict';
$log.debug('VatLayoutController.ctor()...'); $log.debug('VatLayoutController.ctor()...');
...@@ -434,13 +434,6 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer ...@@ -434,13 +434,6 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
} }
} }
$scope.approve = function(){
var approveParam={};
approveParam.projectId = vatSessionService.project.id;
approveParam.periodDate = vatSessionService.project.periodDate;
vatApproveService.commitNewApproval(approveParam);
}
$scope.showProjectStatus = function () { $scope.showProjectStatus = function () {
var modalInstance = $uibModal.open({ var modalInstance = $uibModal.open({
animation: false, animation: false,
......
...@@ -19,13 +19,6 @@ ...@@ -19,13 +19,6 @@
<a ng-repeat="menu in menus" ui-sref-active="active" ng-click="setReportSession(menu.name);" ui-sref=".{{menu.name}}" <a ng-repeat="menu in menus" ui-sref-active="active" ng-click="setReportSession(menu.name);" ui-sref=".{{menu.name}}"
atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.state | translate}}</a> atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.state | translate}}</a>
</div> </div>
<div style="float:right;margin-right:150px;">
<button class="btn btn-default btn-primary" ng-click="approve()">
<span>报表提审</span>
</button>
</div>
<!--<button class="btn btn-vat-primary" translate="TriggerMessageSchedulerJob" ng-click="triggerSchedulerJob()"></button>--> <!--<button class="btn btn-vat-primary" translate="TriggerMessageSchedulerJob" ng-click="triggerSchedulerJob()"></button>-->
......
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