Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
22d5f56c
Commit
22d5f56c
authored
Oct 26, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
areaName and businessUnitName See merge request root/atms!160
parents
7aaf0076
920fb4d3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
610 deletions
+94
-610
organization-list-view.ctrl.js
...cture/organizationListView/organization-list-view.ctrl.js
+2
-2
vat-analysis-menu.ctrl.js
...analyzeReport/vat-analysis-menu/vat-analysis-menu.ctrl.js
+2
-2
vat-model-analysis.html
.../analyzeReport/vat-model-analysis/vat-model-analysis.html
+27
-83
vat-organization-dashboard.ctrl.js
...organization-dashboard/vat-organization-dashboard.ctrl.js
+30
-456
vat-organization-dashboard.html
...at-organization-dashboard/vat-organization-dashboard.html
+31
-66
vat-organization-dashboard.js
.../vat-organization-dashboard/vat-organization-dashboard.js
+2
-1
No files found.
atms-web/src/main/webapp/app/admin/infrastructure/organizationListView/organization-list-view.ctrl.js
View file @
22d5f56c
...
...
@@ -186,12 +186,12 @@
},
{
dataField
:
"businessUnitName"
,
caption
:
$
scope
.
businessName
,
caption
:
$
translate
.
instant
(
'BusinessUnitTitleName'
)
,
allowHeaderFiltering
:
false
,
},
{
dataField
:
"areaName"
,
caption
:
$
scope
.
areaName
,
caption
:
$
translate
.
instant
(
'AreaTitleName'
)
,
allowHeaderFiltering
:
false
,
},
{
...
...
atms-web/src/main/webapp/app/vat/analyzeReport/vat-analysis-menu/vat-analysis-menu.ctrl.js
View file @
22d5f56c
...
...
@@ -5,8 +5,8 @@
$log
.
debug
(
'VatAnalysisMenuController.ctor()...'
);
$scope
.
menus
=
[
{
name
:
'.analyzeReport'
,
text
:
$translate
.
instant
(
'ModelAnalysis'
)
,
icon
:
'glyphicon glyphicon-flag'
,
permission
:
constant
.
vatPermission
.
dataAnalysis
.
modelAnalysisCode
,
show
:
true
},
{
name
:
'analyzeOrganizeDashboard({id:"'
+
vatSessionService
.
project
.
organizationID
+
'"})'
,
text
:
$translate
.
instant
(
'Dashboard'
)
,
icon
:
'glyphicon glyphicon-stats'
,
permission
:
constant
.
vatPermission
.
dataAnalysis
.
dashboard
.
dashboardCode
,
show
:
true
},
{
name
:
'.analyzeReport'
,
text
:
"出口数据对比"
,
icon
:
'glyphicon glyphicon-flag'
,
permission
:
constant
.
vatPermission
.
dataAnalysis
.
modelAnalysisCode
,
show
:
true
},
{
name
:
'analyzeOrganizeDashboard({id:"'
+
vatSessionService
.
project
.
organizationID
+
'"})'
,
text
:
"进项税额差异分析"
,
icon
:
'glyphicon glyphicon-stats'
,
permission
:
constant
.
vatPermission
.
dataAnalysis
.
dashboard
.
dashboardCode
,
show
:
true
},
{
name
:
'.vatTaxDifference'
,
text
:
$translate
.
instant
(
'BookTaxDifference'
),
icon
:
'glyphicon glyphicon-tree-conifer'
,
show
:
true
}
];
vatSessionService
.
querySummayDashboardModel
=
{
...
...
atms-web/src/main/webapp/app/vat/analyzeReport/vat-model-analysis/vat-model-analysis.html
View file @
22d5f56c
<div
class=
"vat-model-analysis
flex-row-start-stretch
"
>
<div
class=
"vat-model-analysis "
>
<div
class=
"ng-template"
style=
"display:none"
>
<script
type=
"text/ng-template"
class=
"content"
id=
"vat-model-analysis-dirty-data-process-bar.html"
>
<
div
class
=
"modal-header"
>
<
h4
class
=
"modal-title"
>
模型计算中
...
<
/h4
>
<
/div
>
<
div
class
=
"modal-body"
>
<
div
dx
-
progress
-
bar
=
"dirtyDataProcess.progressBarOptions"
><
/div
>
<
/div
>
</script>
</div>
<div
class=
"left-container flex-0-0-auto"
dx-resizable=
"resizableOptions"
>
<script
type=
"text/ng-template"
id=
"vat-model-analysis-nodes-renderer.html"
>
<
div
ui
-
tree
-
handle
class
=
"tree-node tree-node-content"
ng
-
class
=
"{'tree-item-select':(node.categoryId == selectCategoryId)}"
>
<
i
class
=
"fa"
data
-
nodrag
ng
-
click
=
"toggle(this)"
ng
-
show
=
"node.nodes.length>0"
ng
-
class
=
"{'fa-caret-right': collapsed,'fa-caret-down': !collapsed}"
><
/i
>
<
span
ng
-
click
=
"nodeSelected(node)"
>
<
span
class
=
"title"
data
-
nodrag
>
{{
node
.
title
}}
<
/span
>
<
span
class
=
"detail-number"
data
-
nodrag
>
({{
node
.
questionCount
}}
/{{node.totalCount}}
)
</
span
>
<
/span
>
<
/div
>
<
ol
ui
-
tree
-
nodes
ng
-
model
=
"node.nodes"
ng
-
hide
=
"collapsed || node.nodes.length < 1"
>
<
li
ng
-
repeat
=
"node in node.nodes"
ui
-
tree
-
node
ng
-
include
=
"'vat-model-analysis-nodes-renderer.html'"
><
/li
>
<
/ol
>
</script>
<div
ui-tree
data-drag-enabled=
"false"
>
<ol
ui-tree-nodes
ng-model=
"modelTreeList"
style=
"z-index:0;"
>
<li
ng-repeat=
"node in modelTreeList"
ui-tree-node
ng-include=
"'vat-model-analysis-nodes-renderer.html'"
data-scroll-container=
".model-configuration-manage #tree-root"
></li>
</ol>
</div>
</div>
<div
class=
"right-container flex-grow-1 flex-column-start-stretch"
>
<div
class=
"menu flex-row-start-center flex-shrink-0"
>
<strong
class=
"flex-0-0-auto"
>
{{'ModelAnalysisResults' | translate}}
</strong>
<div
class=
"flex-1-1-auto flex-row-start-center"
>
<div
class=
"flex-row-start-center"
>
<span>
{{'ModelFeature' | translate}}:
</span>
<div
class=
"model-type flex-row-start-center"
>
<span
ng-model=
"modelType"
uib-btn-radio=
"1"
>
{{'IndexAnalysis' | translate}}
</span>
<span
ng-model=
"modelType"
uib-btn-radio=
"2"
>
{{'EntryComparison' | translate}}
</span>
</div>
</div>
<div
class=
"filter flex-row-start-center"
ng-show=
"modelType === 2"
>
<span>
{{'Period' | translate}}:
</span>
<div
class=
"period-range"
>
<input
type=
"text"
class=
"form-control"
/>
</div>
</div>
<div
class=
"col-lg-12 col-md-12"
style=
"margin-top:20px;"
>
<div
>
<table
border=
"1"
width=
"95%"
style=
"margin: auto"
>
<thead>
<tr
class=
"th"
>
<th>
遇到一个问题1
</th>
<th>
遇到一个问题1
</th>
</tr>
</thead>
<tbody>
<tr
class=
"tb"
>
<td>
遇到一个问题
</td>
<td>
遇到一个问题
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"flex-row-start-center flex-0-0-auto operation-wrapper"
>
<div
class=
"btn-wrapper"
>
<button
class=
"btn btn-vat-primary"
ng-click=
"getOutputModelResult()"
>
{{'OutputModelResult' | translate}}
</button>
</div>
<span
ng-click=
"logOptions.isShown = true"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'Remarks' | translate}}
</span>
</div>
</div>
<model-analysis-report
class=
"flex-1-1-auto"
has-query-permission=
"hasQueryPermission"
has-filter-issue-permission=
"hasFilterIssuePermission"
model-type=
"modelType"
category-id=
"selectCategoryId"
service-type-id=
"serviceTypeId"
organization-id=
"organizationId"
industry-id=
"industryId"
period-from=
"periodFrom"
period-to=
"periodTo"
project-year=
"projectYear"
>
</model-analysis-report>
</div>
<vat-operate-log
period=
"logOptions.period"
module-type=
"logOptions.moduleId"
is-show=
"logOptions.isShown"
>
</vat-operate-log>
<style>
.th
>
th
{
text-align
:
center
;
}
.tb
>
td
{
height
:
30px
;
text-align
:
center
;
}
</style>
</div>
\ No newline at end of file
atms-web/src/main/webapp/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.ctrl.js
View file @
22d5f56c
vatDashboardModule
.
controller
(
'OrganizationDashboardController'
,
[
'$scope'
,
'$lo
g
'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
vatDashboardModule
.
controller
(
'OrganizationDashboardController'
,
[
'$scope'
,
'$lo
cation'
,
'$log'
,
'$uibModal'
,
'$compile
'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'SweetAlert'
,
'dashboardConfigSummaryService'
,
'$stateParams'
,
'vatSessionService'
,
'modelConfigurationService'
,
'canvasUtil'
,
'vatDashboardService'
,
function
(
$scope
,
$lo
g
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
SweetAlert
,
dashboardConfigSummaryService
,
$stateParams
,
function
(
$scope
,
$lo
cation
,
$log
,
$uibModal
,
$compile
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
SweetAlert
,
dashboardConfigSummaryService
,
$stateParams
,
vatSessionService
,
modelConfigurationService
,
canvasUtil
,
vatDashboardService
)
{
'use strict'
;
var
thisData
=
{
organizationId
:
''
,
year
:
vatSessionService
.
year
,
period
:
vatSessionService
.
month
};
var
thisConstant
=
{
dashSignSeparator
:
'-'
,
rowCountPerPage
:
9
,
orgColumn
:
'v1'
,
prefixField
:
'v'
,
tableBeginXml
:
'<w:tbl><w:tblPr><w:tblW w:w="5000" w:type="pct"/><w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/></w:tblPr><w:tblGrid>'
,
tableEndXml
:
'</w:tbl>'
,
tableColDefXml
:
'<w:gridCol w:w="2000"/>'
,
tableColBeginXml
:
'</w:tblGrid><w:tr>'
,
headerFirstCellBeginXml
:
'<w:tc><w:tcPr><w:tcW w:w="2000" w:type="dxa"/><w:tcBorders><w:bottom w:val="single" w:sz="12" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/></w:tcBorders></w:tcPr><w:p><w:pPr><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:b/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t>'
,
headerCellBeginXml
:
'<w:tc><w:tcPr><w:tcW w:w="2000" w:type="dxa"/><w:tcBorders><w:bottom w:val="single" w:sz="12" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/></w:tcBorders></w:tcPr><w:p><w:pPr><w:jc w:val="right"/><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:b/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t>'
,
headerCellEndXml
:
'</w:t></w:r></w:p></w:tc>'
,
firstCellBeginXml
:
'<w:tc><w:tcPr><w:tcW w:w="2000" w:type="dxa"/><w:tcBorders><w:top w:val="single" w:sz="12" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/><w:bottom w:val="single" w:sz="2" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/></w:tcBorders></w:tcPr><w:p><w:pPr><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:b/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t>'
,
cellBeginXml
:
'<w:tc><w:tcPr><w:tcW w:w="2000" w:type="dxa"/><w:tcBorders><w:top w:val="single" w:sz="12" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/><w:bottom w:val="single" w:sz="2" w:space="0" w:color="A5A5A5" w:themeColor="accent3"/></w:tcBorders></w:tcPr><w:p><w:pPr><w:jc w:val="right"/><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/><w:color w:val="ED7D31" w:themeColor="accent2"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t>'
,
rowBeginXml
:
'<w:tr>'
,
rowEndXml
:
'</w:tr>'
,
chartPrefix
:
'chart-'
};
var
thisDateService
=
{
// 转换为页面展示数据
parseShowData
:
function
(
data
)
{
if
(
data
&&
data
.
length
>
0
)
{
data
.
forEach
(
function
(
row
)
{
var
values
=
_
.
values
(
row
.
header
);
var
keys
=
_
.
keys
(
row
.
header
);
var
length
=
keys
?
keys
.
length
:
0
;
row
.
keys
=
keys
;
row
.
headerObj
=
JSON
.
parse
(
row
.
headerObj
);
var
headerKey
=
_
.
keys
(
row
.
header
);
var
headerArr
=
_
.
pairs
(
row
.
header
);
var
monthIdx
=
''
;
var
headerValue
=
_
.
map
(
headerArr
,
function
(
x
)
{
if
(
x
[
1
]
===
'月份'
)
{
monthIdx
=
x
[
0
];
x
[
1
]
=
$translate
.
instant
(
'MonthDimension'
);
}
return
x
[
1
];
});
row
.
header
=
_
.
object
(
headerKey
,
headerValue
);
if
(
!
_
.
isEmpty
(
monthIdx
))
{
_
.
each
(
row
.
data
,
function
(
x
)
{
x
[
monthIdx
]
=
$translate
.
instant
(
'Month'
+
x
[
monthIdx
]);
});
}
});
}
return
data
;
},
// 查询汇总数据
querySummaryProcess
:
function
()
{
dashboardConfigSummaryService
.
queryOrganizationData
(
thisData
.
organizationId
,
thisData
.
year
,
thisData
.
period
).
success
(
function
(
data
)
{
// 进行数据转换
//data[0].isShowChart = false;
$scope
.
querySummaryResult
=
thisDateService
.
parseShowData
(
data
);
data
.
forEach
(
function
(
m
)
{
if
(
!
_
.
isNull
(
m
.
modelTips
))
{
m
.
modelTips
.
forEach
(
function
(
r
)
{
thisDateService
.
setRiskTipStyle
(
r
);
});
}
});
$timeout
(
function
()
{
thisDateService
.
drawTableList
(
$scope
.
querySummaryResult
);
},
200
);
// console.log(JSON.stringify($scope.querySummaryResult));
});
},
drawTableList
:
function
(
data
)
{
if
(
data
&&
data
.
length
>
0
)
{
data
.
forEach
(
function
(
row
)
{
thisDateService
.
drawTable
(
row
);
});
}
},
drawTable
:
function
(
node
)
{
if
(
_
.
isEmpty
(
node
.
data
))
{
node
.
isEmpty
=
true
;
}
else
{
node
.
isEmpty
=
false
;
var
vatGallery
=
thisDateService
.
createGalleryData
(
node
);
var
itemTemplate
=
function
(
item
,
index
)
{
var
columns
=
thisDateService
.
createColumns
(
node
);
return
$
(
'<div class="gallery-table"/>'
).
dxDataGrid
({
dataSource
:
item
.
dataValue
,
width
:
'390px'
,
showRowLines
:
true
,
showColumnLines
:
false
,
noDataText
:
''
,
showBorders
:
false
,
cellHintEnabled
:
true
,
format
:
{
type
:
'fixedPoint'
,
precision
:
2
},
columns
:
columns
});
};
var
galleryWidget
=
$
(
"#"
+
node
.
id
).
dxGallery
({
dataSource
:
vatGallery
,
// height: 260,
width
:
"458px"
,
loop
:
false
,
showIndicator
:
true
,
showNavButtons
:
true
,
itemTemplate
:
itemTemplate
,
}).
dxGallery
(
"instance"
);
}
},
// 构造GalleryData
createGalleryData
:
function
(
node
)
{
var
index
=
Math
.
ceil
(
node
.
data
.
length
/
thisConstant
.
rowCountPerPage
);
// var x = node.data.length % thisConstant.rowCountPerPage;
// if (x !== 0) {
// index = index + 1;
// }
var
result
=
[];
for
(
var
i
=
0
;
i
<
index
;
i
++
)
{
var
item
=
{};
item
.
id
=
i
;
item
.
dataValue
=
[];
var
start
=
i
*
thisConstant
.
rowCountPerPage
;
for
(
var
j
=
start
;
j
<
start
+
thisConstant
.
rowCountPerPage
;
j
++
)
{
var
rowData
=
angular
.
copy
(
node
.
data
[
j
]);
if
(
!
rowData
)
{
continue
;
}
for
(
var
k
=
1
;
k
<
node
.
headerObj
.
length
;
k
++
)
{
var
dataModel
=
node
.
headerObj
[
k
];
var
field
=
thisConstant
.
prefixField
+
(
k
+
1
);
if
(
dataModel
.
dataType
===
1
)
{
rowData
[
field
]
=
Number
(
rowData
[
field
]).
formatAmount
();
}
else
if
(
dataModel
.
dataType
===
3
)
{
rowData
[
field
]
=
rowData
[
field
]
==
1
?
'是'
:
'否'
;
}
else
{
var
percentData
=
Number
(
rowData
[
field
])
*
100
;
rowData
[
field
]
=
Number
(
percentData
).
formatAmount
()
+
'%'
;
}
}
item
.
dataValue
.
push
(
rowData
);
}
result
.
push
(
item
);
}
return
result
;
},
// 构造列表
createColumns
:
function
(
node
)
{
var
result
=
[];
node
.
keys
.
forEach
(
function
(
key
)
{
var
item
=
{};
item
.
dataField
=
key
,
item
.
caption
=
node
.
header
[
key
];
item
.
alignment
=
'center'
;
if
(
key
!==
thisConstant
.
orgColumn
)
{
item
.
format
=
{
type
:
'fixedPoint'
};
item
.
cssClass
=
'orange-color'
;
item
.
alignment
=
'right'
;
}
result
.
push
(
item
);
});
return
result
;
},
setRiskTipStyle
:
function
(
risk
)
{
if
(
risk
.
hasRisk
)
{
return
{
color
:
'#b4122a'
}
}
},
toggleChart
:
function
(
$event
,
node
)
{
var
target
=
$event
.
target
;
node
.
isShowChart
=
!
node
.
isShowChart
;
}
};
$scope
.
hasCheckedDirtyData
=
false
;
$scope
.
progressBarValue
=
0
;
$scope
.
processBarModalInstance
=
null
;
$scope
.
intervalId
=
null
;
$scope
.
hasCheckedDirtyDataSuccess
=
false
;
function
timer
()
{
$scope
.
$apply
(
function
()
{
$scope
.
progressBarValue
++
;
if
(
!
$scope
.
hasCheckedDirtyDataSuccess
)
{
$scope
.
processBarMax
++
;
}
});
}
$scope
.
processBarMax
=
100
;
$scope
.
hasCheckedFinished
=
false
;
$scope
.
progressBarOptions
=
{
min
:
0
,
width
:
"95%"
,
// $log.debug('vatTaxDifferenceController.ctor()...');
$scope
.
grid
=
{
differenceOptions
:
{
height
:
'600px'
,
bindingOptions
:
{
value
:
'progressBarValue'
,
max
:
'processBarMax'
},
statusFormat
:
function
(
value
)
{
return
"计算进度: "
+
(
value
*
100
).
toFixed
(
0
)
+
"%"
;
},
onComplete
:
function
(
e
)
{
//重新计算模型数据结束后加载图表。
thisDateService
.
querySummaryProcess
();
}
};
//删除图表
$scope
.
deleteChartConfig
=
function
(
id
)
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
'ConfirmDelete'
),
text
:
$translate
.
instant
(
'deleteChart'
)
+
"?"
,
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
cancelButtonText
:
$translate
.
instant
(
'Cancel'
),
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
vatDashboardService
.
deleteConfigById
(
id
).
success
(
function
()
{
SweetAlert
.
success
(
$translate
.
instant
(
'DeleteSuccess'
));
thisDateService
.
querySummaryProcess
();
});
}
});
};
var
mainModule
=
{
// 初始化参数
initParams
:
function
()
{
thisData
.
organizationId
=
$stateParams
.
id
;
vatSessionService
.
dashboardSingelOrganizationId
=
$stateParams
.
id
;
var
queryMonth
=
vatSessionService
.
lastDashboardSummaryQueryMonth
;
if
(
!
_
.
isEmpty
(
queryMonth
)
&&
queryMonth
.
indexOf
(
'-'
)
>=
0
)
{
var
dateStrs
=
queryMonth
.
split
(
'-'
);
thisData
.
year
=
Number
(
dateStrs
[
0
]);
thisData
.
period
=
Number
(
dateStrs
[
1
]);
}
dataSource
:
'differenceList'
},
// 入口函数
main
:
function
()
{
mainModule
.
initParams
();
if
(
$scope
.
hasCheckedDirtyData
)
{
thisDateService
.
querySummaryProcess
();
}
else
{
modelConfigurationService
.
organizationsHasDirtyData
(
thisData
.
organizationId
,
vatSessionService
.
querySummayDashboardModel
.
year
,
2
).
success
(
function
(
result
)
{
if
(
result
)
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
'OrganizationsHasDirtyData'
),
text
:
''
,
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
cancelButtonText
:
$translate
.
instant
(
'Cancel'
),
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
var
parentElem
=
angular
.
element
(
$
(
'#organizationDirtyProcessBarContainer'
));
$scope
.
processBarModalInstance
=
$uibModal
.
open
({
ariaLabelledBy
:
'modal-title'
,
ariaDescribedBy
:
'modal-body'
,
templateUrl
:
'dirtyDataProcessBar.html'
,
windowClass
:
'data-table'
,
appendTo
:
parentElem
,
backdrop
:
'static'
,
scope
:
$scope
});
$scope
.
intervalId
=
setInterval
(
timer
,
50
);
//重新计算模型数据
modelConfigurationService
.
updateOrganizationsModelDirtyData
(
thisData
.
organizationId
,
vatSessionService
.
querySummayDashboardModel
.
year
,
2
).
success
(
function
()
{
$scope
.
hasCheckedDirtyDataSuccess
=
true
;
});
}
else
{
thisDateService
.
querySummaryProcess
();
}
});
}
else
{
thisDateService
.
querySummaryProcess
();
}
});
$scope
.
hasCheckedDirtyData
=
true
;
}
},
loadFile
:
function
(
url
,
callback
)
{
JSZipUtils
.
getBinaryContent
(
url
,
callback
);
},
generateDoc
:
function
(
doc
)
{
var
tableContent
=
thisConstant
.
tableBeginXml
;
var
colNum
=
doc
.
keys
.
length
;
var
rowNum
=
doc
.
data
.
length
;
for
(
var
i
=
0
;
i
<
colNum
;
i
++
)
{
tableContent
+=
thisConstant
.
tableColDefXml
;
}
tableContent
+=
thisConstant
.
tableColBeginXml
;
for
(
var
i
=
0
;
i
<
colNum
;
i
++
)
{
tableContent
=
tableContent
+
(
i
===
0
?
thisConstant
.
headerFirstCellBeginXml
:
thisConstant
.
headerCellBeginXml
)
+
doc
.
header
[
doc
.
keys
[
i
]]
+
thisConstant
.
headerCellEndXml
;
}
tableContent
+=
thisConstant
.
rowEndXml
;
for
(
var
j
=
0
;
j
<
rowNum
;
j
++
)
{
tableContent
+=
thisConstant
.
rowBeginXml
;
for
(
var
i
=
0
;
i
<
colNum
;
i
++
)
{
var
dataModel
=
doc
.
headerObj
[
i
];
var
data
=
doc
.
data
[
j
][
doc
.
keys
[
i
]];
if
(
i
>
0
)
{
if
(
dataModel
.
dataType
===
1
)
{
data
=
Number
(
data
).
formatAmount
();
}
else
if
(
dataModel
.
dataType
===
3
)
{
data
=
data
==
1
?
'是'
:
'否'
;
}
else
{
var
percentData
=
Number
(
data
)
*
100
;
data
=
Number
(
percentData
).
formatAmount
()
+
'%'
;
}
}
if
(
i
===
0
)
{
tableContent
=
tableContent
+
thisConstant
.
firstCellBeginXml
+
data
+
thisConstant
.
headerCellEndXml
;
}
else
{
tableContent
=
tableContent
+
thisConstant
.
cellBeginXml
+
data
+
thisConstant
.
headerCellEndXml
;
}
keyExpr
:
"id"
,
noDataText
:
$translate
.
instant
(
'AccountVoucher_DataGrid_NoDataText'
),
parentIdExpr
:
"head_ID"
,
expandedRowKeys
:
[
1
],
showBorders
:
false
,
showColumnLines
:
false
,
showRowLines
:
false
,
columnAutoWidth
:
true
,
autoExpandAll
:
true
,
columns
:
[
{
dataField
:
'typeName'
,
caption
:
$translate
.
instant
(
'IncomeType'
)
},
{
dataField
:
'description'
,
caption
:
$translate
.
instant
(
'Description'
)
},
{
dataField
:
'amount'
,
caption
:
$translate
.
instant
(
'Amount'
),
format
:
{
type
:
'fixedPoint'
,
precision
:
2
}
}
],
selection
:
{
mode
:
"single"
}
tableContent
+=
thisConstant
.
rowEndXml
;
}
tableContent
+=
thisConstant
.
tableEndXml
;
return
{
chartName
:
doc
.
name
,
chartContent
:
thisConstant
.
chartPrefix
+
doc
.
id
,
riskTip
:
_
.
isArray
(
doc
.
modelTips
)
?
doc
.
modelTips
:
[],
tableContent
:
tableContent
};
},
generateDocImages
:
function
()
{
var
opts
=
{
centered
:
true
,
getImage
:
function
(
tagValue
,
tagName
)
{
return
canvasUtil
.
toBinaryData
(
document
.
getElementById
(
tagValue
));
},
getSize
:
function
(
img
,
tagValue
,
tagName
)
{
return
[
550
,
250
];
}
}
var
imageModule
=
new
ImageModule
(
opts
);
return
imageModule
;
},
exportChart
:
function
(
chart
)
{
var
exportModel
=
mainModule
.
generateDoc
(
chart
);
var
exportDocName
=
chart
.
name
+
'.docx'
;
var
templateName
=
'/ExportTemplate/DashboardExportTemplate.docx'
;
mainModule
.
loadFile
(
templateName
+
'?_='
+
Math
.
random
(),
function
(
err
,
content
)
{
if
(
err
)
{
throw
e
};
var
zip
=
new
JSZip2
(
content
);
var
imageModule
=
mainModule
.
generateDocImages
();
var
doc
=
new
docxtemplater
().
attachModule
(
imageModule
).
loadZip
(
zip
);
doc
.
setData
(
exportModel
);
try
{
doc
.
render
();
}
catch
(
err
)
{
$log
.
info
(
err
);
swal
({
title
:
'导出发生一个错误,请重试'
,
confirmButtonColor
:
"#dc6000"
,
confirmButtonText
:
"确定"
,
closeOnConfirm
:
true
,
type
:
"error"
});
return
;
}
var
out
=
doc
.
getZip
().
generate
({
type
:
"blob"
,
mimeType
:
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
,
});
saveAs
(
out
,
exportDocName
);
})
}
var
initData
=
function
()
{
$scope
.
differenceList
=
[];
// getService.getDifferenceList();
// getService.getReasonList();
};
//重新计算模型完成时执行
$scope
.
$watch
(
'progressBarValue'
,
function
(
newValue
)
{
if
(
newValue
==
$scope
.
processBarMax
)
{
$scope
.
processBarModalInstance
.
dismiss
({
$value
:
'cancel'
});
clearInterval
(
$scope
.
intervalId
);
}
});
//开始
(
function
initialize
()
{
$log
.
debug
(
'OrganizationDashboardController.ctor()...'
);
if
(
vatSessionService
.
urlFromAnalyze
)
{
$scope
.
urlFromAnalyze
=
'analyzeOrganizeDashboardConfig'
;
}
else
{
$scope
.
urlFromAnalyze
=
'reportAnalysisDashboardConfig'
;
}
$scope
.
exportChart
=
mainModule
.
exportChart
;
$scope
.
setRiskTipStyle
=
thisDateService
.
setRiskTipStyle
;
$scope
.
setRowblockStyle
=
thisDateService
.
setRowblockStyle
;
$scope
.
toggleChart
=
thisDateService
.
toggleChart
;
mainModule
.
main
();
(
function
()
{
initData
();
})();
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.html
View file @
22d5f56c
<div
class=
"vat-organization-dashboard"
>
<div
class=
"content"
>
<!-- 标题 -->
<div
class=
"header"
style=
"padding-left: 10px; margin-left: -15px"
>
<span
class=
"title"
>
{{'taxDashboard' | translate}}
</span>
<span
class=
"title"
style=
"margin:0px 15px 0px 5px"
>
|
</span>
<span
class=
"title"
style=
"margin-left: -10px; "
>
{{'IndicatorsTotal' | translate}}
<span
class=
"indicators_total"
>
{{querySummaryResult.length}}
</span>
</span>
<span><a
class=
"add-chart"
ui-sref=
"{{urlFromAnalyze}}"
><i
class=
"material-icons add-icon"
>
add_circle
</i>
{{'AddChart' | translate}}
</a></span>
</div>
<!-- 添加图标 -->
<!--<div class="filter">
<a class="add-chart" ui-sref="{{urlFromAnalyze}}"><i class="material-icons add-icon">add_circle</i>{{'AddChart' | translate}}</a>
</div>-->
<!-- 指标配置数据 -->
<!--suppress-scroll-x="true" 隐藏横向滚动条-->
<perfect-scrollbar
class=
"scroller summary-result"
wheel-propagation=
"true"
wheel-speed=
"3"
min-scrollbar-length=
"20"
suppress-scroll-x=
"true"
>
<div
class=
"row-block"
ng-repeat=
"node in querySummaryResult"
>
<div
class=
"title_abstract"
>
<div
class=
"col-sm-2 title_name"
>
<span
ng-click=
"toggleChart($event,node)"
style=
"margin-right:5px"
ng-show=
"node.isShowChart"
><i
class=
"fa fa-minus"
aria-hidden=
"true"
></i></span>
<span
ng-click=
"toggleChart($event,node)"
style=
"margin-right:5px"
ng-show=
"!node.isShowChart"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i></span>
<span>
{{node.name}}
</span>
</div>
<div
class=
"title_button"
>
<a
href=
"javascript:(0);"
ng-click=
"deleteChartConfig(node.id);"
><i
class=
"fa fa-trash"
></i>
{{'deleteChartTitle' | translate}}
</a>
<a
ui-sref=
"{{urlFromAnalyze}}({id:node.id})"
><i
class=
"fa fa-cog"
></i>
{{'IndexConfig' | translate}}
</a>
<a
href=
"javascript:(0);"
ng-click=
"exportChart(node);"
><i
class=
"fa fa-download"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</a>
<a
href=
"javascript:(0);"
><i
class=
"fa fa-envelope"
aria-hidden=
"true"
></i>
{{'Email' | translate}}
</a>
</div>
</div>
<div
class=
"title_total"
ng-show=
"node.modelTips.length > 0 && node.isShowChart"
>
<div
class=
"col-sm-1"
>
{{'RiskIssue' | translate}}:
</div>
<div
class=
"col-sm-11 risk_tip_wrapper"
>
<span
class=
"risk_item"
ng-repeat=
"risk in node.modelTips"
uib-tooltip=
"{{risk.description}}"
tooltip-placement=
"bottom"
tooltip-class=
"risk_tip"
>
<i
class=
"fa fa-exclamation-circle"
aria-hidden=
"true"
ng-style=
"setRiskTipStyle(risk)"
></i>
{{risk.name}}
</span>
</div>
</div>
<div
class=
"row-content"
ng-show=
"node.isShowChart"
>
<div
class=
"table-content"
id=
"{{node.id}}"
ng-show=
"node.isShowChart && !node.isEmpty"
>
</div>
<div
class=
"chart-content"
ng-show=
"node.isShowChart && !node.isEmpty"
>
<vat-echart-renderer
id=
"chart-{{node.id}}"
chart-option=
"node"
is-dynamic-option=
"false"
></vat-echart-renderer>
</div>
<div
class=
"no-chart-content"
ng-show=
"node.isShowChart && node.isEmpty"
>
{{'NoDataInChart' | translate}}
</div>
</div>
</div>
</perfect-scrollbar>
<div
id=
"organizationDirtyProcessBarContainer"
>
<script
type=
"text/ng-template"
class=
"content"
id=
"dirtyDataProcessBar.html"
>
<
div
class
=
"modal-header"
>
<
h4
class
=
"modal-title"
>
模型计算中
...
<
/h4
>
<
/div
>
<
div
class
=
"modal-body process-bar-container"
>
<
div
id
=
"progress"
>
<
div
id
=
"progressBarStatus"
dx
-
progress
-
bar
=
"progressBarOptions"
><
/div
>
<
/div
>
<
/div
>
</script>
</div>
</div>
<div
class=
"col-lg-12 col-md-12"
style=
"margin-top:10px;"
>
</div>
<div
class=
"col-lg-24 col-md-24 fit-height"
>
<table
border=
"1"
width=
"95%"
style=
"margin: auto"
>
<thead>
<tr
class=
"th"
>
<th>
会计科目
</th>
<th>
明细字段
</th>
<th>
金额
</th>
<th>
差异
</th>
<th>
差异原因
</th>
</tr>
</thead>
<tbody
>
<tr
ng-repeat=
"x in list"
>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<style>
.th
>
th
{
width
:
15%
;
text-align
:
center
;
}
</style>
</div>
atms-web/src/main/webapp/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.js
View file @
22d5f56c
...
...
@@ -8,8 +8,9 @@
restrict
:
'E'
,
templateUrl
:
'/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.html'
+
'?_='
+
Math
.
random
(),
scope
:
{},
replace
:
true
,
controller
:
'OrganizationDashboardController'
,
link
:
function
(
scope
,
element
)
{
link
:
function
(
$scope
,
$element
,
$attr
)
{
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment