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()); } }; }]);