Commit 65fbd567 authored by neo's avatar neo

[dev] fixed approval task page grid item

parent 58b9b346
......@@ -12,8 +12,9 @@
}, apiConfig.createVat());
},
queryOutputInvoiceItemList: function (invoiceID) {
return $http.get('/outputInvoiceImport/queryOutputInvoiceItemList/' + invoiceID, apiConfig.createVat());
approvalTasks: function () {
var assignee='accountant';
return $http.get('/approval/tasks/'+assignee, apiConfig.createVat());
},
getExportOutputInvoiceList: function (param) {
......
frameworkModule.controller('appApproveController', ['$rootScope', '$scope', '$timeout', '$q', '$log', '$translate', '$state', '$interval',
'uiGridConstants', 'projectService', 'vatSessionService', 'orgService', 'serviceTypeService', 'userService', 'loginContext', 'enums',
'citSessionService', 'region', 'SweetAlert', 'productService', 'localStorageService', 'assetsManageSessionService','serviceLogService',
'ackUibModal', 'Upload', 'apiInterceptor',
'ackUibModal', 'Upload', 'apiInterceptor','vatApproveService',
function ($rootScope, $scope, $timeout, $q, $log, $translate, $state, $interval, uiGridConstants, projectService, vatSessionService,
orgService, serviceTypeService, userService, loginContext, enums, citSessionService, region, SweetAlert, productService,
localStorageService, assetsManageSessionService, serviceLogService, ackUibModal, Upload, apiInterceptor) {
localStorageService, assetsManageSessionService, serviceLogService, ackUibModal, Upload, apiInterceptor, vatApproveService) {
'use strict';
$log.debug('appApproveController.ctor()...');
var uploadUrl = apiInterceptor.webApiHostUrl + '/product/NewFile';
......@@ -628,6 +628,20 @@
return typeof floatVal == 'undefined' ? Math.round(randVal) : randVal.toFixed(floatVal);
}
var loadApprovalFromDB = function (pageIndex) {
vatApproveService.approvalTasks().success(function (data) {
if (data) {
var index = 1;
data.forEach(function (v) {
v.index = index++;
v.amount = PWC.round(v.amount, 2);
v.taxAmount = PWC.round(v.taxAmount, 2);
});
$scope.gridOptions.data = data;
}
});
};
(function initialize() {
initDatePickers();
......@@ -643,13 +657,29 @@
});
vatSessionService.userPermission = userPermission;
orgDisplay.main();
loadApprovalFromDB();
});
$scope.$watch('productFileName', function (newValue, oldValue) {
if (newValue && newValue !== oldValue) {
doUploadProductFileName(newValue);
}
});
$scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.rowHeight,
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
enableSorting: false,
enableColumnMenus: false,
columnDefs: [
{ name: '序号', width: '7%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
{ name: '报表名称', width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.name}}<span></div>' },
{ name: '期间', width: '7%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}<span></div>' },
{ name: '提审人', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fpdm}}">{{row.entity.fpdm}}</span></div>' },
{ name: '审批人', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>' },
{ name: '审批状态', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' },
{ name: '审批意见', width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)}}</span></div>' },
{ name: '创建时间', width: '7.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)}}</span></div>' },
{ name: '审批时间', width: '7.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)}}</span></div>' },
{ name: '操作', width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span>审批</span>|<span>下载</span>|<span>流程图</span></div>' }
]
};
})();
}
]);
<div id="app-approve" class="app-overview ">
<div class="app-overview-left">
<div class="group-operate-icon" style="margin-bottom: 5px;">
<span class="operate-icon left-first" title="机构" ng-click="dimensionOrgShow('','orgName')"><i class="fa fa-sitemap fa-2x orgName" aria-hidden="true"></i></span><span class="operate-icon" title="事业部" ng-click="dimensionOrgShow('businessUnitID','businessUnitName')">
<span class="operate-icon left-first" title="机构" ng-click="dimensionOrgShow('','orgName')"><i
class="fa fa-sitemap fa-2x orgName" aria-hidden="true"></i></span><span class="operate-icon"
title="事业部"
ng-click="dimensionOrgShow('businessUnitID','businessUnitName')">
<i class="fa fa-bank fa-2x businessUnitName" aria-hidden="true"></i>
</span><span class="operate-icon" title="区域" ng-click="dimensionOrgShow('areaID','areaName')">
<i class="material-icons areaName">place</i>
......@@ -23,24 +26,30 @@
<div class="app-overview-right">
<div class="row" style="margin:20px; display:none;">
<div class="col-lg-2 col-md-2 col-sm-2">
<span class="textLabelHeader" translate="TotalProjectRecords"></span> <span class="textLabelHeader">{{queryResults.length}}</span> <span translate="NumberOfTaskes"></span>
<span class="textLabelHeader" translate="TotalProjectRecords"></span> <span class="textLabelHeader">{{queryResults.length}}</span>
<span translate="NumberOfTaskes"></span>
</div>
<div class="col-lg-8 col-md-8 col-sm-8">
<span translate="CurrentlyInProgress" class=""> </span> <i class="badge progressNumberBadges marginRight10">3</i>
<span translate="AlreadyCompleted" class=""> </span> <i class="badge progressNumberBadges marginRight10">4</i>
<span translate="NotYetStart" class=""> </span> <i class="badge progressNumberBadges marginRight10 ">5</i>
<span translate="CurrentlyInProgress" class=""> </span> <i
class="badge progressNumberBadges marginRight10">3</i>
<span translate="AlreadyCompleted" class=""> </span> <i
class="badge progressNumberBadges marginRight10">4</i>
<span translate="NotYetStart" class=""> </span> <i
class="badge progressNumberBadges marginRight10 ">5</i>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<div id="app-workflow-action-panel" class="pull-right">
<i class="fa fa-calendar red-color" style="font-size:20px;"></i>
<input type="text" class="datepicker" style="border-width: 0; outline: none; width: 100px; cursor: pointer; z-index: 1000" readonly="readonly" />
<input type="text" class="datepicker"
style="border-width: 0; outline: none; width: 100px; cursor: pointer; z-index: 1000"
readonly="readonly"/>
<i class="fa fa-caret-down red-color" style="font-size:10px;"></i>
</div>
</div>
</div>
<div style="display:none;">
<span translate="AssignmentsList" class="textLabelHeader"></span>
<hr />
<hr/>
</div>
<div class="new-right-header">
<div class="head-row">
......@@ -48,77 +57,43 @@
</div>
<div class="project-staus">
<span style="padding-right: 10px;" class="result-style">{{projectMsg}}</span>
<span style="padding-right:10px;">提审中</span><span class="num-style">{{ongoingNum}}</span>
<span style="padding-right:10px;padding-left:20px;">通过</span><span class="num-style">{{notBeginNum}}</span>
<span style="padding-right:10px;padding-left:20px;">未通过</span><span class="num-style">{{completedNum}}</span>
<span style="padding-right:10px;padding-left:20px;">作废</span><span class="num-style">{{completedNum}}</span>
<span style="padding-right:10px;">提审中</span><span class="num-style">{{ongoingNum}}</span>
<span style="padding-right:10px;padding-left:20px;">通过</span><span
class="num-style">{{notBeginNum}}</span>
<span style="padding-right:10px;padding-left:20px;">未通过</span><span
class="num-style">{{completedNum}}</span>
<span style="padding-right:10px;padding-left:20px;">作废</span><span
class="num-style">{{completedNum}}</span>
</div>
<div class="task-list">
<span class="taskMsg" ng-show="serviceTypeId !=='12'">审批列表</span>
<span class="taskMsg" ng-show="serviceTypeId !=='12'">审批列表</span>
</div>
</div>
<div class="new-right-body">
<div class="right-header">
<div class="col-lg-3 col-md-3" style="padding-left:20px;">
<div class="search-container">
<input id="txtSmartSearch" class="search-input" type="text" value="" placeholder="提审人" ng-model="searchKeyword" ng-change="smartSearch(false)" /><span ng-class="(searchKeyword!==undefined && searchKeyword.length>0)? 'glyphicon glyphicon-remove input-group-addon search-icon':'glyphicon glyphicon-search input-group-addon search-icon'" search ng-click="smartSearch(true)"></span>
<input id="txtSmartSearch" class="search-input" type="text" value="" placeholder="提审人"
ng-model="searchKeyword" ng-change="smartSearch(false)"/><span
ng-class="(searchKeyword!==undefined && searchKeyword.length>0)? 'glyphicon glyphicon-remove input-group-addon search-icon':'glyphicon glyphicon-search input-group-addon search-icon'"
search ng-click="smartSearch(true)"></span>
</div>
</div>
<div class="overview-picker">
<input type="text" id="overviewDatepicker" class="datepicker vat-subheader" style="width:120px;" readonly="readonly" />
<input type="text" id="overviewDatepicker" class="datepicker vat-subheader" style="width:120px;"
readonly="readonly"/>
<i class="fa fa-calendar vat-subheader red-color" style="width:20px;"></i>
</div>
<span class="clear"></span>
</div>
<div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" ui-grid-expandable ui-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="app-overview-right">-->
<!--<div class="vat-preview-input-invoice" id="mainPreviewDiv">-->
<!--<div class="top-area-wrapper">-->
<!--<button class="filter-button"-->
<!--atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"-->
<!--popover-container="body" popover-auto-hide="true" data-overwrite="true"-->
<!--use-optimized-placement-algorithm="true"-->
<!--data-placement="bottom"-->
<!--data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">-->
<!--<i class="fa fa-filter" aria-hidden="true"></i>-->
<!--</button>-->
<!--<span translate="IncomeInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>:-->
<!--<input type="text" class="form-control input-width-middle" style="position: relative; top: -33px; left: 160px;" id="input-invoice-period-picker" />-->
<!--<span ng-click="downloadInputInvoice()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>-->
<!--</div>-->
<!--<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">-->
<!--<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:-->
<!--<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow">-->
<!--<span title="{{criteria.fullName}}">-->
<!--{{criteria.name}}-->
<!--</span>-->
<!--<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>-->
<!--</span>-->
<!--<span ng-if="criteriaList.length>6"><br /></span>-->
<!--<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span>-->
<!--<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow">-->
<!--<span title="{{criteria.fullName}}">-->
<!--{{criteria.name}}-->
<!--</span>-->
<!--<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>-->
<!--</span>-->
<!--</div>-->
<!--<div id="mainAreaDiv" class="main-area">-->
<!--<div class="inputInvoiceGrid" ui-grid-expandable ui-grid="gridOptions">-->
<!--<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span></div>-->
<!--</div>-->
<!--<div class="pagination-container">-->
<!--<span>本页{{curPageItemCount}}条记录,共{{queryIncomeInvoiceItemResult.pageInfo.totalCount}}条记录</span>-->
<!--<div id="totalInvoicePage" class="common-pagination" style="display:none;">-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
\ 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