Commit b804def4 authored by Ken you's avatar Ken you

update vat tab---Ken

parent de480ad9
...@@ -54,9 +54,9 @@ constant.payTaxTypeList = [ ...@@ -54,9 +54,9 @@ constant.payTaxTypeList = [
{value: 2, name: '小规模纳税人'}]; {value: 2, name: '小规模纳税人'}];
constant.citReportTypeList = [ constant.citReportTypeList = [
{ value: 1, name: 'TaxReturnType',orderIndex:2 }, { value: 1, name: 'TaxReturnType',orderIndex:1 },
{ value: 2, name: 'QuarterlyFilingReturnType', orderIndex: 3 }, { value: 2, name: 'QuarterlyFilingReturnType', orderIndex: 2 },
{ value: 3, name: 'WorkingPaperType', orderIndex: 1 }, { value: 3, name: 'WorkingPaperType', orderIndex: 3 },
{ value: 4, name: 'DocumentListType', orderIndex: 4 }, { value: 4, name: 'DocumentListType', orderIndex: 4 },
{ value: 5, name: 'OtherTaxes', orderIndex: 5 }]; { value: 5, name: 'OtherTaxes', orderIndex: 5 }];
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
var grpByType = _.groupBy(result[1].data.data, 'reportType'); var grpByType = _.groupBy(result[1].data.data, 'reportType');
_.each(grpByType, function (val, key) { _.each(grpByType, function (val, key) {
var typeName = 'TaxReturnType'; var typeName = 'TaxReturnType';
var parentId = '2';
if (key != null || key == "null") { if (key != null || key == "null") {
//兼容以前的的 vat报表 类型 为 null 的情况 //兼容以前的的 vat报表 类型 为 null 的情况
var idx = 1; var idx = 1;
...@@ -55,47 +54,20 @@ ...@@ -55,47 +54,20 @@
} }
} }
if (parseInt(key) == enums.reportType.taxReturn) {
parentId = '2';
} else if (parseInt(key) == enums.reportType.workingPaper) {
parentId = '4';
}
// 获取 申报表 Report Template // 获取 申报表 Report Template
var taxRtnGrp = { var taxRtnGrp = {
name: typeName, name: typeName,
children: _.map(val, function (x) { children: _.map(val, function (x) {
if(parentId === '4')
{
return { return {
reportId: x.id, reportId: x.id,
id: x.templateId, id: x.templateId,
name: x.templateName, name: x.templateName,
code: x.templateCode code: x.templateCode
} }
}
else
{
return {
reportId: x.id,
id: x.templateId,
name: x.templateName,
code: x.templateCode
}
}
}), }),
orderIndex: idx orderIndex: idx
}; };
if (parentId === '2' && $scope.hasTaxReturnPermission && $scope.hasQueryTaxReturnPermission) {
grps.push(taxRtnGrp); grps.push(taxRtnGrp);
}
else if (parentId === '4' && $scope.hasWorkingPaperTypePermission && $scope.hasQueryWorkingPaperTypePermission) {
grps.push(taxRtnGrp);
}
else {
//没权限就不加入列表
}
}); });
} }
// var diffArr = ['会计数据统计','出口数据比对','进项税额差异分析表','收入差异分析表']; // var diffArr = ['会计数据统计','出口数据比对','进项税额差异分析表','收入差异分析表'];
......
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