Commit 91ba9c17 authored by neo.wang's avatar neo.wang

Merge branch 'dev_oracle_neo' into 'dev_oracle'

[dev] fixed approval task page grid item

See merge request root/atms!156
parents 21286999 65fbd567
......@@ -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>' }
]
};
})();
}
]);
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