Commit d8665eba authored by kevin's avatar kevin

#

parent 839e2e84
...@@ -1113,6 +1113,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -1113,6 +1113,7 @@ public class ReportServiceImpl extends BaseService {
cellData.getData().setEbitData(ebitDataDto1); cellData.getData().setEbitData(ebitDataDto1);
} else { } else {
reportDataDto.setEbitData(ebitDataDto1); reportDataDto.setEbitData(ebitDataDto1);
cellData.setData(reportDataDto);
return cellData; return cellData;
} }
} else if (operationResultDto1.getData().getEbitData() == null && operationResultDto1.getData().getCellData() != null) { } else if (operationResultDto1.getData().getEbitData() == null && operationResultDto1.getData().getCellData() != null) {
...@@ -1127,6 +1128,8 @@ public class ReportServiceImpl extends BaseService { ...@@ -1127,6 +1128,8 @@ public class ReportServiceImpl extends BaseService {
public OperationResultDto loadEbitDataFirst(String orgId, Integer period, OperationResultDto operationResultDto) { public OperationResultDto loadEbitDataFirst(String orgId, Integer period, OperationResultDto operationResultDto) {
EbitDataDto ebitDataDto = new EbitDataDto(); EbitDataDto ebitDataDto = new EbitDataDto();
boolean bool = false;
boolean boo2 = false;
EbitCellDataExample example = new EbitCellDataExample(); EbitCellDataExample example = new EbitCellDataExample();
EbitCellDataExample.Criteria criteria = example.createCriteria(); EbitCellDataExample.Criteria criteria = example.createCriteria();
criteria.andOrganizationIdEqualTo(orgId); criteria.andOrganizationIdEqualTo(orgId);
...@@ -1134,10 +1137,6 @@ public class ReportServiceImpl extends BaseService { ...@@ -1134,10 +1137,6 @@ public class ReportServiceImpl extends BaseService {
criteria.andPeriodEqualTo(period); criteria.andPeriodEqualTo(period);
List<EbitCellData> ebitCellData = ebitCellDataMapper.selectByExample(example); List<EbitCellData> ebitCellData = ebitCellDataMapper.selectByExample(example);
ArrayList<CellDataDto> listCelldatas = Lists.newArrayList(); ArrayList<CellDataDto> listCelldatas = Lists.newArrayList();
if (ebitCellData.size() == 0)
return null;
boolean bool = false;
boolean boo2 = false;
for (EbitCellData ebitCellData1 : ebitCellData) { for (EbitCellData ebitCellData1 : ebitCellData) {
bool = true; bool = true;
switch (ebitCellData1.getRow()) { switch (ebitCellData1.getRow()) {
......
...@@ -76,8 +76,15 @@ ...@@ -76,8 +76,15 @@
scope.$watchGroup(['relation.period', 'relation.orgId', 'relation.data'], function(newValue, oldValue){ scope.$watchGroup(['relation.period', 'relation.orgId', 'relation.data'], function(newValue, oldValue){
if(scope.relation.orgId != null && scope.relation.period != null && scope.spread != undefined){ if(scope.relation.orgId != null && scope.relation.period != null && scope.spread != undefined){
setTimeout(function(){
if(scope.relation.broadcast&& scope.relation.broadcast == true ){
loadSheet(scope.templateId, false)
}else{
loadSheet(scope.templateId, true) loadSheet(scope.templateId, true)
} }
}, 200);
}
}); });
scope.$watch('relation.broadcast', function(newValue, oldValue){ scope.$watch('relation.broadcast', function(newValue, oldValue){
if(scope.relation.orgId != null && scope.relation.period != null && scope.spread != undefined){ if(scope.relation.orgId != null && scope.relation.period != null && scope.spread != undefined){
...@@ -197,8 +204,13 @@ ...@@ -197,8 +204,13 @@
for (var row = 0; row < sheet.getRowCount(); row++) { for (var row = 0; row < sheet.getRowCount(); row++) {
for (var column = 0; column < sheet.getColumnCount(); column++) { for (var column = 0; column < sheet.getColumnCount(); column++) {
try { try {
if((row == 39 && col ==1) || (row == 41 && col ==1) ){
///设置指定单元格不锁定
}else{
sheet.getCell(row, column).locked(true); sheet.getCell(row, column).locked(true);
} }
}
catch (e) { catch (e) {
} }
} }
...@@ -516,30 +528,27 @@ ...@@ -516,30 +528,27 @@
//加载Ebit数据 //加载Ebit数据
var loadEbitCell = function(sheet){ var loadEbitCell = function(sheet){
for( var r = 37; r<= 43; r++ ){ for( var r = 37; r<= 43; r++ ){
for(var c = 1; c<=3; c++){ sheet.setFormatter(r, 1, '# ??/??');//设置格式
if(c == 3){
if(r == 37){ if(r == 37){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.ebitSubtraction)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.ebitSubtraction));
} }
if(r == 38){ if(r == 38){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.specialConsiderations)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.specialConsiderations));
} }
if(r == 39){ if(r == 39){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.specialFactors)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.specialFactors));
} }
if(r == 40){ if(r == 40){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.ebitRate)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.ebitRate));
} }
if(r == 41){ if(r == 41){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.transactionAmount)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.transactionAmount));
} }
if(r == 42){ if(r == 42){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.sixAddTa)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.sixAddTa));
} }
if(r ==43){ if(r ==43){
sheet.setValue(r, c,PWC.tryParseStringToNum(scope.relation.data.totalAmountTax)); sheet.setValue(r, 1,PWC.tryParseStringToNum(scope.relation.data.totalAmountTax));
}
}
} }
} }
} }
......
...@@ -1100,7 +1100,7 @@ ...@@ -1100,7 +1100,7 @@
}; };
var getReportData = function (cb, period) { var getReportData = function (cb, period) {
vatReportService.getReportEbitData($scope.reportId, $scope.relation.orgId, $scope.relation.period == undefined ? period : $scope.relation.period ).success(function (reportData) { vatReportService.getReportEbitData($scope.reportId, $scope.relation.orgId, period != undefined ? period : ($scope.relation.period == undefined ? period : $scope.relation.period) ).success(function (reportData) {
if (reportData && reportData.data && reportData.data.cellData) { if (reportData && reportData.data && reportData.data.cellData) {
_.each(reportData.data.cellData, function (x) { _.each(reportData.data.cellData, function (x) {
x.value = x.cellValue; x.value = x.cellValue;
...@@ -2904,7 +2904,6 @@ ...@@ -2904,7 +2904,6 @@
//初始化 //初始化
$scope.relation.period = year.toString() + monthRevert(mon); $scope.relation.period = year.toString() + monthRevert(mon);
loadCellData($scope.relation.period, $scope.relation.orgId, function(){ loadCellData($scope.relation.period, $scope.relation.orgId, function(){
}); });
}; };
...@@ -3001,7 +3000,7 @@ ...@@ -3001,7 +3000,7 @@
// here is excel IO API // here is excel IO API
excelIo.save(json, function (blob) { excelIo.save(json, function (blob) {
saveAs(blob, fileName); saveAs(blob, $scope.relation.orgName != undefined ? $scope.relation.orgName : "" + $scope.relation.period + fileName);
}, function (e) { }, function (e) {
// process error // process error
console.log(e); console.log(e);
...@@ -3054,15 +3053,14 @@ ...@@ -3054,15 +3053,14 @@
SweetAlert.error(error + "批量导出失败") SweetAlert.error(error + "批量导出失败")
}); });
}; };
$scope.relation._orgId = null;
//机构下拉设置 //机构下拉设置
$scope.selectOrgOptions = { $scope.selectOrgOptions = {
displayExpr: 'name', displayExpr: 'name',
valueExpr: 'id', valueExpr: 'id',
width: '95%',
bindingOptions: { bindingOptions: {
value: 'relation.orgId', value: 'relation._orgId',
dataSource: 'companyList' dataSource: 'companyList'
}, },
height: '30px', height: '30px',
...@@ -3070,12 +3068,24 @@ ...@@ -3070,12 +3068,24 @@
showClearButton: true, showClearButton: true,
searchEnabled: true, searchEnabled: true,
noDataText: $translate.instant('RevenueNoOrgData'), noDataText: $translate.instant('RevenueNoOrgData'),
showSelectionControls: false showSelectionControls: false,
onInitialized : function(){
},
onItemClick: function (e) {
loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgId = e.itemData.id;
$scope.relation.orgName = e.itemData.name;
});
}
}; };
$scope.$watch('relation._orgId', function(n, o){
$scope.relation.orgId = n.pop();
});
var initCompanyList = function () { var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) { vatReportService.getOrgLists().success(function (data) {
if (data) { if (data) {
$scope.companyList = data; $scope.companyList = data.data;
} }
}); });
}; };
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
<div class="col-sm-7" style=" margin-top: 20px;"> <div class="col-sm-7" style=" margin-top: 20px;">
<div class="col-sm-6"> <div class="col-sm-6">
<span class="text-bold" translate="SelectedOrganization" style=" top: -11px; position: relative;">:</span> <span class="text-bold" translate="SelectedOrganization" style=" top: -11px; position: relative;">:</span>
<div id="dx-select-industry" class="tab-content-select industry " style=" display: inline-block;" <!-- <div id="dx-select-industry" class="tab-content-select industry " style=" display: inline-block;"
dx-select-box="dataSourceIndustryList" dx-item-alias="itemObj"> dx-select-box="dataSourceIndustryList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'orgList' }" class="dx-item-content dx-list-item-content" <div data-options="dxTemplate: { name: 'orgList' }" class="dx-item-content dx-list-item-content"
title="{{itemObj.name}}-{{itemObj.name}}"> title="{{itemObj.name}}-{{itemObj.name}}">
{{itemObj.code}}-{{itemObj.name}} {{itemObj.code}}-{{itemObj.name}}
</div> </div>
</div> </div>-->
<div dx-tag-box="selectOrgOptions" style="width: 340px;display: inline-block"></div>
</div> </div>
<div class="col-sm-6" class="dateClass"> <div class="col-sm-6" class="dateClass">
<span class="text-bold" translate="InvoiceQJ">:</span> <span class="text-bold" translate="InvoiceQJ">:</span>
......
...@@ -70,13 +70,13 @@ ...@@ -70,13 +70,13 @@
<div class="col-sm-3 marTop"> <div class="col-sm-3 marTop">
<div dx-tag-box="selectOrgOptions"></div> <div dx-tag-box="selectOrgOptions"></div>
</div> </div>
<label class="col-sm-1 control-label marTop" style="margin-left: -80px;">{{'InvoiceQJ' | translate}}:</label> <label class="col-sm-1 control-label marTop" style="margin-left: 60px;">{{'InvoiceQJ' | translate}}:</label>
<div class="col-sm-1 marTop" style=" width: 11%;"> <div class="col-sm-1 marTop" style=" width: 14%;">
<input type="text" id="periodDatepicker" class="datepicker form-control imp-subheader" style="width:120px; display: inline-block" <input type="text" id="periodDatepicker" class="datepicker form-control imp-subheader" style="width:120px; display: inline-block"
readonly="readonly" ng-model="UploadPeriodTime"/> readonly="readonly" ng-model="UploadPeriodTime"/>
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i> <i class="fa fa-calendar imp-subheader red-color" style="width:20px;position: relative;left: -22px;"></i>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-2">
<button type="button" <button type="button"
ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px;margin-left:30px;margin-top: 10px;"> ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px;margin-left:30px;margin-top: 10px;">
......
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