Commit ef3d5130 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

Dev oracle sherlock

See merge request root/atms!186
parents fd4a320a b5c11386
......@@ -22,6 +22,7 @@ import pwc.taxtech.atms.vat.service.impl.InputInvoiceDataImportServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.*;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
......@@ -47,11 +48,14 @@ public class InputInvoiceImportController {
public void downloadInvoiceQueryData(@RequestBody InputInvoicePreviewQueryParam paras, HttpServletResponse response,
@RequestHeader("from") String projectId) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + UUID.randomUUID() + ".xlsx");
response.setHeader("x-file-name", UUID.randomUUID() + ".xlsx");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
response.setCharacterEncoding("UTF-8");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = getDownloadFilePath(paras, os, projectId);
......@@ -97,7 +101,7 @@ public class InputInvoiceImportController {
List<InputInvoiceExportDto> inputInvoiceExportDtos = Lists.newArrayList();
for(InputInvoice inputInvoice : list){
InputInvoiceExportDto inputInvoiceExportDto = new InputInvoiceExportDto();
inputInvoiceExportDto.setAmount(inputInvoice.getHJJE());
inputInvoiceExportDto.setAmount(inputInvoice.getHJJE() != null ? new BigDecimal(inputInvoice.getHJJE().replace(",","")): BigDecimal.ZERO);
inputInvoiceExportDto.setCertificationDate(inputInvoice.getRZSJ());
inputInvoiceExportDto.setInvoiceCode(inputInvoice.getFPDM());
inputInvoiceExportDto.setInvoiceDate(inputInvoice.getKPRQ());
......@@ -105,7 +109,7 @@ public class InputInvoiceImportController {
inputInvoiceExportDto.setInvoiceTypeName(getFplx(inputInvoice.getFPLX()));
inputInvoiceExportDto.setPeriodId(Integer.parseInt(inputInvoice.getRZSJ().substring(5, 7)));
inputInvoiceExportDto.setSellerTaxNumber(inputInvoice.getXFSH());
inputInvoiceExportDto.setTaxAmount(inputInvoice.getHJSE());
inputInvoiceExportDto.setTaxAmount(inputInvoice.getHJSE() != null ? new BigDecimal(inputInvoice.getHJJE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceExportDtos.add(inputInvoiceExportDto);
}
Map<String, String> header = new HashMap<>();
......@@ -119,6 +123,12 @@ public class InputInvoiceImportController {
header.put("TaxAmount", "税额");
header.put("CertificationDate", "认证日期");
InputInvoiceExportDto inputInvoiceExportDto = new InputInvoiceExportDto();
inputInvoiceExportDto.setTaxAmount(inputInvoiceExportDtos.stream().map(InputInvoiceExportDto::getTaxAmount).reduce(BigDecimal::add).get());
inputInvoiceExportDto.setAmount(inputInvoiceExportDtos.stream().map(InputInvoiceExportDto::getAmount).reduce(BigDecimal::add).get());
InputInvoiceExportDto black = new InputInvoiceExportDto();
inputInvoiceExportDtos.add(black);
inputInvoiceExportDtos.add(inputInvoiceExportDto);
ExcelSheet excelSheetA = new ExcelSheet<>();
excelSheetA.setHeaders(header);
excelSheetA.setDataset(inputInvoiceExportDtos);
......@@ -143,16 +153,26 @@ public class InputInvoiceImportController {
List<InputInvoiceDetail> inputInvoiceDetailList = inputInvoiceDataImportService.getInputInvoiceItemList(item.getID());
for(InputInvoiceDetail inputInvoiceDetail : inputInvoiceDetailList){
InputInvoiceDetailExportDto inputInvoiceDetailExportDto = new InputInvoiceDetailExportDto();
inputInvoiceDetailExportDto.setAmount(inputInvoiceDetail.getJE());
inputInvoiceDetailExportDto.setAmount(inputInvoiceDetail.getJE() != null ? new BigDecimal(inputInvoiceDetail.getJE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setInvoiceCode(inputInvoiceDetail.getFPDM());
inputInvoiceDetailExportDto.setInvoiceNumber(inputInvoiceDetail.getFPHM());
inputInvoiceDetailExportDto.setPeriodId(Integer.parseInt(item.getRZSJ().substring(5, 7)));
inputInvoiceDetailExportDto.setProductionName(inputInvoiceDetail.getSPMC());
inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceDetail.getSE());
inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceDetail.getSE() != null ? new BigDecimal(inputInvoiceDetail.getSE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setTaxRate(inputInvoiceDetail.getSLV());
inputInvoiceItemList.add(inputInvoiceDetailExportDto);
}
}
InputInvoiceDetailExportDto inputInvoiceDetailExportDto = new InputInvoiceDetailExportDto();
inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceItemList.stream().map(InputInvoiceDetailExportDto::getTaxAmount).reduce(BigDecimal::add).get());
inputInvoiceDetailExportDto.setAmount(inputInvoiceItemList.stream().map(InputInvoiceDetailExportDto::getAmount).reduce(BigDecimal::add).get());
InputInvoiceDetailExportDto detailBlack = new InputInvoiceDetailExportDto();
inputInvoiceItemList.add(detailBlack);
inputInvoiceItemList.add(inputInvoiceDetailExportDto);
excelSheetB.setDataset(inputInvoiceItemList);
List<ExcelSheet<InputVATInvoiceBaseDto>> sheets = new ArrayList<>();
sheets.add(excelSheetA);
......
......@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
......@@ -24,6 +25,7 @@ import pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.*;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
......@@ -53,11 +55,14 @@ public class OutputInvoiceController {
@RequestMapping(value = "getExportOutputInvoiceList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadInvoiceQueryData(@RequestBody QueryOutputDto paras, @RequestHeader("from") String projectId, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.setHeader("x-file-name", UUID.randomUUID() + ".xlsx");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = getDownloadFilePath(paras, projectId, os);
......@@ -86,6 +91,13 @@ public class OutputInvoiceController {
if (list.size() == 0) {
return 0;
}
OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new OutputVATInvoiceInfoDto();
outputVATInvoiceInfoDto.setTaxAmount(list.stream().map(OutputVATInvoiceInfoDto::getTaxAmount).reduce(BigDecimal::add).get());
outputVATInvoiceInfoDto.setAmount(list.stream().map(OutputVATInvoiceInfoDto::getAmount).reduce(BigDecimal::add).get());
OutputVATInvoiceInfoDto black = new OutputVATInvoiceInfoDto();
list.add(black);
list.add(outputVATInvoiceInfoDto);
List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>();
list.stream().forEach(x -> {
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d =
......@@ -114,6 +126,7 @@ public class OutputInvoiceController {
header.put("TaxRate", "税率");
header.put("TaxAmount", "税额");
header.put("TaxClassCode", "税收分类编码");
ExcelUtil.exportExcel(header, list2, outputStream);
return list.size();
}
......
......@@ -33,6 +33,11 @@ public class ReportController {
return reportService.getReportTemplate(projectId, EnumServiceType.getEnumByCode(serviceType), period);
}
@RequestMapping(value = "filterTemplate/{projectId}/{serviceType}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<List<ReportDto>> getFilterTemplate(@PathVariable String projectId, @PathVariable int serviceType, @PathVariable Integer period) {
return reportService.getFilterReportTemplate(projectId, EnumServiceType.getEnumByCode(serviceType), period);
}
@RequestMapping(value = "generateByTotal/{projectId}/{mergeManual}/{period}", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity generateAllData(@PathVariable String projectId, @PathVariable Integer period,
......
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.io.Serializable;
import java.math.BigDecimal;
public class InputInvoiceDetailExportDto implements Serializable {
......@@ -16,10 +17,10 @@ public class InputInvoiceDetailExportDto implements Serializable {
private String invoiceNumber;
@ExcelCell(index=2)
private String amount;
private BigDecimal amount;
@ExcelCell(index=1)
private String taxAmount;
private BigDecimal taxAmount;
@ExcelCell(index=3)
private String taxRate;
......@@ -51,19 +52,19 @@ public class InputInvoiceDetailExportDto implements Serializable {
this.invoiceNumber = invoiceNumber;
}
public String getAmount() {
public BigDecimal getAmount() {
return amount;
}
public void setAmount(String amount) {
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getTaxAmount() {
public BigDecimal getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(String taxAmount) {
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
......
......@@ -3,11 +3,12 @@ package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.io.Serializable;
import java.math.BigDecimal;
public class InputInvoiceExportDto implements Serializable {
@ExcelCell(index=6)
private int periodId;
private Integer periodId;
@ExcelCell(index=7)
private String invoiceDate;
......@@ -25,19 +26,19 @@ public class InputInvoiceExportDto implements Serializable {
private String invoiceTypeName;
@ExcelCell(index=4)
private String amount;
private BigDecimal amount;
@ExcelCell(index=1)
private String taxAmount;
private BigDecimal taxAmount;
@ExcelCell(index=2)
private String certificationDate;
public int getPeriodId() {
public Integer getPeriodId() {
return periodId;
}
public void setPeriodId(int periodId) {
public void setPeriodId(Integer periodId) {
this.periodId = periodId;
}
......@@ -81,19 +82,19 @@ public class InputInvoiceExportDto implements Serializable {
this.invoiceTypeName = invoiceTypeName;
}
public String getAmount() {
public BigDecimal getAmount() {
return amount;
}
public void setAmount(String amount) {
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getTaxAmount() {
public BigDecimal getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(String taxAmount) {
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
......
......@@ -290,7 +290,8 @@ public class CellTemplateServiceImpl extends AbstractService {
}
if (nameList.isEmpty()) {
return formula;
// return formula;
return "报表公式";
} else {
return String.join("+", nameList);
}
......
......@@ -337,6 +337,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
Workbook workbook = WorkbookFactory.create(inputStream);
List<Template> filePathList = Lists.newArrayList();
Date now = new Date();
TemplateExample t = new TemplateExample();
t.createCriteria().andTemplateGroupIdEqualTo(templateGroupId);
int length = templateMapper.selectByExample(t).size();
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
String sheetName = workbook.getSheetName(i);
String newName = sheetName + CommonUtils.getUUID() + POIUtil.getFileSuffix(fileName).get();
......@@ -346,7 +349,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
throw new ServiceException(ErrorMessage.SystemError);
}
ByteArrayOutputStream bos = new ByteArrayOutputStream();
optional.get().write(bos);
Workbook wtemp = optional.get();
Sheet temp = wtemp.getSheetAt(0);
for(int j = temp.getFirstRowNum(); j < temp.getLastRowNum(); j ++){
Row row = temp.getRow(j);
for(int k = row.getFirstCellNum(); k < row.getLastCellNum(); k++){
Cell cell = row.getCell(k);
if(!cell.getCellStyle().getLocked() && StringUtils.isNotBlank(cell.getStringCellValue())
&& cell.getStringCellValue().equalsIgnoreCase("${KeyIn}")){
cell.setCellValue("");
}
}
}
wtemp.write(bos);
String tmpPath = httpFileService.uploadTemplate(newName, file);
String[] arr = sheetName.split("_");
String name = arr.length >= 2 ? arr[1] : arr[0];
......@@ -357,7 +372,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
template.setIsActiveAssociation(true);
template.setIsSystemType(false);
template.setName(name);
template.setOrderIndex(i + 1);
template.setOrderIndex(i + length);
template.setPath(tmpPath);
template.setReportType(StringUtils.isBlank(reportType) ? null : Integer.valueOf(reportType));
template.setTemplateGroupId(templateGroupId);
......
......@@ -15,7 +15,9 @@ import pwc.taxtech.atms.dpo.TemplateUniqDto;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.vatdto.TemplateByGroupDto;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.dao.PeriodTemplateMapper;
import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import pwc.taxtech.atms.vat.entity.PeriodTemplateExample;
import java.util.*;
......@@ -27,7 +29,7 @@ import static java.util.stream.Collectors.groupingBy;
public class TemplateServiceImpl extends AbstractService {
@Autowired
private PeriodTemplateMapper periodTemplateMapper;
private PeriodReportMapper periodReportMapper;
public void addExistTemplate(TemplateAddExistDto templateAddExistDto){
TemplateExample t = new TemplateExample();
......@@ -308,10 +310,10 @@ public class TemplateServiceImpl extends AbstractService {
taxReturnGroup.setName(TemplateGroupType.TaxReturn.name());
List<TemplateDto> templateDtos2 = new ArrayList<>();
templates.stream().filter(x -> {
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andTemplateGroupIdEqualTo(templateGroupId)
.andTemplateIdEqualTo(x.getId());
return x.getTemplateGroupId().equals(templateGroupId) && periodTemplateMapper.selectByExample(periodTemplateExample).size() > 0;
PeriodReportExample periodReportExample = new PeriodReportExample();
periodReportExample.createCriteria().andTemplateIdEqualTo(x.getId())
.andProjectIdEqualTo(projectId);
return x.getTemplateGroupId().equals(templateGroupId) && periodReportMapper.selectByExample(periodReportExample).size() > 0;
}).collect(Collectors.toList()).forEach(a -> {
TemplateDto templateDto = new TemplateDto();
CommonUtils.copyProperties(a, templateDto);
......
......@@ -7,6 +7,7 @@ import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.constant.enums.EnumValidationType;
......@@ -67,12 +68,24 @@ public class InputInvoiceDataImportServiceImpl {
invoices.stream().forEach(x -> {
x.setHJJE(df.format(new BigDecimal(x.getHJJE())));
x.setHJSE(df.format(new BigDecimal(x.getHJSE())));
x.setRZJG(convertRzjg(x.getRZJG()));
}
);
PageInfo<InputInvoice> pageInfo = new PageInfo<>(invoices);
return pageInfo;
}
private String convertRzjg(String rzjg){
if (StringUtils.isEmpty(rzjg)) return "";
switch (rzjg){
case "0":
return "认证成功";
case "1":
return "认证失败";
default:
return "未认证";
}
}
public List<InputVATInvoiceDto> getInputInvoiceList(Integer period) {
......
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.service.impl;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Workbook;
......@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
......@@ -107,6 +109,25 @@ public class ReportServiceImpl {
@Autowired
private PeriodApproveMapper periodApprovalMapper;
public OperationResultDto<List<ReportDto>> getFilterReportTemplate(String projectId, EnumServiceType serviceType, Integer periodParam) {
OperationResultDto<List<ReportDto>> result = new OperationResultDto<>();
CommonUtils.copyProperties(getReportTemplate(projectId,serviceType,periodParam),result);
if(!result.getResult() || CollectionUtils.isEmpty(result.getData())) return result;
int period = periodParam != null ? periodParam : 0;
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId)
.andPeriodEqualTo(period);
List<PeriodTemplate> periodTemplateList = periodTemplateMapper.selectByExample(periodTemplateExample);
List<String> ids = Lists.newArrayList();
periodTemplateList.stream().forEach(x -> ids.add(x.getTemplateId() + ""));
List<ReportDto> reportDtos = result.getData().stream().filter(x -> {
return ids.contains(x.getTemplateId());
}).collect(Collectors.toList());
result.setData(reportDtos);
return result;
}
public OperationResultDto<List<ReportDto>> getReportTemplate(String projectId, EnumServiceType serviceType, Integer periodParam) {
int period = periodParam != null ? periodParam : 0;
OperationResultDto<List<ReportDto>> operationResult = new OperationResultDto<>();
......@@ -159,7 +180,10 @@ public class ReportServiceImpl {
map.put("projectId", projectId);
map.put("templateGroupID", templateGroupId);
List<ReportDto> reportDtos = templateMapper.getTemplateLeftJoinReport(map);
if (reportDtos.isEmpty()) {
operationResult.setResultMsg("No Template");
return operationResult;
......
......@@ -98,7 +98,7 @@
</where>
</select>
<resultMap id="reportDto" type="pwc.taxtech.atms.dto.vatdto.ReportDto">
<resultMap id="reportDto" type="pwc.taxtech.atms.dpo.ReportDto">
<id column="ID" jdbcType="VARCHAR" property="id"/>
<result column="PERIOD" jdbcType="INTEGER" property="period"/>
<result column="TEMPLATE_ID" jdbcType="INTEGER" property="templateId"/>
......
......@@ -15,7 +15,7 @@
headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
var filename = decodeURI(headers['x-file-name']) || defaultFileName;
var filename = decodeURI(headers['x-file-name']) + defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
var contentType = headers['content-type'] || octetStreamMime;
......
......@@ -76,6 +76,13 @@
return $http.get('/Report/template/' + projectId + '/' + serviceType + '/' + period, apiConfig.createVat());
},
getFilterTemplate: function (projectId, serviceType, period) {
if (!_.isNumber(period)) {
period = 0;
}
return $http.get('/Report/filterTemplate/' + projectId + '/' + serviceType + '/' + period, apiConfig.createVat());
},
getCellVoucher: function (cellDataID) {
return $http.get('/Report/cellVoucher/' + cellDataID, apiConfig.createVat());
},
......
......@@ -529,7 +529,7 @@
SweetAlert.warning("没有数据可以下载");
return;
}
vatExportService.exportToExcel(data, status, headers, '进项发票信息.xlsx');
vatExportService.exportToExcel(data, status, headers, '进项发票信息.xls');
});
};
......@@ -572,16 +572,16 @@
enableColumnMenus: false,
columnDefs: [
{ name: $translate.instant('ImportErrorPopUpNoCol'), width: '5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
{ name: $translate.instant('InvoiceQJ'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>' },
// { name: $translate.instant('InvoiceQJ'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>' },
{ name: $translate.instant('InvoiceKPRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}<span></div>' },
{ name: $translate.instant('InvoiceFPDM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fpdm}}">{{row.entity.fpdm}}</span></div>' },
{ name: $translate.instant('InvoiceFPHM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>' },
{ name: $translate.instant('InvoiceGHFSH'), width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' },
{ name: $translate.instant('InvoiceFPLX'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">增值税专票</span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass: 'right', width: '8%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass: 'right', width: '8%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>' },
{ name: $translate.instant('InvoiceRZRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>' },
{ name: $translate.instant('InvoiceRZJG'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.certificationResult}}</span></div>' }
{ name: $translate.instant('InvoiceGHFSH'), width: '14%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' },
{ name: $translate.instant('InvoiceFPLX'), width: '9%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">增值税专票</span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass: 'right', width: '9%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass: 'right', width: '9%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>' },
{ name: $translate.instant('InvoiceRZRQ'), width: '12.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>' },
{ name: $translate.instant('InvoiceRZJG'), width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzjg}}</span></div>' }
],
onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi;
......
<div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div class="top-area-wrapper">
<div class="top-area-wrapper" style="margin-top: 10px">
<!--<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
......@@ -8,10 +8,8 @@
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>-->
<div></div><div></div>
<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" />
<input type="text" class="form-control input-width-middle" style="position: relative; top: -30px; left: 130px;" 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>
......
......@@ -465,7 +465,7 @@
SweetAlert.warning("没有数据可以下载");
return;
}
vatExportService.exportToExcel(data, status, headers, '销项发票信息.xlsx');
vatExportService.exportToExcel(data, status, headers, '销项发票信息.xls');
}).error(function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
});
......@@ -480,10 +480,10 @@
name: $translate.instant('ImportErrorPopUpNoCol'), width: '5%',
cellTemplate: '<div class="ui-grid-cell-contents" ><span>{{row.entity.index}}<span></div>'
},
{
name: $translate.instant('PeriodId'), width: '5%',
cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.periodID}}"><span>{{row.entity.periodID}}<span></div>'
},
// {
// name: $translate.instant('PeriodId'), width: '5%',
// cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.periodID}}"><span>{{row.entity.periodID}}<span></div>'
// },
{
name: $translate.instant('InvoiceDate'), width: '10%',
cellTemplate: '<div class="ui-grid-cell-contents" ><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}</span></div>'
......@@ -501,11 +501,11 @@
cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.fphm}}"><span>{{row.entity.fphm}}</span></div>'
},
{
name: $translate.instant('BuyerName'), width: '15%',
name: $translate.instant('BuyerName'), width: '18%',
cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.gfmc}}"><span>{{row.entity.gfmc}}</span></div>'
},
{
name: $translate.instant('BuyerTaxNumber'), width: '15%',
name: $translate.instant('BuyerTaxNumber'), width: '18%',
cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.gfsh}}"><span>{{row.entity.gfsh}}</span></div>'
},
//{
......
......@@ -19,7 +19,7 @@
//projectID = '0cf0945f-d41c-4df3-8235-ae693d5e724d';
$q.all([
templateGroupService.getGroupTemplateByGroupID(48372654336679936, projectID),
vatReportService.getTemplate(vatSessionService.project.id, constant.serviceType.VAT, vatSessionService.month)
vatReportService.getFilterTemplate(vatSessionService.project.id, constant.serviceType.VAT, vatSessionService.month)
]).then(function (result) {
if (!_.isEmpty(result[0]) && !_.isEmpty(result[0].data) && !_.isEmpty(result[0].data.data)
&& !_.isEmpty(result[1]) && !_.isEmpty(result[1].data) && !_.isEmpty(result[1].data.data)) {
......
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