Commit d8665eba authored by kevin's avatar kevin

#

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