Commit 455e7f5d authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 61a46681 8cf16608
......@@ -60,6 +60,8 @@ public class CellDataDto {
private Boolean isConfigured;
private String validationResult;
public String getCellId() {
return this.cellId;
}
......@@ -259,4 +261,12 @@ public class CellDataDto {
public void setIsConfigured(Boolean configured) {
this.isConfigured = configured;
}
public String getValidationResult() {
return validationResult;
}
public void setValidationResult(String validationResult) {
this.validationResult = validationResult;
}
}
......@@ -9,8 +9,10 @@ import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
......@@ -25,7 +27,9 @@ import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.CitAssetsListDto;
import pwc.taxtech.atms.dto.CitDistributionDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.export.ExportDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.entity.*;
......@@ -35,6 +39,7 @@ import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.ReportGeneratorImpl;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
......@@ -219,6 +224,60 @@ public class CitReportServiceImpl extends BaseService {
periodJobMapper.updateByPrimaryKey(genJob);
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
//===============================================start validation compute==========================================================
//todo: 1.get the data from workbook, then put the data into new workbook
Workbook workbook4Validate = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob);
copyDataToWorkbook4Validate(workbook, workbook4Validate);
//todo: 2.get the validate formula in the cell_template_config
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = resources.getPeriodCellTemplateConfigs().stream()
.filter(a -> a.getDataSourceType().equals(CellDataSourceType.Validation.getCode())).collect(Collectors.toList());
List<PeriodCellTemplateConfigDto> periodCellTemplateConfigDtos = new ArrayList<>();
periodCellTemplateConfigs.forEach(a -> {
if (StringUtils.isNotBlank(a.getValidation())) {
Optional<Template> template = templates.stream().filter(t -> t.getId().equals(a.getReportTemplateId())).findFirst();
String templateCode = template.isPresent() ? template.get().getCode() : "";
Integer sheetNumber = template.isPresent() ? template.get().getOrderIndex() : null;
Optional<PeriodCellTemplate> periodCellTemplate = resources.getPeriodCellTemplates().stream().filter(c -> c.getCellTemplateId().equals(a.getCellTemplateId())).findFirst();
Integer rowNumber = periodCellTemplate.isPresent() ? periodCellTemplate.get().getRowIndex() : null;
Integer colNumber = periodCellTemplate.isPresent() ? periodCellTemplate.get().getColumnIndex() : null;
if (StringUtils.isNotBlank(templateCode) && rowNumber != null && colNumber != null) {
String replaceFormula = String.format("BB(\"%s\",%d,%d,0,0)", templateCode, colNumber, rowNumber);
a.setParsedValidation(a.getValidation().replace("aa()", replaceFormula));
PeriodCellTemplateConfigDto periodCellTemplateConfigDto = new PeriodCellTemplateConfigDto();
periodCellTemplateConfigDto.setSheetNumber(sheetNumber);
periodCellTemplateConfigDto.setRowNumber(rowNumber);
periodCellTemplateConfigDto.setColNumber(colNumber);
periodCellTemplateConfigDto.setValidation(a.getValidation());
periodCellTemplateConfigDto.setParsedValidation(a.getParsedValidation());
periodCellTemplateConfigDto.setCellTemplateId(periodCellTemplate.get().getCellTemplateId());
periodCellTemplateConfigDto.setProjectId(projectId);
periodCellTemplateConfigDto.setPeriodParam(periodParam);
periodCellTemplateConfigDtos.add(periodCellTemplateConfigDto);
}
}
});
//todo: 3.use the validate formula to recalculate the new workbook
periodCellTemplateConfigDtos.forEach(a -> {
workbook4Validate.getSheetAt(a.getSheetNumber() - 1).getRow(a.getRowNumber()).getCell(a.getColNumber()).setCellFormula(a.getParsedValidation());
});
reportGenerator.addFunctionsAndContext(workbook4Validate, functions, reportGenerator.initContext(resources, periodParam));
FormulaEvaluator validateEvaluator = workbook4Validate.getCreationHelper().createFormulaEvaluator();
validateEvaluator.evaluateAll();
//todo: 4.then save the validation result to cellData table
periodCellTemplateConfigDtos.forEach(a -> {
//todo: according to periodParam , projectId, cellTemplateId to update the cellData table
PeriodCellDataExample periodCellDataExample = new PeriodCellDataExample();
periodCellDataExample.createCriteria().andCellTemplateIdEqualTo(a.getCellTemplateId()).andProjectIdEqualTo(a.getProjectId()).andPeriodEqualTo(a.getPeriodParam());
Optional<PeriodCellData> cellData = periodCellDataMapper.selectByExample(periodCellDataExample).stream().findFirst();
if (cellData.isPresent()) {
cellData.get().setValidateFormulaExp(a.getParsedValidation());
Boolean result = workbook4Validate.getSheetAt(a.getSheetNumber() - 1).getRow(a.getRowNumber()).getCell(a.getColNumber()).getBooleanCellValue();
cellData.get().setValidateResult(result.toString());
periodCellDataMapper.updateByPrimaryKey(cellData.get());
}
});
//===============================================end validation compute==============================================================
setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
} catch (Exception e) {
......@@ -239,6 +298,42 @@ public class CitReportServiceImpl extends BaseService {
return operationResultDto;
}
private void copyDataToWorkbook4Validate(Workbook workbook, Workbook workbook4Validate) {
int sheetNumber = workbook.getNumberOfSheets();
for (int i = 0; i < sheetNumber; i++) {
Sheet sheet = workbook.getSheetAt(i);
for (Row row : sheet) {
for (Cell cell : row) {
String data;
String result;
data = ((XSSFCell) cell).getRawValue();
if (data != null && data.equals("#VALUE!")) {
FormulaEvaluator formulaEvaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook);
try {
data = formulaEvaluator.evaluate(cell).getStringValue();
} catch (Exception e) {
logger.error(e.getStackTrace().toString());
data = "0.0";
}
}
if (StringUtils.isNotBlank(data)) {
Pattern pattern = Pattern.compile("[0-9.]*");
Matcher isNum = pattern.matcher(data);
if (isNum.matches()) {
result = new BigDecimal(data).toString();
} else {
result = data;
}
} else {
result = data;
}
workbook4Validate.getSheetAt(i).getRow(row.getRowNum()).getCell(cell.getColumnIndex()).setCellValue(result);
}
}
}
}
/**
* 根据projectId(卡片ID)获取模板
*
......
......@@ -313,7 +313,7 @@ public class ReportGeneratorImpl {
cellDataSource.setPeriod(period);
cellDataSource.setProjectId(projectId);
SpringContextUtil.periodCellDataSourceMapper.insertSelective(cellDataSource);
periodCellDataMapper.insert(cellData);
periodCellDataMapper.insertSelective(cellData);
} else {
logger.warn("should not be !!!");
}
......
......@@ -10,6 +10,9 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
......@@ -20,7 +23,10 @@ import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.util.*;
import pwc.taxtech.atms.common.util.DataUtil;
import pwc.taxtech.atms.common.util.FileUploadUtil;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dao.*;
......@@ -41,6 +47,7 @@ import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
......@@ -948,8 +955,60 @@ public class ReportServiceImpl extends BaseService {
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
evaluator.evaluateAll();
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
//===============================================start validation compute==========================================================
//todo: 1.get the data from workbook, then put the data into new workbook
Workbook workbook4Validate = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob);
copyDataToWorkbook4Validate(workbook, workbook4Validate);
//todo: 2.get the validate formula in the cell_template_config
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = resources.getPeriodCellTemplateConfigs().stream()
.filter(a -> a.getDataSourceType().equals(CellDataSourceType.Validation.getCode())).collect(Collectors.toList());
List<PeriodCellTemplateConfigDto> periodCellTemplateConfigDtos = new ArrayList<>();
periodCellTemplateConfigs.forEach(a -> {
if (StringUtils.isNotBlank(a.getValidation())) {
Optional<Template> template = templates.stream().filter(t -> t.getId().equals(a.getReportTemplateId())).findFirst();
String templateCode = template.isPresent() ? template.get().getCode() : "";
Integer sheetNumber = template.isPresent() ? template.get().getOrderIndex() : null;
Optional<PeriodCellTemplate> periodCellTemplate = resources.getPeriodCellTemplates().stream().filter(c -> c.getCellTemplateId().equals(a.getCellTemplateId())).findFirst();
Integer rowNumber = periodCellTemplate.isPresent() ? periodCellTemplate.get().getRowIndex() : null;
Integer colNumber = periodCellTemplate.isPresent() ? periodCellTemplate.get().getColumnIndex() : null;
if (StringUtils.isNotBlank(templateCode) && rowNumber != null && colNumber != null) {
String replaceFormula = String.format("BB(\"%s\",%d,%d,0,0)", templateCode, colNumber, rowNumber);
a.setParsedValidation(a.getValidation().replace("aa()", replaceFormula));
PeriodCellTemplateConfigDto periodCellTemplateConfigDto = new PeriodCellTemplateConfigDto();
periodCellTemplateConfigDto.setSheetNumber(sheetNumber);
periodCellTemplateConfigDto.setRowNumber(rowNumber);
periodCellTemplateConfigDto.setColNumber(colNumber);
periodCellTemplateConfigDto.setValidation(a.getValidation());
periodCellTemplateConfigDto.setParsedValidation(a.getParsedValidation());
periodCellTemplateConfigDto.setCellTemplateId(periodCellTemplate.get().getCellTemplateId());
periodCellTemplateConfigDto.setProjectId(projectId);
periodCellTemplateConfigDto.setPeriodParam(periodParam);
periodCellTemplateConfigDtos.add(periodCellTemplateConfigDto);
}
}
});
//todo: 3.use the validate formula to recalculate the new workbook
periodCellTemplateConfigDtos.forEach(a -> {
workbook4Validate.getSheetAt(a.getSheetNumber() - 1).getRow(a.getRowNumber()).getCell(a.getColNumber()).setCellFormula(a.getParsedValidation());
});
reportGenerator.addFunctionsAndContext(workbook4Validate, functions, reportGenerator.initContext(resources, periodParam));
FormulaEvaluator validateEvaluator = workbook4Validate.getCreationHelper().createFormulaEvaluator();
validateEvaluator.evaluateAll();
//todo: 4.then save the validation result to cellData table
periodCellTemplateConfigDtos.forEach(a -> {
//todo: according to periodParam , projectId, cellTemplateId to update the cellData table
PeriodCellDataExample periodCellDataExample = new PeriodCellDataExample();
periodCellDataExample.createCriteria().andCellTemplateIdEqualTo(a.getCellTemplateId()).andProjectIdEqualTo(a.getProjectId()).andPeriodEqualTo(a.getPeriodParam());
Optional<PeriodCellData> cellData = periodCellDataMapper.selectByExample(periodCellDataExample).stream().findFirst();
if (cellData.isPresent()) {
cellData.get().setValidateFormulaExp(a.getParsedValidation());
Boolean result = workbook4Validate.getSheetAt(a.getSheetNumber() - 1).getRow(a.getRowNumber()).getCell(a.getColNumber()).getBooleanCellValue();
cellData.get().setValidateResult(result.toString());
periodCellDataMapper.updateByPrimaryKey(cellData.get());
}
});
//===============================================end validation compute==============================================================
setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
} catch (Exception e) {
......@@ -970,6 +1029,42 @@ public class ReportServiceImpl extends BaseService {
return operationResultDto;
}
private void copyDataToWorkbook4Validate(Workbook workbook, Workbook workbook4Validate) {
int sheetNumber = workbook.getNumberOfSheets();
for (int i = 0; i < sheetNumber; i++) {
Sheet sheet = workbook.getSheetAt(i);
for (Row row : sheet) {
for (Cell cell : row) {
String data;
String result;
data = ((XSSFCell) cell).getRawValue();
if (data != null && data.equals("#VALUE!")) {
FormulaEvaluator formulaEvaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook);
try {
data = formulaEvaluator.evaluate(cell).getStringValue();
} catch (Exception e) {
logger.error(e.getStackTrace().toString());
data = "0.0";
}
}
if (StringUtils.isNotBlank(data)) {
Pattern pattern = Pattern.compile("[0-9.]*");
Matcher isNum = pattern.matcher(data);
if (isNum.matches()) {
result = new BigDecimal(data).toString();
} else {
result = data;
}
} else {
result = data;
}
workbook4Validate.getSheetAt(i).getRow(row.getRowNum()).getCell(cell.getColumnIndex()).setCellValue(result);
}
}
}
}
@Resource
private TrialBalanceMapper trialBalanceMapper;
@Resource
......@@ -1112,6 +1207,7 @@ public class ReportServiceImpl extends BaseService {
if (cellData.getData() != null) {
cellData.getData().setEbitData(ebitDataDto1);
} else {
reportDataDto.setEbitData(ebitDataDto1);
cellData.setData(reportDataDto);
return cellData;
......@@ -1360,6 +1456,7 @@ public class ReportServiceImpl extends BaseService {
celldata.ifPresent(cellData -> cellDataDto.setCellValue(cellData.getData()));
celldata.ifPresent(cellData -> cellDataDto.setKeyinData(cellData.getKeyinData()));
celldata.ifPresent(cellData -> cellDataDto.setFormulaExp(cellData.getFormulaExp()));
celldata.ifPresent(cellData -> cellDataDto.setValidationResult(cellData.getValidateResult()));
cellDataDto.setCellTemplateConfig(CellConfigTranslater.getConfigDto(a));
List<DataSourceDtoExtend> entryList = datasource.stream()
.filter(y -> y.getItem1().equals(a.getCellTemplateId())).collect(Collectors.toList());
......@@ -1413,9 +1510,9 @@ public class ReportServiceImpl extends BaseService {
return resultDto;
}
@Autowired
@Resource
private ProfitLossStatementFinalMapper profitLossStatementFinalMapper;
@Autowired
@Resource
private EbitCellDataMapper ebitCellDataMapper;
//加载Ebit数据
......
package pwc.taxtech.atms.vat.dpo;
public class PeriodCellTemplateConfigDto {
private String validation;
private String parsedValidation;
private Integer sheetNumber;
private Integer rowNumber;
private Integer colNumber;
private Long cellTemplateId;
private String projectId;
private Integer periodParam;
public String getValidation() {
return validation;
}
public void setValidation(String validation) {
this.validation = validation;
}
public String getParsedValidation() {
return parsedValidation;
}
public void setParsedValidation(String parsedValidation) {
this.parsedValidation = parsedValidation;
}
public Integer getSheetNumber() {
return sheetNumber;
}
public void setSheetNumber(Integer sheetNumber) {
this.sheetNumber = sheetNumber;
}
public Integer getRowNumber() {
return rowNumber;
}
public void setRowNumber(Integer rowNumber) {
this.rowNumber = rowNumber;
}
public Integer getColNumber() {
return colNumber;
}
public void setColNumber(Integer colNumber) {
this.colNumber = colNumber;
}
public Long getCellTemplateId() {
return cellTemplateId;
}
public void setCellTemplateId(Long cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public Integer getPeriodParam() {
return periodParam;
}
public void setPeriodParam(Integer periodParam) {
this.periodParam = periodParam;
}
}
......@@ -233,6 +233,8 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
// });
// }
// else
// Data Preview
if (data[constant.citPermission.dataPreview.journalMerge.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
......@@ -307,6 +309,7 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
});
}
// Data Manage
if (data[constant.citPermission.dataManage.caculateDataCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
......@@ -319,18 +322,7 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
permission: constant.citPermission.dataManage.caculateDataCode,
url: '#/cit/reductionData/caculateData'
});
} else if (data[constant.citPermission.dataManage.accountMappingCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.citPermission.dataManage.dataManageCode, url: '#/cit/reductionData'
});
subMenus.push({
name: 'reductionData.accountMapping',
state: 'reductionData.accountMapping',
num: 3,
permission: constant.citPermission.dataManage.accountMappingCode,
url: '#/cit/reductionData/accountMapping'
});
} else if (data[constant.citPermission.dataManage.assetEamMapping]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
......@@ -356,6 +348,20 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
url: '#/cit/reductionData/distributionTable'
});
}
// } else if (data[constant.citPermission.dataManage.accountMappingCode]) {
// $scope.menus.push({
// name: 'reductionData', state: 'reductionData', num: 3,
// permission: constant.citPermission.dataManage.dataManageCode, url: '#/cit/reductionData'
// });
// subMenus.push({
// name: 'reductionData.accountMapping',
// state: 'reductionData.accountMapping',
// num: 3,
// permission: constant.citPermission.dataManage.accountMappingCode,
// url: '#/cit/reductionData/accountMapping'
// });
if (data[constant.citPermission.reportView.bsplCode]
|| data[constant.citPermission.reportView.quarterlyFilingReturnTypeCode]
......
......@@ -63,7 +63,7 @@
taxGroupType:''
};
$scope.refreshAssetResultListGrid = function () {
debugger;
$log.debug("refreshAssetResultListGrid");
getAssetResultList($scope.citAssetsListDto.assetType);
};
......@@ -265,7 +265,7 @@
$scope.TotalTaxCurrentYearDepreciationAmount = 0;
$scope.TotalYearDifferenceAmount = 0;
assetListService.getAssetResultListPage($scope.citAssetsListDto).success(function (assetListData) {
debugger;
var data = assetListData.data.list;
if (data) {
var index = 1;
......@@ -987,14 +987,14 @@
};
var doDataFilter = function () {
debugger;
// initParamFilter();
getAssetResultList($scope.citAssetsListDto.assetType);
}
var doDataFilterReset = function () {
debugger;
// initParamFilter();
$scope.citAssetsListDto.taxAccountCompare =2;
$scope.citAssetsListDto.assetGroupName = null;
......@@ -1007,7 +1007,7 @@
//开始
(function initialize() {
//分页的设置
debugger;
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
......@@ -1024,14 +1024,14 @@
$scope.changeSheet = changeSheet;
$scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset;
debugger;
function init(){
initColumns();
initDxGrid();
initAssetResultDxGrid();
getAssetResultList(1);
debugger;
getGroupList();
getGroupDetailList();
getUserPermission();
......
......@@ -72,7 +72,7 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi
else if ($location && $location.absUrl().indexOf('reductionData') > -1) {
$scope.nodeDicKey = constant.DictionaryDictKey.DataProcess;
$scope.linkShort = enums.linkShort.ReductionData;
debugger;
$scope.menus = [
{
name: 'caculateData', permission: constant.citPermission.dataManage.caculateDataCode,
......
......@@ -14,7 +14,7 @@
$scope.moduleid = enums.vatModuleEnum.Import_CalculateData;
var initTasks = function () {
debugger;
var task = function (id, status, name,code) {
this.id = id;
this.name = _.isEmpty(name) ? $translate.instant(id) : name;
......@@ -199,7 +199,7 @@ debugger;
task.prototype.code =null;
citReportService.getCitTemplate(vatSessionService.project.id, constant.serviceType.CIT).then(function (report) {
debugger;
var result = [];
// result.push({ name: $translate.instant('ProcessData'), items: [new task('GenerateStdTb', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CompareUnbilled', 'unstarted')] });
......@@ -248,7 +248,7 @@ debugger;
i++;
taskList = taskList.concat(item.items);
});
debugger;
$scope.tasks = result;
getInitTaskStatus();
});
......@@ -289,16 +289,16 @@ debugger;
function doStartCaculate2(isMergeManualDataSource) {
citReportService.generateAllCitReport(vatSessionService.project.id, isMergeManualDataSource, vatSessionService.logUser.id ? vatSessionService.logUser.id : "").success(function (data) {
debugger;
$scope.readonly = true;
if(data && data.result)
updateTasksStatus(data.data);
if(data.data.jobStatus=='Begin'||data.data.jobStatus=='Running'){
if(!$scope.timer)
$scope.timer= $interval(function(){
debugger;
citReportService.getJobStatus(vatSessionService.project.id,0,data.data.id).then(function(result){
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
}else{
......@@ -326,9 +326,9 @@ debugger;
}
var startCaculate = function () {
debugger;
var a = vatSessionService.project.projectStatusList;
debugger;
if (vatSessionService.project.projectStatusList[0] >= constant.ProjectStatusEnum.Generated) {
swal({
title: "warning!",
......@@ -379,9 +379,9 @@ debugger;
};
var startCaculate2 = function () {
debugger;
var a = vatSessionService.project.projectStatusList;
debugger;
if (vatSessionService.project.projectStatusList[vatSessionService.month] >= constant.ProjectStatusEnum.Generated) {
swal({
title: "warning!",
......@@ -576,17 +576,17 @@ debugger;
var updateTasksStatus = function(job){
var items = $scope.tasks;
var tasks = JSON.parse(job.status);
debugger;
if(job.jobStatus == 'End'){
debugger;
items.forEach(function(item,index){
debugger;
item.status = 'completed';
item.text = $translate.instant('completed');
item.items.forEach(function (_task, index) {
debugger;
tasks.forEach(function(task){
debugger;
if(task.code==_task.code){
_task.status = 'completed';
_task.text = $translate.instant(_task.status);
......@@ -628,13 +628,13 @@ debugger;
if($scope.timer)$interval.cancel($scope.timer);
}
}
debugger;
items.forEach(function(item,index){
debugger;
item.items.forEach(function (_task, index) {
debugger;
tasks.forEach(function(task){
debugger;
if(task.code==_task.code){
if(task.status == 'Error'){
_task.status = 'error';
......@@ -651,19 +651,19 @@ debugger;
}
var getInitTaskStatus = function(){
debugger;
citReportService.getRunningJob(vatSessionService.project.id,0).then(function (result) {
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
if(result.data.jobStatus=='Begin'||result.data.jobStatus=='Running'){
if(!$scope.timer)
debugger;
$scope.timer= $interval(function(){
debugger;
citReportService.getJobStatus(vatSessionService.project.id,0,result.data.id)
.then(function(result){
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
}else{
......
......@@ -83,7 +83,7 @@
exceptionMsg = $translate.instant('ModelException');
}
if (!_.isEmpty(cellData.validationErrorList)) {
if (!_.isEmpty(cellData.validationResult)) {
hasException = true;
if (_.isEmpty(exceptionMsg)) {
exceptionMsg = $translate.instant('ValidationException');
......@@ -94,13 +94,13 @@
}
if (hasException) {
cell.value(cell.text() + ' '); // Edmond TODO: Temp move cell value for CIT demo
//cell.value(cell.text() + ' '); // Edmond TODO: Temp move cell value for CIT demo
icons.push(hasExceptionImg);
infos.push(exceptionMsg);
}
try {
cell.cellType(new IconsCellType(icons, infos, tips));
cell.cellType(new IconsCellType(icons, infos, tips)).hAlign(0);
}
catch (e) {
}
......
......@@ -56,11 +56,11 @@ constant.payTaxTypeList = [
{value: 2, name: '小规模纳税人'}];
constant.citReportTypeList = [
{ value: 1, name: 'TaxReturnType',orderIndex:1 },
{ value: 2, name: 'QuarterlyFilingReturnType', orderIndex: 2 },
{ value: 3, name: 'WorkingPaperType', orderIndex: 3 },
{ value: 4, name: 'DocumentListType', orderIndex: 4 },
{ value: 5, name: 'OtherTaxes', orderIndex: 5 }];
{value: 1, name: 'TaxReturnType', orderIndex: 1},
{value: 2, name: 'QuarterlyFilingReturnType', orderIndex: 2},
{value: 3, name: 'WorkingPaperType', orderIndex: 3},
{value: 4, name: 'DocumentListType', orderIndex: 4},
{value: 5, name: 'OtherTaxes', orderIndex: 5}];
constant.cfReportTypeList = [
{value: 1, name: '企业所得税预算'},
......@@ -156,7 +156,7 @@ constant.OperateLogType = {
constant.page = {
pageSize: 10,
logPageSize : 20
logPageSize: 20
}
constant.page.pageSizeArrary = [10, 20, 50, 100];
......@@ -395,6 +395,7 @@ constant.attributeTypeNameColMap = {
// vat权限code
constant.vatPermission = {
code: '02',
dataImport: {
dataImportCode: '02.001',
balanceSheet: {
......@@ -508,8 +509,8 @@ constant.vatPermission = {
saveCode: '02.003.002.002'
},
revenueDetailCode:'02.003.004',
billDetailCode:'02.003.005',
revenueDetailCode: '02.003.004',
billDetailCode: '02.003.005',
caculateDataCode: '02.003.003',
unbilledInvoiceCode: '02.003.004',
......@@ -593,6 +594,7 @@ constant.vatPermission = {
// cit权限code
constant.citPermission = {
code: '03',
dataImport: {
dataImportCode: '03.001',
balanceSheet: {
......@@ -714,16 +716,16 @@ constant.citPermission = {
// 权限代码
constant.adminPermission = {
WebAdmin:'01',
WebAdmin: '01',
basicData: {
mainData:{
queryCode : '01.001.012'
mainData: {
queryCode: '01.001.012'
},
financialData:{
queryCode : '01.001.013'
financialData: {
queryCode: '01.001.013'
},
// 企业账套
......@@ -856,52 +858,53 @@ constant.adminPermission = {
};
constant.batchImportPermisson = {
ExtractDistribution:{
code : '04.001',
financialDataExtraction:{
batchImportPermissonCode: '04',
ExtractDistribution: {
code: '04.001',
financialDataExtraction: {
code: '04.001.001'
},
invoiceDataExtraction:{
invoiceDataExtraction: {
code: '04.001.002'
}
},
ImportDistribution:{
ImportDistribution: {
code: '04.002',
vATInvoiceRecord:{code:'04.002.001'},
certifiedInvoicesList:{code:'04.002.002'},
redLetterVATSpecialInvoiceInfo:{code:'04.002.003'},
invoiceInformation:{code:'04.002.004'},
coupaInvoiceReport:{code:'04.002.005'},
adjustmentTable:{code:'04.002.006'},
balanceSheetPRC:{code:'04.002.007'},
incomeStatementPRC:{code:'04.002.008'},
cashFlowStatement:{code:'04.002.009'},
cITAdjustmentJournal:{code:'04.002.010'},
cITTrialBalance:{code:'04.002.011'},
cITDocumentSubjectMappingTable:{code:'04.002.012'},
cITBalanceSheetPRC:{code:'04.002.013'},
cITProfitStatementPRC:{code:'04.002.014'},
cITEAMAssetDisposalAmountRecord:{code:'04.002.015'},
cITPreClassifiedDataSource:{code:'04.002.016'}
},
Configuration:{
RevenueTypeConfiguration:{code:'04.003.001'},
BillingRecordAndRevenueTypeMappingConfiguration:{code:'04.003.002'},
InputRollOutConfiguration:{code:'04.003.003'}
},
log:{
code:'05',
dataImportRecord:{code:'04.004.001'},
dataProcessingCheckRecord:{code:'04.004.002'}
vATInvoiceRecord: {code: '04.002.001'},
certifiedInvoicesList: {code: '04.002.002'},
redLetterVATSpecialInvoiceInfo: {code: '04.002.003'},
invoiceInformation: {code: '04.002.004'},
coupaInvoiceReport: {code: '04.002.005'},
adjustmentTable: {code: '04.002.006'},
balanceSheetPRC: {code: '04.002.007'},
incomeStatementPRC: {code: '04.002.008'},
cashFlowStatement: {code: '04.002.009'},
cITAdjustmentJournal: {code: '04.002.010'},
cITTrialBalance: {code: '04.002.011'},
cITDocumentSubjectMappingTable: {code: '04.002.012'},
cITBalanceSheetPRC: {code: '04.002.013'},
cITProfitStatementPRC: {code: '04.002.014'},
cITEAMAssetDisposalAmountRecord: {code: '04.002.015'},
cITPreClassifiedDataSource: {code: '04.002.016'}
},
Configuration: {
RevenueTypeConfiguration: {code: '04.003.001'},
BillingRecordAndRevenueTypeMappingConfiguration: {code: '04.003.002'},
InputRollOutConfiguration: {code: '04.003.003'}
},
log: {
code: '05',
dataImportRecord: {code: '04.004.001'},
dataProcessingCheckRecord: {code: '04.004.002'}
}
};
constant.analysisPermisson = {
code : '05',
code: '05',
Dashboard: {code: '05.001'},
DataImport: {
code: '05.002',
......@@ -910,10 +913,19 @@ constant.analysisPermisson = {
},
Form: {
code: '05.003',
TBEBITForm:{code:'05.003.001'}
TBEBITForm: {code: '05.003.001'}
}
};
constant.menuRecordManagePermission = {
code: '06'
};
constant.menuListApprovalPermission = {
code: '07'
};
constant.citMenuList = [
// constant.citPermission.dataImport.balanceSheet.queryCode,
// constant.citPermission.dataImport.journalEntry.queryCode,
......@@ -922,22 +934,26 @@ constant.citMenuList = [
// constant.citPermission.dataImport.documentList.queryCode,
constant.citPermission.dataImport.assetList.queryCode,
constant.citPermission.dataPreview.balanceSheet.queryCode,
constant.citPermission.dataPreview.accountVoucher.queryCode,
// constant.citPermission.dataPreview.balanceSheet.queryCode,
// constant.citPermission.dataPreview.accountVoucher.queryCode,
constant.citPermission.dataPreview.journalMerge.queryCode,
constant.citPermission.dataPreview.bsGenerateVer.queryCode,
constant.citPermission.dataPreview.bsMappingVer.queryCode,
constant.citPermission.dataPreview.assetsList.queryCode,
constant.citPermission.dataPreview.salaryAdvance.queryCode,
constant.citPermission.dataPreview.eamDisposal.queryCode,
// constant.citPermission.dataManage.accountMappingCode,
constant.citPermission.dataManage.caculateDataCode,
constant.citPermission.dataManage.assetEamMapping,
constant.citPermission.dataManage.distributionTable,
constant.citPermission.reportView.bsplCode,
constant.citPermission.reportView.quarterlyFilingReturnTypeCode,
constant.citPermission.reportView.workingPaperTypeCode,
constant.citPermission.reportView.taxReturnCode,
constant.citPermission.reportView.otherReportCode,
// constant.citPermission.reportView.quarterlyFilingReturnTypeCode,
// constant.citPermission.reportView.workingPaperTypeCode,
// constant.citPermission.reportView.taxReturnCode,
// constant.citPermission.reportView.otherReportCode,
// constant.citPermission.dataAnalysis.modelAnalysisCode,
// constant.citPermission.dataAnalysis.dashboard.dashboardCode,
];
......@@ -1419,102 +1435,102 @@ constant.EquityCurrency = [
];
constant.GroupTypeList = [
{code:0,type:"增值税"},
{code:1,type:"印花税"},
{code:2,type:"企业所得税"},
{code:3,type:"国际税"}
{code: 0, type: "增值税"},
{code: 1, type: "印花税"},
{code: 2, type: "企业所得税"},
{code: 3, type: "国际税"}
];
constant.InvoiceTypeList = [
{code:0,type:"增值税专用发票"},
{code:1,type:"增值税普通发票"},
{code:2,type:"机动车销售统一发票"},
{code:3,type:"其他票种"}
{code: 0, type: "增值税专用发票"},
{code: 1, type: "增值税普通发票"},
{code: 2, type: "机动车销售统一发票"},
{code: 3, type: "其他票种"}
];
constant.InvoiceUnitList = [
{code:0,type:"份"},
{code:1,type:"本"},
{code:2,type:"其他"}
{code: 0, type: "份"},
{code: 1, type: "本"},
{code: 2, type: "其他"}
];
constant.TaxDecCycleList = [
{code:0,type:"月度"},
{code:1,type:"季度"},
{code:2,type:"年度"}
{code: 0, type: "月度"},
{code: 1, type: "季度"},
{code: 2, type: "年度"}
];
constant.ApprovedLevyTermList = [
{code:0,type:"次"},
{code:1,type:"月"},
{code:2,type:"季"},
{code:3,type:"半年"},
{code:4,type:"年"}
{code: 0, type: "次"},
{code: 1, type: "月"},
{code: 2, type: "季"},
{code: 3, type: "半年"},
{code: 4, type: "年"}
];
constant.TaxpayerQualificationTypeList = [
{code:0,type:"一般纳税人"},
{code:1,type:"小规模纳税人"}
{code: 0, type: "一般纳税人"},
{code: 1, type: "小规模纳税人"}
];
constant.RegStatusList = [
{code:0,type:"存续"},
{code:1,type:"存续中"},
{code:2,type:"已注销"}
{code: 0, type: "存续"},
{code: 1, type: "存续中"},
{code: 2, type: "已注销"}
];
constant.ArchitectureTypeList = ["DE","WFOE","VIE","JV","有限合伙","Branch","其他"];
constant.ArchitectureTypeList = ["DE", "WFOE", "VIE", "JV", "有限合伙", "Branch", "其他"];
constant.trueFalse = [
{code:false,type:"否"},
{code:true,type:"是"}
{code: false, type: "否"},
{code: true, type: "是"}
];
constant.TaxReturnBusinessTypeList = [
{code:100,type:"非跨地区经营企业"},
{code:210,type:"跨地区经营企业总机构 总机构(跨省)"},
{code:220,type:"总机构(跨省)——不适用《跨地区经营汇总纳税企业所得税征收管理办法》"},
{code:230,type:"undefine"},
{code:311,type:"跨地区经营企业分支机构 需进行完整年度纳税申报 分支机构(须进行完整年度申报并按比例纳税)"},
{code:312,type:"分支机构(须进行完整年度申报但不就地缴纳)"}
{code: 100, type: "非跨地区经营企业"},
{code: 210, type: "跨地区经营企业总机构 总机构(跨省)"},
{code: 220, type: "总机构(跨省)——不适用《跨地区经营汇总纳税企业所得税征收管理办法》"},
{code: 230, type: "undefine"},
{code: 311, type: "跨地区经营企业分支机构 需进行完整年度纳税申报 分支机构(须进行完整年度申报并按比例纳税)"},
{code: 312, type: "分支机构(须进行完整年度申报但不就地缴纳)"}
];
constant.RegFinancialAccountingTypeList = [
{code:false,type:"非独立核算"},
{code:true,type:"独立核算"}
{code: false, type: "非独立核算"},
{code: true, type: "独立核算"}
];
constant.ApplicableAccountingRuleList = [
{code:0,type:"企业会计制度"},
{code:1,type:"金融企业会计制度"},
{code:2,type:"小企业会计制度"},
{code:3,type:"企业会计准则"}
{code: 0, type: "企业会计制度"},
{code: 1, type: "金融企业会计制度"},
{code: 2, type: "小企业会计制度"},
{code: 3, type: "企业会计准则"}
];
constant.AccountingSoftwareList = [
{code:0,type:"Oracle"},
{code:1,type:"SAP"},
{code:2,type:"其他"}
{code: 0, type: "Oracle"},
{code: 1, type: "SAP"},
{code: 2, type: "其他"}
];
constant.LowValueConsumablesAmortizationMethodList = [
{code:0,type:"一次摊销法"},
{code:1,type:"分期摊销法"},
{code:2,type:"五五摊销法"}
{code: 0, type: "一次摊销法"},
{code: 1, type: "分期摊销法"},
{code: 2, type: "五五摊销法"}
];
constant.TaxCreditRatingList = [
{code:0,type:"A"},
{code:1,type:"B"},
{code:2,type:"C"},
{code:3,type:"D"},
{code:4,type:"M"}
{code: 0, type: "A"},
{code: 1, type: "B"},
{code: 2, type: "C"},
{code: 3, type: "D"},
{code: 4, type: "M"}
];
constant.DepreciationMethodList = [
{code:0,type:"年限平均法(直线法)"},
{code:1,type:"工作量法"},
{code:2,type:"年数总和法"},
{code:3,type:"双倍余额递减法"}
{code: 0, type: "年限平均法(直线法)"},
{code: 1, type: "工作量法"},
{code: 2, type: "年数总和法"},
{code: 3, type: "双倍余额递减法"}
];
constant.importFileType = {
......@@ -1544,51 +1560,51 @@ constant.citImportFileType = {
};
constant.fileTypeList = [
{code:100,type:"月度科目余额表"},
{code:101,type:"日记账"},
{code:102,type:"资产负债表PRC"},
{code:103,type:"利润表PRC"},
{code:104,type:"资产负债表"},
{code:105,type:"利润表"},
{code:106,type:"直接法现金流量表"},
{code:107,type:"所有者权益变动表"},
{code:108,type:"汇率表"}
{code: 100, type: "月度科目余额表"},
{code: 101, type: "日记账"},
{code: 102, type: "资产负债表PRC"},
{code: 103, type: "利润表PRC"},
{code: 104, type: "资产负债表"},
{code: 105, type: "利润表"},
{code: 106, type: "直接法现金流量表"},
{code: 107, type: "所有者权益变动表"},
{code: 108, type: "汇率表"}
];
constant.domesticDataList = [
{code:0,type:"EachTaxAmount"},
{code:1,type:"ActualReturnTax"},
{code:2,type:"GMVSubsidy"},
{code:3,type:"EmployeeNum"},
{code:4,type:"DriverNum"}
{code: 0, type: "EachTaxAmount"},
{code: 1, type: "ActualReturnTax"},
{code: 2, type: "GMVSubsidy"},
{code: 3, type: "EmployeeNum"},
{code: 4, type: "DriverNum"}
];
constant.internationalDataList = [
{code:100,type:"BUData"},
{code:101,type:"TaxData"}
{code: 100, type: "BUData"},
{code: 101, type: "TaxData"}
];
constant.NationalEconomicIndustryList =[
{code:"A",type:"农、林、牧、渔业"},
{code:"B",type:"采矿业"},
{code:"C",type:"制造业"},
{code:"D",type:"电力、热力、燃气及水生产和供应业"},
{code:"E",type:"建筑业"},
{code:"F",type:"批发和零售业"},
{code:"G",type:"交通运输、仓储和邮政业"},
{code:"H",type:"住宿和餐饮业"},
{code:"I",type:"信息传输、软件和信息技术服务业"},
{code:"J",type:"金融业"},
{code:"K",type:"房地产业"},
{code:"L",type:"租赁和商务服务业"},
{code:"M",type:"科学研究和技术服务业"},
{code:"N",type:"水利、环境和公共设施管理业"},
{code:"O",type:"居民服务、修理和其他服务业"},
{code:"P",type:"教育"},
{code:"Q",type:"卫生和社会工作"},
{code:"R",type:"文化、体育和娱乐业"},
{code:"S",type:"公共管理、社会保障和社会组织"},
{code:"T",type:"国际组织"}
constant.NationalEconomicIndustryList = [
{code: "A", type: "农、林、牧、渔业"},
{code: "B", type: "采矿业"},
{code: "C", type: "制造业"},
{code: "D", type: "电力、热力、燃气及水生产和供应业"},
{code: "E", type: "建筑业"},
{code: "F", type: "批发和零售业"},
{code: "G", type: "交通运输、仓储和邮政业"},
{code: "H", type: "住宿和餐饮业"},
{code: "I", type: "信息传输、软件和信息技术服务业"},
{code: "J", type: "金融业"},
{code: "K", type: "房地产业"},
{code: "L", type: "租赁和商务服务业"},
{code: "M", type: "科学研究和技术服务业"},
{code: "N", type: "水利、环境和公共设施管理业"},
{code: "O", type: "居民服务、修理和其他服务业"},
{code: "P", type: "教育"},
{code: "Q", type: "卫生和社会工作"},
{code: "R", type: "文化、体育和娱乐业"},
{code: "S", type: "公共管理、社会保障和社会组织"},
{code: "T", type: "国际组织"}
];
constant.maxButtonTitleLength = 20;
......@@ -1602,23 +1618,23 @@ constant.exportExcelFileName = {
};
constant.anlTemplateNameList = [
{code:0,name:"各税种税额"},
{code:1,name:"实际返还税额"},
{code:2,name:"业务线"},
{code:3,name:"职工人数"},
{code:4,name:"司机人数"},
{code:100,name:"国际税业务数据"},
{code:101,name:"国际税税务数据"}
{code: 0, name: "各税种税额"},
{code: 1, name: "实际返还税额"},
{code: 2, name: "业务线"},
{code: 3, name: "职工人数"},
{code: 4, name: "司机人数"},
{code: 100, name: "国际税业务数据"},
{code: 101, name: "国际税税务数据"}
];
constant.anlDownLoadFileNameList = [
{code:0,name:"各税种税额_"},
{code:1,name:"实际返还税额_"},
{code:2,name:"業務線_"},
{code:3,name:"职工人数_"},
{code:4,name:"司機人數_"},
{code:100,name:"国际税业务数据_"},
{code:101,name:"国际税税务数据_"}
{code: 0, name: "各税种税额_"},
{code: 1, name: "实际返还税额_"},
{code: 2, name: "業務線_"},
{code: 3, name: "职工人数_"},
{code: 4, name: "司機人數_"},
{code: 100, name: "国际税业务数据_"},
{code: 101, name: "国际税税务数据_"}
];
constant.countryCNList = ['安哥拉', '阿富汗', '阿尔巴尼亚', '阿尔及利亚', '安道尔共和国', '安圭拉岛', '安提瓜和巴布达', '阿根廷', '亚美尼亚', '阿森松', '澳大利亚', '奥地利', '阿塞拜疆', '巴哈马', '巴林', '孟加拉国', '巴巴多斯', '白俄罗斯', '比利时', '伯利兹', '贝宁', '百慕大群岛', '玻利维亚', '博茨瓦纳', '巴西', '文莱', '保加利亚', '布基纳法索', '缅甸', '布隆迪', '喀麦隆', '加拿大', '开曼群岛', '中非共和国', '乍得', '智利', '中国', '哥伦比亚', '刚果', '库克群岛', '哥斯达黎加', '古巴', '塞浦路斯', '捷克', '丹麦', '吉布提', '多米尼加共和国', '厄瓜多尔', '埃及', '萨尔瓦多', '爱沙尼亚', '埃塞俄比亚', '斐济', '芬兰', '法国', '法属圭亚那', '法属玻利尼西亚', '加蓬', '冈比亚', '格鲁吉亚', '德国', '加纳', '直布罗陀', '希腊', '格林纳达', '关岛', '危地马拉', '几内亚', '圭亚那', '海地', '洪都拉斯', '香港', '匈牙利', '冰岛', '印度', '印度尼西亚', '伊朗', '伊拉克', '爱尔兰', '以色列', '意大利', '科特迪瓦', '牙买加', '日本', '约旦', '柬埔寨', '哈萨克斯坦', '肯尼亚', '韩国', '科威特', '吉尔吉斯坦', '老挝', '拉脱维亚', '黎巴嫩', '莱索托', '利比里亚', '利比亚', '列支敦士登', '立陶宛', '卢森堡', '澳门', '马达加斯加', '马拉维', '马来西亚', '马尔代夫', '马里', '马耳他', '马里亚那群岛', '马提尼克', '毛里求斯', '墨西哥', '摩尔多瓦', '摩纳哥', '蒙古', '蒙特塞拉特岛', '摩洛哥', '莫桑比克', '纳米比亚', '瑙鲁', '尼泊尔', '荷属安的列斯', '荷兰', '新西兰', '尼加拉瓜', '尼日尔', '尼日利亚', '朝鲜', '挪威', '阿曼', '巴基斯坦', '巴拿马', '巴布亚新几内亚', '巴拉圭', '秘鲁', '菲律宾', '波兰', '葡萄牙', '波多黎各', '卡塔尔', '留尼旺', '罗马尼亚', '俄罗斯', '圣卢西亚', '圣文森特岛', '东萨摩亚(美)', '西萨摩亚', '圣马力诺', '圣多美和普林西比', '沙特阿拉伯', '塞内加尔', '塞舌尔', '塞拉利昂', '新加坡', '斯洛伐克', '斯洛文尼亚', '所罗门群岛', '索马里', '南非', '西班牙', '斯里兰卡', '圣文森特', '苏丹', '苏里南', '斯威士兰', '瑞典', '瑞士', '叙利亚', '台湾省', '塔吉克斯坦', '坦桑尼亚', '泰国', '多哥', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', '乌干达', '乌克兰', '阿拉伯联合酋长国', '英国', '美国', '乌拉圭', '乌兹别克斯坦', '委内瑞拉', '越南', '也门', '南斯拉夫', '津巴布韦', '扎伊尔', '赞比亚'];
......@@ -1626,10 +1642,4 @@ constant.countryCNList = ['安哥拉', '阿富汗', '阿尔巴尼亚', '阿尔
constant.countryENList = ['Angola', 'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Anguilla', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Ascension', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda Is', 'Bolivia', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burma', 'Burundi', 'Cameroon', 'Canada', 'Cayman Is', 'Central African Republic', 'Chad', 'Chile', 'China', 'Colombia', 'Congo', 'Cook Is', 'Costa Rica', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica Rep', 'Ecuador', 'Egypt', 'EI Salvador', 'Estonia', 'Ethiopia', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Grenada', 'Guam', 'Guatemala', 'Guinea', 'Guyana', 'Haiti', 'Honduras', 'Hongkong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Ivory Coast', 'Jamaica', 'Japan', 'Jordan', 'Kampuchea (Cambodia )', 'Kazakstan', 'Kenya', 'Korea', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Mariana Is', 'Martinique', 'Mauritius', 'Mexico', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat Is', 'Morocco', 'Mozambique', 'Namibia', 'Nauru', 'Nepal', 'Netheriands Antilles', 'Netherlands', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'North Korea', 'Norway', 'Oman', 'Pakistan', 'Panama', 'Papua New Cuinea', 'Paraguay', 'Peru', 'Philippines', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russia', 'Saint Lueia', 'Saint Vincent', 'Samoa Eastern', 'Samoa Western', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Is', 'Somali', 'South Africa', 'Spain', 'SriLanka', 'St.Lucia', 'St.Vincent', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikstan', 'Tanzania', 'Thailand', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kiongdom', 'United States of America', 'Uruguay', 'Uzbekistan', 'Venezuela', 'Vietnam', 'Yemen', 'Yugoslavia', 'Zimbabwe', 'Zaire', 'Zambia'];
/************************************************cit constant end*************************************************/
\ No newline at end of file
......@@ -9,7 +9,6 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
return $http.get('/asset/getAssetResultList?assetType=' + assetType + '&projectId=' + projectId + '&taxAccountCompare=' + taxAccountCompare, apiConfig.create());
},
getAssetResultListPage: function (citAssetsListDto) {
debugger;
return $http.post('/asset/getAssetResultListPage', citAssetsListDto, apiConfig.create());
},
getAssetGroupResultData: function (projectId) {
......
......@@ -4,8 +4,8 @@
// AppNavBarController controller for the navigation bar of the application. This controller is responsible for
// manage the different types of the tabs and corresponding menus.
frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log', '$state' ,'loginContext', 'application', 'userService', '$translate', 'vatSessionService', '$interval', 'workflowService',
function ($rootScope, $scope, $log, $state ,loginContext, application, userService, $translate, vatSessionService, $interval, workflowService) {
frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log', '$state', 'loginContext', 'application', 'userService', '$translate', 'vatSessionService', '$interval', 'workflowService',
function ($rootScope, $scope, $log, $state, loginContext, application, userService, $translate, vatSessionService, $interval, workflowService) {
'use strict';
$log.debug('AppNavController.ctor()...');
......@@ -116,39 +116,51 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
// todo 增值税申报和报表审批菜单没有做权限管理,可以在这里一起加上
var list = [];
list.push(constant.adminPermission.WebAdmin);
list.push(constant.vatPermission.code);
list.push(constant.citPermission.code);
list.push(constant.analysisPermisson.code);
list.push(constant.menuRecordManagePermission.code);
list.push(constant.menuListApprovalPermission.code);
$scope.$root.checkUserPermissionList(list).success(function (data) {
$scope.adminSettingShow = data[constant.adminPermission.WebAdmin];
$scope.vatShow = data[constant.vatPermission.code];
$scope.citShow = data[constant.citPermission.code];
$scope.analysisShow = data[constant.analysisPermisson.code];
$scope.menuRecordManageShow = data[constant.menuRecordManagePermission.code];
$scope.menuListApprovalShow = data[constant.menuListApprovalPermission.code];
});
};
//设置 菜单选中状态
var initState = function(){
var initState = function () {
$($('.nav-container .nav-element-left a')[0]).addClass('active');
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
$log.debug("$stateChangeStart: toState="+toState.name);
$log.debug("$stateChangeStart: toState=" + toState.name);
// 这里没想好怎么搞,暂时先这样点击导入按钮更新下display,nav-bar里其他的按钮更新display,其他不做操作
var isNeedHide = angular.equals('notification',toState.name)||
angular.equals('summary',toState.name)||
angular.equals('taxDocumentManage',toState.name)||
angular.equals('overviewCit',toState.name)||
angular.equals('overviewAssetsManage',toState.name)||
angular.equals('listApproval',toState.name)||
angular.equals('overviewVat',toState.name)||
angular.equals('taxDocumentManage',toState.name)||
angular.equals('overview',toState.name);
if(isNeedHide){
var isNeedHide = angular.equals('notification', toState.name) ||
angular.equals('summary', toState.name) ||
angular.equals('taxDocumentManage', toState.name) ||
angular.equals('overviewCit', toState.name) ||
angular.equals('overviewAssetsManage', toState.name) ||
angular.equals('listApproval', toState.name) ||
angular.equals('overviewVat', toState.name) ||
angular.equals('taxDocumentManage', toState.name) ||
angular.equals('overview', toState.name);
if (isNeedHide) {
$('.data-import-contents')[0].style.display = "none";
$('.main-contents')[0].style.width = "";
$('.main-contents')[0].style.float = "";
$('.main-contents')[0].style.styleFloat = "";
$('.main-contents')[0].style.cssFloat = "";
// $('.data-import-contents').removeClass('data-import-contents');
}else if(angular.equals('overviewDataImp',toState.name)){
} else if (angular.equals('overviewDataImp', toState.name)) {
$('.data-import-contents')[0].style.display = "block";
}else if(angular.equals('overviewAnalysis',toState.name)){
} else if (angular.equals('overviewAnalysis', toState.name)) {
$('.data-import-contents')[0].style.display = "block";
}
/*$('.nav-container .nav-element-left a').removeClass('active');
......@@ -156,18 +168,25 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
});
};
var getMenuIndex = function(name){
switch(name){
case 'GlobalSearch': return 0;
case 'summary': return 0;
case 'summaryDashboard': return 3;
case 'RiskPanel': return 3;
case 'DataSummary': return 3;
default: return 2;
};
var getMenuIndex = function (name) {
switch (name) {
case 'GlobalSearch':
return 0;
case 'summary':
return 0;
case 'summaryDashboard':
return 3;
case 'RiskPanel':
return 3;
case 'DataSummary':
return 3;
default:
return 2;
}
;
};
$scope.search = function(){
$scope.search = function () {
PWC.simulateProgress();
$state.go('GlobalSearch');
};
......
......@@ -16,26 +16,26 @@
<!--</a>-->
<!--</div>-->
<div class="nav-element-left">
<a ui-sref="overviewVat" hover-show="first">
<a ui-sref="overviewVat" hover-show="first" ng-if="vatShow">
<span class="nav-icon-color">{{'MenuVAT' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<div class="nav-element-left" ng-if="citShow">
<a ui-sref="overviewCit">
<span class="nav-icon-color">{{'MenuCIT' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<div class="nav-element-left" ng-if="analysisShow">
<a ui-sref="taxDocumentManage">
<span class="nav-icon-color">{{'MenuRecordManage' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<div class="nav-element-left" ng-if="menuRecordManageShow">
<a ui-sref="overviewAnalysis">
<span class="nav-icon-color">{{'MenuAnalysis' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<div class="nav-element-left" ng-if="menuListApprovalShow">
<a ui-sref="listApproval">
<span class="nav-icon-color">{{'MenuListApproval' | translate}}</span>
</a>
......
frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$timeout', '$q', '$log', '$translate', '$state', '$interval',
'uiGridConstants', 'projectService', 'vatSessionService', 'orgService', 'serviceTypeService', 'userService', 'loginContext', 'enums',
'citSessionService', 'region', 'SweetAlert', 'productService', 'localStorageService', 'assetsManageSessionService','serviceLogService',
'citSessionService', 'region', 'SweetAlert', 'productService', 'localStorageService', 'assetsManageSessionService', 'serviceLogService',
'ackUibModal', 'Upload', 'apiInterceptor',
function ($rootScope, $scope, $timeout, $q, $log, $translate, $state, $interval, uiGridConstants, projectService, vatSessionService,
orgService, serviceTypeService, userService, loginContext, enums, citSessionService, region, SweetAlert, productService,
......@@ -82,8 +82,7 @@
var status = "../../../app-resources/images/overview/";
if (region === 'zh-CN') {
status += 'zh-CN';
}
else {
} else {
status += 'en-US';
}
......@@ -136,8 +135,7 @@
var status = "../../../app-resources/images/overview/";
if (region === 'zh-CN') {
status += 'zh-CN';
}
else {
} else {
status += 'en-US';
}
......@@ -177,20 +175,20 @@
function initListGrid() {
var listColumns = [
{ caption: $translate.instant('SequenceNo'), dataField: "index", width: 100, },
{caption: $translate.instant('SequenceNo'), dataField: "index", width: 100,},
//{ caption: $translate.instant('SapDate'), dataField: "sapDate", dataType: "date", format: "yyyy-MM-dd", },
//{ caption: $translate.instant('ProjectNameCol'), dataField: "name", },
{ caption: $translate.instant('ProjectCompanyCol'), dataField: "organizationName", },
{ caption: $translate.instant('PIndustry'), dataField: "industryName", },
{caption: $translate.instant('ProjectCompanyCol'), dataField: "organizationName",},
{caption: $translate.instant('PIndustry'), dataField: "industryName",},
//{
// caption: $translate.instant('SapProductType'), dataField: "sapProductType",
// calculateCellValue: function (rowData) {
// return rowData.sapProductType ? convertProductTypeToStr(rowData.sapProductType) : null;
// },
//},
{ caption: $translate.instant('ProjectYearCol'), dataField: "year", width: 100, },
{ caption: $translate.instant('ProjectServiceCol'), dataField: "serviceTypeName", },
{ caption: $translate.instant('ProjectStatus'), dataField: "projectStatusDisplay", },
{caption: $translate.instant('ProjectYearCol'), dataField: "year", width: 100,},
{caption: $translate.instant('ProjectServiceCol'), dataField: "serviceTypeName",},
{caption: $translate.instant('ProjectStatus'), dataField: "projectStatusDisplay",},
// {
// caption: $translate.instant('TotalBuildAmount'), dataField: "totalAmount",
// format: { type: 'fixedPoint', precision: 2 },
......@@ -209,9 +207,9 @@
// mode: "virtual"
//},
hoverStateEnabled: true,
paging: { pageSize: 20 },
paging: {pageSize: 20},
noDataText: $translate.instant('AccountVoucher_DataGrid_NoDataText'),
selection: { mode: "single" },
selection: {mode: "single"},
onRowClick: function (e) {
$scope.goToService(e.data);
}
......@@ -279,9 +277,9 @@
return regionName;
};
$scope.loginAtms =function(){
document.cookie="LtpaToken=AAECAzVCRkQ2QTAwNUMyNEY2RkZTdXBlckFkbWlumd6hrZ2+cxiAEdE7sMEjLrIBGGg=;";
window.open("http://localhost:18080/index","_blank");
$scope.loginAtms = function () {
document.cookie = "LtpaToken=AAECAzVCRkQ2QTAwNUMyNEY2RkZTdXBlckFkbWlumd6hrZ2+cxiAEdE7sMEjLrIBGGg=;";
window.open("http://localhost:18080/index", "_blank");
}
$scope.initCitDataProcessMockData = function () {
......@@ -303,8 +301,8 @@
result.push(new task(3, constant.DataProccessStatus.ToUpdate, 'DataProcessDataName_UpdateReportConfig', 2, 2, true, 3));
result.push(new task(4, constant.DataProccessStatus.ToUpdate, 'DataProcessDataName_FinanceReport', 2, 2, true, 4));
result.push(new task(5, constant.DataProccessStatus.Unstarted, 'DataProcessDataName_CITQuarterly', 2, 2, false, 5));
result.push(new task(6, constant.DataProccessStatus.Completed,'DataProcessDataName_CITFirstQuarterly', 3, 5, true, 6));
result.push(new task(7, constant.DataProccessStatus.Unstarted,'DataProcessDataName_CITSecondQuarterly', 3, 5, true, 6));
result.push(new task(6, constant.DataProccessStatus.Completed, 'DataProcessDataName_CITFirstQuarterly', 3, 5, true, 6));
result.push(new task(7, constant.DataProccessStatus.Unstarted, 'DataProcessDataName_CITSecondQuarterly', 3, 5, true, 6));
result.push(new task(8, constant.DataProccessStatus.NoData, 'DataProcessDataName_CITThirdQuarterly', 3, 5, true, 6));
result.push(new task(9, constant.DataProccessStatus.NoData, 'DataProcessDataName_CITForthQuarterly', 3, 5, true, 6));
result.push(new task(10, constant.DataProccessStatus.Unstarted, 'DataProcessDataName_YearWorkPaper', 2, 2, true, 7));
......@@ -385,7 +383,7 @@
vatSessionService.projects = _.clone($scope.allResults);
$scope.queryResults = _.clone($scope.allResults);
$scope.gridListOptions.bindingOptions = { "dataSource": "queryResults" };
$scope.gridListOptions.bindingOptions = {"dataSource": "queryResults"};
//$scope.query();
goQueryState();
}, 300);
......@@ -487,8 +485,7 @@
var periodDate;
if (serType === enums.serviceType.CIT) {
periodDate = $scope.currentSelectedYear + "";
}
else {
} else {
periodDate = $scope.currentSelectedYear + "." + $scope.currentSelectedMonth;
}
return periodDate;
......@@ -518,8 +515,7 @@
return i;
}
});
}
else if ($scope.serviceTypeId === enums.serviceType.CIT) {
} else if ($scope.serviceTypeId === enums.serviceType.CIT) {
temp = _.filter(temp, function (i) {
return vatSessionService.year == i.year;
});
......@@ -552,10 +548,12 @@
project.finalStatus = (project.serviceTypeID === enums.serviceType.VAT) ? setLayoutStatusTitle(project.projectStatusList) : setLayoutStatusTitleForCIT(project.projectStatusList);
project.periodDate = (project.serviceTypeID === enums.serviceType.VAT) ? ($scope.currentSelectedYear + "." + $scope.currentSelectedMonth) : ($scope.currentSelectedYear + "");
var oneDemoData = _.find(demoData, function (one) { return one.id === project.id });
var oneDemoData = _.find(demoData, function (one) {
return one.id === project.id
});
if (project.serviceTypeID === enums.serviceType.VAT) {
if (project.projectStatusList !== null && project.projectStatusList[vatSessionService.month] !== undefined && project.projectStatusList[vatSessionService.month] !== 10 && oneDemoData!==undefined) {
if (project.projectStatusList !== null && project.projectStatusList[vatSessionService.month] !== undefined && project.projectStatusList[vatSessionService.month] !== 10 && oneDemoData !== undefined) {
project.taxAmount = oneDemoData.taxAmount;
project.prepadidTaxAmount = oneDemoData.prepadidTaxAmount;
project.taxRate = oneDemoData.taxRate;
......@@ -571,9 +569,8 @@
project.hasWarning = true;
}
// END: For --->> Edmond Meng, CIT Demo
}
else {
if (project.projectStatusList !== null && (Object.keys(project.projectStatusList).length > 0 && project.projectStatusList[Object.keys(project.projectStatusList)[Object.keys(project.projectStatusList).length - 1]] !== 10) && oneDemoData!==undefined) {
} else {
if (project.projectStatusList !== null && (Object.keys(project.projectStatusList).length > 0 && project.projectStatusList[Object.keys(project.projectStatusList)[Object.keys(project.projectStatusList).length - 1]] !== 10) && oneDemoData !== undefined) {
project.taxAmount = oneDemoData.taxAmount;
project.prepadidTaxAmount = oneDemoData.prepadidTaxAmount;
project.taxRate = oneDemoData.taxRate;
......@@ -585,8 +582,7 @@
var status = "../../../app-resources/images/overview/";
if (region === 'zh-CN') {
status += 'zh-CN';
}
else {
} else {
status += 'en-US';
}
status += '/04.png';
......@@ -605,7 +601,7 @@
$scope.queryResults = temp;
$scope.gridListOptions.data = $scope.queryResults;
$scope.projectMsg = $translate.instant('ProjectResultMsg').formatObj({ "ProjectNum": $scope.queryResults.length });
$scope.projectMsg = $translate.instant('ProjectResultMsg').formatObj({"ProjectNum": $scope.queryResults.length});
var notBeginTemp = _.filter(temp, function (i) {
if (i.serviceTypeID === enums.serviceType.VAT)
......@@ -623,8 +619,7 @@
if (i.projectStatusList && i.projectStatusList[vatSessionService.month] != null) {
return i.projectStatusList[vatSessionService.month] === 100;
}
}
else {
} else {
if (i.projectStatusList && i.projectStatusList.length > 0) {
return i.projectStatusList[Object.keys(i.projectStatusList)[Object.keys(i.projectStatusList).length - 1]] === 100;
}
......@@ -672,8 +667,7 @@
localStorageService.set(demoDataComposedByLocalStorage, demoData);
}
else {
} else {
// Get from State:
demoData = localStorageService.get(demoDataComposedByLocalStorage);
}
......@@ -734,7 +728,7 @@
if (!project.clicked) {
project.clicked = true;
$log.debug('goToService()...');
serviceLogService.addEnterProjectLog(loginContext.displayUserName, 'Enter project (id: ' + project.id + ', serviceType: ' + project.serviceTypeID + ')').then(function () {
serviceLogService.addEnterProjectLog(loginContext.userName, 'Enter project (id: ' + project.id + ', serviceType: ' + project.serviceTypeID + ')').then(function () {
if (project.serviceTypeID === enums.serviceType.AssetsManage) {
$state.go('assetsManage.importData.productItem');
assetsManageSessionService.product.fSetCode = project.fSetCode;
......@@ -743,8 +737,7 @@
assetsManageSessionService.project.id = project.id;
assetsManageSessionService.project.serviceTypeID = project.serviceTypeID;
//window.location.href = '/#/assetsManage/importData/productItem';
}
else if (project.serviceTypeID === enums.serviceType.VAT) {
} else if (project.serviceTypeID === enums.serviceType.VAT) {
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[vatSessionService.month])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.id, vatSessionService.month, constant.ProjectStatusEnum.UnStarted)
......@@ -756,8 +749,7 @@
goRightPath(project);
}
});
}
else {
} else {
vatSessionService.project = citSessionService.project = project;
goRightPath(project);
}
......@@ -775,7 +767,7 @@
projectService.getProjectAllStatus(project.id).success(function (org) {
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList = org;
projectService.getProjectStatus( project.id, vatSessionService.month)
projectService.getProjectStatus(project.id, vatSessionService.month)
.success(function (or1) {
if (or1.result) {
project.importSubStatus = or1.data.importSubStatus;
......@@ -786,19 +778,16 @@
})
}
});
}
else {
} else {
vatSessionService.project = project;
goRightPath(project);
}
}
else {
} else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
}
}
else { // project.serviceTypeID === enums.serviceType.CIT
} else { // project.serviceTypeID === enums.serviceType.CIT
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[enums.wholeYearPeriod.import])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.id, enums.wholeYearPeriod.import, constant.ProjectStatusEnum.UnStarted)
......@@ -811,8 +800,7 @@
goRightPath(project);
}
});
}
else {
} else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
......@@ -843,14 +831,12 @@
})
}
});
}
else {
} else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
}
else {
} else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
......@@ -873,12 +859,11 @@
// TODO: CIT 权限
if (project.serviceTypeID === enums.serviceType.CIT) {
$state.go('cit.importData.assetList');
}
else {
} else {
var menuList = [
// constant.vatPermission.dataImport.balanceSheet.queryCode,
// constant.vatPermission.dataImport.journalEntry.queryCode,
// constant.vatPermission.dataImport.erpImport.queryCode,
constant.vatPermission.dataImport.balanceSheet.queryCode,
constant.vatPermission.dataImport.journalEntry.queryCode,
constant.vatPermission.dataImport.erpImport.queryCode,
// constant.vatPermission.dataImport.outputInvoice.queryCode,
// constant.vatPermission.dataImport.inputInvoice.queryCode,
// constant.vatPermission.dataImport.customInvoice.queryCode,
......@@ -886,27 +871,74 @@
// constant.vatPermission.dataImport.invoiceMapping.queryCode,
// constant.vatPermission.dataImport.auditAdjust.queryCode,
constant.vatPermission.dataPreview.balanceSheet.queryCode,
// constant.vatPermission.dataPreview.accountVoucher.queryCode,
// constant.vatPermission.dataPreview.customInvoice.queryCode,
constant.vatPermission.dataPreview.outputInvoice.queryCode,
constant.vatPermission.dataPreview.inputInvoice.queryCode,
constant.vatPermission.dataPreview.trialBalance.queryCode,
constant.vatPermission.dataPreview.profitLoss.queryCode,
constant.vatPermission.dataPreview.offBalanceSheet.queryCode,
constant.vatPermission.dataPreview.journal.queryCode,
constant.vatPermission.dataPreview.cashFlow.queryCode,
constant.vatPermission.dataPreview.invoiceRecord.queryCode,
constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode,
constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
constant.vatPermission.dataPreview.invoiceData.queryCode,
// constant.vatPermission.dataManage.accountMappingCode,
// constant.vatPermission.dataManage.goodsMappingCode,
constant.vatPermission.dataManage.caculateDataCode,
// constant.vatPermission.dataManage.unbilledInvoiceCode,
constant.vatPermission.dataManage.revenueDetailCode,
constant.vatPermission.dataManage.billDetailCode,
constant.vatPermission.reportView.bsplCode,
constant.vatPermission.reportView.taxReturnCode,
constant.vatPermission.dataAnalysis.modelAnalysisCode,
constant.vatPermission.dataAnalysis.dashboard.dashboardCode,
// constant.vatPermission.dataAnalysis.modelAnalysisCode,
// constant.vatPermission.dataAnalysis.dashboard.dashboardCode,
//constant.vatPermission.dataAnalysis.vatTaxDifferenceCode,
];
$scope.$root.checkUserOrganizationPermissionList(menuList).success(function (data) {
//TODO 加上跳转
if (data) {
if (data[constant.vatPermission.dataImport.balanceSheet.queryCode]) {
$state.go('vat.importData.balanceSheet');
} else if (data[constant.vatPermission.dataImport.journalEntry.queryCode]) {
$state.go('vat.importData.journalEntry');
} else if (data[constant.vatPermission.dataImport.erpImport.queryCode]) {
$state.go('vat.importData.erpImport');
} else if (data[constant.vatPermission.dataPreview.trialBalance.queryCode]) {
$state.go('vat.previewData.trialBalance');
} else if (data[constant.vatPermission.previewData.profitLoss.queryCode]) {
$state.go('vat.previewData.profitLoss');
} else if (data[constant.vatPermission.previewData.offBalanceSheet.queryCode]) {
$state.go('vat.previewData.offBalanceSheet');
} else if (data[constant.vatPermission.previewData.journal.queryCode]) {
$state.go('vat.previewData.journal');
} else if (data[constant.vatPermission.previewData.cashFlow.queryCode]) {
$state.go('vat.previewData.cashFlow');
} else if (data[constant.vatPermission.previewData.invoiceRecord.queryCode]) {
$state.go('vat.previewData.invoiceRecord');
} else if (data[constant.vatPermission.previewData.certifiedInvoicesList.queryCode]) {
$state.go('vat.previewData.certifiedInvoicesList');
} else if (data[constant.vatPermission.previewData.redLetterInformationTable.queryCode]) {
$state.go('vat.previewData.redLetterInfoTab');
} else if (data[constant.vatPermission.previewData.coupaPurchasingReport.queryCode]) {
$state.go('vat.previewData.coupaPurchasingReport');
} else if (data[constant.vatPermission.previewData.invoiceData.queryCode]) {
$state.go('vat.previewData.invoiceData');
} else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
$state.go('vat.reductionData.caculateData');
} else if (data[constant.vatPermission.dataManage.revenueDetailCode]) {
$state.go('vat.reductionData.revenueDetail');
} else if (data[constant.vatPermission.dataManage.billDetailCode]) {
$state.go('vat.reductionData.billDetail');
} else if (data[constant.vatPermission.reportView.bsplCode]) {
$state.go('vat.generateReport.reportView');
} else if (data[constant.vatPermission.reportView.taxReturnCode]) {
$state.go('vat.generateReport.reportUploadView');
}
// if (data[constant.vatPermission.dataImport.balanceSheet.queryCode]) {
// $state.go('vat.importData.balanceSheet');
// } else if (data[constant.vatPermission.dataImport.journalEntry.queryCode]) {
......@@ -926,17 +958,12 @@
// } else if (data[constant.vatPermission.dataImport.invoiceMapping.queryCode]) {./
// $state.go('vat.importData.invoiceMapping');
// } else
if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
$state.go('vat.previewData.balanceSheet');
}
// else if (data[constant.vatPermission.dataPreview.accountVoucher.queryCode]) {
// $state.go('vat.previewData.accountVoucher');
// } else
else if (data[constant.vatPermission.dataPreview.inputInvoice.queryCode]) {
$state.go('vat.previewData.inputInvoice');
} else if (data[constant.vatPermission.dataPreview.outputInvoice.queryCode]) {
$state.go('vat.previewData.outputInvoice');
}
// else if (data[constant.vatPermission.dataPreview.customInvoice.queryCode]) {
// $state.go('vat.previewData.customInvoice');
// }
......@@ -945,21 +972,34 @@
// } else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
// $state.go('vat.reductionData.goodsMapping');
// }
else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
$state.go('vat.reductionData.caculateData');
}else if (data[constant.vatPermission.dataManage.revenueDetailCode]){
$state.go('vat.reductionData.revenueDetail');
}else if (data[constant.vatPermission.dataManage.billDetailCode]){
$state.go('vat.reductionData.billDetail');
} /*else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
$state.go('vat.reductionData.unbilledInvoice');
}*/ else if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
$state.go('vat.generateReport');
} else if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) {
$state.go('vat.analyzeLayout.analyzeReport');
} else if (data[constant.vatPermission.dataAnalysis.dashboard.dashboardCode]) {
$state.go('analyzeOrganizeDashboard');
}
//TODO 删除的部分
// if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
// $state.go('vat.previewData.balanceSheet');
// }
// else if (data[constant.vatPermission.dataPreview.inputInvoice.queryCode]) {
// $state.go('vat.previewData.inputInvoice');
// } else if (data[constant.vatPermission.dataPreview.outputInvoice.queryCode]) {
// $state.go('vat.previewData.outputInvoice');
// }
// else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
// $state.go('vat.reductionData.caculateData');
// } else if (data[constant.vatPermission.dataManage.revenueDetailCode]) {
// $state.go('vat.reductionData.revenueDetail');
// } else if (data[constant.vatPermission.dataManage.billDetailCode]) {
// $state.go('vat.reductionData.billDetail');
// } /*else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
// $state.go('vat.reductionData.unbilledInvoice');
// }*/ else if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
// $state.go('vat.generateReport');
// } else if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) {
// $state.go('vat.analyzeLayout.analyzeReport');
// } else if (data[constant.vatPermission.dataAnalysis.dashboard.dashboardCode]) {
// $state.go('analyzeOrganizeDashboard');
// }
//else if (data[constant.vatPermission.dataAnalysis.vatTaxDifferenceCode]) {
// $state.go('vat.analyzeLayout.vatTaxDifference');
//}
......@@ -1082,7 +1122,7 @@
};
$scope.changeStartDate = function (e) {
if (e&&e.date) {
if (e && e.date) {
var tempYear = e.date.getFullYear();
var tempMonth = e.date.getMonth() + 1;
$scope.currentSelectedStartMonth = tempMonth;
......@@ -1398,14 +1438,14 @@
//初始化产品列表
function initProductListGrid() {
var listColumns = [
{ caption: '年份', dataField: 'fYear' },
{ caption: '产品标识', dataField: "fSetID" },
{ caption: '产品编号', dataField: "fSetCode" },
{ caption: '产品描述(名称)', dataField: "fSetName" },
{ caption: '财务主管', dataField: "fManager" },
{ caption: '启用年份', dataField: "fStartYear" },
{ caption: '启用月份', dataField: "fStartMonth" },
{ caption: '所属机构', dataField: "accountDepartment" }
{caption: '年份', dataField: 'fYear'},
{caption: '产品标识', dataField: "fSetID"},
{caption: '产品编号', dataField: "fSetCode"},
{caption: '产品描述(名称)', dataField: "fSetName"},
{caption: '财务主管', dataField: "fManager"},
{caption: '启用年份', dataField: "fStartYear"},
{caption: '启用月份', dataField: "fStartMonth"},
{caption: '所属机构', dataField: "accountDepartment"}
];
$scope.gridListOptions = {
showBorders: true,
......@@ -1417,9 +1457,9 @@
enabled: true
},
hoverStateEnabled: true,
paging: { pageSize: 20 },
paging: {pageSize: 20},
noDataText: $translate.instant('AccountVoucher_DataGrid_NoDataText'),
selection: { mode: "single" },
selection: {mode: "single"},
onRowClick: function (e) {
$scope.goToService(e.data);
},
......@@ -1490,7 +1530,7 @@
if (!v.productIDs) {
var item = new Object;
item.name = v.fSetName;
item.content = { id: v.fSetCode, guid: v.id};
item.content = {id: v.fSetCode, guid: v.id};
$scope.treeDataSource.push(item);
}
});
......@@ -1526,7 +1566,7 @@
},
onItemSelectionChanged: function (args) {
var keyValue = args.component.getSelectedNodesKeys();
if (keyValue.length===0) {
if (keyValue.length === 0) {
keyValue = [""];
}
var value = [""];
......@@ -1546,7 +1586,7 @@
$scope.treeBoxValue = keyValue;
$scope.newNewtreeBoxValue = value;
$scope.newTreeBoxValue = newValue;
var tempArray = nameValue.length===1?nameValue:nameValue.shift();
var tempArray = nameValue.length === 1 ? nameValue : nameValue.shift();
$scope.treeBoxNameValue = nameValue;
}
}
......@@ -1587,12 +1627,10 @@
if (sourceNumber.length > 1) {
if (sourceNumber < 10) {
return sourceNumber.replace(/0/g, '');
}
else {
} else {
return sourceNumber;
}
}
else {
} else {
return sourceNumber;
}
};
......@@ -1729,10 +1767,10 @@
initDatePickers();
$scope.updateStatus = false;
if($.isEmptyObject(vatSessionService.orgTree)){
if ($.isEmptyObject(vatSessionService.orgTree)) {
orgService.getOrgListLevel().success(function (data) {
if(data&&$.isEmptyObject(vatSessionService.orgTree)){
vatSessionService.orgTree=data;
if (data && $.isEmptyObject(vatSessionService.orgTree)) {
vatSessionService.orgTree = data;
$scope.orgTreeUpdate = true;
}
});
......@@ -1753,12 +1791,11 @@
vatSessionService.userPermission = userPermission;
orgDisplay.main();
if ($scope.serviceTypeId === enums.serviceType.AssetsManage) {
$scope.projectMsg = $translate.instant('ProjectResultMsg').formatObj({ "ProjectNum": 66 });
$scope.projectMsg = $translate.instant('ProjectResultMsg').formatObj({"ProjectNum": 66});
initProductListGrid();
$scope.initProductList();
$scope.toggleView('listView');
}
else {
} else {
$scope.initProjectList();
}
});
......@@ -1770,7 +1807,7 @@
});
$scope.$watch('orgTreeUpdate', function (newValue, oldValue) {
if(newValue===true){
if (newValue === true) {
orgDisplay.getOrgData();
}
});
......@@ -1820,7 +1857,7 @@ frameworkModule.factory('assetsManageSessionService', ['$log', function ($log) {
reset: reset,
product: {
fSetCode: '11111111111111111111',
productIDs:'xxxxxxxxxxxxxxxxxxxx'
productIDs: 'xxxxxxxxxxxxxxxxxxxx'
}
}
......
vatModule.controller('VatLayoutController', ['$scope', '$rootScope', '$q', '$log', '$timeout', '$state', '$translate', 'projectService', 'SweetAlert', 'loginContext'
, 'vatSessionService', 'vatCommonService', 'vatWorkflowService', 'application', 'enums', '$uibModal',
function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectService, SweetAlert, loginContext
function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectService, SweetAlert, loginContext
, vatSessionService, vatCommonService, vatWorkflowService, application, enums, $uibModal) {
'use strict';
$log.debug('VatLayoutController.ctor()...');
$scope.dateFormat = $translate.instant('dateFormat4YearMonth');
$scope.showSubMenu = true;
if(vatSessionService.project.projectName){
if (vatSessionService.project.projectName) {
$scope.projectName = vatSessionService.project.projectName;
}else{
} else {
$scope.projectName = vatSessionService.project.organizationName + '(' + vatSessionService.project.year + ')';
}
......@@ -48,19 +48,21 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
vatSessionService.dataChanged = false;
if (_.contains(mainMenu, toState.name)) {
goFirstSubMenu(toState);
}
else {
} else {
$state.go(toState, toParams, options);
};
};
});
}
else {
;
}
;
});
} else {
if (_.contains(mainMenu, toState.name)) {
event.preventDefault();
goFirstSubMenu(toState);
};
};
}
;
}
;
});
$scope.changeDate = function (e) {
......@@ -72,24 +74,22 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
projectService.isProjectStatusExisted(vatSessionService.project.id, temp).success(function (or) {
if (or.result) {//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
if (_.isNull(or.data)) {
projectService.setProjectStatus( temp, constant.ProjectStatusEnum.UnStarted).success(function (or) {
projectService.setProjectStatus(temp, constant.ProjectStatusEnum.UnStarted).success(function (or) {
if (or.result) {
vatSessionService.project.projectStatusList[temp] = constant.ProjectStatusEnum.UnStarted;
initStatus(vatSessionService.project.id, temp);
}
else {
} else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
}).error(function(e){
}).error(function (e) {
vatSessionService.project.projectStatusList[temp] = constant.ProjectStatusEnum.UnStarted;
initStatus(vatSessionService.project.id, temp);
});
}
else { //已经导入的话,更新最新项目状态
} else { //已经导入的话,更新最新项目状态
vatSessionService.project.projectStatusList[temp] = or.data.status;
initStatus( vatSessionService.project.id, temp);
initStatus(vatSessionService.project.id, temp);
}
}else{
} else {
vatSessionService.project.projectStatusList[temp] = constant.ProjectStatusEnum.UnStarted;
initStatus(vatSessionService.project.id, temp);
}
......@@ -100,24 +100,25 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
if (isConfirm) {
vatSessionService.dataChanged = false;
vatSessionService.month = temp;
$scope.selectedDate = new Date(vatSessionService.project.year, temp - 1, 1);;
$scope.selectedDate = new Date(vatSessionService.project.year, temp - 1, 1);
;
$state.reload($state.$current);
} else {
$scope.elePicker.datepicker("setDate", $scope.selectedDate);
};
});
}
else {
;
});
} else {
vatSessionService.month = temp;
$scope.selectedDate = new Date(vatSessionService.project.year, temp - 1, 1);
//查看报表时路由为三层结构,特殊处理,其他逻辑不变
if ($state.$current.parent && $state.$current.parent.self.name === 'vat.generateReport') {
$scope.$broadcast('refreshGenerateReport', { templateId: $state.params.templateid });
}
else {
$scope.$broadcast('refreshGenerateReport', {templateId: $state.params.templateid});
} else {
$state.reload($state.$current);
}
};
}
;
}, 100);
}
};
......@@ -125,35 +126,49 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
$scope.setPermissionMenu = function () {
$scope.menus = [];
var menuList = [
// constant.vatPermission.dataImport.balanceSheet.queryCode,
// constant.vatPermission.dataImport.journalEntry.queryCode,
// constant.vatPermission.dataImport.erpImport.queryCode,
// constant.vatPermission.dataImport.outputInvoice.queryCode,
// constant.vatPermission.dataImport.inputInvoice.queryCode,
// constant.vatPermission.dataImport.customInvoice.queryCode,
// constant.vatPermission.dataImport.voucherMapping.queryCode,
// constant.vatPermission.dataImport.invoiceMapping.queryCode,
// constant.vatPermission.dataImport.auditAdjust.queryCode,
constant.vatPermission.dataPreview.balanceSheet.queryCode,
// constant.vatPermission.dataPreview.accountVoucher.queryCode,
// constant.vatPermission.dataPreview.customInvoice.queryCode,
constant.vatPermission.dataPreview.outputInvoice.queryCode,
constant.vatPermission.dataPreview.inputInvoice.queryCode,
constant.vatPermission.dataImport.balanceSheet.queryCode,
constant.vatPermission.dataImport.journalEntry.queryCode,
constant.vatPermission.dataImport.erpImport.queryCode,
// constant.vatPermission.dataImport.outputInvoice.queryCode,
// constant.vatPermission.dataImport.inputInvoice.queryCode,
// constant.vatPermission.dataImport.customInvoice.queryCode,
// constant.vatPermission.dataImport.voucherMapping.queryCode,
// constant.vatPermission.dataImport.invoiceMapping.queryCode,
// constant.vatPermission.dataImport.auditAdjust.queryCode,
constant.vatPermission.dataPreview.trialBalance.queryCode,
constant.vatPermission.dataPreview.profitLoss.queryCode,
constant.vatPermission.dataPreview.offBalanceSheet.queryCode,
constant.vatPermission.dataPreview.journal.queryCode,
constant.vatPermission.dataPreview.cashFlow.queryCode,
constant.vatPermission.dataPreview.invoiceRecord.queryCode,
constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode,
constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
constant.vatPermission.dataPreview.invoiceData.queryCode,
constant.vatPermission.dataManage.caculateDataCode,
constant.vatPermission.dataManage.revenueDetailCode,
constant.vatPermission.dataManage.billDetailCode,
// constant.vatPermission.dataManage.accountMappingCode,
// constant.vatPermission.dataManage.goodsMappingCode,
// constant.vatPermission.dataManage.unbilledInvoiceCode,
//constant.vatPermission.dataAnalysis.vatTaxDifferenceCode,
// constant.vatPermission.dataPreview.balanceSheet.queryCode,
//
// constant.vatPermission.dataPreview.outputInvoice.queryCode,
// constant.vatPermission.dataPreview.inputInvoice.queryCode,
constant.vatPermission.dataManage.caculateDataCode,
constant.vatPermission.dataManage.revenueDetailCode,
constant.vatPermission.dataManage.billDetailCode,
constant.vatPermission.reportView.bsplCode,
constant.vatPermission.reportView.taxReturnCode,
constant.vatPermission.dataAnalysis.modelAnalysisCode,
constant.vatPermission.dataAnalysis.dashboard.dashboardCode,
//constant.vatPermission.dataAnalysis.vatTaxDifferenceCode,
// constant.vatPermission.dataAnalysis.modelAnalysisCode,
// constant.vatPermission.dataAnalysis.dashboard.dashboardCode,
];
$scope.$root.checkUserOrganizationPermissionList(menuList).success(function (data) {
......@@ -164,91 +179,109 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.balanceSheet', state: 'importData.balanceSheet', num: 1,
permission: constant.vatPermission.dataImport.balanceSheet.queryCode, url: '#/vat/importData/balanceSheet'
name: 'importData.balanceSheet',
state: 'importData.balanceSheet',
num: 1,
permission: constant.vatPermission.dataImport.balanceSheet.queryCode,
url: '#/vat/importData/balanceSheet'
});
}
else if (data[constant.vatPermission.dataImport.journalEntry.queryCode]) {
} else if (data[constant.vatPermission.dataImport.journalEntry.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.journalEntry', state: 'importData.journalEntry', num: 1,
permission: constant.vatPermission.dataImport.journalEntry.queryCode, url: '#/vat/importData/journalEntry'
name: 'importData.journalEntry',
state: 'importData.journalEntry',
num: 1,
permission: constant.vatPermission.dataImport.journalEntry.queryCode,
url: '#/vat/importData/journalEntry'
});
}
else if (data[constant.vatPermission.dataImport.erpImport.queryCode]) {
} else if (data[constant.vatPermission.dataImport.erpImport.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.erpData', state: 'importData.erpData', num: 1,
permission: constant.vatPermission.dataImport.erpImport.queryCode, url: '#/vat/importData/erpData'
name: 'importData.erpData',
state: 'importData.erpData',
num: 1,
permission: constant.vatPermission.dataImport.erpImport.queryCode,
url: '#/vat/importData/erpData'
});
}
else if (data[constant.vatPermission.dataImport.outputInvoice.queryCode]) {
} else if (data[constant.vatPermission.dataImport.outputInvoice.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.outputInvoice', state: 'importData.outputInvoice', num: 1,
permission: constant.vatPermission.dataImport.outputInvoice.queryCode, url: '#/vat/importData/outputInvoice'
name: 'importData.outputInvoice',
state: 'importData.outputInvoice',
num: 1,
permission: constant.vatPermission.dataImport.outputInvoice.queryCode,
url: '#/vat/importData/outputInvoice'
});
}
else if (data[constant.vatPermission.dataImport.inputInvoice.queryCode]) {
} else if (data[constant.vatPermission.dataImport.inputInvoice.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.inputInvoice', state: 'importData.inputInvoice', num: 1,
permission: constant.vatPermission.dataImport.inputInvoice.queryCode, url: '#/vat/importData/inputInvoice'
name: 'importData.inputInvoice',
state: 'importData.inputInvoice',
num: 1,
permission: constant.vatPermission.dataImport.inputInvoice.queryCode,
url: '#/vat/importData/inputInvoice'
});
}
else if (data[constant.vatPermission.dataImport.customInvoice.queryCode]) {
} else if (data[constant.vatPermission.dataImport.customInvoice.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.customInvoice', state: 'importData.customInvoice', num: 1,
permission: constant.vatPermission.dataImport.customInvoice.queryCode, url: '#/vat/importData/customInvoice'
name: 'importData.customInvoice',
state: 'importData.customInvoice',
num: 1,
permission: constant.vatPermission.dataImport.customInvoice.queryCode,
url: '#/vat/importData/customInvoice'
});
}
else if (data[constant.vatPermission.dataImport.voucherMapping.queryCode]) {
} else if (data[constant.vatPermission.dataImport.voucherMapping.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.voucherMapping', state: 'importData.voucherMapping', num: 1,
permission: constant.vatPermission.dataImport.voucherMapping.queryCode, url: '#/vat/importData/voucherMapping'
name: 'importData.voucherMapping',
state: 'importData.voucherMapping',
num: 1,
permission: constant.vatPermission.dataImport.voucherMapping.queryCode,
url: '#/vat/importData/voucherMapping'
});
}
else if (data[constant.vatPermission.dataImport.invoiceMapping.queryCode]) {
} else if (data[constant.vatPermission.dataImport.invoiceMapping.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.invoiceMapping', state: 'importData.invoiceMapping', num: 1,
permission: constant.vatPermission.dataImport.invoiceMapping.queryCode, url: '#/vat/importData/invoiceMapping'
name: 'importData.invoiceMapping',
state: 'importData.invoiceMapping',
num: 1,
permission: constant.vatPermission.dataImport.invoiceMapping.queryCode,
url: '#/vat/importData/invoiceMapping'
});
}
else if (data[constant.vatPermission.dataImport.auditAdjust.queryCode]) {
} else if (data[constant.vatPermission.dataImport.auditAdjust.queryCode]) {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
});
subMenus.push({
name: 'importData.auditAdjust', state: 'importData.auditAdjust', num: 1,
permission: constant.vatPermission.dataImport.auditAdjust.queryCode, url: '#/vat/importData/auditAdjust'
name: 'importData.auditAdjust',
state: 'importData.auditAdjust',
num: 1,
permission: constant.vatPermission.dataImport.auditAdjust.queryCode,
url: '#/vat/importData/auditAdjust'
});
}
else {
} else {
$scope.menus.push({
name: 'importData', state: 'importData', num: 1,
permission: constant.vatPermission.dataImport.dataImportCode, url: '#/vat/importData'
......@@ -259,50 +292,221 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
});
}
if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
// TODO
if (data[constant.vatPermission.dataPreview.trialBalance.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.balanceSheet', state: 'previewData.balanceSheet', num: 2,
permission: constant.vatPermission.dataPreview.balanceSheet.queryCode, url: '#/vat/previewData/balanceSheet'
name: 'previewData.trialBalance',
state: 'previewData.trialBalance',
num: 2,
permission: constant.vatPermission.dataPreview.trialBalance.queryCode,
url: '#/vat/previewData/trialBalance'
});
} else if (data[constant.vatPermission.dataPreview.profitLoss.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
// }
// else if (data[constant.vatPermission.dataPreview.accountVoucher.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
// permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// });
// subMenus.push({
// name: 'previewData.accountVoucher', state: 'previewData.accountVoucher', num: 2,
// permission: constant.vatPermission.dataPreview.accountVoucher.queryCode, url: '#/vat/previewData/accountVoucher'
// });
// }
// else if (data[constant.vatPermission.dataPreview.inputInvoice.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
// permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// });
subMenus.push({
name: 'previewData.inputInvoice', state: 'previewData.inputInvoice', num: 2,
permission: constant.vatPermission.dataPreview.inputInvoice.queryCode, url: '#/vat/previewData/inputInvoice'
name: 'previewData.profitLoss',
state: 'previewData.profitLoss',
num: 2,
permission: constant.vatPermission.dataPreview.profitLoss.queryCode,
url: '#/vat/previewData/profitLoss'
});
} else if (data[constant.vatPermission.dataPreview.offBalanceSheet.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.offBalanceSheet',
state: 'previewData.offBalanceSheet',
num: 2,
permission: constant.vatPermission.dataPreview.offBalanceSheet.queryCode,
url: '#/vat/previewData/offBalanceSheet'
});
} else if (data[constant.vatPermission.dataPreview.journal.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.journal',
state: 'previewData.journal',
num: 2,
permission: constant.vatPermission.dataPreview.journal.queryCode,
url: '#/vat/previewData/journal'
});
} else if (data[constant.vatPermission.dataPreview.cashFlow.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.cashFlow',
state: 'previewData.cashFlow',
num: 2,
permission: constant.vatPermission.dataPreview.cashFlow.queryCode,
url: '#/vat/previewData/cashFlow'
});
} else if (data[constant.vatPermission.dataPreview.invoiceRecord.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.invoiceRecord',
state: 'previewData.invoiceRecord',
num: 2,
permission: constant.vatPermission.dataPreview.invoiceRecord.queryCode,
url: '#/vat/previewData/invoiceRecord'
});
} else if (data[constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
// }
// else if (data[constant.vatPermission.dataPreview.outputInvoice.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
// permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// });
subMenus.push({
name: 'previewData.outputInvoice', state: 'previewData.outputInvoice', num: 2,
permission: constant.vatPermission.dataPreview.outputInvoice.queryCode, url: '#/vat/previewData/outputInvoice'
name: 'previewData.certifiedInvoicesList',
state: 'previewData.certifiedInvoicesList',
num: 2,
permission: constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode,
url: '#/vat/previewData/certifiedInvoicesList'
});
} else if (data[constant.vatPermission.dataPreview.redLetterInformationTable.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.redLetterInfoTab',
state: 'previewData.redLetterInfoTab',
num: 2,
permission: constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
url: '#/vat/previewData/redLetterInfoTab'
});
} else if (data[constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.coupaPurchasingReport',
state: 'previewData.coupaPurchasingReport',
num: 2,
permission: constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
url: '#/vat/previewData/coupaPurchasingReport'
});
} else if (data[constant.vatPermission.dataPreview.invoiceData.queryCode]) {
$scope.menus.push({
name: 'previewData',
state: 'previewData',
num: 2,
permission: constant.vatPermission.dataPreview.dataPreviewCode,
url: '#/vat/importData'
});
subMenus.push({
name: 'previewData.outputoffInvoice', state: 'previewData.outputoffInvoice', num: 2,
permission: constant.vatPermission.dataPreview.outputInvoice.queryCode, url: '#/vat/previewData/outputoffInvoice'
name: 'previewData.invoiceData',
state: 'previewData.invoiceData',
num: 2,
permission: constant.vatPermission.dataPreview.invoiceData.queryCode,
url: '#/vat/previewData/invoiceData'
});
}
// TODO
// TODO 待删除
// if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
// permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// });
// subMenus.push({
// name: 'previewData.balanceSheet',
// state: 'previewData.balanceSheet',
// num: 2,
// permission: constant.vatPermission.dataPreview.balanceSheet.queryCode,
// url: '#/vat/previewData/balanceSheet'
// });
//
// // }
// // else if (data[constant.vatPermission.dataPreview.accountVoucher.queryCode]) {
// // $scope.menus.push({
// // name: 'previewData', state: 'previewData', num: 2,
// // permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// // });
// // subMenus.push({
// // name: 'previewData.accountVoucher', state: 'previewData.accountVoucher', num: 2,
// // permission: constant.vatPermission.dataPreview.accountVoucher.queryCode, url: '#/vat/previewData/accountVoucher'
// // });
// // }
// // else if (data[constant.vatPermission.dataPreview.inputInvoice.queryCode]) {
// // $scope.menus.push({
// // name: 'previewData', state: 'previewData', num: 2,
// // permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// // });
// subMenus.push({
// name: 'previewData.inputInvoice',
// state: 'previewData.inputInvoice',
// num: 2,
// permission: constant.vatPermission.dataPreview.inputInvoice.queryCode,
// url: '#/vat/previewData/inputInvoice'
// });
// // }
// // else if (data[constant.vatPermission.dataPreview.outputInvoice.queryCode]) {
// // $scope.menus.push({
// // name: 'previewData', state: 'previewData', num: 2,
// // permission: constant.vatPermission.dataPreview.dataPreviewCode, url: '#/vat/previewData'
// // });
// subMenus.push({
// name: 'previewData.outputInvoice',
// state: 'previewData.outputInvoice',
// num: 2,
// permission: constant.vatPermission.dataPreview.outputInvoice.queryCode,
// url: '#/vat/previewData/outputInvoice'
// });
// subMenus.push({
// name: 'previewData.outputoffInvoice',
// state: 'previewData.outputoffInvoice',
// num: 2,
// permission: constant.vatPermission.dataPreview.outputInvoice.queryCode,
// url: '#/vat/previewData/outputoffInvoice'
// });
// }
// else if (data[constant.vatPermission.dataPreview.customInvoice.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
......@@ -330,19 +534,27 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
});
subMenus.push({
name: 'reductionData.caculateData', state: 'reductionData.caculateData', num: 3,
permission: constant.vatPermission.dataManage.caculateDataCode, url: '#/vat/reductionData/caculateData'
name: 'reductionData.caculateData',
state: 'reductionData.caculateData',
num: 3,
permission: constant.vatPermission.dataManage.caculateDataCode,
url: '#/vat/reductionData/caculateData'
});
subMenus.push({
name: 'reductionData.revenueDetail', state: 'reductionData.revenueDetail', num: 3,
permission: constant.vatPermission.dataManage.revenueDetailCode, url: '#/vat/reductionData/revenueDetail'
name: 'reductionData.revenueDetail',
state: 'reductionData.revenueDetail',
num: 3,
permission: constant.vatPermission.dataManage.revenueDetailCode,
url: '#/vat/reductionData/revenueDetail'
});
subMenus.push({
name: 'reductionData.billDetail', state: 'reductionData.billDetail', num: 3,
permission: constant.vatPermission.dataManage.billDetailCode, url: '#/vat/reductionData/billDetail'
name: 'reductionData.billDetail',
state: 'reductionData.billDetail',
num: 3,
permission: constant.vatPermission.dataManage.billDetailCode,
url: '#/vat/reductionData/billDetail'
});
}
else if (data[constant.vatPermission.dataManage.accountMappingCode]) {
} else if (data[constant.vatPermission.dataManage.accountMappingCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
......@@ -351,8 +563,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
name: 'reductionData.accountMapping', state: 'reductionData.accountMapping', num: 3,
permission: constant.vatPermission.dataManage.accountMappingCode, url: '#/vat/reductionData/accountMapping'
});*/
}
else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
} else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
......@@ -361,8 +572,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
name: 'reductionData.goodsMapping', state: 'reductionData.goodsMapping', num: 3,
permission: constant.vatPermission.dataManage.goodsMappingCode, url: '#/vat/reductionData/goodsMapping'
});*/
}
else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
} else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
......@@ -375,12 +585,18 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
$scope.menus.push({
name: 'generateReport', state: 'generateReport', num: 4,
permission: constant.vatPermission.reportView.reportViewCode, url: '#/vat/generateReport'
name: 'generateReport',
state: 'generateReport',
num: 4,
permission: constant.vatPermission.reportView.reportViewCode,
url: '#/vat/generateReport'
});
subMenus.push({
name: 'generateReport', state: 'generateReport', num: 4,
permission: constant.vatPermission.reportView.reportViewCode, url: '#/vat/generateReport'
name: 'generateReport',
state: 'generateReport',
num: 4,
permission: constant.vatPermission.reportView.reportViewCode,
url: '#/vat/generateReport'
});
}
......@@ -416,7 +632,8 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
// });
}
}
});
}
);
}
......@@ -429,16 +646,15 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
}
});
if (state) {
if (state['state'] && state['state'].indexOf('analyzeOrganizeDashboard')>=0) {
$state.go('organizationDashboard', { id: vatSessionService.project.organizationID });
}
else {
if (state['state'] && state['state'].indexOf('analyzeOrganizeDashboard') >= 0) {
$state.go('organizationDashboard', {id: vatSessionService.project.organizationID});
} else {
$state.go('vat.' + state['state']);
}
}
else {
} else {
$state.go(toState);
};
}
;
}
}
......@@ -539,15 +755,51 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
function setSubStatusDto() {
$log.debug("setSubStatusDto");
$scope.subStatusList = [];
var tbStatus = { dispalyIndex: 1, name: $translate.instant('balanceSheet'), isImported: vatSessionService.project.importSubStatus.isTbImport };
var entryStatus = { dispalyIndex: 2, name: $translate.instant('JournalEntryTitle'), isImported: vatSessionService.project.importSubStatus.isEntryImport };
var erpStatus = { dispalyIndex: 3, name: $translate.instant('erpData'), isImported: vatSessionService.project.importSubStatus.isErpImport };
var outputInvoiceStatus = { dispalyIndex: 4, name: $translate.instant('outputInvoice'), isImported: vatSessionService.project.importSubStatus.isOutputInvoiceImport };
var inputInvoiceStatus = { dispalyIndex: 5, name: $translate.instant('inputInvoice'), isImported: vatSessionService.project.importSubStatus.isInputInvoiceImport };
var customStatus = { dispalyIndex: 6, name: $translate.instant('customInvoice'), isImported: vatSessionService.project.importSubStatus.isCustomInvoiceImport };
var voucherMapStatus = { dispalyIndex: 7, name: $translate.instant('voucherMapping'), isImported: vatSessionService.project.importSubStatus.isVoucherMapImport };
var invoiceMapStatus = { dispalyIndex: 8, name: $translate.instant('invoiceMapping'), isImported: vatSessionService.project.importSubStatus.isInvoiceMapImport };
var adjustStatus = { dispalyIndex: 9, name: $translate.instant('auditAdjust'), isImported: vatSessionService.project.importSubStatus.isAdjustImport };
var tbStatus = {
dispalyIndex: 1,
name: $translate.instant('balanceSheet'),
isImported: vatSessionService.project.importSubStatus.isTbImport
};
var entryStatus = {
dispalyIndex: 2,
name: $translate.instant('JournalEntryTitle'),
isImported: vatSessionService.project.importSubStatus.isEntryImport
};
var erpStatus = {
dispalyIndex: 3,
name: $translate.instant('erpData'),
isImported: vatSessionService.project.importSubStatus.isErpImport
};
var outputInvoiceStatus = {
dispalyIndex: 4,
name: $translate.instant('outputInvoice'),
isImported: vatSessionService.project.importSubStatus.isOutputInvoiceImport
};
var inputInvoiceStatus = {
dispalyIndex: 5,
name: $translate.instant('inputInvoice'),
isImported: vatSessionService.project.importSubStatus.isInputInvoiceImport
};
var customStatus = {
dispalyIndex: 6,
name: $translate.instant('customInvoice'),
isImported: vatSessionService.project.importSubStatus.isCustomInvoiceImport
};
var voucherMapStatus = {
dispalyIndex: 7,
name: $translate.instant('voucherMapping'),
isImported: vatSessionService.project.importSubStatus.isVoucherMapImport
};
var invoiceMapStatus = {
dispalyIndex: 8,
name: $translate.instant('invoiceMapping'),
isImported: vatSessionService.project.importSubStatus.isInvoiceMapImport
};
var adjustStatus = {
dispalyIndex: 9,
name: $translate.instant('auditAdjust'),
isImported: vatSessionService.project.importSubStatus.isAdjustImport
};
$scope.subStatusList.push(tbStatus);
$scope.subStatusList.push(entryStatus);
......@@ -564,7 +816,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
function setSubmitDetailDto() {
$log.debug("setSubmitDetailDto");
$scope.submitDetailDto = {
userId:"",
userId: "",
userName: "",
finishedDateTime: "",
finishedData: "",
......@@ -575,9 +827,9 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
return;
}
var viewReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ViewReport })[0];
var viewReportNode = _.where(wf.workflowNodeList, {dictionaryKey: constant.DictionaryDictKey.ViewReport})[0];
if (!_.isNull(viewReportNode) && !_.isUndefined(viewReportNode)) {
var submitTask = _.where(viewReportNode.workflowTaskList, { dictionaryKey: constant.DictionaryDictKey.WFSubmitReport })[0];
var submitTask = _.where(viewReportNode.workflowTaskList, {dictionaryKey: constant.DictionaryDictKey.WFSubmitReport})[0];
if (!_.isNull(submitTask) && !_.isUndefined(submitTask)) {
$scope.submitDetailDto.userId = submitTask.userId;
$scope.submitDetailDto.userName = submitTask.userName;
......@@ -601,7 +853,8 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
$scope.approveTitle = $translate.instant('ProjectStatusReportRejected');
break;
default:
$scope.approveTitle = $translate.instant('ProjectStatusReportApproved');;
$scope.approveTitle = $translate.instant('ProjectStatusReportApproved');
;
}
var wf = vatSessionService.project.workflow;
......@@ -609,7 +862,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
return;
}
var approveReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
var approveReportNode = _.where(wf.workflowNodeList, {dictionaryKey: constant.DictionaryDictKey.ApproveReport})[0];
if (!_.isNull(approveReportNode) && !_.isUndefined(approveReportNode)) {
$.each(approveReportNode.auditReportLevelList, function (index, item) {
var approveDto = {
......@@ -653,7 +906,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
//如下操作:一级通过审核,二级拒绝审核,提交审核,一级通过审核。
//此时状态为“已审核”,审核的子状态:1级审核 已审核; 2级审核 已驳回 :应该显示为灰色
if (vatSessionService.project.projectStatusList[vatSessionService.month] === 60 && a.orderIndex > 1) {
var previousLevel = _.where($scope.approveDetailList, { orderIndex: a.orderIndex - 1 })[0];
var previousLevel = _.where($scope.approveDetailList, {orderIndex: a.orderIndex - 1})[0];
if (!_.isUndefined(previousLevel)) {
if (previousLevel.isDone && a.isRejected) {
a.ngClassInActive = true;
......@@ -676,8 +929,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
if (!_.isUndefined(curPeriodStatus)) {
if (_.isEqual(curPeriodStatus, constant.ProjectStatusEnum.UnStarted)) {
$scope.startStatusText = $translate.instant('ProjectStatusUnStarted');
}
else {
} else {
$scope.startStatusText = $translate.instant('ProjectStatusStarted');
}
}
......@@ -696,7 +948,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
setLayoutStatusTitle(vatSessionService.project.projectStatusList[month]);
setStartStatusText(month);
$log.debug(vatSessionService.project.importSubStatus);
}else{
} else {
vatSessionService.project.importSubStatus = constant.ProjectStatusEnum.UnStarted;
$scope.period = vatSessionService.month;
setLayoutStatusTitle(constant.ProjectStatusEnum.UnStarted);
......@@ -727,4 +979,4 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
});
})();
}]);
\ No newline at end of file
}]);
\ No newline at end of file
......@@ -16,8 +16,8 @@
<i class="fa fa-calendar vat-subheader red-color" style="font-size:20px;"></i>
<input type="text" id="vatDatepicker" class="datepicker vat-subheader" style="border-width:0;outline:none;" readonly="readonly" />
<div id="vat-menu-buttons" style="display:inline-block;">
<a ng-repeat="menu in menus" ui-sref-active="active" ng-click="setReportSession(menu.name);" ui-sref=".{{menu.name}}"
atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.state | translate}}</a>
<a ng-repeat="menu in menus" ui-sref-active="active" ng-click="setReportSession(menu.name);" ui-sref=".{{menu.state}}"
atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.name | translate}}</a>
</div>
<!--<button class="btn btn-vat-primary" translate="TriggerMessageSchedulerJob" ng-click="triggerSchedulerJob()"></button>-->
......
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