Commit b5602edb authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

# Conflicts:
#	atms-web/src/main/webapp/app/common/utils/constant.js
parents 017b4e17 81d221b7
......@@ -5,6 +5,8 @@ public class ErrorMessage {
public static final String SaveFileError = "SaveFileError";
public static final String SystemError = "SystemError";
public static final String NoFile = "NoFile";
public static final String DidntSelectedCompany = "Didn't Selected Company";
public static final String DidntSelectedPeriod = "Didn't Selected period";
public static final String NoSelectSheet = "NoSelectSheet";
public static final String DIDNOTSELECTPERIOD = "You should select period!";
......
package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSONArray;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import com.google.common.collect.Lists;
import org.springframework.web.multipart.MultipartFile;
......@@ -50,12 +51,15 @@ public class DataImportController extends BaseController {
@ResponseBody
@RequestMapping(value = "PLExcelFile", method = RequestMethod.POST)
public OperationResultDto importPLExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
public OperationResultDto importPLExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
// 这里可以写aop简化代码,我没时间先不写了:)
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importPLExcelFile(file, periodDate,importType);
return dataImportService.importPLExcelFile(file, orgList,periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......@@ -66,12 +70,14 @@ public class DataImportController extends BaseController {
@ResponseBody
@RequestMapping(value = "BSExcelFile", method = RequestMethod.POST)
public OperationResultDto importBSExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
public OperationResultDto importBSExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importBSExcelFile(file, periodDate,importType);
return dataImportService.importBSExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......@@ -84,10 +90,11 @@ public class DataImportController extends BaseController {
@RequestMapping(value = "RLITExcelFile", method = RequestMethod.POST)
public OperationResultDto importRLITExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importRLITExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
......@@ -101,10 +108,11 @@ public class DataImportController extends BaseController {
@RequestMapping(value = "ATExcelFile", method = RequestMethod.POST)
public OperationResultDto importATExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importATExcelFile(file, orgList,periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
......@@ -116,16 +124,18 @@ public class DataImportController extends BaseController {
@ResponseBody
@RequestMapping(value = "CFExcelFile", method = RequestMethod.POST)
public OperationResultDto importCFExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
public OperationResultDto importCFExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importCFExcelFile(file, periodDate,importType);
return dataImportService.importCFExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importATExcelFile error.", e);
logger.error("importCFExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
......@@ -134,10 +144,11 @@ public class DataImportController extends BaseController {
@RequestMapping(value = "CPRExcelFile", method = RequestMethod.POST)
public OperationResultDto importCPRExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importCPRExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
......@@ -149,12 +160,14 @@ public class DataImportController extends BaseController {
@ResponseBody
@RequestMapping(value = "IDExcelFile", method = RequestMethod.POST)
public OperationResultDto importIDExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
public OperationResultDto importIDExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importIDExcelFile(file, periodDate,importType);
return dataImportService.importIDExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......@@ -167,10 +180,11 @@ public class DataImportController extends BaseController {
@RequestMapping(value = "IRExcelFile", method = RequestMethod.POST)
public OperationResultDto importIRExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importIRExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
......@@ -182,12 +196,14 @@ public class DataImportController extends BaseController {
@ResponseBody
@RequestMapping(value = "CILExcelFile", method = RequestMethod.POST)
public OperationResultDto importCILExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
public OperationResultDto importCILExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return dataImportService.importCILExcelFile(file, periodDate,importType);
return dataImportService.importCILExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......@@ -227,4 +243,17 @@ public class DataImportController extends BaseController {
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
private String valParameter(MultipartFile file,List<String> orgList,String periodDate){
if (null == file) {
return ErrorMessage.NoFile;
}
if(orgList.size()<1){
return ErrorMessage.DidntSelectedCompany;
}
if(StringUtils.isEmpty(periodDate)){
return ErrorMessage.DidntSelectedPeriod;
}
return null;
}
}
......@@ -218,7 +218,7 @@ public class DataImportService extends BaseService {
* 1、存在非选择期间数据
* 2、未映射到主体
*/
public OperationResultDto importPLExcelFile(MultipartFile file, String periodDate, Integer importType) throws ServiceException {
public OperationResultDto importPLExcelFile(MultipartFile file,List<String> orgIds, String periodDate, Integer importType) throws ServiceException {
try {
InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream);
......@@ -259,6 +259,12 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLogs.add(dataImportLog);
continue;
}
// 所选期间与导入文件期间不相等 且非 所选期间12期导入文件为13期
boolean isThirteenPeriod = period / 1000 != 13 && tmsPeriod != 12;
if (!tmsPeriod.equals(period) && isThirteenPeriod) {
......@@ -372,7 +378,7 @@ public class DataImportService extends BaseService {
* 2、未映射到主体
* @author Gary J Li
*/
public OperationResultDto importBSExcelFile(MultipartFile file, String periodDate, Integer importType) throws ServiceException {
public OperationResultDto importBSExcelFile(MultipartFile file,List<String> orgIds, String periodDate, Integer importType) throws ServiceException {
try {
InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream);
......@@ -414,6 +420,13 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLogs.add(dataImportLog);
continue;
}
// 所选期间与导入文件期间不相等 且非 所选期间12期导入文件为13期
boolean isThirteenPeriod = period / 1000 != 13 && tmsPeriod != 12;
if (!tmsPeriod.equals(period) && isThirteenPeriod) {
......@@ -501,7 +514,7 @@ public class DataImportService extends BaseService {
* @author Gary J Li
* @return
*/
public OperationResultDto importCFExcelFile(MultipartFile file, String periodDate, Integer importType) throws ServiceException {
public OperationResultDto importCFExcelFile(MultipartFile file,List<String> orgIds, String periodDate, Integer importType) throws ServiceException {
try {
InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream);
......@@ -544,6 +557,12 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLogs.add(dataImportLog);
continue;
}
// 所选期间与导入文件期间不相等 且非 所选期间12期导入文件为13期
boolean isThirteenPeriod = period / 1000 != 13 && tmsPeriod != 12;
if (!tmsPeriod.equals(period) && isThirteenPeriod) {
......@@ -628,7 +647,7 @@ public class DataImportService extends BaseService {
* @author Gary J Li
* @return OperationResultDto
*/
public OperationResultDto importIDExcelFile(MultipartFile file, String periodDate, Integer importType) throws ServiceException{
public OperationResultDto importIDExcelFile(MultipartFile file,List<String> orgIds ,String periodDate, Integer importType) throws ServiceException{
try {
InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream);
......@@ -674,6 +693,12 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLogs.add(dataImportLog);
continue;
}
// 所选期间与导入文件期间不相等 且非 所选期间12期导入文件为13期
boolean isThirteenPeriod = period / 1000 != 13 && tmsPeriod != 12;
if (!tmsPeriod.equals(period) && isThirteenPeriod) {
......@@ -1095,7 +1120,7 @@ public class DataImportService extends BaseService {
* @author Gary J Li
* @return
*/
public OperationResultDto importCILExcelFile(MultipartFile file, String periodDate, Integer importType) throws ServiceException {
public OperationResultDto importCILExcelFile(MultipartFile file,List<String> orgIds, String periodDate, Integer importType) throws ServiceException {
try {
InputStream inputStream = file.getInputStream();
......@@ -1136,6 +1161,12 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLogs.add(dataImportLog);
continue;
}
String companyName = organizations.get(0).getName();
dataImportLog.setCompanyName(companyName);
// 所选期间与导入文件期间不相等 且非 所选期间12期导入文件为13期
......
......@@ -68,8 +68,8 @@ public class DataInitTest extends CommonIT {
JSONObject object = JSONObject.parseObject(input);
Map<String, Object> orgs = object.getInnerMap();
Map<String, Object> failList = new HashMap<>();
StringBuilder failMsg = new StringBuilder();
orgs.forEach((orgK, orgV) -> {
try {
......@@ -317,17 +317,19 @@ public class DataInitTest extends CommonIT {
if (organizationExtraMapper.insertSelective(orgEx) < 0) {
failList.putIfAbsent(orgK, orgV);
}
if (orgEmp.getEmployeesNumEnd() > 0 && organizationEmployeeMapper.insertSelective(orgEmp) < 0) {
if (organizationEmployeeMapper.insertSelective(orgEmp) < 0) {
failList.putIfAbsent(orgK, orgV);
}
}
});
} catch (Exception e) {
failMsg.append(e.getMessage()+"\n");
failList.putIfAbsent(orgK, orgV);
}
});
String failedStr = JSON.toJSONString(failList);
FileWriter writer;
FileWriter writer1;
try {
writer = new FileWriter("C:\\Users\\Gary J Li\\Documents\\PwcDoc\\DD2018\\admin文档\\初始化\\company_info_failed.json");
writer.write(failedStr);
......@@ -336,6 +338,14 @@ public class DataInitTest extends CommonIT {
} catch (IOException e) {
e.printStackTrace();
}
try {
writer1 = new FileWriter("C:\\Users\\Gary J Li\\Documents\\PwcDoc\\DD2018\\admin文档\\初始化\\company_info_msg.txt");
writer1.write(failMsg.toString());
writer1.flush();
writer1.close();
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(String.format("失败条数[%s]", failList.size()));
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2234,6 +2234,15 @@
if($scope.selectCompany.engageNationalProhibitIndustry!=null){
$scope.selectCompany.engageNationalProhibitIndustry = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否";
}
if($scope.selectCompany.nationalEconomicIndustry!=null){
$scope.nationalEconomicIndustryList.map(function(value,index){
if (value.code === $scope.selectCompany.nationalEconomicIndustry) {
$scope.selectCompany.nationalEconomicIndustry = value.code+"-"+value.type;
return;
}
});
}
};
// 添加或者编辑机构成功之后,刷新当前页面的数据
......@@ -3156,6 +3165,7 @@
$scope.taxReturnBusinessTypeList = constant.TaxReturnBusinessTypeList;
$scope.trueFalse = constant.trueFalse;
$scope.regFinancialAccountingTypeList = constant.RegFinancialAccountingTypeList;
$scope.nationalEconomicIndustryList = constant.NationalEconomicIndustryList;
$scope.applicableAccountingRuleList = constant.ApplicableAccountingRuleList;
$scope.regStatusList = constant.RegStatusList;
$scope.lowValueConsumablesAmortizationMethodList = constant.LowValueConsumablesAmortizationMethodList;
......
<div class="title-container">
<!-- 暂时只测试实现"尚有待填报项"提示 -->
<span><span ng-bind="尚有待填报项"></span>(<span ng-bind="item.cellAlerts[1].length"></span>)</span>
</div>
<div class="tooltip-list-container">
<div class="tooltip-item" ng-repeat="tooltipItem in item.cellAlerts[1]">
<p>{{tooltipItem.cell + " : " +tooltipItem.alert}}</p>
</div>
</div>
\ No newline at end of file
<div class="modal-header">
<div class="modal-title flex-row-start-center">
<span ng-bind="modelExcptionModal.title" class="flex-1-1-auto"></span>
<div class="data-count flex-0-0-auto flex-row-start-center">
<span class="flex-row-start-center">
<i class="fa fa-exclamation-circle"></i>
异常综述:
<span ng-bind="modelExcptionModal.dataSource.length" style="color: #B83000;"></span>
</span>
<span class="flex-row-start-center">
已处理:
<span ng-bind="(modelExcptionModal.dataSource | filter:{handled:true}).length"></span>
</span>
<button type="button" class="btn close " ng-click="modelExcptionModal.close()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
</div>
<div class="modal-body">
<div dx-data-grid="modelExcptionModal.dxDataGridOptions"></div>
</div>
\ No newline at end of file
<div class="modal-header">
<div class="modal-title">
<span class="flex-1-1-auto">备注</span>
<button type="button" class="btn close " ng-click="reportCommentsModal.close()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body">
<div dx-data-grid="reportCommentsModal.dxDataGridOptions"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="reportCommentsModal.popEditForm()" style="float:left;">添加
</button>
<button type="button" class="btn btn-primary" ng-click="reportCommentsModal.close()">确定</button>
</div>
\ No newline at end of file
<div class="modal-header">
<div class="modal-title">
<span ng-bind="modelExcptionModal.title" class="flex-1-1-auto"></span>
<button type="button" class="btn close " ng-click="modelExcptionModal.close()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body">
<div dx-data-grid="modelExcptionModal.dxDataGridOptions"></div>
</div>
\ No newline at end of file
commonModule.controller('reportCheckListModalController', ['$scope', '$log', '$translate', '$location', "$compile", '$timeout', '$interval', '$filter',
'SweetAlert', '$uibModal', 'enums', 'checkListService', 'vatSessionService',
function ($scope, $log, $translate, $location, $compile, $timeout, $interval, $filter, SweetAlert, $uibModal, enums, checkListService, vatSessionService) {
$scope.stagesColors = {
"0": {
color: "white",
icon: "white",
text: $translate.instant('CheckListOTAll')
},
"1": {
//无需填报
color: "grey",
icon: "fa-circle",
text: $translate.instant('CheckListOTNotRequired')
},
"2": {
//未填报
color: "#c63",
icon: "fa-circle-thin",
text: $translate.instant('CheckListOTBlank')
},
"3": {
//填报中
color: "#c63",
icon: "fa-adjust",
text: $translate.instant('CheckListOTDraft')
},
"4": {
//已提交
color: "#40A010",
icon: "fa-circle",
text: $translate.instant('CheckListOTSubmitted')
},
"5": {
//已完成
color: "#3c763d",
icon: "fa-check-circle",
text: $translate.instant('CheckListOTCompleted')
}
};
$scope.sheetList = [];
$scope.modalInstance = null;
$scope.filter = function (event, dataStages) {
$scope.sheetList = $.grep($scope.listDataSource, function (x) {
return (!dataStages) || x.reportStatus == dataStages;
});
var eventTarget = event.target;
$(eventTarget).closest(".summary").find("button").removeClass("activated");
$(eventTarget).addClass("activated");
};
$scope.open = function () {
$.each($scope.listDataSource, function (i, x) {
if (!!x.lastModifiedTime)
x.lastModifiedTime = new Date(x.lastModifiedTime);
x.reportDisplayName = [x.reportCode.split(".").reverse().shift(), x.reportName].join("_");
x.alertNumber = _.reduce(x.cellAlerts, function (memo, list) {
return memo + (list || []).length
}, 0);
var status = x.reportStatus.toString();
x.statusIcon = $scope.stagesColors[status].icon;
x.statusText = $scope.stagesColors[status].text;
x.statusColor = {color: $scope.stagesColors[status].color};
_.each(x.reportComments, function (item) {
if (item.createTime)
item.createTime = new Date(item.createTime);
});
//TODO:暂时简单的处理为有无异常,异常是否已处理就好,后期需要重新实现
x.hasError = _.reduce(x.exceptions, function (memo, list) {
return memo + (list || []).length
}, 0) > 0;
x.hasErrorFixed = _.reduce(_.union(_.values(x.exceptions)), function (memo, x) {
return memo && x.hasOwnProperty("status") ? x.status == 1 : true
}, true);
});
$scope.sheetList = $scope.listDataSource;
$scope.modalInstance = $uibModal.open({
animation: false,
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: "static",
templateUrl: '/app/common/controls/check-list/check-list.html',
scope: $scope,
windowClass: "report-check-list-modal"
});
};
$scope.cancel = function () {
$scope.modalInstance.dismiss('cancel');
$scope.modalInstance = null;
$scope.isOpen = false;
};
$scope.close = function () {
$scope.modalInstance.close();
$scope.modalInstance = null;
$scope.isOpen = false;
};
$scope.$watch('isOpen', function (newValue, oldValue) {
if (newValue && !$scope.modalInstance)
$scope.open();
if (!newValue && $scope.modalInstance)
$scope.close();
});
/*
显示"模型异常","预警详情"和"校验异常"详细信息
*/
$scope.modelExceptionModal = {
title: "",
modalInstance: null,
dataSource: [],
modelAnalysisColumns: [
{
alignment: "right",
dataField: "sequence",
dataType: "string",
caption: null,
width: "2em"
},
{
alignment: "left",
dataField: "modelName",
dataType: "string",
caption: "模型名称",
width: "16em"
},
{
alignment: "right",
dataField: "amount",
dataType: "number",
caption: "金额",
width: "9em",
format: {
type: 'currency',
precision: 2
}
},
{
alignment: "left",
dataField: "advice",
dataType: "string",
caption: "建议"
},
{
alignment: "center",
dataField: "status",
dataType: "string",
caption: "状态",
width: "5em"
}
],
riskWarningColumns: [
{
alignment: "right",
dataField: "sequence",
dataType: "string",
caption: null,
width: "2em"
},
{
alignment: "left",
dataField: "riskName",
dataType: "string",
caption: "预警明细",
width: "16em"
},
{
alignment: "left",
dataField: "advice",
dataType: "string",
caption: "建议"
},
{
alignment: "center",
dataField: "operation",
dataType: "string",
caption: "操作",
width: "6em"
}
],
dxDataGridInstance: null,
dxDataGridOptions: {
bindingOptions: {
dataSource: "modelExceptionModal.dataSource"
},
allowColumnResizing: true,
columns: [],
editing: {
allowAdding: false,
allowDeleting: false,
allowUpdating: false
},
focusStateEnabled: true,
hoverStateEnabled: true,
keyExpr: null,
loadPanel: {
enabled: true
},
noDataText: $translate.instant('NoDataText'),
paging: {
enabled: false
},
rowAlternationEnabled: false, //单双行颜色
scrolling: {
mode: "infinite"
},
selection: {
allowSelectAll: false,
mode: "single"
},
showBorders: true,
showColumnLines: true,
showRowLines: true,
sorting: {
mode: "none"
},
onInitialized: function (e) {
$scope.modelExcptionModal.dxDataGridInstance = e.component;
},
onCellPrepared: function (e) {
if (e.rowType !== "data" || e.column.dataField !== "operation")
return;
var btn = $("<button type='button' ng-click='modelExceptionModal.confirmRiskWarning($event)'>确认</button>");
e.cellElement.html($compile(btn)($scope));
}
},
open: function (item) {
if (!$.isArray(item.exceptions) || item.exceptions.length < 1)
return;
var that = $scope.modelExcptionModal;
var columns, templateUrl, title, windowClass;
if ($scope.isModelAnalysis) {
columns = that.modelAnalysisColumns;
templateUrl = "/app/common/controls/check-list/check-list-model-analysis-modal.html";
title = "模型异常详情";
windowClass = "check-list-model-analysis-modal";
}
else {
columns = that.riskWarningColumns;
templateUrl = "/app/common/controls/check-list/check-list-risk-warning-modal.html";
title = "预警详情";
windowClass = "check-list-risk-warning-modal";
}
that.dxDataGridOptions.columns = columns;
that.dataSource = item.exceptions;
that.title = title;
$scope.modelExcptionModal.modalInstance = $uibModal.open({
animation: false,
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: "static",
templateUrl: templateUrl,
scope: $scope,
windowClass: windowClass
});
},
close: function () {
$scope.modelExcptionModal.modalInstance.close();
$scope.modelExcptionModal.modalInstance = null;
},
confirmRiskWarning: function (item) {
//TODO:自定义逻辑
console.log(item);
}
};
$scope.reportCommentsModal = {
checkListItem: null,
modalInstance: null,
dataSource: [],
dxDataGridInstance: null,
dxDataGridOptions: {
bindingOptions: {
dataSource: "reportCommentsModal.dataSource"
},
allowColumnResizing: true,
columns: [
{
alignment: "left",
dataField: "content",
dataType: "string",
caption: "备注"
},
{
alignment: "left",
dataField: "createBy",
dataType: "string",
caption: "备注人",
width: "6em"
},
{
alignment: "center",
dataField: "createTime",
dataType: "datetime",
caption: "备注时间",
width: "11em",
format: "yyyy-MM-dd HH:mm:ss"
},
{
alignment: "center",
dataField: "operation",
dataType: "string",
caption: "",
width: "6em"
}
],
editing: {
mode: "popup",
form: {
items: []
},
popup: {
title: "添加备注",
height: "260px",
width: "450px",
showTitle: true,
position: {
my: "center",
at: "center",
of: window
},
onContentReady: function (e) {
var textArea = $("<div/>").dxTextArea({height: "100%"});
e.component.content().html(textArea).css("padding-bottom", 0);
e.component.bottomToolbar().find("[dx-button]:eq(0)").data("dxButton").option("onClick", function () {
var text = textArea.data("dxTextArea").option("value");
$scope.reportCommentsModal.addComment(text).then(function (rsponse) {
var rst = rsponse.data;
if (!rst.result)
return;
rst.data = {
id: rst.data,
content: text,
createBy: vatSessionService.logUser.UserName,
createTime: new Date()
};
$scope.reportCommentsModal.dataSource.push(rst.data);
e.component.hide();
});
});
}
}
},
focusStateEnabled: true,
hoverStateEnabled: true,
keyExpr: null,
loadPanel: {
enabled: false
},
noDataText: $translate.instant('NoDataText'),
paging: {
enabled: false
},
rowAlternationEnabled: false, //单双行颜色
scrolling: {
mode: "infinite"
},
selection: {
allowSelectAll: false,
mode: "single"
},
showBorders: true,
showColumnLines: true,
showRowLines: true,
sorting: {
mode: "none"
},
onInitialized: function (e) {
$scope.reportCommentsModal.dxDataGridInstance = e.component;
},
onCellPrepared: function (e) {
if (e.rowType !== "data" || e.column.dataField !== "operation")
return;
var btn = $("<button type='button' class='operation' ng-click='reportCommentsModal.deleteComment($event)'>删除</button>");
e.cellElement.html($compile(btn)($scope));
}
},
open: function (item) {
if (!item.reportId)
return;
var that = $scope.reportCommentsModal;
that.dataSource = item.reportComments;
that.checkListItem = item;
that.modalInstance = $uibModal.open({
animation: false,
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: "static",
templateUrl: "/app/common/controls/check-list/check-list-report-comments-modal.html",
scope: $scope,
windowClass: "check-list-report-comments-modal"
});
},
close: function () {
$scope.reportCommentsModal.modalInstance.close();
$scope.reportCommentsModal.modalInstance = null;
},
popEditForm: function () {
$scope.reportCommentsModal.dxDataGridInstance.addRow();
},
addComment: function (content) {
return checkListService.addReportComment($scope.reportCommentsModal.checkListItem.reportId, content);
},
deleteComment: function (e) {
var options = $(e.target.closest("tr")).data("options");
checkListService.removeReportComment(options.data.id).then(function (response) {
if (response.data && response.data.result) {
var index = $scope.reportCommentsModal.dataSource.findIndex(function (x) {
return x.id === options.data.id;
});
if (index !== -1) {
$scope.reportCommentsModal.dataSource.splice(index, 1);
}
}
});
}
}
}
]);
<div class="modal-header">
<div class="modal-title">
<span ng-bind="modalTitel"></span>
<button type="button" class="btn close " aria-label="Close" aria-hidden="true" ng-click="close()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body">
<div class="summary flex-row-start-stretch">
<div>
<button ng-click="filter($event,null)" class="activated">{{'CheckListOTAll' | translate}}</button>
<span class="badge"
ng-bind="listDataSource.length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div>
<button ng-click="filter($event,'5')">{{'CheckListOTCompleted' | translate}}</button>
<span class="badge"
ng-bind="(listDataSource | filter:{reportStatus:'5'}).length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div>
<button ng-click="filter($event,'4')">{{'CheckListOTSubmitted' | translate}}</button>
<span class="badge"
ng-bind="(listDataSource | filter:{reportStatus:'4'}).length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div>
<button ng-click="filter($event,'3')">{{'CheckListOTDraft' | translate}}</button>
<span class="badge"
ng-bind="(listDataSource | filter:{reportStatus:'3'}).length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div>
<button ng-click="filter($event,'2')">{{'CheckListOTBlank' | translate}}</button>
<span class="badge"
ng-bind="(listDataSource | filter:{reportStatus:'2'}).length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div>
<button ng-click="filter($event,'1')">{{'CheckListOTNotRequired' | translate}}</button>
<span class="badge"
ng-bind="(listDataSource | filter:{reportStatus:'1'}).length"
ng-style="{'background-color':stagesColors['1'].color}">
</span>
</div>
<div class="search-for-text flex-1-1-auto">
<input type="text" style="width: calc(100% - 40px);">
<button class="fa fa-search font-color-gray" type="button"></button>
</div>
</div>
<div class="sheet-list">
<div class="list-header">
<div class="sequence-error" style="text-align: left;">{{'CheckListFNException' | translate}}</div>
<div class="sheet-name" style="text-align: left;">{{'CheckListFNFormName' | translate}}</div>
<div class="report-status">{{'CheckListFNStatus' | translate}}</div>
<div class="operations">{{'CheckListFNAction' | translate}}</div>
<div class="comments">{{'CheckListFNRemark' | translate}}</div>
<div class="update-operator" style="text-align: left;">{{'CheckListFNLastUpdatedBy' | translate}}</div>
</div>
<div class="list-body">
<div ng-repeat="item in sheetList track by item.reportCode" class="list-item">
<div class="sequence-error">
<i class="fa fa-question-circle"
ng-if="false && item.hasError" title="预警详情"
ng-click="modelExceptionModal.open(item)"></i>
<i class="fa fa-exclamation-circle" title="模型异常"
ng-if="item.hasError && !item.hasErrorFixed"
ng-click="modelExceptionModal.open(item)"></i>
<i class="fa fa-check-circle" title="异常模型已处理"
ng-if="item.hasError && item.hasErrorFixed"
ng-click="modelExceptionModal.open(item)"></i>
<span ng-bind="$index + 1" class="flex-0-0-auto"></span>
</div>
<div class="sheet-name limit-length-ellipsis">
<span title="{{item.reportDisplayName}}}" ng-bind="item.reportDisplayName"></span>
</div>
<div class="report-status">
<div class="icon-container">
<i class="fa" ng-class="item.statusIcon" ng-style="item.statusColor"></i>
</div>
<span ng-bind="item.statusText"></span>
<span class="badge" ng-if="item.reportStatus == '3' && item.alertNumber > 0"
ng-bind="item.alertNumber"
uib-tooltip-template="'/app/common/controls/check-list/check-list-filled-tooltip.html'"
tooltip-placement="bottom"
tooltip-class="check-list-filled-tooltip">
</span>
</div>
<div class="operations">
<div ng-if="item.reportStatus == '4'">
<button style="border-color: limegreen;color: limegreen;" class="flex-0-0-auto">
<i class="fa fa-check"></i>
<span>{{'CheckListOPApprove' | translate}}</span>
</button>
<button style="border-color: #cc0000;color: #cc0000;" class="flex-0-0-auto">
<i class="fa fa-close"></i>
<span>{{'CheckListOPReject' | translate}}</span>
</button>
</div>
</div>
<div class="comments">
<span ng-click="reportCommentsModal.open(item)" style="cursor: pointer;">
<i class="fa fa-pencil"></i>
<span class=""><span ng-bind="item.reportComments.length"></span></span>
</span>
</div>
<div class="update-operator">
<div class="last-update flex-row-start-center font-color-gray" ng-if="item.lastModifiedTime">
<span ng-bind="item.lastModifiedTime | date:'yyyy-MM-dd HH:mm'"></span>
<div ng-if="item.lastModifiedBy" class="flex-row-start-center font-color-gray limit-length-ellipsis">
<div class="fa-container">
<i class="fa fa-user-circle-o"></i>
</div>
<span title="{{item.lastModifiedBy}}" ng-bind="item.lastModifiedBy"></span>
</div>
</div>
<div ng-if="!item.lastModifiedTime && !item.lastModifiedBy" style="text-align: center;width: 100%;">
<span></span>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
commonModule.directive('reportCheckListModal', ['$log', function ($log) {
'use strict';
return {
restrict: 'A',
replace: false,
controller: 'reportCheckListModalController',
scope:
{
modalTitel: '=',
listDataSource: '=',
isOpen: '='
}
};
}
]);
\ No newline at end of file

.report-check-list-modal .modal-dialog {
width: 1180px;
background-color: white;
font-size: 14px;
.modal-content {
border: none;
.modal-header {
border-bottom: none;
padding-bottom: 5px;
background-color: white;
.modal-title > span {
font-size: 17px;
}
}
.modal-body {
padding: 0;
}
}
button {
outline: none;
}
.summary {
padding: 15px;
border-bottom: 1px solid lightgrey;
}
.summary > div {
margin: 0 20px;
}
.summary button {
background: transparent;
border: none;
padding: 1px 3px;
vertical-align: middle;
}
.summary .badge {
font-size: 0.857em;
}
.summary button:hover, .summary button:active, .summary button.activated {
color: #c63;
}
.search-for-text button {
font-size: 1.15em;
}
.search-for-text > * {
border: none;
outline: none;
}
.flex-row-start-center {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
}
.sheet-list {
font-family: 'Microsoft YaHei', serif;
color: #000000;
span, i {
line-height: 28px;
}
.list-header {
.flex-row-start-center;
background-color: gainsboro;
padding: 15px 30px 15px 15px;
> div {
margin: 0 10px;
flex: 0 0 auto;
text-align: center;
}
}
.sequence-error {
width: 50px;
}
.sheet-name {
width: 250px;
flex: 1 1 auto !important;
}
.report-status {
width: 90px;
}
.comments {
width: 130px;
}
.operations {
width: 200px;
}
.update-operator {
width: 255px;
}
.sequence-error, .comments, .update-operator, .operations {
margin: 0 !important;
}
.list-body {
max-height: calc(~"100vh - 210px");
overflow-x: auto;
.list-item {
.flex-row-start-center;
padding: 15px;
border-bottom: 1px solid lightgrey;
height: 60px;
width: 1160px;
> div {
.flex-row-start-center;
margin: 0 10px;
flex: 0 0 auto;
}
.sequence-error {
justify-content: flex-end;
.fa {
font-size: 17px;
cursor: pointer;
}
.fa-exclamation-circle, .fa-question-circle {
color: red;
}
.fa-check-circle {
color: #FFB600;
}
span {
width: 2em;
text-align: end;
}
}
.sheet-name {
}
.report-status {
.badge {
position: relative;
top: -0.675em;
line-height: 13px;
background-color: #B83000;
cursor: pointer;
height: 20px;
}
.icon-container {
width: 25px;
i {
line-height: 16px;
height: 16px;
width: 16px;
position: relative;
top: 4px;
}
}
}
.comments {
padding: 0 10px;
}
.operations {
padding: 0 15px;
> div {
.flex-row-start-center;
}
button {
height: 28px;
-webkit-border-radius: 14px;
-moz-border-radius: 14px;
border-radius: 14px;
border: 1px solid transparent;
padding: 0 10px;
background-color: transparent;
margin: 0 5px;
i {
margin: 0 2px 0 -3px;
}
}
}
.update-operator {
.fa-container {
padding: 0 5px;
font-size: 16px;
line-height: 19px;
}
.last-update {
min-width: 80px;
margin: 0 10px;
}
}
.comments, .update-operator, .operations {
border-left: 1px solid lightgrey;
}
.comments > *, .operations > * {
margin: 0 auto;
}
}
}
}
.limit-length-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.font-color-gray {
color: rgba(0, 0, 0, 0.65);
}
.font-color-red {
color: #cc0000;
}
}
.check-list-model-analysis-modal {
.modal-dialog {
width: 900px;
margin-top: calc(~"100vh * 0.25");
.modal-title {
.data-count {
> span {
margin-right: 30px;
.fa-exclamation-circle {
font-size: 16px;
color: #cc0000;
margin: 0 5px;
}
> span {
font-weight: 700;
font-size: 1.15em;
}
}
}
}
}
}
.check-list-risk-warning-modal {
.modal-dialog {
width: 850px;
td > button {
border: none;
background-color: transparent;
outline: none !important;
color: #B83000;
}
}
}
.check-list-filled-tooltip {
opacity: 1 !important;
border-radius: 4px;
border: 1px solid #B83000;
margin: 0 !important;
padding: 0 !important;
.tooltip-arrow {
display: none;
}
.tooltip-inner {
text-align: left;
background-color: white;
max-width: 50em;
padding: 5px;
color: black !important;
.title-container > span {
span {
font-weight: 700;
font-size: 1.125em;
}
span:last-child {
color: #B83000;
}
}
.tooltip-list-container {
.tooltip-item {
padding: 5px;
border: 1px solid gainsboro;
&:not(:first-child) {
border-top-style: hidden;
}
}
}
}
}
.check-list-report-comments-modal {
.operation {
border: none;
background-color: transparent;
color: darkblue;
}
}
\ No newline at end of file
commonModule.controller('importBSController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService',
, 'projectService', 'vatCommonService','templateService','orgService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService) {
, projectService, vatCommonService,templateService,orgService) {
'use strict';
var successCount = 0;
......@@ -33,6 +33,12 @@
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
$scope.importBSExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/BSExcelFile';
......@@ -59,7 +65,6 @@
OperationType: '',
OperationContent: '',
OriginalState: '',
UpdateState: '',
CreatorID: vatSessionService.logUser.ID,
Comment: comment,
......@@ -708,10 +713,12 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importBSExcelFile,
data: {
orgIds : orgIds,
periodDate : period,
importType : importType
},
......@@ -1153,6 +1160,60 @@
$scope.setGridStyle = setGridStyle;
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
}
});
};
//开始
(function initialize() {
$log.debug('ImportTBController.ctor()...');
......@@ -1161,6 +1222,7 @@
initParam();
loadImportBSStatusInfoDatagrid();
initDatePicker();
initCompanyList();
$scope.$watch('importExcelFile', function (newValue, oldValue) {
if (newValue !== null && newValue !== oldValue) {
......
......@@ -11,6 +11,29 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
......
commonModule.controller('importCFController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService',
, 'projectService', 'vatCommonService','templateService','orgService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService) {
, projectService, vatCommonService,templateService,orgService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
......@@ -31,6 +31,11 @@
$scope.importCFExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/CFExcelFile';
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
var date = new Date();
var year = date.getFullYear();
......@@ -712,10 +717,12 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importCFExcelFile,
data: {
orgIds : orgIds,
periodDate : period,
importType : importType
},
......@@ -900,6 +907,51 @@
$scope.pagingOptions.totalItems = totalItemsCount;
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
// 检查用户机构权限
var checkUserOrganizationPermissionList = function () {
......@@ -956,6 +1008,14 @@
ele1.datepicker("setDate", $scope.selectedDate);
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
}
});
};
var initParam = function () {
$scope.doUploadCF = doUploadCF;
$scope.downloadTemplate = downloadTemplate;
......@@ -973,6 +1033,7 @@
checkUserOrganizationPermissionList();
getUserPermission();
loadImportCFStatusInfoDatagrid();
initCompanyList();
initDatePicker();
$scope.$watch('importExcelFile', function (newValue, oldValue) {
......
......@@ -11,6 +11,29 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
......
commonModule.controller('importCILController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService',
, 'projectService', 'vatCommonService','templateService','orgService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService) {
, projectService, vatCommonService,templateService,orgService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
......@@ -31,6 +31,12 @@
$scope.importCILExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/CILExcelFile';
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth();
......@@ -159,10 +165,12 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importCILExcelFile,
data: {
orgIds : orgIds,
periodDate : period,
importType : importType
},
......@@ -346,6 +354,51 @@
$scope.pagingOptions.totalItems = totalItemsCount;
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
// 检查用户机构权限
var checkUserOrganizationPermissionList = function () {
......@@ -403,6 +456,14 @@
ele1.datepicker("setDate", $scope.selectedDate);
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
}
});
};
var initParam = function () {
$scope.doUploadCIL = doUploadCIL;
$scope.downloadTemplate = downloadTemplate;
......@@ -425,6 +486,7 @@
initParam();
getUserPermission();
loadImportCILStatusInfoDatagrid();
initCompanyList();
initDatePicker();
$scope.$watch('importExcelFile', function (newValue, oldValue) {
......
......@@ -11,6 +11,29 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
......
commonModule.controller('importInvoiceDataController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService',
, 'projectService', 'vatCommonService','templateService','orgService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService) {
, projectService, vatCommonService,templateService,orgService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
......@@ -31,6 +31,11 @@
$scope.importIDExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/IDExcelFile';
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
var date = new Date();
var year = date.getFullYear();
......@@ -133,10 +138,12 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importIDExcelFile,
data: {
orgIds : orgIds,
periodDate : period,
importType : importType
},
......@@ -355,6 +362,51 @@
$scope.pagingOptions.totalItems = totalItemsCount;
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
// 检查用户机构权限
var checkUserOrganizationPermissionList = function () {
......@@ -410,6 +462,14 @@
ele1.datepicker("setDate", $scope.selectedDate);
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
}
});
};
var initParam =function () {
$scope.doUploadID = doUploadID;
$scope.downloadTemplate = downloadTemplate;
......@@ -427,6 +487,7 @@
initParam();
getUserPermission();
loadImportIDStatusInfoDatagrid();
initCompanyList();
initDatePicker();
$scope.$watch('importExcelFile', function (newValue, oldValue) {
......
......@@ -11,6 +11,29 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
......
commonModule.controller('importPLController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService',
, 'projectService', 'vatCommonService','templateService','orgService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService) {
, projectService, vatCommonService,templateService,orgService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
......@@ -31,6 +31,11 @@
$scope.importPLExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/PLExcelFile';
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
var date = new Date();
var year = date.getFullYear();
......@@ -162,10 +167,12 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importPLExcelFile,
data: {
orgIds : orgIds,
periodDate : period,
importType : importType
},
......@@ -422,6 +429,61 @@
$scope.setGridStyle = setGridStyle;
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
}
});
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
//开始
(function initialize() {
$log.debug('ImportTBController.ctor()...');
......@@ -430,6 +492,8 @@
getUserPermission();
loadImportPLStatusInfoDatagrid();
initDatePicker();
initCompanyList();
$scope.$watch('importExcelFile', function (newValue, oldValue) {
if (newValue !== null && newValue !== oldValue) {
......
......@@ -11,6 +11,29 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
......
......@@ -151,7 +151,8 @@ constant.OperateLogType = {
}
constant.page = {
pageSize: 10
pageSize: 10,
logPageSize : 20
}
constant.page.pageSizeArrary = [10, 20, 50, 100, 5];
......@@ -500,8 +501,9 @@ constant.vatPermission = {
saveCode: '02.003.002.002'
},
revenueDetailCode:'02.003.004',
caculateDataCode: '02.003.003',
unbilledInvoiceCode: '02.003.004',
},
reportView: {
......@@ -1421,30 +1423,44 @@ constant.importFileType = {
coupaPurchasingReport: 6,
invoiceData: 7,
certifiedInvoicesList: 8,
invoiceRecord: 9
invoiceRecord: 9,
ExtractFinancialData: 10,
ExtractInvoiceData: 11
};
constant.fileTypeList = [
{code:0,type:"月度科目余额表"},
{code:1,type:"日记账"},
{code:2,type:"资产负债表PRC"},
{code:2,type:"利润表PRC"},
{code:2,type:"资产负债表"},
{code:2,type:"利润表"},
{code:2,type:"直接法现金流量表"},
{code:2,type:"所有者权益变动表和汇率表"}
{code:3,type:"利润表PRC"},
{code:4,type:"资产负债表"},
{code:5,type:"利润表"},
{code:6,type:"直接法现金流量表"},
{code:7,type:"所有者权益变动表和汇率表"}
];
constant.citImportFileType = {
undefined: 0,
JournalAdjust: 1,
TrialBalance: 2,
DraftAccountMapping: 3,
BalanceSheetPrcAdjust: 4,
ProfitPrcAdjust: 5,
EAMAssetsDisposal: 6,
SalaryAdvance: 7
};
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;
......@@ -1457,4 +1473,6 @@ constant.maxButtonTitleLength = 20;
/************************************************cit constant end*************************************************/
\ No newline at end of file
webservices.factory('checkListService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
getCheckListViewData: function (serviceTypeID, reportType, period) {
var data = {
"serviceTypeID": serviceTypeID,
"reportType": reportType,
"period": period
};
data = _.pairs(data).map(function (x) { return x.join("="); }).join("&");
return $http.get('/checkList/getCheckListViewData?' + data, apiConfig.createVat());
},
addReportComment: function (reportId, content) {
var data = {
"reportId": reportId,
"content": content
};
return $http.post('/checkList/addReportComment', data, apiConfig.createVat());
},
addReportModifyLog: function (reportId, content) {
var data = {
"reportId": reportId,
"content": content
};
return $http.post('/checkList/addReportModifyLog', data, apiConfig.createVat());
},
removeReportComment: function (commentId) {
return $http.delete('/checkList/removeReportComment?commentId=' + commentId, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -159,13 +159,19 @@
return $http.post('/Report/citUpdateConfig/' + projectId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ignoreLoadingBar: true}));
},
citGeneratePrepay: function (projectId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/citGenerate/byTotal/' + projectId + '/' + ifDeleteManualDataSource + '/' + 0
// 暂时将生成预缴表的period设置为0,等待完成新的预缴表生成逻辑 + period
+ '/' + enums.reportType.prepay
+ '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGenerateByType: function (projectId, ifDeleteManualDataSource, reportType, generator) {
var paramStr = '';
if (_.isNumber(reportType)) {
paramStr = '/' + reportType;
}
return $http.post('/Report/citGenerate/byTotal/' + projectId + '/' + ifDeleteManualDataSource + '/0' + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ignoreLoadingBar: true}));
return $http.post('/Report/citGenerate/byTotal/' + projectId + '/' + ifDeleteManualDataSource + '/0' + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetTemplate: function (projectId, period) {
if (!_.isNumber(period)) {
......@@ -174,13 +180,19 @@
return $http.get('/Report/citTemplate/' + projectId + '/' + period, apiConfig.createVat());
},
citGetTemplateTree: function (projectId) {
return $http.get('/Report/citTemplateTree/' + projectId, apiConfig.createVat());
},
vatGetTemplateTree: function (projectId, period, serviceType) {
return $http.get('/Report/vatTemplateTree/' + projectId + '/' + period + '/' + serviceType, apiConfig.createVat());
},
citCalculateKeyValue: function (projectId, reportType) {
var reportTypeParam = '';
if (_.isNumber(reportType)) {
reportTypeParam = '/' + reportType;
}
return $http.post('/Report/citCalculateKeyValue/' + projectId + '/0' + reportTypeParam, {}, apiConfig.createVat({ignoreLoadingBar: true}));
return $http.post('/Report/citCalculateKeyValue/' + projectId + '/0' + reportTypeParam, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getReportByTemplateId: function (templateId, period) {
if (!_.isNumber(period)) {
......
......@@ -42,7 +42,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
return $http.get('/org/getProjectIndustrys', apiConfig.create());
},
enableOrgs: function (id) {
return $http.get('/org/enableOrgs?orgID=' + id, apiConfig.create());
return $http.get('/org/enableOrgs?orgId=' + id, apiConfig.create());
},
getOrgIvhTreeList: function (useType, orgSetID) {
return $http.get('/org/getOrgIvhTreeList?useType=' + useType + '&orgSetID=' + orgSetID, apiConfig.create());
......@@ -84,7 +84,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
return $http.get('/org/getOrgCityAreaUserCountList?orgID=' + orgID, apiConfig.create({ ignoreLoadingBar: true }));
},
getGeneralInfo: function (orgID) {
return $http.get('/org/getGeneralInfo?orgID=' + orgID, apiConfig.create({ ignoreLoadingBar: true }));
return $http.get('/org/getGeneralInfo?orgId=' + orgID, apiConfig.create({ ignoreLoadingBar: true }));
},
getOrgBuAreaIndustryUser: function (userID) {
return $http.get('/org/getOrgBuAreaIndustryUser?userID=' + userID, apiConfig.create());
......
......@@ -1172,35 +1172,34 @@
},
getOrgData: function () {
orgService.getOrgListLevel().success(function (data) {
if (!data) {
data = [];
}
var data = vatSessionService.orgTree;
var result = [];
if (!data) {
data = [];
}
//如果是资产管理,则只获取资产管理类型的组织机构
if ($scope.serviceTypeId === enums.serviceType.AssetsManage) {
result = _.filter(data, function (item) {
return item.industryID == '10';
});
}
else {
for (var i = 0; i < data.length; i++) {
var item = data[i];
var result = [];
if (thisDataService.isHaveOrganizationPermission(item.id)) {
result.push(item);
}
//如果是资产管理,则只获取资产管理类型的组织机构
if ($scope.serviceTypeId === enums.serviceType.AssetsManage) {
result = _.filter(data, function (item) {
return item.industryID == '10';
});
} else {
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (thisDataService.isHaveOrganizationPermission(item.id)) {
result.push(item);
}
}
}
orgDisplay.orgList = result;
orgDisplay.orgList = result;
//$scope.dimensionOrgShow('', 'orgName');
$scope.dimensionOrgShow(vatSessionService.queryDto.fieldId, vatSessionService.queryDto.filedName);
//$scope.dimensionOrgShow('', 'orgName');
$scope.dimensionOrgShow(vatSessionService.queryDto.fieldId, vatSessionService.queryDto.filedName);
});
// orgDisplay.orgList = testOrgList;
},
......@@ -1727,6 +1726,12 @@
initDatePickers();
$scope.updateStatus = false;
if($.isEmptyObject(vatSessionService.orgTree)){
orgService.getOrgListLevel().success(function (data) {
vatSessionService.orgTree=data;
});
}
userService.getUserPermission(loginContext.userName).success(function (userPermission) {
thisData.userPermission = userPermission;
userPermission.permissionList.forEach(function (p) {
......@@ -1752,6 +1757,8 @@
}
});
$scope.$watch('productFileName', function (newValue, oldValue) {
if (newValue && newValue !== oldValue) {
doUploadProductFileName(newValue);
......
......@@ -16,6 +16,8 @@ webservices.factory('vatSessionService', ['$log', 'localStorageService', functio
var userPermission = {};
var orgTree = {};
var queryDto = {
searchKeyword: '',
fieldId: '',
......@@ -73,6 +75,7 @@ webservices.factory('vatSessionService', ['$log', 'localStorageService', functio
logUser: logUser,
reset: reset,
userPermission: userPermission,
orgTree:orgTree,
queryDto: queryDto,
setProperty: setProperty,
getProperty: getProperty,
......
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