Commit c930eef3 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed some issues

parent 5fa78c42
package pwc.taxtech.atms.controller;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.ProjectClientDto;
import pwc.taxtech.atms.dto.ServiceTypeDto;
import pwc.taxtech.atms.dto.taxadmin.AddProjectResult;
import pwc.taxtech.atms.dto.taxadmin.ProjectDisplayDto;
import pwc.taxtech.atms.service.ProjectService;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/v1/project")
public class ProjectController {
......@@ -61,7 +54,7 @@ public class ProjectController {
@ApiOperation(value = "getAllProjectList", notes = "Get All List")
@RequestMapping(value = "getAllProjectList", method = RequestMethod.GET)
public @ResponseBody
List<ProjectDisplayDto> getAllProjectList(String orgID, String serviceID, Integer projectYear) {
List<ProjectDisplayDto> getAllProjectList( String orgID, String serviceID,@RequestParam(required = false) Integer projectYear) {
logger.info("/api/v1/project/getAllProjectList with orgID {} serviceID {}", orgID, serviceID);
return projectService.getAllProjectList(orgID, serviceID == null ? "" : serviceID, projectYear);
}
......
......@@ -10,8 +10,8 @@
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="chrome=1; IE=11; IE=10; IE=9; IE=EDGE">
<title>Apex+</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="/Account/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="/bundles/accountLogin.css" rel="stylesheet" type="text/css" />
<!--@Styles.Render("~/Account/login")-->
<style>
html, body {
......@@ -20,6 +20,11 @@
overflow: hidden;
}
input:-webkit-autofill{
background-color: transparent !important;
background-image: initial !important;
}
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
......@@ -345,7 +350,7 @@
var $ripple = $("<div class='ripple'></div>");
$ripple.css({ top: y, left: x });
elem.append($ripple);
};
}
var $inputwrapper = $('.login__row');
$inputwrapper.find('input').on('input propertychange', function () {
......@@ -382,7 +387,7 @@
// other browser
return false;
}
};
//since of the ie couldn't render svg properly, use the workaround
if (detectIE()) {
......
webservices.factory('BSPLService', ['$log', '$http', 'apiConfig',
function ($log,$http,apiConfig) {
'use strict';
$log.debug('BSPLService.ctor()...');
return {
//CIT Remove(可以直接使用vat已有的):
// citSwitchPeriod: function (templateID, period)
GetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/cellDetail/' + keyValueDataID, apiConfig.createVat());
},
GetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/cellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
SwitchPeriod: function (templateID, period) {
return $http.get('/bspl/filter', apiConfig.createVat());
},
GenerateBSPL: function (projectId, period) {
return $http.get('/bspl/generate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
GenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/generate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/reportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
},
citGetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/citCellDetail/' + keyValueDataID, apiConfig.createVat());
},
citGetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/citCellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
citGenerateBSPL: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
citGenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/citReportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService', 'FileSaver',
function ($http, apiConfig, httpCacheService, FileSaver) {
'use strict';
return {
getInvoiceFilterBasicData: function () {
return $http.get('/invoiceManage/getInvoiceFilterBasicData', apiConfig.create());
},
//除去已经失效的invoice,用来做重复验证
getAllValidInvoiceList: function () {
return $http.get('/invoiceManage/getAllValidInvoiceList', apiConfig.create());
},
//获取invoice的各种remarks,例如,退票,补录,验真
getInvoiceRemarks: function (listInvoice) {
return $http.post('/invoiceManage/getInvoiceRemarks', listInvoice, apiConfig.create());
},
//批量验证
checkUnique: function (invoiceList) {
return $http.post('/invoiceManage/checkUnique', invoiceList, apiConfig.create());
},
//单个重复验证
invoiceUniqueVerify: function (invoiceCode, invoiceNumber) {
return $http.get('/invoiceManage/invoiceUniqueVerify?invoiceCode=' + invoiceCode + '&invoiceNumber=' + invoiceNumber, apiConfig.create());
},
//查询invoice according on condition
getInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=false', queryParm, apiConfig.create());
},
//未收票认证发票查询
getNotReceivedInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getNotReceivedInputInvoiceList', queryParm, apiConfig.create());
},
//服务器导出
exportInputInvoiceList: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInputInvoiceList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//服务器导出发票关联信息
exportInvoiceAllInfo: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInvoiceAllInfoList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//关联管理服务器导出
exportMappingInvoiceList: function (queryParm, fileName) {
return $http.post('/invoiceManage/exportMappingInvoiceList?fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
addRefundRemark: function (param) {
return $http.post('/invoiceManage/addRefundRemark', param, apiConfig.create());
},
getInputInvoiceItemList: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceItemList?inputInvoiceId=' + invoiceID, apiConfig.create());
},
getInputInvoiceRefundList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=true', queryParm, apiConfig.create());
},
getVerifyFilterBasicData: function () {
return $http.get('/invoiceManage/getVerifyFilterBasicData', apiConfig.create());
},
getNotVerifyDataList: function (dto) {
return $http.post('/invoiceManage/getVerifyListData', dto, apiConfig.create());
},
verifySpecialInvoice: function (dto) {
return $http.post('/invoiceManage/verifySpecialInvoice', dto, apiConfig.create());
},
//获取发票关联管理列表
getInvoiceRelevanceDisplayList: function (queryParam) {
return $http.post('/invoiceManage/invoiceRelevanceDisplay', queryParam, apiConfig.create());
},
saveVoucherNo: function (param) {
return $http.post('/invoiceManage/saveInputInvoiceVoucherNo', param, apiConfig.create());
},
//保存发票关联信息
saveInputInoviceRelevance: function (inputInvoiceRelevanceDto, isCompleted) {
return $http.post('/invoiceManage/saveInputInvoiceRelevance/' + isCompleted, inputInvoiceRelevanceDto, apiConfig.create());
},
//根据invoiceID获取发票关联信息
getSingleInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/getSingleInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//完成发票关联操作
completeInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/completeInputInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//根据AN号获取locationCode并判断是否纳入进项税额
getIncludedInTaxAmountByAcceptNO: function (acceptNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByAcceptNO/' + acceptNO, apiConfig.create());
},
//根据CostCenter判断是否计入进项税额
getIncludedInTaxAmountByCostCenter: function (costCenterCodes) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByCostCenter/' + costCenterCodes, apiConfig.create());
},
//根据VoucherNO获取是否计入进项税额
getIncludedInTaxAmountByVoucherNO: function (voucherNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByVoucherNO/' + voucherNO, apiConfig.create());
},
//根据发票的购方名称获取CompanyCode和CostCenter
getCompanyCodeAndCostCenter: function (buyerName) {
return $http.get('/invoiceManage/getCompanyCodeAndCostCenter/' + buyerName, apiConfig.create());
},
//手动认证
invoiceManualVerify: function (verifyList) {
return $http.post('/invoiceManage/invoiceManualVerify', verifyList, apiConfig.create());
},
//自动认证
invoiceAutoVerify: function () {
return $http.post('/invoiceManage/invoiceAutoVerify', apiConfig.create());
},
//手动识别
invoiceManualRecognize: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognize', invoiceIDList, apiConfig.create());
},
//手动识别,只是更新状态,更新为识别中,不会去百旺拿数据
invoiceManualRecognizeBool: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognizeBool', invoiceIDList, apiConfig.create({ ignoreLoadingBar: true }));
},
//
//自动识别
invoiceAutoRecognize: function () {
return $http.post('/invoiceManage/invoiceAutoRecognize', apiConfig.create());
},
//发票验真(系统验真,批量)
invoiceExamination: function () {
return $http.post('/invoiceManage/invoiceExamination', apiConfig.create());
},
//发票手动验真
invoiceManualExamination: function (invoiceList) {
return $http.post('/invoiceManage/invoiceManualExamination', invoiceList, apiConfig.create());
},
//退票和失效,变更发票状态
updateInvoiceStatus: function (invoiceStatusType, invoiceIDList) {
return $http.post('/invoiceManage/invoiceStatusOperate?invoiceStatusType=' + invoiceStatusType, invoiceIDList, apiConfig.create());
},
//扫描枪上传数据
invoiceUploadFromScan: function (invoiceList) {
return $http.post('/invoiceManage/invoiceUploadFromScan', invoiceList, apiConfig.create());
},
downloadTemplate: function () {
var thisConfig = apiConfig.create();
thisConfig.responseType = "arraybuffer";
return $http.post('/invoiceManage/downloadTemplate', {}, thisConfig).then(function (response) {
var data = new Blob([response.data], { type: response.headers('Content-Type') });
// var filename1 = response.headers('Content-Disposition').split(';')[1].trim().substr('filename='.length);
var filename = '发票认证模板.xlsx';
FileSaver.saveAs(data, filename);
});
},
//PDF上传数据
confirmToUpload: function (analysisInvoiceList) {
return $http.post('/invoiceManage/confirmToUpload', analysisInvoiceList, apiConfig.create());
},
//取文件信息
getInputInvoiceFile: function (fileId) {
return $http.get('/invoiceManage/getInputInvoiceFile?fileId=' + fileId, apiConfig.create());
},
//保存发票校验码
saveInvoiceCheckCode: function (dto) {
return $http.post('/invoiceManage/saveInvoiceCheckCode', dto, apiConfig.create());
},
//上传扫描仪发票列表
saveScanInvoiceList: function (invoiceList) {
return $http.post('/invoiceManage/UploadInvoiceFile', invoiceList, apiConfig.create());
},
//获取验真结果,
getInputInvoiceValid: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceValid?invoiceID=' + invoiceID, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('vatCommonService', ['$http', '$q', '$log', '$location', 'apiConfig', '$translate',
'enums', 'SweetAlert', 'vatSessionService', 'projectService', 'vatWorkflowService', '$rootScope',
function ($http, $q, $log, $location, apiConfig, $translate,
enums, SweetAlert, vatSessionService, projectService, vatWorkflowService, $rootScope) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
//设置项目状态 + 更新WorkflowTaskLog数据
//dbName, periodId, status: 设置项目的状态
//dicKey,isFinished: 设置Task是否完成
setProjectStatus: function (dbName, periodId, status,dicKey,isFinished) {
projectService.setProjectStatus(dbName, periodId, status).success(function (or) {
if (or.result) {
$rootScope.$broadcast('statusChanged', { status: status });
//记录操作log
if (!_.isNull(dicKey) && !_.isNull(isFinished)) {
vatWorkflowService.setProcessLog(status,dbName, periodId, dicKey, isFinished);
}
vatSessionService.project.projectStatusList[periodId] = status;
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
},
//只更新设置项目状态
//setProjectStatusSimple: function(dbName, periodId, status){
// projectService.setProjectStatus(dbName, periodId, status).success(function (or) {
// if (or.result) {
// $rootScope.$broadcast('statusChanged', { status: status });
// vatSessionService.project.projectStatusList[periodId] = status;
// }
// else {
// SweetAlert.error($translate.instant('SetProjectStatusError'));
// }
// });
//},
//导入操作设置项目状态
//前提状态为未开始 --> 已导入
//前提状态为已导入及后续状态 -->原状态
importSetProjectStatus: function (dbName, periodId, dicKey, isFinished) {
$log.debug("vatCommonService importSetProjectStatus start.....");
$log.debug("current status: " + vatSessionService.project.projectStatusList[periodId]);
var projectStatus = -1;
if (!_.isUndefined(vatSessionService.project.projectStatusList[periodId])) {
if (_.isEqual(vatSessionService.project.projectStatusList[periodId], constant.ProjectStatusEnum.UnStarted)) {
projectStatus = constant.ProjectStatusEnum.Imported;
}
else {
projectStatus = vatSessionService.project.projectStatusList[periodId];
}
}
$log.debug("status before update db: " + projectStatus);
projectService.setProjectStatus(dbName, periodId, projectStatus, dicKey, isFinished).success(function (or) {
if (or.result) {
$rootScope.$broadcast('statusChanged', { status: projectStatus });
//记录操作log
vatWorkflowService.setProcessLog(projectStatus, dbName, periodId, dicKey, isFinished);
vatSessionService.project.projectStatusList[periodId] = projectStatus;
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
},
//清空操作设置项目状态
//有导入过任何数据时: 1): 状态>='已生成', 回退到'已生成' 2): < '已生成',回退到已导入;
//没有导入过任何数据时:保持原来的项目状态
clearProjectStatus: function (dbName, periodId, dicKey, isFinished) {
projectService.isImportedAnyData(periodId, vatSessionService.project.id).success(function (or) {
if (or.result) {
var projectStatus = -1;
if (or.data) {
projectStatus = vatSessionService.project.projectStatusList[periodId] >= constant.ProjectStatusEnum.Generated
? vatSessionService.project.projectStatusList[periodId] : constant.ProjectStatusEnum.Imported;
}
else {
projectStatus = vatSessionService.project.projectStatusList[periodId] <= constant.ProjectStatusEnum.AccountMapSubmitted
? constant.ProjectStatusEnum.UnStarted : vatSessionService.project.projectStatusList[periodId];
}
projectService.setProjectStatus(dbName, periodId, projectStatus,dicKey,isFinished).success(function (or) {
if (or.result) {
$rootScope.$broadcast('statusChanged', { status: projectStatus });
//记录操作log
vatWorkflowService.setProcessLog(constant.inValidNum,dbName, periodId, dicKey, isFinished);
vatSessionService.project.projectStatusList[periodId] = projectStatus;
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
},
//清空操作设施项目状态
//清空所有当月导入数据:未开始;
//否则: 1)前提状态为已导入-->已导入; 2) 前提状态为已对应、已生成--> 已对应
clearDataSetProjectStatus: function (dbName, periodId, dicKey, isFinished) {
projectService.isImportedAnyData(periodId, vatSessionService.project.id).success(function (or) {
if (or.result) {
var projectStatus = -1;
if (or.data) {
if (!_.isUndefined(vatSessionService.project.projectStatusList[periodId])) {
if (_.isEqual(vatSessionService.project.projectStatusList[periodId], constant.ProjectStatusEnum.Imported)) {
projectStatus = constant.ProjectStatusEnum.Imported;
}
if (_.isEqual(vatSessionService.project.projectStatusList[periodId], constant.ProjectStatusEnum.AccountMapSubmitted)
|| _.isEqual(vatSessionService.project.projectStatusList[periodId], constant.ProjectStatusEnum.Generated)) {
projectStatus = constant.ProjectStatusEnum.AccountMapSubmitted;
}
}
}
else {
if (!_.isUndefined(vatSessionService.project.projectStatusList[periodId])) {
projectStatus = constant.ProjectStatusEnum.UnStarted;
}
}
projectService.setProjectStatus(dbName, periodId, projectStatus).success(function (or) {
if (or.result) {
$rootScope.$broadcast('statusChanged', { status: projectStatus });
//记录操作log
vatWorkflowService.setProcessLog(dbName, periodId, dicKey, isFinished);
vatSessionService.project.projectStatusList[periodId] = projectStatus;
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
},
//清空操作设施项目状态
//清空所有当月导入数据时,状态变为:未开始; 否则:状态为已导入
clearDataSetProjectStatusSimple: function (dbName, periodId, dicKey, isFinished) {
projectService.isImportedAnyData(periodId, vatSessionService.project.id).success(function (or) {
if (or.result) {
var projectStatus = -1;
if (or.data) {
projectStatus = constant.ProjectStatusEnum.Imported;
}
else {
projectStatus = constant.ProjectStatusEnum.UnStarted;
}
projectService.setProjectStatus(dbName, periodId, projectStatus).success(function (or) {
if (or.result) {
$rootScope.$broadcast('statusChanged', { status: projectStatus });
//记录操作log
vatWorkflowService.setProcessLog(projectStatus, dbName, periodId, dicKey, isFinished);
vatSessionService.project.projectStatusList[periodId] = projectStatus;
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
}
else {
SweetAlert.error($translate.instant('SetProjectStatusError'));
}
});
},
//页面中导入、清除数据后,设置vatSessionService.project.importSubStatus子状态
setImportSubStatus: function (statusId,isImported) {
if (_.isEqual(enums.VatImportSubStatus.isAdjustImport, statusId)) {
vatSessionService.project.importSubStatus.isAdjustImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isCustomInvoiceImport, statusId)) {
vatSessionService.project.importSubStatus.isCustomInvoiceImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isEntryImport, statusId)) {
vatSessionService.project.importSubStatus.isEntryImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isErpImport, statusId)) {
vatSessionService.project.importSubStatus.isErpImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isInputInvoiceImport, statusId)) {
vatSessionService.project.importSubStatus.isInputInvoiceImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isInvoiceMapImport, statusId)) {
vatSessionService.project.importSubStatus.isInvoiceMapImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isOutputInvoiceImport, statusId)) {
vatSessionService.project.importSubStatus.isOutputInvoiceImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isTbImport, statusId)) {
vatSessionService.project.importSubStatus.isTbImport = isImported;
}
if (_.isEqual(enums.VatImportSubStatus.isVoucherMapImport, statusId)) {
vatSessionService.project.importSubStatus.isVoucherMapImport = isImported;
}
},
getProjectStautsEnumDesc: function (status) {
switch (status) {
case constant.ProjectStatusEnum.UnStarted:
return $translate.instant('ProjectStatusUnStarted');
case constant.ProjectStatusEnum.Imported:
return $translate.instant('ProjectStatusImported');
case constant.ProjectStatusEnum.AccountMapSubmitted:
return $translate.instant('ProjectStatusAcccountMapSubmitted');
case constant.ProjectStatusEnum.Generated:
return $translate.instant('ProjectStatusGenerated');
case constant.ProjectStatusEnum.ReportSubmitted:
return $translate.instant('ProjectStatusReportSubmitted');
case constant.ProjectStatusEnum.ReportApproved:
return $translate.instant('ProjectStatusReportApproved');
case constant.ProjectStatusEnum.ReportRejected:
return $translate.instant('ProjectStatusReportRejected');
case constant.ProjectStatusEnum.Completed:
return $translate.instant('ProejctStatusCompleted');
default:
return 'todo';
}
},
//获取当前登录用户在'报表审核'节点中有几级审批
getLoginUserApproveReportLevels: function () {
var wf = vatSessionService.project.workflow;
var approveLevel = []; //存放登录用户具有的审批层级
var approveReprotNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
if (!_.isNull(approveReprotNode) && !_.isUndefined(approveReprotNode)) {
approveReprotNode.auditReportLevelList.forEach(function (item, index) {
var userList = _.where(item.userDetailList, { userId: vatSessionService.logUser.id });
if (userList.length > 0) {
approveLevel.push(item.orderIndex);
}
});
}
return approveLevel;
},
//获取当前登录用户在当前'报表审核'的审批
getLoginUserCurrentApproveReportLevel: function () {
var wf = vatSessionService.project.workflow;
var approveReprotNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
if (!_.isNull(approveReprotNode) && !_.isUndefined(approveReprotNode)) {
return approveReprotNode.currentApproveLevel;
}
},
//判断报表审核中上个level是否审核通过
//ctOrderIndex: 当前审批层级的OrderIndex
isReportLastLevelApproved: function (ctOrderIndex) {
var wf = vatSessionService.project.workflow;
var approveReprotNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
if (ctOrderIndex === 0 || ctOrderIndex === 1) { //审批第一级时,总是返回true
return true;
}
else {
var lastLevel = _.where(approveReprotNode.auditReportLevelList, { orderIndex: ctOrderIndex - 1 })[0];
if (!_.isNull(lastLevel) && !_.isUndefined(lastLevel)) {
return lastLevel.isDone;
}
}
},
//判断报表审核的上个节点是否完成
isPreviousNodeFinished: function (dicKey, wf) {
var result = false;
var crtNode = _.where(wf.workflowNodeList,{dictionaryKey: dicKey})[0];
if(!_.isNull(crtNode) && !_.isUndefined(crtNode)){
var previousNode = _.where(wf.workflowNodeList, { orderIndex: crtNode.orderIndex - 1 })[0];
result = !_.isNull(previousNode) && !_.isUndefined(previousNode)
? previousNode.isDone : crtNode.isDone; //previousNode == null说明ViewReport是第一个节点
}
return result;
},
//数据导入,数据预览,数据整理layout: vat-import-layout.ctl.js
isLayoutMenuShow: function (dbName, month, nodeDicKeyValue, linkShort, menus) {
$log.debug("start to isLayoutMenuShow");
$q.all([vatWorkflowService.getWorkflowDetailByDb(dbName, month)]).then(function (result) {
var wfData = result[0].data;
if (wfData.result) {
var wf = wfData.data;
if (_.isNull(wf) || _.isUndefined(wf)) {//当前项目没有配置workflow,就忽略workflow的配置,全部显示
$.each(menus, function (index, m) { m.show = true; });
}
else {
var wfNodesList = wf.workflowNodeList;
var nodeDto = _.where(wfNodesList, { dictionaryKey: constant.DictionaryDictKey[nodeDicKeyValue] })[0];
if (!_.isNull(nodeDto) && !_.isUndefined(nodeDto)) {
if (nodeDto.isActive === false) { //Node不可用,全部隐藏
$.each(menus, function (index, m) { m.show = false; });
}
else {
var taskMenus = [];//存放已经处理过的menu name
$.each(nodeDto.workflowTaskList, function (index, item) {
var menu = _.where(menus, { name: enums.dictionaryKeyMenusMap[item.dictionaryKey] })[0];
if (!_.isNull(menu) && !_.isUndefined(menu)) {
menu.show = item.isActive;
taskMenus.push(menu.name);
}
});
//没有配置过的Task对应的menu需要隐藏
$.each(menus, function (index, item) {
var findResult = _.find(taskMenus, function (n) {
return _.isEqual(n, item.name);
});
if (!findResult) {
item.show = false;
}
});
}
//上一个节点未完成的话,弹出提示框
var lastNodeDto = _.where(wfNodesList, { orderIndex: nodeDto.orderIndex - 1 })[0];
if (!_.isNull(lastNodeDto) && !_.isUndefined(lastNodeDto)) {
//debug: only for debug
//lastNodeDto.isDone = false;
if (!lastNodeDto.isDone) {
SweetAlert.warning($translate.instant('LastNodeIsNotFinished'));
}
}
}
else {
$log.debug("nodeDto is undefined");
}
}
}
});
$log.debug("menus before return");
$log.debug(menus);
return menus;
},
isViewReportBtShow: function (wf, buttonStatus) {
var viewReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ViewReport })[0];
if (!_.isNull(viewReportNode) && !_.isUndefined(viewReportNode)) {
var reportPreviewNode = _.where(wf.workflowNodeList, { orderIndex: viewReportNode.orderIndex - 1 })[0];
var isPreveiwNodeDone = !_.isNull(reportPreviewNode) ? reportPreviewNode.isDone : viewReportNode.isDone; //reportPreviewNode == null说明ViewReport是第一个节点
var submitTask = _.where(viewReportNode.workflowTaskList, { dictionaryKey: constant.DictionaryDictKey.WFSubmitReport })[0];
if (!_.isNull(submitTask) && !_.isUndefined(submitTask)) {
buttonStatus.viewReportBtShow = isPreveiwNodeDone && submitTask.isActive && !submitTask.isDone;
}
else {//没有配置“提交审核”任务
buttonStatus.viewReportBtShow = false;
}
}
else {//没有配置“查看报表”节点
buttonStatus.viewReportBtShow = false;
}
return buttonStatus;
},
isApproveReportBtShow: function (wf, buttonStatus) {
var viewReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ViewReport })[0];
var approveReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
if (!_.isNull(approveReportNode) && !_.isUndefined(approveReportNode)) {
var approveTask = _.where(approveReportNode.workflowTaskList, { dictionaryKey: constant.DictionaryDictKey.WFReportApproval })[0];
var currentApproveLevel = approveReportNode.currentApproveLevel; //项目当前所在的审批层级
var approveLevelUsers = _.where(approveReportNode.auditReportLevelList, { orderIndex: currentApproveLevel })[0].userDetailList; //当前审批层级的审核人
var userHasApproveAuth = _.where(approveLevelUsers, { userId: vatSessionService.logUser.id })[0]; //登录用户是否在审核人之中
var isUserHasApproveAuth = !_.isNull(userHasApproveAuth) && !_.isUndefined(userHasApproveAuth) ? true : false;
if (!_.isNull(approveTask) && !_.isUndefined(approveTask)) {
if (!_.isNull(viewReportNode) && !_.isUndefined(viewReportNode)) { //配置了上一节点“查看报表”节点
buttonStatus.approveReportBtShow = viewReportNode.isDone && approveTask.isActive && !approveTask.isDone && isUserHasApproveAuth;
}
else { //没有配置上一节点“提交审核”任务
buttonStatus.approveReportBtShow = approveTask.isActive && !approveTask.isDone && isUserHasApproveAuth;
}
}
else {//没有配置“报表审核”Task
buttonStatus.approveReportBtShow = false;
}
}
else { //没有配置“报表审核”节点
buttonStatus.approveReportBtShow = false;
}
return buttonStatus;
},
isDeclarationComplete: function (wf, buttonStatus) {
var approveReportNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.ApproveReport })[0];
var decCompleteNode = _.where(wf.workflowNodeList, { dictionaryKey: constant.DictionaryDictKey.DeclarationComplete })[0];
if (!_.isNull(decCompleteNode) && !_.isUndefined(decCompleteNode)) {
var decCompleteTask = _.where(decCompleteNode.workflowTaskList, { dictionaryKey: constant.DictionaryDictKey.WFDeclarationComplete })[0];
var uploadCertifiTask = _.where(decCompleteNode.workflowTaskList, { dictionaryKey: constant.DictionaryDictKey.WFUploadCertificate })[0];
//“完成申报”Task
if (!_.isNull(decCompleteTask) && !_.isUndefined(decCompleteTask)) {
if (!_.isNull(approveReportNode) && !_.isUndefined(approveReportNode)) { //配置了上一节点“报表审核”
buttonStatus.decCompleteBtShow = approveReportNode.isDone && decCompleteTask.isActive && !decCompleteTask.isDone;
}
else {//没有配置上一节点“报表审核”
buttonStatus.decCompleteBtShow = decCompleteTask.isActive && !decCompleteTask.isDone;
}
}
else {//没有配置“完成申报”Task
buttonStatus.decCompleteBtShow = false;
}
//“上传凭证”Task
if (!_.isNull(uploadCertifiTask) && !_.isUndefined(uploadCertifiTask)) {
if (!_.isNull(approveReportNode) && !_.isUndefined(approveReportNode)) { //配置了上一节点“报表审核”
buttonStatus.uploadCerficateBtShow = approveReportNode.isDone && uploadCertifiTask.isActive && !uploadCertifiTask.isDone;
}
else {//没有配置上一节点“报表审核”
buttonStatus.uploadCerficateBtShow = uploadCertifiTask.isActive && !uploadCertifiTask.isDone;
}
}
else {
buttonStatus.uploadCerficateBtShow = false;
}
}
else { //没有配置“完成申报”节点
buttonStatus.decCompleteBtShow = false;
buttonStatus.uploadCerficateBtShow = false;
}
return buttonStatus;
},
};
}]);
\ No newline at end of file
webservices.factory('vatDashboardService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatDashboardService.ctor()...');
return {
getModelNameList: function () {
return $http.get('/Dashboard/getModelNameList', apiConfig.createVat());
},
getSubModelList: function (year, period) {
return $http.get('/Dashboard/getSubModelList/' + year + '/' + period, apiConfig.createVat());
},
saveSummaryConfig: function (data) {
return $http.post('/Dashboard/saveSummaryConfig', data, apiConfig.createVat())
},
getDashboardConfigSummary: function (id) {
return $http.get('/Dashboard/getDashboardConfigSummary/' + id, apiConfig.createVat());
},
deleteChartConfig: function (id) {
return $http.post('/Dashboard/deleteChartConfig/' + id, {}, apiConfig.createVat());
},
deleteConfigById: function (id) {
return $http.post('/Dashboard/deleteConfigById/' + id, {}, apiConfig.createVat());
},
saveOrganizationConfig: function (data) {
return $http.post('/Dashboard/saveOrganizationConfig', data, apiConfig.createVat())
},
getOrganizationConfig: function (id) {
return $http.get('/Dashboard/getOrganizationConfig/' + id, apiConfig.createVat());
},
getOrganizationSubModelList: function (organizationId) {
return $http.get('/Dashboard/getOrganizationSubModelList/' + organizationId, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatExportService', ['$log', '$http', 'apiConfig', '$q', function ($log, $http, apiConfig, $q) {
'use strict';
$log.debug('vatExportService.ctor()...');
//下载服务器上的xls文件
var exportToExcel = function (data, status, headers, defaultFileName) {
$('#busy-indicator-container').show();
var defer = $q.defer();
var octetStreamMime = 'application/octet-stream';
var success = false;
// Get the headers
headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
var filename = decodeURI(headers['x-file-name']) || defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
//console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: contentType });
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;
if (saveBlob === undefined) throw "Not supported";
saveBlob(blob, filename);
}
//console.log("saveBlob succeeded");
success = true;
} catch (ex) {
$log.debug("saveBlob method failed with the following exception:");
$log.debug(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
//console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], { type: contentType });
var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
//console.log("Download link method with simulated click succeeded");
success = true;
} catch (ex) {
$log.debug("Download link method with simulated click failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], { type: octetStreamMime });
var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess;
//console.log("Download link method with window.location succeeded");
success = true;
} catch (ex) {
//console.log("Download link method with window.location failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
}
}
if (!success) {
// Fallback to window.open method
$log.debug("No methods worked for saving the arraybuffer, using last resort window.open");
window.open(httpPath, '_blank', '');
}
//Delete the file
//deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
};
//下载完成后将服务器文件删除
var deleteFile = function (filename) {
return $http.get('/inputInvoiceImport/delete/file?filename=' + filename, apiConfig.createVat());
};
return {
exportToExcel: exportToExcel,
exportReport: function (jsonData) {
return $http.post('/Report/export', { ReportData: jsonData }, apiConfig.createVat());
}
}
}]);
\ No newline at end of file
webservices.factory('vatImportService', ['$http', 'apiConfig', 'vatSessionService', function ($http, apiConfig, vatSessionService) {
'use strict';
return {
//代扣代缴
getImportWithholdingTaxList: function (param) {
return $http.post('/vatImportModule/getImportWithholdingTaxList', param, apiConfig.createVat());
},
addImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/addImportWithholdingTax', tax, apiConfig.createVat());
},
updateImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/updateImportWithholdingTax', tax, apiConfig.createVat());
},
deleteImportWithholdingTax: function (id) {
return $http.get('/vatImportModule/deleteImportWithholdingTax?id=' + id, apiConfig.createVat());
},
//海关发票
getCustomInvoiceList: function (param) {
return $http.post('/vatImportModule/getCustomInvoiceList', param, apiConfig.createVat());
},
addCustomInvoice: function (inv) {
return $http.post('/vatImportModule/addCustomInvoice', inv, apiConfig.createVat());
},
updateCustomInvoice: function (inv) {
return $http.post('/vatImportModule/updateCustomInvoice', inv, apiConfig.createVat());
},
deleteCustomInvoice: function (id) {
return $http.get('/vatImportModule/deleteCustomInvoice?id=' + id, apiConfig.createVat());
},
//通行费
getTollFeeList: function (param) {
return $http.post('/vatImportModule/getTollFeeList', param, apiConfig.createVat());
},
addTollFee: function (entity) {
return $http.post('/vatImportModule/addTollFee', entity, apiConfig.createVat());
},
updateTollFee: function (entity) {
return $http.post('/vatImportModule/updateTollFee', entity, apiConfig.createVat());
},
deleteTollFee: function (id) {
return $http.get('/vatImportModule/deleteTollFee?id=' + id, apiConfig.createVat());
},
//红字专票信息统计
getRedInvoiceList: function (param) {
return $http.post('/vatImportModule/getRedInvoiceList', param, apiConfig.createVat());
},
addRedInvoice: function (entity) {
return $http.post('/vatImportModule/addRedInvoice', entity, apiConfig.createVat());
},
updateRedInvoice: function (entity) {
return $http.post('/vatImportModule/updateRedInvoice', entity, apiConfig.createVat());
},
deleteRedInvoice: function (id) {
return $http.get('/vatImportModule/deleteRedInvoice?id=' + id, apiConfig.createVat());
},
//专票清单 getImportSpecialInvoiceInventoryList
getImportSpecialInvoiceInventoryList: function (param) {
return $http.post('/vatImportModule/getImportSpecialInvoiceInventoryList', param, apiConfig.createVat());
},
//上传模块
getImportFileList: function (param, importModuleId) {
return $http.post('/vatImportModule/getImportFile?importModuleId=' + importModuleId, param, apiConfig.createVat());
},
deleteImportFile: function (id) {
return $http.get('/vatImportModule/deleteImportFile?id=' + id, apiConfig.createVat());
},
//获取手工中方账
getImportYonYouList: function (params) {
return $http.post('/vatImportModule/getImportYonYouList', params, apiConfig.createVat());
},
//获取JdeaccountBalanceList
getImportJdeAccountBalanceList: function (params) {
return $http.post('/vatImportModule/getImportJdeAccountBalanceList', params, apiConfig.createVat());
},
//获取getImportJdeVoucherList
getImportJdeVoucherList: function (params) {
return $http.post('/vatImportModule/getImportJdeVoucherList', params, apiConfig.createVat());
},
isUnbilledInoiceUpdated: function (projectID, periodID) {
return $http.get('/ProjectInfo/isUnbilledInoiceUpdated/' + projectID + '/' + periodID, apiConfig.createVat());
},
};
}]);
\ No newline at end of file
webservices.factory('vatOperationLogService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatOperationLogService.ctor()...');
return {
addOperationLog: function (operationLog) {
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getOperationLogList: function (param) {
return $http.post('/OperationLog/getOperationLogList', {
PageInfo: param.pageInfo,
Period: param.period,
ModuleID: param.moduleID,
QueryValue: param.queryValue,
UserId: param.userId
}, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatPreviewService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
queryOutputInvoiceList: function (param) {
return $http.post('/outputInvoiceImport/queryOutputInvoiceList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
InvoiceType: param.invoiceType,
StartInvoiceDate: param.invoiceDateStart,
EndInvoiceDate: param.invoiceDateEnd,
ClassCode: param.classCode,
InvoiceNumber: param.invoiceNumber,
BuyerName: param.buyerName,
ProductName: param.productName,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
}, apiConfig.createVat());
},
queryOutputInvoiceItemList: function (invoiceID) {
return $http.get('/outputInvoiceImport/queryOutputInvoiceItemList/' + invoiceID, apiConfig.createVat());
},
getExportOutputInvoiceList: function (param) {
return $http.post('/outputInvoiceImport/getExportOutputInvoiceList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
InvoiceType: param.invoiceType,
StartInvoiceDate: param.invoiceDateStart,
EndInvoiceDate: param.invoiceDateEnd,
ClassCode: param.classCode,
InvoiceNumber: param.invoiceNumber,
BuyerName: param.buyerName,
ProductName: param.productName,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
}, apiConfig.createVat({ responseType: 'arraybuffer' }));
},
queryInputInvoiceList: function (param) {
return $http.post('/inputInvoiceImport/inputInvoicePreviewList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
CertificationDateStart: param.certificationDateStart,
CertificationDateEnd: param.certificationDateEnd,
InvoiceCode: param.invoiceCode,
InvoiceNumber: param.invoiceNumber,
SellerTaxNumber: param.sellerTaxNumber,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
InvoiceType: param.invoiceType,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
CertificationStatus: param.certificationStatus
}, apiConfig.createVat());
},
queryInputInvoiceItemList: function (inputInvoiceID) {
return $http.get('/inputInvoiceImport/inputInvoiceItemPreviewList/' + inputInvoiceID, apiConfig.createVat());
},
//导出进项发票数据
getExportInputInvoiceList: function (param) {
return $http.post('/inputInvoiceImport/exportQueryData/get', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
CertificationDateStart: param.certificationDateStart,
CertificationDateEnd: param.certificationDateEnd,
InvoiceCode: param.invoiceCode,
InvoiceNumber: param.invoiceNumber,
SellerTaxNumber: param.sellerTaxNumber,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
InvoiceType: param.invoiceType,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
CertificationStatus: param.certificationStatus
}, apiConfig.createVat({ responseType: 'arraybuffer' }));
},
voucherSelectAdvancedByEntry: function (mainRelation, allJe, pagingInfo, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedByEntry', {
MainRelation: mainRelation,
AllJe: allJe,
PagingInfo: pagingInfo,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
voucherSelectAdvancedByVoucher: function (mainRelation, allJe, pagingInfo, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedByVoucher', {
MainRelation: mainRelation,
AllJe: allJe,
PagingInfo: pagingInfo,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
voucherSelectAdvancedCount: function (mainRelation, isEntryShow, allJe, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedCount', {
MainRelation: mainRelation,
AllJe: allJe,
IsEntryShow: isEntryShow,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getVoucherByConditon: function (mainRelation, allJe, period, vID, group, listQueryCondition) {
return $http.post('/voucher/getVoucherByConditon', {
MainRelation: mainRelation,
AllJe: allJe,
Period: period,
VID: vID,
Group: group,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getSelectWhereString: function (mainRelation, allJe, listQueryCondition) {
return $http.post('/voucher/getSelectWhereString', {
MainRelation: mainRelation,
AllJe: allJe,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getEnterpriseAccount: function () {
return $http.get('/voucher/getEnterpriseAccount', apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('vatReductionService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
/************************************************GoodsMapping*********************************************************/
getGoodsMappingList: function () {
return $http.get('/GoodsMapping/getGoodsMappingList', apiConfig.createVat());
},
updateGoodsMapping: function (goodsList) {
return $http.post('/GoodsMapping/updateGoodsMapping', goodsList, apiConfig.createVat());
},
/************************************************UnbilledInvoice*********************************************************/
getVoucherList: function (param) {
return $http.post('/comaredata/getVoucherList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getOuputInvoiceList: function (param) {
return $http.post('/comaredata/getOuputInvoiceList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getVoucherHistoryList: function (param) {
return $http.post('/comaredata/getVoucherHistoryList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getOuputInvoiceHistoryList: function (param) {
return $http.post('/comaredata/getOuputInvoiceHistoryList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getVoucherMapInvoice: function (param) {
return $http.post('/comaredata/getVoucherMapInvoice', param, apiConfig.createVat());
},
getInvoiceMapVoucher: function (param) {
return $http.post('/comaredata/getInvoiceMapVoucher', param, apiConfig.createVat());
},
/************************************************caculationData*********************************************************/
CaculateUnbilled: function (period, project) {
return $http.post('/comaredata/unbilledtax' + '/' + period, project, apiConfig.createVat({ ignoreLoadingBar: true }));
},
CompareOutputInvoice: function (period) {
return $http.post('/comaredata/output' + '/' + period, null, apiConfig.createVat({ ignoreLoadingBar: true }));
},
test: function () {
return $http.get('/GoodsMapping/getGoodsMappingList', apiConfig.createVat({ ignoreLoadingBar: true }));
},
/********************************************vat-account-mapping**************************************************/
//获取标准科目数据
getStdAccountHierarchy: function () {
return $http.get('/AccountMapping/stdAccounts/getStdAccountHierarchy', apiConfig.createVat());
},
//获取企业科目数据
getEnterpriceAccountList: function (acctProp, isMapped, periodId) {
return $http.get('/AccountMapping/accounts/details/' + acctProp + '/' + isMapped + '/' + periodId, apiConfig.createVat());
},
//获取为对应的企业科目数据
getEnterpriseAccountNotMapped: function (periodID) {
return $http.get('/AccountMapping/accounts/getEnterpriseAccountNotMapped/' + periodID + '/', apiConfig.createVat());
},
//获取标准科目对应企业科目数据
getStdAccountLinkEtsAccount: function () {
return $http.get('/AccountMapping/todo', apiConfig.createVat());
},
//自动对应
autoMap: function (ruleId, periodId) {
return $http.get('/AccountMapping/mapping/autoMap/' + ruleId + '/' + periodId, apiConfig.createVat());
},
//取消对应
clearMap: function (periodId, etsAccountIDs) {
//return $http.post('/AccountMapping/mapping/cancelAccoutStdCode/', etsAccountIDs, apiConfig.createVat());
return $http.post('/AccountMapping/mapping/updateAcctStdCode/' + null + '/' + periodId, etsAccountIDs, apiConfig.createVat());
},
//手动对应
mapAccount: function (stdCode, periodId, enterpriseAccountCodes) {
return $http.post('/AccountMapping/mapping/updateAcctStdCode/' + stdCode + '/' + periodId, enterpriseAccountCodes, apiConfig.createVat());
},
//提交科目对应
submitAccountMapping: function(voucherRemapId, custRemapId) {
return $http.get('/AccountMapping/mapping/submit/' + voucherRemapId + '/' + custRemapId, apiConfig.createVat());
},
//提交科目对应-隐藏Loading bar
submitAccountMappingNoLoading: function (voucherRemapId, custRemapId) {
return $http.get('/AccountMapping/mapping/submit/' + voucherRemapId + '/' + custRemapId, apiConfig.createVat({ ignoreLoadingBar: true }));
},
//在获取企业科目数据前,先递归更新父科目对应的stdcode
mapStdCodeRecursiveByAccountList: function (periodId) {
return $http.get('/AccountMapping/mapping/mapStdCodeRecursiveByAccountList/' + periodId, apiConfig.createVat());
},
//获取重分类明细
getClassificationList: function (etsCode) {
return $http.get('/AccountMapping/getReMapDetail/' + etsCode, apiConfig.createVat());
},
//保存手工重对应
saveManualReclassification: function (model) {
return $http.post('/AccountMapping/remappingcust/edit',
{
Code: model.code,
StdCode: model.stdCode,
ReMapName: model.reMapName,
ReMapDebit: model.reMapDebit,
ReMapCredit: model.reMapCredit,
ReMapReason: model.reMapReason,
ReMapTypeId: model.reMapTypeId,
Period: model.period
}, apiConfig.createVat());
},
//保存凭证重对应,编辑
saveVoucherReclassification: function (model) {
return $http.post('/AccountMapping/remappingvoucher/save',
{
//ReMapId: model.reMapId,
RemapBatchId: model.remapBatchId,
Code: model.code,
StdCode: model.stdCode,
ReMapStdCode: model.reMapStdCode,
ReMapName: model.reMapName,
ReMapDebit: model.reMapDebit,
ReMapCredit: model.reMapCredit,
ReMapReason: model.reMapReason,
ReMapTypeId: model.reMapTypeId,
ReMapDateTime: model.reMapDateTime,
Period: model.period,
ReMapProcessTypeId: model.reMapProcessTypeId,
VoucherLists: model.vouchers
}, apiConfig.createVat());
},
//删除重分类记录
deleteReMappingRecords: function (model) {
return $http.post('/AccountMapping/reMapping/deleteReMap',
{
AcctCode: model.acctCode,
CustomerCode: model.customerCode,
StdCode: model.stdCode,
ReMappName: model.reMappName,
RemapDebit: model.remapDebit,
RemapCredit: model.remapCredit,
ReMappReason: model.reMappReason,
ReMappTypeId: model.reMappTypeId,
Period: model.period,
Vouchers: model.vouchers
}, apiConfig.createVat());
},
//获取标准科目重对应结果
getStdRemapResult: function (periodId) {
return $http.get('/AccountMapping/reMapping/getStdReMap/' + periodId, apiConfig.createVat());
},
//根据科目代码获取voucher
getVouchersByCode: function (code, periodId) {
return $http.get('/AccountMapping/reMapping/getVouchers/' + code + '/' + periodId, apiConfig.createVat());
},
getVouchersByConditions: function (periodId, accountCode, processTypeId, remapBatchId) {
return $http.get('/AccountMapping/reMapping/getVouchersByConditions/' + periodId + '/' + accountCode + '/' + processTypeId + '/' + remapBatchId, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatReportCacheService', ['$log', '$q', '$http', '$cacheFactory', 'vatCommonService', 'vatSessionService',
'vatReportService', 'modelConfigurationService', 'apiConfig', 'enums',
function ($log, $q, $http, $cacheFactory, vatCommonService, vatSessionService, vatReportService, modelConfigurationService, apiConfig, enums) {
'use strict';
$log.debug('vatReportCacheService.ctor()...');
var reportCache = $cacheFactory('report-cache');
var setProjectStatus = function () {
var status = vatSessionService.project.projectStatusList[vatSessionService.month];
//已生成,已提交=>原状态
if (_.isEqual(vatSessionService.project.projectStatusList[vatSessionService.month], constant.ProjectStatusEnum.Generated) ||
_.isEqual(vatSessionService.project.projectStatusList[vatSessionService.month], constant.ProjectStatusEnum.ReportSubmitted)) {
status = vatSessionService.project.projectStatusList[vatSessionService.month];
}
//已审核及后续状态=>已生成
if (vatSessionService.project.projectStatusList[vatSessionService.month] >= constant.ProjectStatusEnum.ReportApproved) {
status = constant.ProjectStatusEnum.Generated;
}
return vatCommonService.setProjectStatus(vatSessionService.project.dbName, vatSessionService.month, status, null, null);
};
return {
// 修改保存机制后,需要添加缓存机制的方法:
// 1: addCellManualData
// 2: deleteCellVoucher
// 3: deleteCellInvoice
// 4: deleteCellDatasource
// 5: addDataSource
// 6: addDataSourceItems
// 7: updateDataSourceAmount
// 8: modelConfigurationService.deleteModelBackFill
// 9: modelConfigurationService.modelBackFill
// 初始化report cache
initReportCache: function () {
reportCache.removeAll();
reportCache.put('report-cache', []);
},
// 检查是否存在report cache
hasReportCache: function () {
var cache = reportCache.get('report-cache');
return !_.isEmpty(cache);
},
// 保存report cache中的数据
saveReportCache: function (dirtyData, reportId, generator) {
var promise = $q.when();
var cache = reportCache.get('report-cache');
var addList = _.filter(cache, function (i) { return i.serviceType == 'addCellManualData' })
if (!_.isEmpty(addList))
{
var paramList = [];
addList.forEach(function (i) {
var param = {
manualDto: i.params[0],
operationLog: i.params[1],
};
paramList.push(param);
});
promise = promise.then(function () {
return vatReportService.addCellManualDataList(paramList);
});
}
//// 按顺序执行缓存的service
//while (!_.isEmpty(cache)) {
// var serviceItem = cache.shift();
// (function (i) {
// if (_.isFunction(vatReportService[i.serviceType])) {
// promise = promise.then(function () {
// return vatReportService[i.serviceType].apply(vatReportService, i.params);
// });
// }
// else if (_.isFunction(modelConfigurationService[i.serviceType])) {
// promise = promise.then(function () {
// return modelConfigurationService[i.serviceType].apply(modelConfigurationService, i.params);
// });
// }
// }(serviceItem));
//}
if (!_.isEmpty(dirtyData)) {
promise = promise.then(function () {
return vatReportService.updateReportCellValue(dirtyData, reportId, generator);
});
}
promise = promise.then(setProjectStatus);
this.initReportCache();
return promise;
},
//updateConfig: function (projectId, period, generator) {
// return $http.post('/Report/updateConfig/' + projectId + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
//},
//generate: function (projectId, templateId, period, generator) {
// return $http.post('/Report/generate/' + projectId + '/' + templateId + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
//},
//getReportData: function (reportId) {
// return $http.get('/Report/reportData/' + reportId, apiConfig.createVat());
//},
//CalculateSingleCellFormula: function (cellId) {
// return $http.get('/Report/formulaDataSource/byCell/' + cellId, apiConfig.createVat());
//},
//getTemplate: function (projectId, period) {
// return $http.get('/Report/template/' + projectId + '/' + period, apiConfig.createVat());
//},
//getCellVoucher: function (cellDataID) {
// return $http.get('/Report/cellVoucher/' + cellDataID, apiConfig.createVat());
//},
//getCellInvoice: function (cellDataID, invoiceType) {
// return $http.get('/Report/cellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
//},
addCellManualData: function (manualData, logInfo) {
var cache = reportCache.get('report-cache');
var existingItem = _.findWhere(cache, { serviceType: 'addCellManualData', id: manualData.cellTemplateID });
var paramDs = [angular.copy(manualData), angular.copy(logInfo)];
if (existingItem) {
existingItem.params = paramDs;
}
else {
cache.push({
serviceType: 'addCellManualData',
id: manualData.cellTemplateID,
params: paramDs
});
}
reportCache.put('report-cache', cache);
var manualDataSource = {
name: manualData.name,
amount: manualData.amount,
description: manualData.description,
projectID: manualData.projectID,
serviceTypeID: manualData.serviceTypeID,
cellDataID: manualData.cellID,
cellTemplateID: manualData.cellTemplateID,
dataSourceType: enums.cellDataSourceType.KeyIn
};
return $q.when(manualDataSource);
//return $http.post('/Report/addCellManualData', manualData, apiConfig.createVat());
},
deleteCellVoucher: function (voucherId, dataSourceId) {
var cache = reportCache.get('report-cache');
cache.push({
serviceType: 'deleteCellVoucher',
id: voucherId + "," + dataSourceId,
params: [voucherId, dataSourceId]
});
reportCache.put('report-cache', cache);
var defer = $q.defer();
var promise = defer.promise;
defer.resolve()
return $q.when({ detailId: voucherId, dataSourceId: dataSourceId, opType: 0 });
//return $http.post('/Report/deleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellInvoice: function (invoiceId, dataSourceId) {
var cache = reportCache.get('report-cache');
cache.push({
serviceType: 'deleteCellInvoice',
id: invoiceId + "," + dataSourceId,
params: [invoiceId, dataSourceId]
});
reportCache.put('report-cache', cache);
return $q.when({ detailId: invoiceId, dataSourceId: dataSourceId, opType: 1 });
//return $http.post('/Report/deleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellDatasource: function (dataSourceId, cellId) {
var cache = reportCache.get('report-cache');
cache.push({
serviceType: 'deleteCellDatasource',
id: dataSourceId + "," + cellId,
params: [dataSourceId, cellId]
});
reportCache.put('report-cache', cache);
return $q.when({ dataSourceId: dataSourceId, cellId: cellId });
//return $http.post('/Report/deleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
},
deleteModelBackFill: function (dataSourceId, cellId) {
var cache = reportCache.get('report-cache');
cache.push({
serviceType: 'deleteModelBackFill',
id: dataSourceId + "," + cellId,
params: [dataSourceId, cellId]
});
reportCache.put('report-cache', cache);
return $q.when({ dataSourceId: dataSourceId, cellId: cellId });
//return $http.post('/Report/deleteCellDatasource/' + datasourceID + '/' + cellId, {}, apiConfig.createVat());
},
//getAllDataItems: function (dataSourceType) {
// return $http.get('/Report/getAllDataItems/' + dataSourceType, apiConfig.createVat())
//},
addDataSource: function (dataSource) {
var cache = reportCache.get('report-cache');
var existingItem = _.findWhere(cache, { serviceType: 'addDataSource', id: dataSource.ID });
var paramDs = angular.copy(dataSource);
if (existingItem) {
existingItem.params = [paramDs];
}
else {
cache.push({
serviceType: 'addDataSource',
id: dataSource.ID,
params: [paramDs]
});
}
reportCache.put('report-cache', cache);
var manualDataSource = {
id: dataSource.id,
name: dataSource.name,
dataSourceType: dataSource.dataSourceType,
cellDataID: dataSource.cellDataID,
projectID: dataSource.projectID,
serviceTypeID: dataSource.serviceTypeID,
amount: 0,
creator: dataSource.creator,
updater: dataSource.updater,
operationType: dataSource.operationType
};
return $q.when(manualDataSource);
//return $http.post('/Report/addDataSource', dataSource, apiConfig.createVat());
},
addDataSourceItems: function (dataSource) {
var cache = reportCache.get('report-cache');
var existingItem = _.findWhere(cache, { serviceType: 'addDataSourceItems', id: dataSource.id });
var paramDs = angular.copy(dataSource);
delete paramDs.extraItems;
if (existingItem) {
existingItem.params = [paramDs];
}
else {
cache.push({
serviceType: 'addDataSourceItems',
id: dataSource.id,
params: [paramDs]
});
}
reportCache.put('report-cache', cache);
var manualDataSource = {
id: dataSource.id,
name: dataSource.name,
items: dataSource.items,
cellDataID: dataSource.cellDataID,
projectID: dataSource.projectID,
amount: dataSource.amount,
serviceTypeID: dataSource.serviceTypeID,
dataSourceType: dataSource.dataSourceType,
operationType: dataSource.operationType
};
if (dataSource.dataSourceType === enums.cellDataSourceType.OutputInvoice
|| dataSource.dataSourceType === enums.cellDataSourceType.InputInvoice
|| dataSource.dataSourceType === enums.cellDataSourceType.CustomInvoice
|| dataSource.dataSourceType === enums.cellDataSourceType.Voucher) {
manualDataSource.extraItems = dataSource.extraItems;
}
return $q.when(manualDataSource);
//return $http.post('/Report/addDataSourceItems', dataSource, apiConfig.createVat());
},
//getCellAccountRange: function (reportTemplateId, period, rowIndex, columnIndex) {
// return $http.get('/Report/getCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
//},
//getCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
// return $http.get('/Report/getCellTemplateConfig/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
//},
//updateCellAccountRangeAndSummary: function (cellTemplateId, period, value, operation) {
// return $http.post('/Report/updateCellAccountRangeAndSummary/' + cellTemplateId + '/' + period + '/' + value + '/' + operation, {}, apiConfig.createVat());
//},
updateDataSourceAmount: function (dataSource, amount) {
var cache = reportCache.get('report-cache');
var existingItem = _.findWhere(cache, { serviceType: 'updateDataSourceAmount', id: dataSource.id });
if (existingItem) {
existingItem.params = [dataSource.id, amount];
}
else {
cache.push({
serviceType: 'updateDataSourceAmount',
id: dataSource.id,
params: [dataSource.id, amount]
});
}
reportCache.put('report-cache', cache);
var dataSourceInfo = {
id: dataSource.id,
name: dataSource.name,
amount: amount,
description: dataSource.description,
projectID: dataSource.projectID,
serviceTypeID: dataSource.serviceTypeID,
cellDataID: dataSource.cellID,
cellTemplateID: dataSource.cellTemplateID,
dataSourceType: dataSource.dataSourceType
};
return $q.when(dataSourceInfo);
//return $http.post('/Report/updateDataSourceAmount/' + datasourceId + '/' + amount, {}, apiConfig.createVat());
},
modelBackFill: function (dataSource) {
var cache = reportCache.get('report-cache');
var paramDs = angular.copy(dataSource);
var par = {
dataSourceID: paramDs.id,
cellDataID: paramDs.cellDataID,
backFillList: paramDs.modelWriteBackData
};
var existingItem = _.findWhere(cache, { serviceType: 'modelBackFill', id: paramDs.id });
if (existingItem) {
existingItem.params = [par];
}
else {
cache.push({
serviceType: 'modelBackFill',
id: paramDs.id,
params: [par]
});
}
reportCache.put('report-cache', cache);
var dataSourceInfo = {
id: paramDs.id,
name: paramDs.name,
amount: paramDs.amount,
cellDataID: paramDs.cellDataID,
cellTemplateID: paramDs.cellTemplateId,
dataSourceType: paramDs.dataSourceType,
modelWriteBackData: paramDs.modelWriteBackData
};
return $q.when(dataSourceInfo);
},
//getStdAccountByIndustryID: function (industryID) {
// return $http.get('/Report/getStdAccountByIndustry/' + industryID, apiConfig.createVat());
//},
//getTemplateReferences: function (period) {
// return $http.get('/Report/templateReferences/' + period, apiConfig.createVat());
//},
//citUpdateConfig: function (projectId, period) {
// var periodParam = '';
// if (_.isNumber(period)) {
// periodParam = '/' + period.toString();
// }
// return $http.post('/Report/citUpdateConfig/' + projectId + periodParam, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
//},
//citGenerate: function (projectId, templateId, param, generator) {
// var paramStr = '';
// if (!_.isEmpty(param)) {
// paramStr = '/' + param;
// }
// return $http.post('/Report/citGenerate/' + projectId + '/' + templateId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
//},
//citGenerateByType: function (projectId, reportType, generator) {
// var paramStr = '';
// if (_.isNumber(reportType)) {
// paramStr = '/' + reportType;
// }
// return $http.post('/Report/citGenerate/byTotal/' + projectId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
//},
//citGetReportData: function (reportId) {
// return $http.get('/Report/citReportData/' + reportId, apiConfig.createVat());
//},
//citCalculateSingleCellFormula: function (cellId) {
// return $http.get('/Report/citFormulaDataSource/byCell/' + cellId, apiConfig.createVat());
//},
//citGetTemplate: function (projectId, param) {
// var paramStr = '';
// if (!_.isEmpty(param)) {
// paramStr = '/' + param;
// }
// return $http.get('/Report/citTemplate/' + projectId + paramStr, apiConfig.createVat());
//},
//citGetCellVoucher: function (cellDataID) {
// return $http.get('/Report/citCellVoucher/' + cellDataID, apiConfig.createVat());
//},
//citGetCellInvoice: function (cellDataID, invoiceType) {
// return $http.get('/Report/citCellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
//},
//citAddCellManualData: function (mauanlData) {
// return $http.post('/Report/citAddCellManualData', mauanlData, apiConfig.createVat());
//},
//citDeleteCellVoucher: function (voucherId, datasourceId) {
// return $http.post('/Report/citDeleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
//},
//citDeleteCellInvoice: function (invoiceId, datasourceId) {
// return $http.post('/Report/citDeleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
//},
//citDeleteCellDatasource: function (datasourceID, cellID) {
// return $http.post('/Report/citDeleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
//},
//citGetAllDataItems: function (dataSourceType) {
// return $http.get('/Report/citGetAllDataItems/' + dataSourceType, apiConfig.createVat())
//},
//citAddDataSource: function (dataSource) {
// return $http.post('/Report/citAddDataSource', dataSource, apiConfig.createVat());
//},
//citAddDataSourceItems: function (dataSource) {
// return $http.post('/Report/citAddDataSourceItems', dataSource, apiConfig.createVat());
//},
//citGetCellAccountRange: function (reportTemplateId, rowIndex, columnIndex, param) {
// var paramStr = '';
// if (!_.isEmpty(param)) {
// paramStr = '/' + param;
// }
// return $http.get('/Report/citGetCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex + paramStr, apiConfig.createVat());
//},
//citGetCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
// var periodParam = '';
// if (_.isNumber(period)) {
// periodParam = '/' + period.toString();
// }
// return $http.get('/Report/citGetCellTemplateConfig/' + reportTemplateId + '/' + rowIndex + '/' + columnIndex + periodParam, apiConfig.createVat());
//},
//citUpdateCellAccountRangeAndSummary: function (cellTemplateId, value, operation, param) {
// var paramStr = '';
// if (!_.isEmpty(param)) {
// paramStr = '/' + param;
// }
// return $http.post('/Report/citUpdateCellAccountRangeAndSummary/' + cellTemplateId + '/' + value + '/' + operation + paramStr, {}, apiConfig.createVat());
//},
//citUpdateDataSourceAmount: function (datasourceId, amount) {
// return $http.post('/Report/citUpdateDataSourceAmount/' + datasourceId + '/' + amount, {}, apiConfig.createVat());
//}
};
}]);
\ No newline at end of file
webservices.factory('vatReportService', ['$log', '$http', '$translate', 'apiConfig', 'enums', 'SweetAlert', 'vatOperationLogService',
'vatSessionService',
function ($log, $http, $translate, apiConfig, enums, SweetAlert, vatOperationLogService, vatSessionService) {
'use strict';
$log.debug('vatReportService.ctor()...');
return {
// 修改保存机制后,需要添加缓存机制的方法:
// addCellManualData,并添加了一个日志参数
// deleteCellVoucher
// deleteCellInvoice
// deleteCellDatasource
// addDataSource
// addDataSourceItems
// updateDataSourceAmount
// 移除了CalculateSingleCellFormula
// 新增了updateReportCellValue
//CIT Remove(可以直接使用vat已有的):
// citGetStdAccountByIndustryID: function (industryID)
//CIT Update(带问号参数为修改的参数,目前对于申报表可以直接传null,对于BSPL如果调用到这些API需要传period):
// citUpdateConfig: function (projectId, period?)
// citGenerate: function (projectId, templateId, param?, generator)
// citGetTemplate: function (projectId, param?)
// citGetCellAccountRange: function (reportTemplateId, rowIndex, columnIndex, param?)
// citGetCellTemplateConfig: function (reportTemplateId, period?, rowIndex, columnIndex)
// citUpdateCellAccountRangeAndSummary: function (cellTemplateId, value, operation, param?)
updateConfig: function (projectId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/updateConfig/' + projectId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
generate: function (projectId, templateId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/generate/' + projectId + '/' + templateId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getReportData: function (reportId) {
return $http.get('/Report/reportData/' + reportId, apiConfig.createVat());
},
//CalculateSingleCellFormula: function (cellId) {
// return $http.get('/Report/formulaDataSource/byCell/' + cellId, apiConfig.createVat());
//},
updateReportCellValue: function (cellDataList, reportId, generator) {
return $http.post('/Report/updateReportCellValue/' + reportId + '?generator=' + generator, cellDataList, apiConfig.createVat());
},
getTemplate: function (projectId, period) {
return $http.get('/Report/template/' + projectId + '/' + period, apiConfig.createVat());
},
getCellVoucher: function (cellDataID) {
return $http.get('/Report/cellVoucher/' + cellDataID, apiConfig.createVat());
},
getCellInvoice: function (cellDataID, invoiceType) {
return $http.get('/Report/cellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
},
addCellManualData: function (manualData, logInfo) {
return $http.post('/Report/addCellManualData', manualData, apiConfig.createVat()).then(function (data) {
logInfo.UpdateState = $translate.instant('ManualInputSuccess');
return vatOperationLogService.addOperationLog(logInfo);
}, function () {
logInfo.UpdateState = $translate.instant('ManualInputFail');
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
return vatOperationLogService.addOperationLog(logInfo);
});
},
addCellManualDataList: function (manualDataList) {
return $http.post('/Report/addCellManualDataList', manualDataList, apiConfig.createVat());
},
deleteCellVoucher: function (voucherId, datasourceId) {
return $http.post('/Report/deleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellInvoice: function (invoiceId, datasourceId) {
return $http.post('/Report/deleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellDatasource: function (datasourceID, cellID) {
return $http.post('/Report/deleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
},
getAllDataItems: function (dataSourceType) {
return $http.get('/Report/getAllDataItems/' + dataSourceType, apiConfig.createVat())
},
addDataSource: function (dataSource) {
return $http.post('/Report/addDataSource', dataSource, apiConfig.createVat());
},
addDataSourceItems: function (dataSource) {
return $http.post('/Report/addDataSourceItems', dataSource, apiConfig.createVat());
},
getCellAccountRange: function (reportTemplateId, period, rowIndex, columnIndex) {
return $http.get('/Report/getCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
},
getCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
return $http.get('/Report/getCellTemplateConfig/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
},
updateCellAccountRangeAndSummary: function (cellTemplateId, period, value, operation) {
return $http.post('/Report/updateCellAccountRangeAndSummary/' + cellTemplateId + '/' + period + '/' + value + '/' + operation, {}, apiConfig.createVat());
},
updateDataSourceAmount: function (datasourceId, amount) {
return $http.post('/Report/updateDataSourceAmount/' + datasourceId + '/' + amount, {}, apiConfig.createVat());
},
getStdAccountByIndustryID: function (industryID) {
return $http.get('/Report/getStdAccountByIndustry/' + industryID, apiConfig.createVat());
},
getTemplateReferences: function (period) {
return $http.get('/Report/templateReferences/' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citUpdateConfig: function (projectId, period) {
var periodParam = '';
if (_.isNumber(period)) {
periodParam = '/' + period.toString();
}
return $http.post('/Report/citUpdateConfig/' + projectId + periodParam, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGenerate: function (projectId, templateId, param, generator) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.post('/Report/citGenerate/' + projectId + '/' + templateId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGenerateByType: function (projectId, reportType, generator) {
var paramStr = '';
if (_.isNumber(reportType)) {
paramStr = '/' + reportType;
}
return $http.post('/Report/citGenerate/byTotal/' + projectId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetReportData: function (reportId) {
return $http.get('/Report/citReportData/' + reportId, apiConfig.createVat());
},
citCalculateSingleCellFormula: function (cellId) {
return $http.get('/Report/citFormulaDataSource/byCell/' + cellId, apiConfig.createVat());
},
citGetTemplate: function (projectId, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.get('/Report/citTemplate/' + projectId + paramStr, apiConfig.createVat());
},
citGetCellVoucher: function (cellDataID) {
return $http.get('/Report/citCellVoucher/' + cellDataID, apiConfig.createVat());
},
citGetCellInvoice: function (cellDataID, invoiceType) {
return $http.get('/Report/citCellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
},
citAddCellManualData: function (mauanlData) {
return $http.post('/Report/citAddCellManualData', mauanlData, apiConfig.createVat());
},
citDeleteCellVoucher: function (voucherId, datasourceId) {
return $http.post('/Report/citDeleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
},
citDeleteCellInvoice: function (invoiceId, datasourceId) {
return $http.post('/Report/citDeleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
},
citDeleteCellDatasource: function (datasourceID, cellID) {
return $http.post('/Report/citDeleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
},
citGetAllDataItems: function (dataSourceType) {
return $http.get('/Report/citGetAllDataItems/' + dataSourceType, apiConfig.createVat())
},
citAddDataSource: function (dataSource) {
return $http.post('/Report/citAddDataSource', dataSource, apiConfig.createVat());
},
citAddDataSourceItems: function (dataSource) {
return $http.post('/Report/citAddDataSourceItems', dataSource, apiConfig.createVat());
},
citGetCellAccountRange: function (reportTemplateId, rowIndex, columnIndex, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.get('/Report/citGetCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex + paramStr, apiConfig.createVat());
},
citGetCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
var periodParam = '';
if (_.isNumber(period)) {
periodParam = '/' + period.toString();
}
return $http.get('/Report/citGetCellTemplateConfig/' + reportTemplateId + '/' + rowIndex + '/' + columnIndex + periodParam, apiConfig.createVat());
},
citUpdateCellAccountRangeAndSummary: function (cellTemplateId, value, operation, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.post('/Report/citUpdateCellAccountRangeAndSummary/' + cellTemplateId + '/' + value + '/' + operation + paramStr, {}, apiConfig.createVat());
},
citUpdateDataSourceAmount: function (datasourceId, amount) {
return $http.post('/Report/citUpdateDataSourceAmount/' + datasourceId + '/' + amount, {}, apiConfig.createVat());
},
//未开票收入计算
caculateUnbilled: function (period, year, orgID) {
return $http.post('/Report/calculateUnInvoiced/' + period + '/' + year + '/' + orgID, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
//获取收入汇总
getIncomeSummary: function (period) {
return $http.get('/Report/getIncomeSummary/' + period, apiConfig.createVat())
},
//获取汇总明细
getIncomeSummaryDetail: function (relevanceCode, period, type) {
return $http.get('/Report/getIncomeSummaryDetail/' + relevanceCode + '/' + period + '/' + type, apiConfig.createVat());
},
//添加备注
saveIncomeSummaryRemark: function (id, remark) {
var unInvoicedParm = {
id: id,
remark: remark
};
return $http.post('/Report/saveIncomeSummaryRemark', unInvoicedParm, apiConfig.createVat());
},
//修改汇总数据
updateInvoicedIncomeSummary: function (id, salesAmount, projectId, remark) {
var unInvoicedParm = {
id: id,
remark: remark,
projectID: projectId,
salesAmount: salesAmount
};
return $http.post('/Report/updateInvoicedIncomeSummary', unInvoicedParm, apiConfig.createVat());
},
//获取报表审核状态
getReportApprovalStatus: function (period) {
return $http.get('/Report/approvalStatus/' + period, apiConfig.createVat());
},
addRemarkApproval: function (remarkApproval) {
return $http.post('/Report/remarkApproval/', remarkApproval, apiConfig.createVat());
},
getRemarkApprovalList: function (period) {
return $http.get('/Report/remarkApproval/' + period, apiConfig.createVat());
},
deleteRemark: function (id) {
return $http.delete('/Report/remarkApproval/' + id, apiConfig.createVat());
},
exportExcel: function (reportIdList) {
var thisConfig = apiConfig.createVat();
thisConfig.responseType = "arraybuffer";
return $http.post('/Report/exportExcelZip', reportIdList, thisConfig);
},
updateCellValue: function (projectId, period) {
return $http.get('/Report/updateCellValue/' + projectId + '/' + period, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatSessionService', ['$log', 'localStorageService', function ($log, localStorageService) {
'use strict';
$log.debug('vatSessionService.ctor()...');
var date = new Date();
var month = date.getMonth() <= 0 ? 1 : date.getMonth();
var projectyear = date.getFullYear();
var cacheName = 'cargill-cache';
var propList = ['month', 'year', 'project', 'projects', 'dataChanged', 'logUser', 'userPermission', 'queryDto'];
var logUser = {
ID: "66933E7B-DA75-4B2E-B7D6-AB65DCA20D50",
UserName: "Admin",
};
var queryDto = {
searchKeyword: '',
fieldId: '',
filedName: 'orgName',
checkedOrgs: {},
};
var cacheObj = {
month: month,
userPermission: {},
project: { year: projectyear },
projects: [],
dataChanged: false
};
var temp = localStorageService.get(cacheName);
if (temp) {
cacheObj = temp;
} else {
localStorageService.set(cacheName, cacheObj);
}
//设置属性值
var setProperty = function (propertyName, propertyValue) {
cacheObj[propertyName] = propertyValue;
localStorageService.set(cacheName, cacheObj);
}
//获取属性值
var getProperty = function (propertyName) {
return cacheObj[propertyName];
}
//重置项目月份
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
//跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var clearSelectProject = function () {
var tempProject = { year: projectyear };
setProperty('project', tempProject);
};
var result = {};
var defineProp = function (propertyName) {
Object.defineProperty(result, propertyName, {
get: function () {
var getValue = getProperty(propertyName);
var year = new Date().getFullYear();
var month = new Date().getMonth();
switch (propertyName) {
case "year":
return getValue || year;
case "month":
return getValue || month - 1;
case "project":
return getValue || { year: year };
case "projects":
return getValue || [];
case "dataChanged":
return getValue || false;
case "logUser":
return getValue || logUser;
case "userPermission":
return getValue || {};
case "queryDto":
return getValue || queryDto;
}
},
set: function (val) {
setProperty(propertyName, val);
},
});
};
propList.forEach(function (propName) {
defineProp(propName);
});
result.reset = reset;
result.setProperty = setProperty;
result.getProperty = getProperty;
result.clearSelectProject = clearSelectProject;
return result;
}]);
\ No newline at end of file
webservices.factory('vatWorkflowService', ['$http', 'apiConfig', 'enums', function ($http, apiConfig, enums) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
setProcessLog: function (status,dbName, periodId, dictKey, isFinished) {
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
setWorkflowNodeLog: function (status, dbName, periodId, dictKey, isFinished) {
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
//添加TaxAdmin.WorkflowApproveReportLog和项目数据下的OperationLog表的数据
addApproveReportLog: function (approveLog) {
return $http.post('/Workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
},
getWorkflowDetailByDb: function (dbName, periodId) {
return $http.get('/Workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
},
execute: function () {
return $http.get('/WorkflowMessageJob/execute',apiConfig.createVat());
},
addExceptionMessage: function(exMsg){
return $http.post('/WorkflowMessageJob/addExceptionMessage/',exMsg, apiConfig.createVat());
},
addErpImportExceptionMessage: function (dbName, periodId, erpValidationTypeId) {
return $http.get('/WorkflowMessageJob/addErpImportExceptionMessage/' + dbName + "/" + periodId + '/' + erpValidationTypeId, apiConfig.createVat());
},
addApproveMessage: function (approveMsg) {
return $http.post('/WorkflowMessageJob/addApproveMessage/', approveMsg, apiConfig.createVat());
},
getWorkflowApproveReportLog: function (dbName, period, orderIndex,operationTypeId,templateCode){
return $http.get('/Workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
getWorkflowApproveReportLogNoLevel: function (dbName, period, operationTypeId, templateCode) {
return $http.get('/Workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
isExistApproveLogSubmitItem: function (dbName, period, orderIndex, operationTypeId, templateCode) {
return $http.get('/Workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -6,11 +6,6 @@
//CIT Remove(可以直接使用vat已有的):
// citSwitchPeriod: function (templateID, period)
// citGetCellDetailInfo: function (keyValueDataID)
// citGetCellInfo: function (templateId,col,row)
// citGenerateBSPL: function (projectId, period)
// citGenerateBSPLWithoutLoading: function (projectId, period)
// citGetReportData: function (projectId, templateId, period, generator)
GetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/cellDetail/' + keyValueDataID, apiConfig.createVat());
......@@ -29,6 +24,21 @@
},
getReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/reportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
},
citGetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/citCellDetail/' + keyValueDataID, apiConfig.createVat());
},
citGetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/citCellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
citGenerateBSPL: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
citGenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/citReportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
}
};
......
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService',
function ($http, apiConfig, httpCacheService) {
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService', 'FileSaver',
function ($http, apiConfig, httpCacheService, FileSaver) {
'use strict';
return {
getInvoiceFilterBasicData: function () {
return $http.get('/invoiceManage/getInvoiceFilterBasicData', apiConfig.create());
......@@ -12,16 +12,59 @@ function ($http, apiConfig, httpCacheService) {
return $http.get('/invoiceManage/getAllValidInvoiceList', apiConfig.create());
},
//获取invoice的各种remarks,例如,退票,补录,验真
getInvoiceRemarks: function (listInvoice) {
return $http.post('/invoiceManage/getInvoiceRemarks', listInvoice, apiConfig.create());
},
//批量验证
checkUnique: function (invoiceList) {
return $http.post('/invoiceManage/checkUnique', invoiceList, apiConfig.create());
},
//单个重复验证
invoiceUniqueVerify: function (invoiceCode, invoiceNumber) {
return $http.get('/invoiceManage/invoiceUniqueVerify?invoiceCode=' + invoiceCode + '&invoiceNumber=' + invoiceNumber, apiConfig.create());
},
//查询invoice according on condition
getInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=false', queryParm, apiConfig.create());
},
//未收票认证发票查询
getNotReceivedInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getNotReceivedInputInvoiceList', queryParm, apiConfig.create());
},
//服务器导出
exportInputInvoiceList: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInputInvoiceList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//服务器导出发票关联信息
exportInvoiceAllInfo: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInvoiceAllInfoList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//关联管理服务器导出
exportMappingInvoiceList: function (queryParm, fileName) {
return $http.post('/invoiceManage/exportMappingInvoiceList?fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
addRefundRemark: function (param) {
return $http.post('/invoiceManage/addRefundRemark', param, apiConfig.create());
},
getInputInvoiceItemList: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceItemList?inputInvoiceId=' + invoiceID, apiConfig.create());
},
getInputInvoiceRefundList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=true', queryParm, apiConfig.create());
},
......@@ -29,21 +72,76 @@ function ($http, apiConfig, httpCacheService) {
getVerifyFilterBasicData: function () {
return $http.get('/invoiceManage/getVerifyFilterBasicData', apiConfig.create());
},
getNotVerifyDataList: function (dto) {
return $http.post('/invoiceManage/getVerifyListData', dto, apiConfig.create());
},
verifySpecialInvoice: function (dto) {
return $http.post('/invoiceManage/verifySpecialInvoice', dto, apiConfig.create());
},
//获取发票关联管理列表
getInvoiceRelevanceDisplayList: function (queryParam) {
return $http.post('/invoiceManage/invoiceRelevanceDisplay', queryParam, apiConfig.create());
},
saveVoucherNo: function (param) {
return $http.post('/invoiceManage/saveInputInvoiceVoucherNo', param, apiConfig.create());
},
//保存发票关联信息
saveInputInoviceRelevance: function (inputInvoiceRelevanceDto, isCompleted) {
return $http.post('/invoiceManage/saveInputInvoiceRelevance/' + isCompleted, inputInvoiceRelevanceDto, apiConfig.create());
},
//根据invoiceID获取发票关联信息
getSingleInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/getSingleInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//完成发票关联操作
completeInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/completeInputInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//根据AN号获取locationCode并判断是否纳入进项税额
getIncludedInTaxAmountByAcceptNO: function (acceptNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByAcceptNO/' + acceptNO, apiConfig.create());
},
//根据CostCenter判断是否计入进项税额
getIncludedInTaxAmountByCostCenter: function (costCenterCodes) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByCostCenter/' + costCenterCodes, apiConfig.create());
},
//根据VoucherNO获取是否计入进项税额
getIncludedInTaxAmountByVoucherNO: function (voucherNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByVoucherNO/' + voucherNO, apiConfig.create());
},
//根据发票的购方名称获取CompanyCode和CostCenter
getCompanyCodeAndCostCenter: function (buyerName) {
return $http.get('/invoiceManage/getCompanyCodeAndCostCenter/' + buyerName, apiConfig.create());
},
//手动认证
invoiceManualVerify: function (verifyList) {
return $http.post('/invoiceManage/invoiceManualVerify', verifyList, apiConfig.create());
},
//自动认证
invoiceAutoVerify: function () {
return $http.post('/invoiceManage/invoiceAutoVerify', apiConfig.create());
},
//手动识别
invoiceManualRecognize: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognize', invoiceIDList, apiConfig.create());
},
//手动识别,只是更新状态,更新为识别中,不会去百旺拿数据
invoiceManualRecognizeBool: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognizeBool', invoiceIDList, apiConfig.create({ ignoreLoadingBar: true }));
},
//
//自动识别
invoiceAutoRecognize: function () {
return $http.post('/invoiceManage/invoiceAutoRecognize', apiConfig.create());
......@@ -53,6 +151,7 @@ function ($http, apiConfig, httpCacheService) {
invoiceExamination: function () {
return $http.post('/invoiceManage/invoiceExamination', apiConfig.create());
},
//发票手动验真
invoiceManualExamination: function (invoiceList) {
return $http.post('/invoiceManage/invoiceManualExamination', invoiceList, apiConfig.create());
......@@ -62,9 +161,46 @@ function ($http, apiConfig, httpCacheService) {
updateInvoiceStatus: function (invoiceStatusType, invoiceIDList) {
return $http.post('/invoiceManage/invoiceStatusOperate?invoiceStatusType=' + invoiceStatusType, invoiceIDList, apiConfig.create());
},
//扫描枪上传数据
invoiceUploadFromScan: function (invoiceList) {
return $http.post('/invoiceManage/invoiceUploadFromScan', invoiceList, apiConfig.create());
},
downloadTemplate: function () {
var thisConfig = apiConfig.create();
thisConfig.responseType = "arraybuffer";
return $http.post('/invoiceManage/downloadTemplate', {}, thisConfig).then(function (response) {
var data = new Blob([response.data], { type: response.headers('Content-Type') });
// var filename1 = response.headers('Content-Disposition').split(';')[1].trim().substr('filename='.length);
var filename = '发票认证模板.xlsx';
FileSaver.saveAs(data, filename);
});
},
//PDF上传数据
confirmToUpload: function (analysisInvoiceList) {
return $http.post('/invoiceManage/confirmToUpload', analysisInvoiceList, apiConfig.create());
},
//取文件信息
getInputInvoiceFile: function (fileId) {
return $http.get('/invoiceManage/getInputInvoiceFile?fileId=' + fileId, apiConfig.create());
},
//保存发票校验码
saveInvoiceCheckCode: function (dto) {
return $http.post('/invoiceManage/saveInvoiceCheckCode', dto, apiConfig.create());
},
//上传扫描仪发票列表
saveScanInvoiceList: function (invoiceList) {
return $http.post('/invoiceManage/UploadInvoiceFile', invoiceList, apiConfig.create());
},
//获取验真结果,
getInputInvoiceValid: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceValid?invoiceID=' + invoiceID, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationConfiguration', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
load: function () {
return $http.get('/outputReconciliationConfiguration/load', apiConfig.create());
},
add: function (dto) {
return $http.post('/outputReconciliationConfiguration/add', dto, apiConfig.create());
},
update: function (dto) {
return $http.put('/outputReconciliationConfiguration/update', dto, apiConfig.create());
},
deleteRule: function (id) {
return $http.delete('/outputReconciliationConfiguration/delete?ID=' + id, apiConfig.create());
},
getNextRuleNo: function () {
return $http.get('/outputReconciliationConfiguration/getNextRuleNo', apiConfig.create());
},
saveSort: function (dto) {
return $http.post('/outputReconciliationConfiguration/saveSort', dto, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
loadReconciliationEntityOverview: function (dto) {
return $http.post('/reconciliationValue/load', dto, apiConfig.createVat());
},
updateReconciliationEntityValue: function (dto) {
return $http.put('/reconciliationValue/updateValue', dto, apiConfig.createVat());
},
refreshForm: function (dto) {
return $http.post('/reconciliationValue/refreshForm', dto, apiConfig.createVat());
},
getIncomeAxList: function (incomeAxParams) {
return $http.post('/reconciliationEntityOverview/getIncomeAxList', incomeAxParams, apiConfig.create())
},
getTaxFaPiaoList: function (taxFapiaoParams) {
return $http.post('/reconciliationEntityOverview/getTaxFaPiaoList', taxFapiaoParams, apiConfig.create())
},
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationQueryService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
queryJournalList: function (model) {
return $http.post('/outputReconciliationQuery/queryJournalList', model, apiConfig.createVat());
},
getDictinctCategoryList:function(){
return $http.get('/outputReconciliationQuery/getDictinctCategoryList', apiConfig.createVat());
},
queryFapiaoList:function(model){
return $http.post('/outputReconciliationQuery/queryFapiaoList', model, apiConfig.createVat());
},
manualAdjust:function(model){
return $http.post('/outputReconciliationQuery/manualAdjust', model, apiConfig.createVat());
},
undo:function(model){
return $http.post('/outputReconciliationQuery/undo', model, apiConfig.createVat());
},
getMatchedGroupDetail:function(groupID){
return $http.get('/outputReconciliationQuery/getMatchedGroupDetail?groupID='+ groupID, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatDifferenceService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatDifferenceService.ctor()...');
return {
taxDifferenceByVoucher: function (dto) {
return $http.post('/voucher/voucherSelectAdvancedByVoucher', dto, apiConfig.create());
},
getTaxDifferenceList: function (projectID,period) {
return $http.get('/taxDifference/getTaxDifferenceData/' + projectID+'/'+period, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -98,7 +98,7 @@
}
//Delete the file
deleteFile(encodeURI(filename));
//deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
......
webservices.factory('vatImportService', ['$http', 'apiConfig', 'vatSessionService', function ($http, apiConfig, vatSessionService) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
//代扣代缴
getImportWithholdingTaxList: function (param) {
return $http.post('/vatImportModule/getImportWithholdingTaxList', param, apiConfig.createVat());
},
/************************************************input invoice*********************************************************/
importInputInvoiceData: function (inputInvoiceList, importType) {
return $http.post('/inputInvoiceImport/importInputInvoice',
{ InputInvoiceList: inputInvoiceList, ImportType: importType }, apiConfig.createVat());
addImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/addImportWithholdingTax', tax, apiConfig.createVat());
},
getInputInvoiceList: function (period) {
return $http.get('/inputInvoiceImport/getInputInvoiceList/' + period, apiConfig.createVat());
updateImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/updateImportWithholdingTax', tax, apiConfig.createVat());
},
deleteInputInvoiceDuplicateData: function (invoiceIDs) {
return $http.post('/inputInvoiceImport/deleteDuplicateData', invoiceIDs, apiConfig.createVat());
},
validateInputInvoiceInfo: function (period) {
return $http.get('/inputInvoiceImport/validateInputInvoiceInfo/' + period, apiConfig.createVat());
},
clearInputInvoiceData: function (period) {
return $http.get('/inputInvoiceImport/clearInputInvoiceData/' + period, apiConfig.createVat());
},
/************************************************input invoice item*********************************************************/
importInputInvoiceItemData: function (inputInvoiceItemList, importType) {
return $http.post('/inputInvoiceImport/importInputInvoiceItem',
{ InputInvoiceItemList: inputInvoiceItemList, ImportType: importType }, apiConfig.createVat());
},
getInputInvoiceItemList: function (period) {
return $http.get('/inputInvoiceImport/getInputInvoiceItemList/' + period, apiConfig.createVat());
},
validateInputInvoiceItemInfo: function (period) {
return $http.get('/inputInvoiceImport/validateInputInvoiceItemInfo/' + period, apiConfig.createVat());
},
clearInputInvoiceItemData: function (period) {
return $http.get('/inputInvoiceImport/clearInputInvoiceItemData/' + period, apiConfig.createVat());
},
/************************************************journal entry*********************************************************/
importJournalEntryData: function (journalEntryList, importType) {
return $http.post('/journalEntryImport/importJournalEntry', { VoucherList: journalEntryList, ImportType: importType }, apiConfig.createVat());
},
getValidationDtoInfo: function (type, period) {
return $http.get('/journalEntryImport/getValidationInfo/' + type + '/' + period, apiConfig.createVat());
},
getJournalEntryData: function (period) {
return $http.get('/journalEntryImport/getJournalEntryData/' + period, apiConfig.createVat());
deleteImportWithholdingTax: function (id) {
return $http.get('/vatImportModule/deleteImportWithholdingTax?id=' + id, apiConfig.createVat());
},
queryJournalEntryData: function (queryDto) {
return $http.post('/journalEntryImport/queryJournalEntryData', {
PageInfo: queryDto.pageInfo,
PeriodId: queryDto.periodId,
}, apiConfig.createVat());
//海关发票
getCustomInvoiceList: function (param) {
return $http.post('/vatImportModule/getCustomInvoiceList', param, apiConfig.createVat());
},
deleteAdjustAudit: function (deleteDto){
return $http.post('/journalEntryImport/deleteAdjustAudit',
{
ServiceTypeId: deleteDto.serviceTypeId,
PeriodIds: deleteDto.periodIds
}, apiConfig.createVat());
},
deleteJournalEntryData: function (voucherIDs) {
return $http.post('/journalEntryImport/deleteDuplicateData', voucherIDs, apiConfig.createVat());
addCustomInvoice: function (inv) {
return $http.post('/vatImportModule/addCustomInvoice', inv, apiConfig.createVat());
},
validateJournalEntryData: function (period) {
return $http.get('/journalEntryImport/validateJournalEntryData/' + period, apiConfig.createVat());
updateCustomInvoice: function (inv) {
return $http.post('/vatImportModule/updateCustomInvoice', inv, apiConfig.createVat());
},
clearJournalEntryData: function (period) {
return $http.get('/journalEntryImport/clearJournalEntryData/' + period, apiConfig.createVat());
deleteCustomInvoice: function (id) {
return $http.get('/vatImportModule/deleteCustomInvoice?id=' + id, apiConfig.createVat());
},
//auditAdjust
ImportAuditAdjust: function (list, period, importType) {
return $http.post('/journalEntryImport/importAuditAdjust/' + period, { VoucherList: list, ImportType: importType }, apiConfig.createVat());
//通行费
getTollFeeList: function (param) {
return $http.post('/vatImportModule/getTollFeeList', param, apiConfig.createVat());
},
GetAuditAdjust: function (period) {
return $http.get('/journalEntryImport/getAuditAdjust/' + period, apiConfig.createVat());
addTollFee: function (entity) {
return $http.post('/vatImportModule/addTollFee', entity, apiConfig.createVat());
},
queryAuditAdjust: function (queryDto) {
return $http.post('/journalEntryImport/queryAuditAdjust', {
PageInfo: queryDto.pageInfo,
PeriodId: queryDto.periodId,
}, apiConfig.createVat());
updateTollFee: function (entity) {
return $http.post('/vatImportModule/updateTollFee', entity, apiConfig.createVat());
},
IsImportAuditAdjustOnly: function(projectId,periodId){
return $http.get('/journalEntryImport/isImportAuditAdjustOnly/' + projectId + '/' + periodId, apiConfig.createVat());
deleteTollFee: function (id) {
return $http.get('/vatImportModule/deleteTollFee?id=' + id, apiConfig.createVat());
},
/************************************************Import output*********************************************************/
importOutputInvoiceData: function (outputInvoiceList, outputInvoiceItemList, importType) {
return $http.post('/outputInvoiceImport/importOutputInvoice',
{ OutputInvoiceList: outputInvoiceList, OutputInvoiceItemList: outputInvoiceItemList, ImportType: importType }, apiConfig.createVat());
//红字专票信息统计
getRedInvoiceList: function (param) {
return $http.post('/vatImportModule/getRedInvoiceList', param, apiConfig.createVat());
},
importOutputValidate: function (outputInvoiceList) {
return $http.post('/outputInvoiceImport/importValidate', outputInvoiceList, apiConfig.createVat());
addRedInvoice: function (entity) {
return $http.post('/vatImportModule/addRedInvoice', entity, apiConfig.createVat());
},
getOutputInvoiceList: function (period) {
return $http.get('/outputInvoiceImport/getOutputInvoiceList' + '/' + period, apiConfig.createVat());
},
deleteOutputDupData: function (invoiceIDs) {
return $http.post('/outputInvoiceImport/deleteOutputDuplicateData', invoiceIDs, apiConfig.createVat());
updateRedInvoice: function (entity) {
return $http.post('/vatImportModule/updateRedInvoice', entity, apiConfig.createVat());
},
refreshOutputInvoice: function (period) {
return $http.get('/outputInvoiceImport/refreshOutputInvoice/' + period, apiConfig.createVat());
deleteRedInvoice: function (id) {
return $http.get('/vatImportModule/deleteRedInvoice?id=' + id, apiConfig.createVat());
},
clearOutputData: function (periodID) {
return $http.get('/outputInvoiceImport/clearOutputData/' + periodID, apiConfig.createVat());
//专票清单 getImportSpecialInvoiceInventoryList
getImportSpecialInvoiceInventoryList: function (param) {
return $http.post('/vatImportModule/getImportSpecialInvoiceInventoryList', param, apiConfig.createVat());
},
/************************************************Import Evidence*********************************************************/
getEvidenceList: function (param) {
return $http.post('/outputInvoiceImport/getEvidenceList', {
QueryType: param.queryType,
QueryString: param.queryString,
IsCurrentPeriod: param.isCurrentPeriod,
PeriodId: param.periodId
}, apiConfig.createVat());
//上传模块
getImportFileList: function (param, importModuleId) {
return $http.post('/vatImportModule/getImportFile?importModuleId=' + importModuleId, param, apiConfig.createVat());
},
deleteEvidences: function (evidencelist) {
return $http.post('/outputInvoiceImport/deleteEvidences', evidencelist, apiConfig.createVat());
deleteImportFile: function (id) {
return $http.get('/vatImportModule/deleteImportFile?id=' + id, apiConfig.createVat());
},
downloadEvidence: function (param) {
return $http.post('/outputInvoiceImport/DownLoadEvidence', {
filePath: param.filePath,
fileName: param.fileName
}, apiConfig.createVat({ responseType: 'arraybuffer' }));
//获取手工中方账
getImportYonYouList: function (params) {
return $http.post('/vatImportModule/getImportYonYouList', params, apiConfig.createVat());
},
/************************************************Tb entry*********************************************************/
deleteTbData: function (periodID) {
return $http.get('/DataImport/ClearTbData/' + periodID, apiConfig.createVat());
},
clearServiceTbData: function (dto){
return $http.post('/DataImport/ClearServiceTbData', {
ServiceTypeId: dto.serviceTypeId,
Periods: dto.periods,
ProjectId: dto.projectId
}, apiConfig.createVat());
},
clearErpData: function (periodId) {
return $http.get('/financeImportData/clearErpTable/' + periodId, apiConfig.create());
},
updatePeriodStatus: function (queryImportDto) {
return $http.post('/ProjectInfo/updatePeriodStatus', {
serviceTypeId: queryImportDto.serviceTypeId,
periods: queryImportDto.periods,
projectId: queryImportDto.projectId,
importTypeId: queryImportDto.importTypeId
}, apiConfig.createVat());
},
//此处是vat系统,默认servcieType = 2
getImportType: function (projectID, periodID) {
return $http.get('/ProjectInfo/getImportType/' + projectID + '/' + periodID + '/' + constant.serviceType.VAT, apiConfig.createVat());
//获取JdeaccountBalanceList
getImportJdeAccountBalanceList: function (params) {
return $http.post('/vatImportModule/getImportJdeAccountBalanceList', params, apiConfig.createVat());
},
getFileContent: function (tempFileName, selectedSheetIndex, topRowNumber) {
return $http.get('/DataImport/FileContent/' + tempFileName + '/' + selectedSheetIndex + '/' + topRowNumber, apiConfig.createVat());
},
//getFileContentByDbName: function(tempFileName, selectedSheetIndex,topRowNumber){
// return $http.get('/DataImport/FileContent/' + tempFileName + '/' + selectedSheetIndex + '/' + topRowNumber, apiConfig.createVat({dbName:dbName}));
//},
importBalanceList: function (balanceList, importType,serviceTypeId) {
return $http.post('/DataImport/ImportBalance', { balanceList: balanceList, importType: importType, serviceTypeId: serviceTypeId }, apiConfig.createVat());
},
getBalanceList: function (period,projectId) {
return $http.get('/DataImport/GetBalanceList/' + period + '/' + projectId, apiConfig.createVat());
},
queryTrialBalanceData: function(queryDto){
return $http.post('/DataImport/queryTrialBalanceData', {
PageInfo: queryDto.pageInfo,
PeriodId: queryDto.periodId,
ProjectId: queryDto.projectId,
ServiceTypeId: queryDto.serviceTypeId
}, apiConfig.createVat());
},
deleteDuplicateTbData: function (balanceIds) {
return $http.post('/DataImport/DeleteDuplicateTbData', balanceIds, apiConfig.createVat());
},
refreshTrialBalance: function (period,serviceTypeId) {
return $http.get('/DataImport/RefreshTrialBalance/' + period + "/" + serviceTypeId, apiConfig.createVat());
},
refreshTrialBalancePeriods: function (queryDto) {
return $http.post('/DataImport/RefreshTrialBalancePeriods', {
Periods: queryDto.periods,
ServiceTypeId: queryDto.serviceTypeId
}, apiConfig.createVat());
},
getValidationList: function (type, period) {
return $http.get('/DataImport/GetValidationList/' + type + '/' + period, apiConfig.createVat());
},
getServiceValidationList : function (type, period, serviceTypeId, projectId){
return $http.get('/DataImport/GetServiceValidationList/' + type + '/' + period + '/' + serviceTypeId + '/' + projectId, apiConfig.createVat());
},
getTBImportedPeriods: function (projectId, serviceTypeId) {
return $http.get("/DataImport/getTBImportedPeriods/" + projectId + '/' + serviceTypeId, apiConfig.createVat());
},
isImportData: function (projectId, importTypeId) {
return $http.get('/ProjectInfo/isProjectImportedData/' + projectId + '/' + importTypeId, apiConfig.createVat());
},
getProjectImportType: function (queryImportType) {
return $http.post('/ProjectInfo/getProjectImportType', {
serviceTypeId: queryImportType.serviceTypeId,
periods: queryImportType.periods,
projectId: queryImportType.projectId
}, apiConfig.createVat());
},
clearTableByPeriods: function (periods) {
return $http.post("/DataImport/clearTableByPeriods", { periods: periods }, apiConfig.createVat());
},
getAdjustAuditPeriods: function () {
return $http.get("/journalEntryImport/getAdjustAuditPeriods", apiConfig.createVat());
},
validateJournalEntryByPeriods: function () {
return $http.get("/journalEntryImport/validateJournalEntryByPeriods", apiConfig.createVat());
},
/****************************************************************************************************/
/* Tony's Beatup services */
getBalanceDataForDisplay: function (category, fromPeriod, toPeriod, criteria) {
return $http.post('/DataImport/GetBalanceDataForDisplay', {
category: category,
fromPeriod: fromPeriod,
toPeriod: toPeriod,
criteria: criteria
}, apiConfig.createVat());
// return $http.get('/DataImport/GetBalanceDataForDisplay?category=' + category + '&fromPeriod=' + fromPeriod + '&toPeriod=' + toPeriod + '&criteria=' + criteria, apiConfig.createVat());
},
updateACustomPrice: function (customId, invoiceAmount) {
return $http.get('/CustomsInvoice/UpdateACustomPrice?customId=' + customId + '&invoiceAmount=' + invoiceAmount, apiConfig.createVat());
},
getCustomsInvoiceDataForDisplay: function (fromPeriod, toPeriod, criteria, pagination) {
return $http.get('/CustomsInvoice/GetCustomsInvoiceDataForDisplay?fromPeriod=' + fromPeriod + '&toPeriod=' + toPeriod + '&criteria=' + criteria + '&pagination=' + pagination, apiConfig.createVat());
},
getExportCustomInvoiceList: function (criteria) {
return $http.post('/CustomsInvoice/ExportQueryData/get?criteria=' + criteria, {},apiConfig.createVat({ responseType: 'arraybuffer' }));
},
getParentCodesForDisplay: function (category) {
return $http.get('/DataImport/GetParentCodesForDisplay?category=' + category , apiConfig.createVat());
},
/* workflow */
getVoucherList: function (param) {
return $http.post('/outputInvoiceImport/getVoucherList', {
QueryType: param.queryType,
QueryString: param.queryString,
IsCurrentPeriod: param.isCurrentPeriod,
PeriodId: param.periodId
}, apiConfig.createVat());
},
updateEvidencesComments: function (commentsWithFileId) {
return $http.post('/outputInvoiceImport/updateEvidencesComments', commentsWithFileId, apiConfig.createVat());
},
getJePeriods: function () {
return $http.get("/journalEntryImport/getJePeriods", apiConfig.createVat());
//获取getImportJdeVoucherList
getImportJdeVoucherList: function (params) {
return $http.post('/vatImportModule/getImportJdeVoucherList', params, apiConfig.createVat());
},
/************************************************Mappings*********************************************************/
SaveVourcherMappings: function (list, period, isAddition) {
return $http.post('/vimapping/savevmappings' + '/' + period + '/' + isAddition, list, apiConfig.createVat());
},
GetVourcherMappings: function (period) {
return $http.get('/vimapping/getvmappings' + '/' + period, apiConfig.createVat());
},
SaveInvoiceMappings: function (list, period, isAddition) {
return $http.post('/vimapping/saveimappings' + '/' + period + '/' + isAddition, list, apiConfig.createVat());
},
GetInvoiceMappings: function (period) {
return $http.get('/vimapping/getimappings' + '/' + period, apiConfig.createVat());
},
deleteVourcherMappings: function (ids) {
return $http.post('/vimapping/deletevmappings', ids, apiConfig.createVat());
isUnbilledInoiceUpdated: function (projectID, periodID) {
return $http.get('/ProjectInfo/isUnbilledInoiceUpdated/' + projectID + '/' + periodID, apiConfig.createVat());
},
validDBVoucherMapping: function (period) {
return $http.post('/vimapping/validvmappings/' + '/' + period, null, apiConfig.createVat());
},
deleteInvoiceMappings: function (ids) {
return $http.post('/vimapping/deleteimappings', ids, apiConfig.createVat());
},
validDBInvoiceMapping: function (period) {
return $http.post('/vimapping/validimappings/' + '/' + period, null, apiConfig.createVat());
},
/************************************************CustomsInvoice*********************************************************/
importCustomsInvoiceList: function (custList, importType) {
return $http.post('/CustomsInvoice/ImportCustomsInvoice', { customsList: custList, importType: importType }, apiConfig.createVat());
},
getCustomsInvoiceList: function () {
return $http.get('/CustomsInvoice/GetCustomsInvoices', apiConfig.createVat());
},
getCustomsInvoicesByPeriodId: function (periodId) {
return $http.get('/CustomsInvoice/GetCustomsInvoicesByPeriodId/' + periodId, apiConfig.createVat());
},
deleteCustomsInvoicesByPeriodId: function (periodId) {
return $http.get('/CustomsInvoice/DeleteCustomsInvoices/' + periodId, apiConfig.createVat());
},
getCustomsInvoicesValidates: function (periodId) {
return $http.get('/CustomsInvoice/getCustomsInvoicesValidates/' + periodId, apiConfig.createVat());
},
getPayNumDuplicateDetails: function () {
return $http.get('/CustomsInvoice/getPayNumDuplicateDetails', apiConfig.createVat());
},
deleteCustomInvoiceByIds: function (customsIds) {
return $http.post('/CustomsInvoice/deleteCustomInvoiceByIds',customsIds,apiConfig.createVat());
},
updateCustomsInvoiceValidation: function (periodId) {
return $http.get('/CustomsInvoice/updateCustomsInvoiceValidation/'+ periodId,apiConfig.createVat());
},
/************************************************CustomsInvoice*********************************************************/
};
}]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
$log.debug('vatOperationLogService.ctor()...');
return {
addOperationLog: function (operationLog) {
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat());
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getOperationLogList: function (param) {
......
webservices.factory('vatOutputInvoiceManageService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
//手工更新数据
manualUpdateSFData: function () {
return $http.get('/outputInvoiceImported/manualUpdateSFData', apiConfig.create());
},
//Reassign VRL
reassignCase: function (reassignReason) {
return $http.post('/outputInvoiceImported/reassignCase', reassignReason , apiConfig.create());
},
//获取已导入数据
getOutputImportedList: function (queryParm) {
return $http.post('/outputInvoiceImported/getImportedData', queryParm, apiConfig.create());
},
// 获取编辑的outputInvoiceEdited
getOutputInvoiceEditedList: function (model) {
return $http.post('/outputInvoiceEdited/getOutputInvoiceEditedList', model, apiConfig.create());
},
// 存入到发票表中
addOutputInvoicePrinted: function (model, loadingBar) {
var ignoreLoadingBar = true;
// 默认不显示转圈圈,如果加载LoadBar,则显示
if (loadingBar) {
ignoreLoadingBar = false;
}
var config = { ignoreLoadingBar: ignoreLoadingBar };
return $http.post('/outputInvoiceEdited/addOutputInvoicePrinted', model, apiConfig.create(config));
},
// 发票编辑保存
updateOutputInvoiceEdit: function (model) {
return $http.post('/outputInvoiceEdited/updateOutputInvoiceEdit', model, apiConfig.create());
},
// 获取已打印GD-BD发票
getIssuedInvoiceGdList: function (queryParm) {
return $http.post('/outputInvoicePrinted/getIssuedInvoiceGdList', queryParm, apiConfig.create());
},
// 获取修改待打印发票理由
getAllOutputInvoiceUpdateReasonList: function () {
return $http.get('/outputInvoiceEdited/getAllOutputInvoiceUpdateReasonList', apiConfig.create());
},
//获取已打印的BD-USER发票列表
getIssuedVehicleBdList: function (queryParm) {
return $http.post('/outputInvoicePrinted/getIssuedVehicleBdList', queryParm, apiConfig.create());
},
//根据vin获取来自sf的BD信息
getOutputInvoiceImportedByVin: function (vin) {
return $http.get('/outputInvoiceImported/getOutputInvoiceImportedByVin/' + vin, apiConfig.create());
},
//special vat invoice list
getSpecailGBInvoiceList: function (dto) {
return $http.post('/outputInvoiceGBIssued/getGBInvoiceList', dto, apiConfig.create());
},
//special vat invoice detail
getGBInvoiceDetail: function (id) {
return $http.get('/outputInvoiceGBIssued/getGBDetail/' + id, apiConfig.create());
},
//GD-BD invoice cancel
cancelGDInvoice: function (list) {
return $http.post('/outputInvoiceGBIssued/gdInvoiceCancel', list, apiConfig.create());
},
//GD-BD red letter
gdRedLetter: function (detailID) {
return $http.post('/outputInvoiceGBIssued/gdRedletter?detailID=' + detailID, {}, apiConfig.create());
},
//GD-BD multiple red letter
gdMultipleRedLetter: function (detailIDs) {
return $http.post('/outputInvoiceGBIssued/gdMultipleRedletter' ,detailIDs, apiConfig.create());
},
//更新GD-BD Status
updateInvoiceGdBdStatus: function (id, status) {
return $http.post('/outputInvoicePrinted/updateInvoiceGdBdStatus/' + id + '/' + status, {}, apiConfig.create());
},
//更新GD-BD的车辆 Status
updateInvoiceVichelGdBdStatus: function (id, status) {
return $http.post('/outputInvoicePrinted/updateInvoiceVichelGdBdStatus/' + id + '/' + status, {}, apiConfig.create());
},
pendingForApprovalGdBdInvoice: function(vin){
return $http.post('/outputInvoicePrinted/pendingForApprovalGdBdInvoice/' + vin, {}, apiConfig.create());
},
//保存折扣率
saveMarkupRatio: function (data) {
return $http.post('/outputInvoiceGBIssued/saveMarkupRatio', data, apiConfig.create());
},
// 保存限额
saveInvoiceQuota: function (data) {
return $http.post('/outputInvoiceGBIssued/invoiceQuota', angular.toJson(data), apiConfig.create());
},
// 手动调价
manualAdjustPrice: function (model) {
return $http.post('/outputInvoiceImported/manualAdjustPrice', model, apiConfig.create());
},
getAmountCheckManualInputReason: function () {
return $http.get('/outputInvoicePrinted/amountCheckManualInputReason', apiConfig.create());
},
// 挂起列表
holdRecordList: function (list) {
return $http.post('/outputInvoiceImported/holdRecordList', list, apiConfig.create());
},
// 进入待开票状态
triggerIssuanceList: function (list) {
return $http.post('/outputInvoiceImported/triggerIssuanceList', list, apiConfig.create());
},
//获取折扣率
getMarkupRatio: function () {
return $http.get('/outputInvoiceGBIssued/getMarkupRatio', apiConfig.create());
},
// 获取限额
getInvoiceQuota: function () {
return $http.get('/outputInvoiceGBIssued/invoiceQuota', apiConfig.create());
},
//取消已打印的(BD-User)发票
cancelInvoice: function (id,reprint) {
return $http.post('/outputInvoicePrinted/cancelInvoice/' + id+'/'+reprint, {}, apiConfig.create());
},
//红冲已打印的(BD-User)发票
redLetterInvoice: function (id) {
return $http.post('/outputInvoicePrinted/redLetterInvoice/' + id, {}, apiConfig.create());
},
//添加手工修改发票历史记录
addOutputInvoiceEditHistory: function (data) {
return $http.post('/outputInvoiceEdited/addOutputInvoiceEditHistory', data, apiConfig.create());
},
//获取手工修改发票历史记录
getOutputInvoiceEditHistory: function (invoiceId) {
return $http.get('/outputInvoiceEdited/getOutputInvoiceEditHistory/' + invoiceId, apiConfig.create());
},
//保存手工导入数据历史记录
saveSyncHistory: function (data) {
return $http.post('/outputInvoiceImported/saveSyncHistory', data, apiConfig.create());
},
//获取手工导入数据历史记录
getSyncHistory: function () {
return $http.get('/outputInvoiceImported/getSyncHistory', apiConfig.create());
},
//获取Model Mapping设置
getModelMappingConfig: function () {
return $http.get('/outputInvoiceImported/modelMappingConfig', apiConfig.create());
},
addModelMappingConfig: function (model) {
return $http.post('/outputInvoiceImported/modelMappingConfig', model, apiConfig.create());
},
updateModelMappingConfig: function (model) {
return $http.put('/outputInvoiceImported/modelMappingConfig', model, apiConfig.create());
},
deleteModelMappingConfig: function (id) {
return $http.delete('/outputInvoiceImported/modelMappingConfig?id=' + id, apiConfig.create());
},
getModelSeries: function () {
return $http.get('/outputInvoiceImported/modelSeries', apiConfig.create());
},
getCabinConfiguration: function () {
return $http.get('/outputInvoiceImported/cabinConfiguration', apiConfig.create());
},
// 打印GD发票
printGDInvoice: function (model) {
return $http.post('/outputInvoicePrinted/printGDInvoice', model, apiConfig.create());
},
getGdInvoiceInventory: function () {
return $http.get('/outputInvoicePrinted/gdInvoiceInventory', apiConfig.create());
},
getBdInvoiceInventory: function (id) {
return $http.get('/outputInvoiceEdited/bdInvoiceInventory?id=' + id, apiConfig.create());
},
getCheckShipmentList: function (vinList) {
return $http.post('/outputInvoicePrinted/checkShipmentList', vinList, apiConfig.create());
},
// 计算价格
computeBDPrice: function (model) {
var config = { ignoreLoadingBar: true };
return $http.post('/outputInvoiceEdited/computeBDPrice', model, apiConfig.create(config));
},
// 解挂
unHoldRecordByList:function(model){
return $http.post('/outputInvoiceImported/unHoldRecordByList', model, apiConfig.create());
},
// 取消BD发票打印
cancelBDEditList:function(model){
return $http.post('/outputInvoiceEdited/cancelBDEditList', model, apiConfig.create());
},
//添加BD-User 红冲原因
addBdUserRedLetterReason: function (data) {
return $http.post('/outputInvoicePrinted/addBdUserRedLetterReason', data, apiConfig.create());
},
//删除BdUserRedLetter Evidence File
deleteEvidenceFile: function (evidencesList) {
return $http.post('/outputInvoicePrinted/deleteEvidences', evidencesList, apiConfig.create());
},
//下载Evidence File
downloadEvidenceFile: function (queryDto) {
return $http.post('/outputInvoicePrinted/downLoadEvidence', queryDto, apiConfig.create())
}
,
// 查询shipment列表
getImportShipmentList:function(model){
return $http.post('/outputInvoiceImportShipment/getImportShipmentList', model, apiConfig.create());
},
// 查询日志
getOutputInvoiceImportShipmentSyncHistory:function(){
return $http.get('/outputInvoiceImportShipment/getOutputInvoiceImportShipmentSyncHistory', apiConfig.create());
},
sendEmail: function (vin,id) {
return $http.post('/outputInvoicePrinted/sendEmail/' + vin + '/' + id, {}, apiConfig.create())
},
receiveEmail: function () {
return $http.get('/outputInvoicePrinted/receiveEmail', apiConfig.create())
},
getGDDetailByVin: function (dto) {
return $http.post('/outputInvoiceGBIssued/gdDetailViewByVin',dto, apiConfig.create());
},
getVehicleModelNameList: function(){
return $http.get('/outputInvoicePrinted/getVehicleModelNameList', apiConfig.create());
},
getTaxControlDiskList:function(model,loadingBar){
var ignoreLoadingBar = true;
// 默认不显示转圈圈,如果加载LoadBar,则显示
if (loadingBar) {
ignoreLoadingBar = false;
}
var config = { ignoreLoadingBar: ignoreLoadingBar };
return $http.post('/taxControlDisk/getTaxControlDiskList',model, apiConfig.create(config));
},
testIsActive:function(model,loadingBar){
var ignoreLoadingBar = true;
// 默认不显示转圈圈,如果加载LoadBar,则显示
if (loadingBar) {
ignoreLoadingBar = false;
}
var config = { ignoreLoadingBar: ignoreLoadingBar };
return $http.post('/taxControlDisk/testIsActive',model, apiConfig.create(config));
}, getBDDetailGroupByVIN: function (dto) {
return $http.post('/outputInvoicePrinted/getBDDetailGroupByVIN', dto, apiConfig.create());
},
updateTaxControlDisk:function(model){
return $http.post('/taxControlDisk/updateTaxControlDisk',model, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('vatReconciliationCalculate', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
calculateInvoiceJournalGroup: function (calculateDate, organizationID, isForceCalculate) {
return $http.post('/OutputReconciliation/calculateInvoiceJournalGroup/' + calculateDate + '/' + organizationID + '/' + isForceCalculate, {}, apiConfig.createVat());
},
getInputReconciliationSummary: function (dto) {
return $http.post('/inputReconciliation/InputReconciliationDetail', dto, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -49,33 +49,47 @@
// 保存report cache中的数据
saveReportCache: function (dirtyData, reportId, generator) {
var promise = $q.when();
var cache = reportCache.get('report-cache');
// 按顺序执行缓存的service
while (!_.isEmpty(cache)) {
var serviceItem = cache.shift();
(function (i) {
if (_.isFunction(vatReportService[i.serviceType])) {
promise = promise.then(function () {
return vatReportService[i.serviceType].apply(vatReportService, i.params);
});
}
else if (_.isFunction(modelConfigurationService[i.serviceType])) {
promise = promise.then(function () {
return modelConfigurationService[i.serviceType].apply(modelConfigurationService, i.params);
});
}
}(serviceItem));
var cache = reportCache.get('report-cache');
var addList = _.filter(cache, function (i) { return i.serviceType == 'addCellManualData' })
if (!_.isEmpty(addList))
{
var paramList = [];
addList.forEach(function (i) {
var param = {
manualDto: i.params[0],
operationLog: i.params[1],
};
paramList.push(param);
});
promise = promise.then(function () {
return vatReportService.addCellManualDataList(paramList);
});
}
//// 按顺序执行缓存的service
//while (!_.isEmpty(cache)) {
// var serviceItem = cache.shift();
// (function (i) {
// if (_.isFunction(vatReportService[i.serviceType])) {
// promise = promise.then(function () {
// return vatReportService[i.serviceType].apply(vatReportService, i.params);
// });
// }
// else if (_.isFunction(modelConfigurationService[i.serviceType])) {
// promise = promise.then(function () {
// return modelConfigurationService[i.serviceType].apply(modelConfigurationService, i.params);
// });
// }
// }(serviceItem));
//}
if (!_.isEmpty(dirtyData)) {
promise = promise.then(function () {
return vatReportService.updateReportCellValue(dirtyData, reportId, generator);
});
}
promise = promise.then(setProjectStatus);
this.initReportCache();
return promise;
},
......
......@@ -16,46 +16,25 @@
// 移除了CalculateSingleCellFormula
// 新增了updateReportCellValue
// For CIT:
// 新增了citGenerateByType
//CIT Remove(可以直接使用vat已有的):
// citGetStdAccountByIndustryID: function (industryID)
// citGenerate: function (projectId, templateId, param?, generator)
// citGetReportData: function (reportId)
// citGetCellVoucher: function (cellDataID)
// citGetCellInvoice: function (cellDataID, invoiceType)
// citAddCellManualData: function (mauanlData)
// citAddDataSource: function (dataSource)
// citAddDataSourceItems: function (dataSource)
// citDeleteCellVoucher: function (voucherId, datasourceId)
// citDeleteCellInvoice: function (invoiceId, datasourceId)
// citDeleteCellDatasource: function(datasourceID,cellID)
// citGetAllDataItems: function (dataSourceType)
// citGetCellAccountRange: function (reportTemplateId, period, rowIndex, columnIndex)
// citGetCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex)
// citUpdateCellAccountRangeAndSummary: function (cellTemplateId, period?, value, operation)
// citUpdateDataSourceAmount: function (datasourceId, amount)
//CIT Update(带问号参数为修改的参数,目前对于申报表可以直接传null,对于BSPL如果调用到这些API需要传period):
// citUpdateConfig: function (projectId, period?)
// citGetTemplate: function (projectId, period?)
// citGenerate: function (projectId, templateId, param?, generator)
// citGetTemplate: function (projectId, param?)
// citGetCellAccountRange: function (reportTemplateId, rowIndex, columnIndex, param?)
// citGetCellTemplateConfig: function (reportTemplateId, period?, rowIndex, columnIndex)
// citUpdateCellAccountRangeAndSummary: function (cellTemplateId, value, operation, param?)
updateConfig: function (projectId, period, generator) {
return $http.post('/Report/updateConfig/' + projectId + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
updateConfig: function (projectId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/updateConfig/' + projectId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
generate: function (projectId, templateId, period, generator) {
return $http.post('/Report/generate/' + projectId + '/' + templateId + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
generate: function (projectId, templateId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/generate/' + projectId + '/' + templateId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getReportData: function (reportId) {
return $http.get('/Report/reportData/' + reportId, apiConfig.createVat());
},
calculateKeyValue: function (projectId, period) {
return $http.post('/Report/calculateKeyValue/' + projectId + '/' + period, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
//CalculateSingleCellFormula: function (cellId) {
// return $http.get('/Report/formulaDataSource/byCell/' + cellId, apiConfig.createVat());
//},
......@@ -63,10 +42,6 @@
return $http.post('/Report/updateReportCellValue/' + reportId + '?generator=' + generator, cellDataList, apiConfig.createVat());
},
getTemplate: function (projectId, period) {
if (!_.isNumber(period)) {
period = 0;
}
return $http.get('/Report/template/' + projectId + '/' + period, apiConfig.createVat());
},
getCellVoucher: function (cellDataID) {
......@@ -85,13 +60,17 @@
return vatOperationLogService.addOperationLog(logInfo);
});
},
addCellManualDataList: function (manualDataList) {
return $http.post('/Report/addCellManualDataList', manualDataList, apiConfig.createVat());
},
deleteCellVoucher: function (voucherId, datasourceId) {
return $http.post('/Report/deleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellInvoice: function (invoiceId, datasourceId) {
return $http.post('/Report/deleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
},
deleteCellDatasource: function(datasourceID,cellID){
deleteCellDatasource: function (datasourceID, cellID) {
return $http.post('/Report/deleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
},
getAllDataItems: function (dataSourceType) {
......@@ -104,24 +83,12 @@
return $http.post('/Report/addDataSourceItems', dataSource, apiConfig.createVat());
},
getCellAccountRange: function (reportTemplateId, period, rowIndex, columnIndex) {
if (!_.isNumber(period)) {
period = 0;
}
return $http.get('/Report/getCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
},
getCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
if (!_.isNumber(period)) {
period = 0;
}
return $http.get('/Report/getCellTemplateConfig/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex, apiConfig.createVat());
},
updateCellAccountRangeAndSummary: function (cellTemplateId, period, value, operation) {
if (!_.isNumber(period)) {
period = 0;
}
return $http.post('/Report/updateCellAccountRangeAndSummary/' + cellTemplateId + '/' + period + '/' + value + '/' + operation, {}, apiConfig.createVat());
},
updateDataSourceAmount: function (datasourceId, amount) {
......@@ -131,17 +98,23 @@
return $http.get('/Report/getStdAccountByIndustry/' + industryID, apiConfig.createVat());
},
getTemplateReferences: function (period) {
return $http.get('/Report/templateReferences/' + period, apiConfig.createVat());
return $http.get('/Report/templateReferences/' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citTryGenerateDocList: function (projectId, serviceType, generator) {
return $http.post('/Report/citTryGenerateDocList/' + projectId + '/' + serviceType + '?generator=' + generator, {}, apiConfig.createVat());
citUpdateConfig: function (projectId, period) {
var periodParam = '';
if (_.isNumber(period)) {
periodParam = '/' + period.toString();
}
return $http.post('/Report/citUpdateConfig/' + projectId + periodParam, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citUpdateConfig: function (projectId, period, generator) {
if (!_.isNumber(period)) {
period = 0;
citGenerate: function (projectId, templateId, param, generator) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.post('/Report/citUpdateConfig/' + projectId + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
return $http.post('/Report/citGenerate/' + projectId + '/' + templateId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGenerateByType: function (projectId, reportType, generator) {
var paramStr = '';
......@@ -149,22 +122,126 @@
paramStr = '/' + reportType;
}
return $http.post('/Report/citGenerate/byTotal/' + projectId + '/0' + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
return $http.post('/Report/citGenerate/byTotal/' + projectId + paramStr + '?generator=' + generator, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetTemplate: function (projectId, period) {
if (!_.isNumber(period)) {
period = 0;
citGetReportData: function (reportId) {
return $http.get('/Report/citReportData/' + reportId, apiConfig.createVat());
},
citCalculateSingleCellFormula: function (cellId) {
return $http.get('/Report/citFormulaDataSource/byCell/' + cellId, apiConfig.createVat());
},
citGetTemplate: function (projectId, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.get('/Report/citTemplate/' + projectId + '/' + period, apiConfig.createVat());
return $http.get('/Report/citTemplate/' + projectId + paramStr, apiConfig.createVat());
},
citCalculateKeyValue: function (projectId, reportType) {
var reportTypeParam = '';
if (_.isNumber(reportType)) {
reportTypeParam = '/' + reportType;
citGetCellVoucher: function (cellDataID) {
return $http.get('/Report/citCellVoucher/' + cellDataID, apiConfig.createVat());
},
citGetCellInvoice: function (cellDataID, invoiceType) {
return $http.get('/Report/citCellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
},
citAddCellManualData: function (mauanlData) {
return $http.post('/Report/citAddCellManualData', mauanlData, apiConfig.createVat());
},
citDeleteCellVoucher: function (voucherId, datasourceId) {
return $http.post('/Report/citDeleteCellVoucher/' + voucherId + '/' + datasourceId, {}, apiConfig.createVat());
},
citDeleteCellInvoice: function (invoiceId, datasourceId) {
return $http.post('/Report/citDeleteCellInvoice/' + invoiceId + '/' + datasourceId, {}, apiConfig.createVat());
},
citDeleteCellDatasource: function (datasourceID, cellID) {
return $http.post('/Report/citDeleteCellDatasource/' + datasourceID + '/' + cellID, {}, apiConfig.createVat());
},
citGetAllDataItems: function (dataSourceType) {
return $http.get('/Report/citGetAllDataItems/' + dataSourceType, apiConfig.createVat())
},
citAddDataSource: function (dataSource) {
return $http.post('/Report/citAddDataSource', dataSource, apiConfig.createVat());
},
citAddDataSourceItems: function (dataSource) {
return $http.post('/Report/citAddDataSourceItems', dataSource, apiConfig.createVat());
},
citGetCellAccountRange: function (reportTemplateId, rowIndex, columnIndex, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.get('/Report/citGetCellAccountRange/' + reportTemplateId + '/' + period + '/' + rowIndex + '/' + columnIndex + paramStr, apiConfig.createVat());
},
citGetCellTemplateConfig: function (reportTemplateId, period, rowIndex, columnIndex) {
var periodParam = '';
if (_.isNumber(period)) {
periodParam = '/' + period.toString();
}
return $http.get('/Report/citGetCellTemplateConfig/' + reportTemplateId + '/' + rowIndex + '/' + columnIndex + periodParam, apiConfig.createVat());
},
citUpdateCellAccountRangeAndSummary: function (cellTemplateId, value, operation, param) {
var paramStr = '';
if (!_.isEmpty(param)) {
paramStr = '/' + param;
}
return $http.post('/Report/citCalculateKeyValue/' + projectId + '/0' + reportTypeParam, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
return $http.post('/Report/citUpdateCellAccountRangeAndSummary/' + cellTemplateId + '/' + value + '/' + operation + paramStr, {}, apiConfig.createVat());
},
citUpdateDataSourceAmount: function (datasourceId, amount) {
return $http.post('/Report/citUpdateDataSourceAmount/' + datasourceId + '/' + amount, {}, apiConfig.createVat());
},
//未开票收入计算
caculateUnbilled: function (period, year, orgID) {
return $http.post('/Report/calculateUnInvoiced/' + period + '/' + year + '/' + orgID, {}, apiConfig.createVat({ ignoreLoadingBar: true }));
},
//获取收入汇总
getIncomeSummary: function (period) {
return $http.get('/Report/getIncomeSummary/' + period, apiConfig.createVat())
},
//获取汇总明细
getIncomeSummaryDetail: function (relevanceCode, period, type) {
return $http.get('/Report/getIncomeSummaryDetail/' + relevanceCode + '/' + period + '/' + type, apiConfig.createVat());
},
//添加备注
saveIncomeSummaryRemark: function (id, remark) {
var unInvoicedParm = {
id: id,
remark: remark
};
return $http.post('/Report/saveIncomeSummaryRemark', unInvoicedParm, apiConfig.createVat());
},
//修改汇总数据
updateInvoicedIncomeSummary: function (id, salesAmount, projectId, remark) {
var unInvoicedParm = {
id: id,
remark: remark,
projectID: projectId,
salesAmount: salesAmount
};
return $http.post('/Report/updateInvoicedIncomeSummary', unInvoicedParm, apiConfig.createVat());
},
//获取报表审核状态
getReportApprovalStatus: function (period) {
return $http.get('/Report/approvalStatus/' + period, apiConfig.createVat());
},
addRemarkApproval: function (remarkApproval) {
return $http.post('/Report/remarkApproval/', remarkApproval, apiConfig.createVat());
},
getRemarkApprovalList: function (period) {
return $http.get('/Report/remarkApproval/' + period, apiConfig.createVat());
},
deleteRemark: function (id) {
return $http.delete('/Report/remarkApproval/' + id, apiConfig.createVat());
},
exportExcel: function (reportIdList) {
var thisConfig = apiConfig.createVat();
thisConfig.responseType = "arraybuffer";
return $http.post('/Report/exportExcelZip', reportIdList, thisConfig);
},
updateCellValue: function (projectId, period) {
return $http.get('/Report/updateCellValue/' + projectId + '/' + period, apiConfig.createVat());
}
};
......
......@@ -3,18 +3,15 @@
$log.debug('vatSessionService.ctor()...');
var date = new Date();
var month = date.getMonth();
var month = date.getMonth() <= 0 ? 1 : date.getMonth();
var projectyear = date.getFullYear();
if (month <= 0) {
month = 1;
}
var logUser =
{
ID: "66933E7B-DA75-4B2E-B7D6-AB65DCA20D50",
UserName: "Admin",
};
var cacheName = 'cargill-cache';
var propList = ['month', 'year', 'project', 'projects', 'dataChanged', 'logUser', 'userPermission', 'queryDto'];
var userPermission = {};
var logUser = {
ID: "66933E7B-DA75-4B2E-B7D6-AB65DCA20D50",
UserName: "Admin",
};
var queryDto = {
searchKeyword: '',
......@@ -23,59 +20,95 @@
checkedOrgs: {},
};
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
var cacheObj = {
month: month,
userPermission: {},
project: { year: 2017 },
project: { year: projectyear },
projects: [],
dataChanged: false
};
var temp = localStorageService.get('atms-cache');
var temp = localStorageService.get(cacheName);
if (temp) {
cacheObj = temp;
} else {
localStorageService.set('atms-cache', cacheObj);
localStorageService.set(cacheName, cacheObj);
}
//设置属性值
var setProperty = function (propertyName, propertyValue) {
cacheObj[propertyName] = propertyValue
//$cookieStore.put('atms-cache', JSON.stringify(apiTokenObj));
localStorageService.set('atms-cache', cacheObj);
cacheObj[propertyName] = propertyValue;
localStorageService.set(cacheName, cacheObj);
}
//获取属性值
var getProperty = function (propertyName) {
//console.log($cookieStore.get('atms-cache'));
return cacheObj[propertyName];
}
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
//重置项目月份
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
//跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var clearSelectProject = function () {
var tempProject = { year: 2017 };
var tempProject = { year: projectyear };
setProperty('project', tempProject);
};
return {
month: month,
year: projectyear,
project: { year: 2017 },
projects: [],
dataChanged: false,
logUser: logUser,
reset: reset,
userPermission: userPermission,
queryDto: queryDto,
setProperty: setProperty,
getProperty: getProperty,
clearSelectProject: clearSelectProject,
}
var result = {};
var defineProp = function (propertyName) {
Object.defineProperty(result, propertyName, {
get: function () {
var getValue = getProperty(propertyName);
var year = new Date().getFullYear();
var month = new Date().getMonth();
switch (propertyName) {
case "year":
return getValue || year;
case "month":
return getValue || month - 1;
case "project":
return getValue || { year: year };
case "projects":
return getValue || [];
case "dataChanged":
return getValue || false;
case "logUser":
return getValue || logUser;
case "userPermission":
return getValue || {};
case "queryDto":
return getValue || queryDto;
}
},
set: function (val) {
setProperty(propertyName, val);
},
});
};
propList.forEach(function (propName) {
defineProp(propName);
});
result.reset = reset;
result.setProperty = setProperty;
result.getProperty = getProperty;
result.clearSelectProject = clearSelectProject;
return result;
}]);
\ No newline at end of file
......@@ -7,21 +7,21 @@
setProcessLog: function (status,dbName, periodId, dictKey, isFinished) {
return $http.get('/workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
setWorkflowNodeLog: function (status, dbName, periodId, dictKey, isFinished) {
return $http.get('/workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
//添加TaxAdmin.WorkflowApproveReportLog和项目数据下的OperationLog表的数据
addApproveReportLog: function (approveLog) {
return $http.post('/workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
return $http.post('/Workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
},
getWorkflowDetailByDb: function (dbName, periodId) {
return $http.get('/workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
},
execute: function () {
......@@ -41,15 +41,15 @@
},
getWorkflowApproveReportLog: function (dbName, period, orderIndex,operationTypeId,templateCode){
return $http.get('/workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
getWorkflowApproveReportLogNoLevel: function (dbName, period, operationTypeId, templateCode) {
return $http.get('/workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
isExistApproveLogSubmitItem: function (dbName, period, orderIndex, operationTypeId, templateCode) {
return $http.get('/workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -14,7 +14,7 @@ webservices.factory('projectService', ['$http', 'apiConfig', function ($http, ap
getAllProjectList: function (orgID, serviceID, projectYear) {
return $http.get('/project/getAllProjectList?orgID=' + orgID + '&serviceID=' + serviceID + '&projectYear=' + projectYear, apiConfig.create());
return $http.get('/project/getAllProjectList?orgID=' + orgID + '&serviceID=' + serviceID + (projectYear==null?'':'&projectYear=' + projectYear), apiConfig.create());
},
getProjectByID: function (projectID) {
return $http.get('/project/getProject?projectID=' + projectID, apiConfig.create());
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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