Commit 2a074497 authored by chase's avatar chase

merge 档案管理

parent ddb37e77
package pwc.taxtech.atms.constant; package pwc.taxtech.atms.constant;
import java.io.File; import java.io.File;
import java.text.DecimalFormat;
import java.util.Locale;
import java.util.UUID; import java.util.UUID;
public final class Constant { public final class Constant {
...@@ -50,6 +48,7 @@ public final class Constant { ...@@ -50,6 +48,7 @@ public final class Constant {
public static final String IMAGE_FORMART_ = "png"; public static final String IMAGE_FORMART_ = "png";
public static final String EMPTY = ""; public static final String EMPTY = "";
public static final String DateTimeFormate = "%d年%d月"; public static final String DateTimeFormate = "%d年%d月";
public static final String DateTimeFormate1 = "%d-%d";
public static final String INPUT_RZJG_SUCCESS="1"; public static final String INPUT_RZJG_SUCCESS="1";
public static final String INPUT_RZJG_FAILED="2"; public static final String INPUT_RZJG_FAILED="2";
......
...@@ -159,7 +159,7 @@ public class TaxDocumentServiceImpl { ...@@ -159,7 +159,7 @@ public class TaxDocumentServiceImpl {
} }
//创建人 creator //创建人 creator
if (StringUtils.isNotBlank(taxDocumentDto.getCreator())) { if (StringUtils.isNotBlank(taxDocumentDto.getCreator())) {
criteria.andCreatorEqualTo(taxDocumentDto.getCreator()); criteria.andCreatorLike("%" + taxDocumentDto.getCreator() + "%");
} }
return example; return example;
} }
......
...@@ -396,6 +396,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -396,6 +396,7 @@ public class ReportServiceImpl extends BaseService {
Long cellTemplateId = distributedIdService.nextId(); Long cellTemplateId = distributedIdService.nextId();
PeriodCellTemplate cellTemplate = new PeriodCellTemplate(); PeriodCellTemplate cellTemplate = new PeriodCellTemplate();
cellTemplate.setPeriod(period); cellTemplate.setPeriod(period);
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
cellTemplate.setProjectId(projectId); cellTemplate.setProjectId(projectId);
cellTemplate.setColumnIndex(c); cellTemplate.setColumnIndex(c);
cellTemplate.setCreateTime(now); cellTemplate.setCreateTime(now);
...@@ -407,9 +408,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -407,9 +408,9 @@ public class ReportServiceImpl extends BaseService {
if (cell.getCellComment() != null) { if (cell.getCellComment() != null) {
cellTemplate.setComment(cell.getCellComment().getString().getString()); cellTemplate.setComment(cell.getCellComment().getString().getString());
} }
cellTemplate.setIsReadOnly(cell.getCellStyle().getLocked() ? 1 : 0); cellTemplate.setIsReadOnly(hasHandDatas.contains(c) ? 0 : 1);
cellTemplateList.add(cellTemplate); cellTemplateList.add(cellTemplate);
if (hasFormulaDatas.contains(c) && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) { if (r>0&&hasFormulaDatas.contains(c) && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) {
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig(); PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
periodCellTemplateConfig.setId(distributedIdService.nextId()); periodCellTemplateConfig.setId(distributedIdService.nextId());
periodCellTemplateConfig.setPeriod(period); periodCellTemplateConfig.setPeriod(period);
...@@ -429,8 +430,8 @@ public class ReportServiceImpl extends BaseService { ...@@ -429,8 +430,8 @@ public class ReportServiceImpl extends BaseService {
fixedAccountCode(periodCellTemplateConfig); fixedAccountCode(periodCellTemplateConfig);
cellTemplateConfigList.add(periodCellTemplateConfig); cellTemplateConfigList.add(periodCellTemplateConfig);
} }
if (hasHandDatas.contains(c)) { if (r>0&&hasHandDatas.contains(c)) {
addManualConfig(template.getId(), cellTemplateId, cell, now, cellTemplateConfigList); addManualConfig(cellTemplate, cell, now, cellTemplateConfigList);
} }
} else { } else {
//查询原来行cell是否有CellTemplate //查询原来行cell是否有CellTemplate
...@@ -513,14 +514,16 @@ public class ReportServiceImpl extends BaseService { ...@@ -513,14 +514,16 @@ public class ReportServiceImpl extends BaseService {
} }
} }
private void addManualConfig(Long templateId, Long cellTemplateId, Cell cell, Date now, List<PeriodCellTemplateConfig> list) { private void addManualConfig(PeriodCellTemplate cellTemplate, Cell cell, Date now, List<PeriodCellTemplateConfig> list) {
PeriodCellTemplateConfig configManual = new PeriodCellTemplateConfig(); PeriodCellTemplateConfig configManual = new PeriodCellTemplateConfig();
configManual.setId(distributedIdService.nextId()); configManual.setId(distributedIdService.nextId());
configManual.setCellTemplateId(cellTemplateId); configManual.setCellTemplateId(cellTemplate.getCellTemplateId());
configManual.setReportTemplateId(templateId); configManual.setReportTemplateId(cellTemplate.getReportTemplateId());
configManual.setPeriod(cellTemplate.getPeriod());
configManual.setProjectId(cellTemplate.getProjectId());
configManual.setDataSourceType(CellDataSourceType.KeyIn.getCode()); configManual.setDataSourceType(CellDataSourceType.KeyIn.getCode());
configManual.setFormula(POIUtil.getCellFormulaString(cell)); configManual.setFormula(POIUtil.getCellFormulaString(cell));
// config.setFormula(cell.getCellFormula()); // configManual.setFormula(cell.getCellFormula());
configManual.setFormulaDataSource("报表数据"); //todo KV相关 configManual.setFormulaDataSource("报表数据"); //todo KV相关
configManual.setUpdateTime(now); configManual.setUpdateTime(now);
// configManual.setUpdateBy(authUserHelper.getCurrentUserId()); // configManual.setUpdateBy(authUserHelper.getCurrentUserId());
...@@ -714,9 +717,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -714,9 +717,9 @@ public class ReportServiceImpl extends BaseService {
for (RevenueConfig config : dataList) { for (RevenueConfig config : dataList) {
Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow); Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow);
row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + rowIndex); row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + rowIndex);
row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue(config.getName()); row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue(config.getName());
row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("PC(\"TimeInterval\",\"\""); row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("PC(\"FilterDate1\",2)");
//判断帐载收入明细 //判断帐载收入明细
if (0 == config.getAccountType()) {//0值 if (0 == config.getAccountType()) {//0值
row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue(0.00); row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue(0.00);
...@@ -732,24 +735,26 @@ public class ReportServiceImpl extends BaseService { ...@@ -732,24 +735,26 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_6.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_6.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_7.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_7.getIndex()).setCellValue("");
if (1 == config.getTaxBase()) {//账载 if (1 == config.getTaxBase()) {//账载
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")"); // row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")");
} else if (2 == config.getTaxBase()) {//开票收入 } else if (2 == config.getTaxBase()) {//开票收入
} else if (3 == config.getTaxBase()) {//手工录入 } else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额 } else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"\",\"\")"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",,)");
} else if (5 == config.getTaxBase()) {//贷方发生额 } else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"\",\"\")"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",,)");
}else{ }else{
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("");
} }
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"C\",\"增值税进项税\",\"G\")");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue(config.getTaxRate().multiply(new BigDecimal(100)).intValue() + "%"); row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue(config.getTaxRate().multiply(new BigDecimal(100)).intValue() + "%");
row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue(0); // row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")*"
// +"WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"I\")");
if(rowIndex == 3){
row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"I\")");
}
row.getCell(TaxesCalculateReportEnum.Column.Column_11.getIndex()).setCellValue(RevenueConfEnum.RevenueType.MAPPING.get(config.getRevenueType())); row.getCell(TaxesCalculateReportEnum.Column.Column_11.getIndex()).setCellValue(RevenueConfEnum.RevenueType.MAPPING.get(config.getRevenueType()));
row.getCell(TaxesCalculateReportEnum.Column.Column_12.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType())); row.getCell(TaxesCalculateReportEnum.Column.Column_12.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType()));
row.getCell(TaxesCalculateReportEnum.Column.Column_13.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType()));
rowIndex++; rowIndex++;
} }
} }
......
...@@ -4,6 +4,7 @@ import com.google.common.collect.Lists; ...@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.MissingArgEval;
import org.apache.poi.ss.formula.eval.NumberEval; import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval; import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
...@@ -31,12 +32,18 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -31,12 +32,18 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return null; return null;
} }
String code = getStringParam(args[0], ec); String code = getStringParam(args[0], ec);//科目代码
int year = getIntParam(args[1], ec); int year = getIntParam(args[1], ec);
int period = getIntParam(args[2], ec); int period = getIntParam(args[2], ec);
int sourceDataType = getIntParam(args[3], ec);//科目代码 int sourceDataType = getIntParam(args[3], ec);//取值数据源
String segment5 = getStringParam(args[4], ec);//利润中心代码 String segment5 = null;
String segment6 = getStringParam(args[5], ec);//产品代码 if(!(args[4] instanceof MissingArgEval)){
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")"; String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")";
logger.debug(formulaExpression); logger.debug(formulaExpression);
......
...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions; ...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator; import org.apache.poi.ss.formula.WorkbookEvaluator;
import org.apache.poi.ss.formula.eval.*; import org.apache.poi.ss.formula.eval.*;
...@@ -10,7 +11,6 @@ import org.slf4j.LoggerFactory; ...@@ -10,7 +11,6 @@ import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.SpringContextUtil; import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.entity.*; import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent; import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
...@@ -222,20 +222,42 @@ public class FunctionBase { ...@@ -222,20 +222,42 @@ public class FunctionBase {
if (!dss.isEmpty()) return dss.get(0).getAmount(); if (!dss.isEmpty()) return dss.get(0).getAmount();
} else { } else {
String evalStr = OperandResolver.coerceValueToString(eval); String evalStr = OperandResolver.coerceValueToString(eval);
if(StringUtils.isBlank(evalStr)){
evalStr = "0";
}
LOGGER.debug("[Formula_debug] eval other cell value {}", evalStr); LOGGER.debug("[Formula_debug] eval other cell value {}", evalStr);
try { if(evalStr.endsWith("%")){
BigDecimal bigDecimal = new BigDecimal(evalStr); evalStr = evalStr.replace("%","");
if (!dss.isEmpty()) { try {
return bigDecimal.add(dss.get(0).getAmount()); BigDecimal bigDecimal = new BigDecimal(evalStr);
} else { bigDecimal.divide(new BigDecimal(100));
return bigDecimal; if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
}
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
}
}else{
try {
BigDecimal bigDecimal = new BigDecimal(evalStr);
if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
}
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
} }
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
} }
} }
return new BigDecimal(0); return new BigDecimal(0);
......
...@@ -4,6 +4,7 @@ import com.google.common.collect.Lists; ...@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.MissingArgEval;
import org.apache.poi.ss.formula.eval.NumberEval; import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval; import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
...@@ -31,12 +32,19 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -31,12 +32,19 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
return null; return null;
} }
String code = getStringParam(args[0], ec); String code = getStringParam(args[0], ec);//科目代码
int year = getIntParam(args[1], ec); int year = getIntParam(args[1], ec);
int period = getIntParam(args[2], ec); int period = getIntParam(args[2], ec);
int sourceDataType = getIntParam(args[3], ec);//科目代码 int sourceDataType = getIntParam(args[3], ec);//取值数据源
String segment5 = getStringParam(args[4], ec);//利润中心代码 String segment5 = null;
String segment6 = getStringParam(args[5], ec);//产品代码 if(!(args[4] instanceof MissingArgEval)){
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
String formulaExpression = "JFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")"; String formulaExpression = "JFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")";
logger.debug(formulaExpression); logger.debug(formulaExpression);
......
...@@ -7,7 +7,6 @@ import org.apache.poi.ss.formula.eval.ValueEval; ...@@ -7,7 +7,6 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.common.util.SpringContextUtil; import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
...@@ -40,6 +39,9 @@ public class PC extends FunctionBase implements FreeRefFunction { ...@@ -40,6 +39,9 @@ public class PC extends FunctionBase implements FreeRefFunction {
return new StringEval(String.format(Constant.DateTimeFormate, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH))); return new StringEval(String.format(Constant.DateTimeFormate, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
case "FilterDate": case "FilterDate":
return new StringEval(String.format(Constant.DateTimeFormate, formulaContext.getYear(), formulaContext.getPeriod())); return new StringEval(String.format(Constant.DateTimeFormate, formulaContext.getYear(), formulaContext.getPeriod()));
case "FilterDate1":
// String month = formulaContext.getPeriod()<10?"0"+formulaContext.getPeriod():formulaContext.getPeriod()+"";
return new StringEval(String.format(Constant.DateTimeFormate1, formulaContext.getYear(), formulaContext.getPeriod()));
case "TimeInterval": case "TimeInterval":
Date beginOfPeriod = new Date(formulaContext.getYear(), formulaContext.getIsYear() ? 1 : formulaContext.getPeriod(), 1); Date beginOfPeriod = new Date(formulaContext.getYear(), formulaContext.getIsYear() ? 1 : formulaContext.getPeriod(), 1);
calendar.setTime(beginOfPeriod); calendar.setTime(beginOfPeriod);
......
...@@ -59,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction { ...@@ -59,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL); MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
cellTemplateData = cellTemplateDataList.get(0); cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode()); int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), "VAT020".equals(bo.getReportCode())?bo.getColumnIndex():(bo.getColumnIndex() - 1), cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex(),
Long.parseLong(cellTemplateData.getCellTemplateId())); Long.parseLong(cellTemplateData.getCellTemplateId()));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData); nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
nullCellDto.setAmount(cellValue); nullCellDto.setAmount(cellValue);
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
"ProjectYearCol": "年份", "ProjectYearCol": "年份",
"AssignRoleCol": "分配角色", "AssignRoleCol": "分配角色",
"SequenceNoCol": "序号", "SequenceNoCol": "序号",
"SequenceNumber":"序号",
"DocumentID": "档案ID", "DocumentID": "档案ID",
"TaxGroup":"税种", "TaxGroup":"税种",
"DocumentAttr": "档案属性", "DocumentAttr": "档案属性",
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
columns: [ columns: [
{ {
dataField: "id", dataField: "id",
caption: $translate.instant('DocumentID'), caption: $translate.instant('SequenceNumber'),
allowHeaderFiltering: true, allowHeaderFiltering: true,
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
...@@ -241,6 +241,9 @@ ...@@ -241,6 +241,9 @@
}; };
}; };
$scope.exportEventTrigger = function(){
$(".dx-datagrid-export-button").click();
};
//弹出框 //弹出框
var openEditPop = function (rowId) { var openEditPop = function (rowId) {
if (rowId) { if (rowId) {
......
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
line-height: 34px; line-height: 34px;
float: none; float: none;
} }
div.dx-datagrid-export-button{
display: none;
}
</style> </style>
<div class="menu-header"> <div class="menu-header">
<div class="menu-title" translate="DocumentTypeSets"></div> <div class="menu-title" translate="DocumentTypeSets"></div>
...@@ -17,13 +22,14 @@ ...@@ -17,13 +22,14 @@
</div> </div>
<div class="content-container"> <div class="content-container">
<div class="row" style="margin-top:15px; text-align:right;padding:1rem;background: #fff"> <div class="row" style="margin-top:15px; text-align:right;padding:1rem;background: #fff">
<button style="width: 150px;" class="btn btn-in-panel-big" ng-click="exportEventTrigger()">
<i class="fa fa-file-excel-o"></i>
{{'ExportTable' | translate}}
</button>
<button style="width: 150px;" class="btn btn-in-panel-big" ng-click="openEditPop()"> <button style="width: 150px;" class="btn btn-in-panel-big" ng-click="openEditPop()">
<i class="material-icons button-icons">add_circle_outline</i> <i class="material-icons button-icons">add_circle_outline</i>
{{'addFileType' | translate}} {{'addFileType' | translate}}
</button><!----><!--ng-disabled="!hasAddPermission"--> </button>
<!--<button class="btn btn-export">
导出档案类型
</button>-->
</div> </div>
<div style="padding:0 1rem;background:#fff"> <div style="padding:0 1rem;background:#fff">
<div class="dx-viewport demo-container"> <div class="dx-viewport demo-container">
...@@ -42,14 +48,15 @@ ...@@ -42,14 +48,15 @@
<div class="modal-dialog" style="width:550px;height:200px;" role="document"> <div class="modal-dialog" style="width:550px;height:200px;" role="document">
<div class="modal-content"> <div class="modal-content">
<form class="form-horizontal" name="newDocFileTypeForm" ng-submit="confirmDocFileType()"> <form class="form-horizontal" name="newDocFileTypeForm" ng-submit="confirmDocFileType()">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title"><span translate="createDocFileType"></span></div> <div class="modal-title"><span translate="CreateDocFileType"></span></div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<!--序号--> <!--序号-->
<div class="form-group" hidden> <div class="form-group" hidden>
<label for="SequenceNoCol" class="col-sm-3 control-label" translate="SequenceNoCol"></label> <label for="SequenceNoCol" class="col-sm-3 control-label" translate="SequenceNumber"></label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input class="form-control" <input class="form-control"
id="SequenceNoCol" id="SequenceNoCol"
...@@ -93,17 +100,16 @@ ...@@ -93,17 +100,16 @@
<!--<span style="color:red"> * <span translate="Require"></span> </span>--> <!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>--> <!--</div>-->
</div> </div>
<!--说明--> <!--描述-->
<div class="form-group"> <div class="form-group">
<label for="Description" class="col-sm-3 control-label"> <label for="Description" class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="DescriptionWithOutColon"></span> <span translate="DescriptionWithOutColon"></span>
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input class="form-control" id="Description" <input class="form-control" id="Description"
ng-model="editModel.description" ng-model="editModel.description"
placeholder="请输入..." placeholder="请输入..."
required style="width:320px;" maxlength="50" /> style="width:320px;" maxlength="50" />
</div> </div>
</div> </div>
<!--必填字段--> <!--必填字段-->
...@@ -131,7 +137,7 @@ ...@@ -131,7 +137,7 @@
<input class="form-control" id="Remarks" <input class="form-control" id="Remarks"
ng-model="editModel.remarks" ng-model="editModel.remarks"
placeholder="请输入..." placeholder="请输入..."
required style="width:320px;" maxlength="50" /> style="width:320px;" maxlength="50" />
</div> </div>
</div> </div>
<!--状态--> <!--状态-->
...@@ -145,8 +151,8 @@ ...@@ -145,8 +151,8 @@
<label class="col-sm-5 DM-state-label"> <label class="col-sm-5 DM-state-label">
<input type="radio" name="editModelState" <input type="radio" name="editModelState"
value=1 value=1
ng-checked="editModel.status == 1" ng-checked="editModel.status == 1 || editModel.status == null || editModel.status == undefined"
ng-model="editModel.status" required /> ng-model="editModel.status"/>
<span translate="Enable"></span> <span translate="Enable"></span>
</label> </label>
<label class="col-sm-5 DM-state-label"> <label class="col-sm-5 DM-state-label">
......
...@@ -111,7 +111,8 @@ ...@@ -111,7 +111,8 @@
title="{{selected}}" title="{{selected}}"
readonly readonly
ng-model="selected"> ng-model="selected">
<button type="button" class="input-arrow-drop-button"> <button type="button" class="input-arrow-drop-button"
ng-click="showMenu()">
</button> </button>
<button type="button" class="input-reset-button" <button type="button" class="input-reset-button"
ng-click="clearInput()" ng-click="clearInput()"
......
...@@ -92,17 +92,10 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -92,17 +92,10 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField: "id", dataField: "id",
caption: "", caption: "",
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
// var targetString = '<input name="dataGridCheckBox" ng-click="sniffCheckbox()"' + var target = $('<input name="dataGridCheckBox" type="checkbox" ' +
// 'data-id="'+options.data.id+'" ' + 'data-id="' + options.data.id + '" ' +
// 'data-url="'+options.data.filePositionUrl+'" ' + 'data-url="' + options.data.filePositionUrl + '"/>');
// 'type="checkbox">'; target.off('click').on('click', function () {
// var eventTarget = $(targetString);
// $compile(eventTarget)($scope);
// container.append(eventTarget);
var target = $('<input name="dataGridCheckBox" type="checkbox" '+
'data-id="'+options.data.id+'" '+
'data-url="'+options.data.filePositionUrl+'"/>');
target.off('click').on('click',function(){
$scope.sniffCheckbox(); $scope.sniffCheckbox();
}); });
container.append(target); container.append(target);
...@@ -1127,6 +1120,16 @@ taxDocumentManageModule.directive('helpPop', function () { ...@@ -1127,6 +1120,16 @@ taxDocumentManageModule.directive('helpPop', function () {
$("#helpPopDialog").modal("show"); $("#helpPopDialog").modal("show");
}) })
}; };
$scope.sniffHelpPopRadio = function(){
$("input[name='helpPopRadio']").each(function (index,item) {
if(item.checked){
$scope.editFieldModel.fileAttr = item.getAttribute("data-fileAttr");
$scope.editFieldModel.fileType = item.getAttribute("data-fileType");
$scope.syncRequiredFields($scope.editFieldModel);
}
});
};
$scope.help_dataGridUpdate = function (_data) { $scope.help_dataGridUpdate = function (_data) {
$scope.help_cacheData = _data.items; $scope.help_cacheData = _data.items;
$scope.help_dataGridOptions = { $scope.help_dataGridOptions = {
...@@ -1151,6 +1154,21 @@ taxDocumentManageModule.directive('helpPop', function () { ...@@ -1151,6 +1154,21 @@ taxDocumentManageModule.directive('helpPop', function () {
columnAutoWidth: true, columnAutoWidth: true,
allowColumnReordering: true, allowColumnReordering: true,
columns: [ columns: [
{
dataField: "",
caption: "",
cellTemplate: function (container, options) {
var target = $('<input name="helpPopRadio" type="radio" ' +
'data-id="helpPop_' + options.data.id + '" ' +
'data-fileAttr="' + options.data.fileAttr + '" ' +
'data-fileType="' + options.data.fileType +
'" />');
container.append(target);
// target.parents("tr").off('click').on('click', function () {
// $scope.sniffHelpPopRadio(options.data.id);
// });
}
},
{ {
dataField: "fileAttr", dataField: "fileAttr",
caption: $translate.instant('DocumentAttr'), caption: $translate.instant('DocumentAttr'),
......
...@@ -922,10 +922,10 @@ ...@@ -922,10 +922,10 @@
</select> </select>
</div> </div>
<div class="DTL-special-external-btn" title="查看类型列表"> <!--<div class="DTL-special-external-btn" title="查看类型列表">
<a href="javascript:void(0)" ng-click="openHelpPop()"><i <a href="javascript:void(0)" ng-click="openHelpPop()"><i
class="fa fake-question-circle" aria-hidden="true"></i></a> class="fa fake-question-circle" aria-hidden="true"></i></a>
</div> </div>-->
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label">
...@@ -1151,6 +1151,11 @@ ...@@ -1151,6 +1151,11 @@
<div class="dx-viewport demo-container" id="helpPopContainer"> <div class="dx-viewport demo-container" id="helpPopContainer">
</div> </div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" translate="Confirm" ng-click="sniffHelpPopRadio()"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()"
translate="Cancel"></button>
</div>
</div> </div>
</div> </div>
</div> </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