Commit 10cf66cf authored by neo's avatar neo

[DEV] add approval comment

parent 9b6b5b87
......@@ -100,9 +100,9 @@
return locateCell(spread, true);
});
}
}, function (data) {
$log.info(data);
});
}, function (data) {
$log.info(data);
});
};
var initSpreadExcel = function (reportSpread) {
......
commonModule.controller('VatReportViewController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q', '$compile', '$state', '$stateParams',
'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,
vatReportService, vatReportCacheService, vatSessionService, loginContext, enums, vatCommonService, vatWorkflowService, projectService,
$uibModal, $cookies, Upload, vatImportService) {
$uibModal, $cookies, Upload, vatImportService, vatApproveService) {
'use strict';
$log.debug('VatReportViewController.ctor()...');
......@@ -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) {
if ($scope.voucherList.length > 0) {
......
<div class='vat-report-view'>
<!--Report SpreadJS-->
<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-click="submitReport(43)" ng-show="submitBtShow"><i class="fa fa-arrow-up" aria-hidden="true"></i>&nbsp;{{'ReportSubmitToApprove' | translate}}</span>
<span ng-click="withdrawReport(44)" ng-show="showWithdrawBt"><i class="fa fa-arrow-down" aria-hidden="true"></i>&nbsp;{{'ReportWithdrawToApprove' | translate}}</span>
<span ng-click="approve(45)" ng-show="approveBtShow && !submitBtShow"><i class="fa fa-check"
aria-hidden="true"></i>&nbsp;{{'ReportApprove' | translate}} {{approveLevelDesc}}</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>
<span ng-if="!isBSPL" ng-click="commitApprove();"><i
class="fa fa-floppy-o"></i>&nbsp;{{'报表提审'}}</span>
<span ng-if="!isBSPL" ng-click="doApprove();"><i
class="fa fa-floppy-o"></i>&nbsp;{{'报表审批'}}</span>
</div>
<div class='report-container' id="reportContainer">
......@@ -160,27 +149,30 @@
</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">
<div class="modal-dialog" style="" role="document">
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="closeModal()">×</span>
<span>{{voucherFileName}}</span>
<span>{{vatSessionService.project.name}}</span>
</div>
<br/>
<div class="row" style="margin-left:12px; margin-right:12px;">
<div class="col-lg-12 col-md-12 col-sm-12">
<table class="table">
<caption>备注</caption>
<caption>审核意见</caption>
<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>
</tr>
<tr>
<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>
</td>
</tr>
......
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
, vatSessionService, vatCommonService, vatWorkflowService, application, enums, $uibModal, vatApproveService) {
, vatSessionService, vatCommonService, vatWorkflowService, application, enums, $uibModal) {
'use strict';
$log.debug('VatLayoutController.ctor()...');
......@@ -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 () {
var modalInstance = $uibModal.open({
animation: false,
......
......@@ -19,13 +19,6 @@
<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>
</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>-->
......
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