1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
invoiceModule.directive('outputReconciliationConfiguration', ['$log',
function ($log) {
return {
restrict: 'E',
templateUrl: '/app/vat/output-invoice/outputReconciliationConfiguration/output-reconciliation-configuration.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'outputReconciliationConfigurationController',
link: function (scope, element, attr) {
//计算datagrid的高度
scope.setInvoiceGridHeight = function () {
var pageHeight = $(document).height();
//var smallTitleHeight = $('#litterTitle').outerHeight();
var topTitleHeight = $('.menu-header').outerHeight();
//var pageSearchHeight = $('.query-panel').outerHeight();
//var pageFastSearchHeight = $('.action-row').outerHeight();
////var dataGridLineHeight = $('.grid-container .prompt-line').outerHeight();
//var dataGridPagerHeight = $('.page-footer').outerHeight();
//if (dataGridPagerHeight === 0) dataGridPagerHeight = 60;
//var subHeight = pageHeight - topTitleHeight - pageSearchHeight - pageFastSearchHeight - dataGridPagerHeight;
//scope.height = subHeight - 50;
var containerHeight = $('.content-container').outerHeight();
if (containerHeight === 0) dataGridPagerHeight = 660;
scope.gridTable = containerHeight - 30;
try {
$('#reconciliation-grid').dxDataGrid('instance').repaint();
}
catch (e) {
console.log(e);
}
};
$(window).on('resize', function () {
scope.setInvoiceGridHeight();
});
}
}
}]);