1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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());
}
};
}]);