Commit fee7ba9b authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 26cb676d 3589c48d
......@@ -240,7 +240,12 @@
<artifactId>commons-net</artifactId>
<version>3.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.reflections/reflections -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
......
......@@ -210,7 +210,7 @@
<version>2.1</version>
<configuration>
<!-- 通过maven tomcat7:run运行项目时,访问项目的端口号 -->
<port>28080</port>
<port>8080</port>
<!-- 项目访问路径 本例:localhost:9090, 如果配置的aa, 则访问路径为localhost:9090/aa-->
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
......
......@@ -61,6 +61,16 @@ grunt.initConfig({
'<%= pkg.bundleDest %>/less/noPermissionPage.less': ['app/admin/noPermissionPage/**/*.less']
}
},
citJs: {
src: ['app/cit/**/*.js'],
dest: '<%= pkg.bundleTemp %>/cit.js'
},
citLess: {
options: {process},
files: {
'<%= pkg.bundleDest %>/less/cit.less': ['app/cit/**/*.less']
}
},
contentCss: {
src: ["Content/bootstrap.css",
"Content/bootstrap-switch/bootstrap3/bootstrap-switch.css",
......@@ -382,6 +392,11 @@ grunt.initConfig({
"<%= pkg.bundleDest %>/noPermissionPage.less": "<%= pkg.bundleDest %>/less/noPermissionPage.less"
}
},
cit: {
files: {
"<%= pkg.bundleDest %>/cit.less": "<%= pkg.bundleDest %>/less/cit.less"
}
},
appresources: {
files: {
'<%= pkg.bundleDest %>/appresources.less': '<%= pkg.bundleDest %>/less/appresources.less'
......@@ -496,7 +511,7 @@ grunt.registerTask('dev', '开发环境', function () {
grunt.task.run(['concat:adminHomePageJs', 'concat:adminHomePageLess','concat:basicDataJs',
'concat:basicDataLess', 'concat:systemConfigurationJs','concat:systemConfigurationLess',
'concat:basicDataCss', 'concat:infrastructureJs','concat:infrastructureLess',
'concat:commonCss', 'concat:commonLess','concat:adminApp','concat:noPermissionPageJs','concat:noPermissionPageLess',
'concat:commonCss', 'concat:commonLess','concat:adminApp','concat:noPermissionPageJs','concat:noPermissionPageLess','concat:citJs','concat:citLess',
'concat:commonJs', 'concat:frameworkJs','concat:frameworkLess',
'concat:taxDocumentManageLess', 'concat:taxDocumentManageJs','concat:appJs',
'concat:vatJs', 'concat:vatCss','concat:vatLess',
......
......@@ -57,6 +57,7 @@
<link href="bundles/common.less" rel="stylesheet" type="text/css" />
<link href="bundles/less/framework.less" rel="stylesheet" type="text/css" />
<link href="bundles/less/taxDocumentManage.less" rel="stylesheet" type="text/css" />
<link href="bundles/less/cit.less" rel="stylesheet" type="text/css" />
</head>
<body ng-controller="AppController">
<!--@Html.AntiForgeryToken()-->
......@@ -102,6 +103,7 @@
<script type="text/javascript" src="bundles/common.js"></script>
<script type="text/javascript" src="bundles/framework.js"></script>
<script type="text/javascript" src="bundles/taxDocumentManage.js"></script>
<script type="text/javascript" src="bundles/cit.js"></script>
<script type="text/javascript" src="bundles/cldr.js"></script>
<script type="text/javascript" src="bundles/globalize.js"></script>
......@@ -126,12 +128,12 @@
}
});
<!--if (JSON.parse(user_name.split('=')[1]).user_name.toLowerCase() === 'simon') {-->
<!--window.location.href = '/#/overview/assetsManage';-->
<!--}-->
<!--else {-->
// <!--if (JSON.parse(user_name.split('=')[1]).user_name.toLowerCase() === 'simon') {-->
// <!--window.location.href = '/#/overview/assetsManage';-->
// <!--}-->
// <!--else {-->
window.location.href = '/#/overview/vat';
<!--}-->
// <!--}-->
// create the back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
......
citModule.controller('citAnalysisMenuController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q',
'SweetAlert', 'vatSessionService', 'citSessionService',
function ($scope, $rootScope, $log, $translate, $timeout, $q, SweetAlert, vatSessionService, citSessionService) {
'use strict';
$log.debug('citAnalysisMenuController.ctor()...');
$scope.menus = [
{ name: '.analyzeReport', text: $translate.instant('ModelAnalysis'), icon: 'glyphicon glyphicon-flag', show: true },
{ name: '.organizeDashboard', text: $translate.instant('Dashboard'), icon: 'glyphicon glyphicon-stats', show: true }
];
citSessionService.querySummayDashboardModel = {
organizationID: vatSessionService.project.organizationID,
year: (new Date()).getFullYear(),
month: 13
};
citSessionService.dashboardSingelOrganizationId = vatSessionService.project.organizationID;
var analyzeMenuEvent = function (obj) {
if (obj.menu.text === $translate.instant('Dashboard')) {
citSessionService.urlFromAnalyze = true;
return true;
}
};
(function initialize() {
$log.debug('citAnalysisMenuController.initialize()...');
$scope.analyzeMenuEvent = analyzeMenuEvent;
})();
}
]);
\ No newline at end of file
<div id="cit-analysis-menu">
<div class="vat-analysis-menu">
<perfect-scrollbar class="scroller" wheel-propagation="true" wheel-speed="1" min-scrollbar-length="20">
<div class="li" ng-repeat="menu in ::menus" atms-permission permission-control-type="ngIf" permission-code="{{::menu.permission}}">
<a ng-click="analyzeMenuEvent(this);" ui-sref-active="active" ui-sref="{{::menu.name}}">
<i class="{{::menu.icon}}" style="display: block;padding-bottom: 10px;" aria-hidden="true"></i>
<span>{{::menu.text}}</span>
</a>
</div>
</perfect-scrollbar>
</div>
<div class="vat-analysis-content" ui-view></div>
</div>

citModule.directive('citAnalysisMenu', ['$log',
function ($log) {
'use strict';
$log.debug('citAnalysisMenu.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/analyzeReport/cit-analysis-menu/cit-analysis-menu.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'citAnalysisMenuController',
link: function ($scope, $element, $attr) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
#cit-analysis-menu {
width: 100%;
height: 100%;
position: absolute;
.vat-analysis-content {
display: inline-block;
position: relative;
margin-left: 100px;
width: calc(~"100% - 100px");
vertical-align: top;
height: 100%;
}
.vat-analysis-menu {
display: inline-block;
position: absolute;
width: 80px;
height: 100%;
background: @color-background;
vertical-align: top;
border-right: @thin-border solid @color-border;
.scroller {
overflow-y: hidden;
position: relative;
height:100%;
}
.ps-container>.ps-scrollbar-y-rail{
width: 5px;
}
.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y {
width: 5px;
right: 0px;
}
.li {
display: block;
width: 80px;
height: 80px;
vertical-align: middle;
text-align: center;
cursor: pointer;
a {
height: 100%;
width: 100%;
display: block;
padding-top:20px;
padding-bottom:20px;
vertical-align: middle;
text-align: center;
word-wrap: break-word;
font-size: 12px;
text-decoration: none;
color: @color-black;
background-color:#ffffff;
outline:none;
}
a:hover {
text-decoration: none;
background-color:#808080;
i {
color: red;
}
}
a.active {
text-decoration: none;
font-weight: bold;
background-color:#f5f5f5;
i {
color: red;
}
}
}
}
}
citModule.controller('citModelAnalysisController', ['$scope', '$translate', '$uibModal', 'vatSessionService', 'citSessionService', 'modelConfigurationService', '$compile', '$timeout', '$q', 'SweetAlert', 'enums',
function ($scope, $translate, $uibModal, vatSessionService, citSessionService, modelConfigurationService, $compile, $timeout, $q, SweetAlert, enums) {
'use strict';
//由 project 决定的在本页面中固定的变量
$scope.industryId = vatSessionService.project.industryID;
$scope.organizationId = vatSessionService.project.organizationID;
$scope.projectId = vatSessionService.project.id;
$scope.projectYear = vatSessionService.project.year;
$scope.serviceTypeId = vatSessionService.project.serviceTypeID;
/************* ViewModels BEGIN *************/
$scope.logOptions = {
isShown: false,
period: citSessionService.month,
moduleId: "26" //VAT 中的 Id
};
$scope.modelType = 1;
$scope.periodFrom = 1;
$scope.periodTo = 12;
$scope.modelTreeList = [];
$scope.selectCategoryId = null;
$scope.resizableOptions = {
handles: "right",
Width: 250,
minWidth: 200,
maxWidth: 350
};
$scope.dirtyDataProcess = {
hasCheckedFinished: false,
intervalId: null,
progressBarValue: 0,
processBarMax: 100,
processBarModalInstance: null,
progressBarOptions: {
min: 0,
width: "90%",
bindingOptions: {
value: 'dirtyDataProcess.progressBarValue',
max: 'dirtyDataProcess.processBarMax'
},
statusFormat: function (value) {
return "计算进度: " + (value * 100).toFixed(0) + "%";
},
onComplete: function (e) {
$scope.dirtyDataProcess.processBarModalInstance.dismiss({$value: 'cancel'});
$scope.dirtyDataProcess.processBarModalInstance = null;
clearInterval($scope.dirtyDataProcess.intervalId);
$scope.dirtyDataProcess.intervalId = null;
loadTreeData();
}
}
};
/************* ViewModels END *************/
var loadTreeData = function () {
var apiFunc = modelConfigurationService.getModelCategory;
apiFunc($scope.organizationId, $scope.industryId, $scope.serviceTypeId).success(function (data) {
var dic = {};
for (var ix = 0; ix < data.length; ix++) {
var item = data[ix];
dic[item.categoryID] = {
id: item.modelID,
title: item.modelName,
isCategory: item.isCategory,
questionCount: item.questionCount,
totalCount: item.modelTotalCount,
categoryId: item.categoryID,
parentID: item.parentID,
modelType: item.modelType,
parentNode: null,
sort: item.sort,
data: item,
feature: item.feature,
nodes: [],
};
}
//查找每个节点是否存在父节点,并维护父节点与本节点的关系
for (var key in dic) {
if (!dic.hasOwnProperty(key))
continue;
var item = dic[key];
var parentId = item.parentID;
if (!parentId || !dic.hasOwnProperty(parentId))
continue;
var p = dic[parentId];
if (!p && p === item)
continue;
item.parentNode = p;
p.nodes.push(item);
}
var srcData = [];
for (var key in dic) {
if (!dic.hasOwnProperty(key))
continue;
var item = dic[key];
if (!item || item.parentNode)
continue;
srcData.push(item);
}
$scope.modelTreeList = srcData;
var mNode = null;
//完成树形控件初始化后,默认加载第一个模型不为空的节点
for (var i = 0; i < $scope.modelTreeList.length; i++) {
mNode = getFirstNodeInTheTree($scope.modelTreeList[i]);
if (mNode) {
$scope.nodeSelected(mNode);
break;
}
}
});
};
var getFirstNodeInTheTree = function (node) {
if (!node)
return null;
if (node.totalCount>0)
return node;
if (node.nodes.length>0) {
for (var i = 0; i < node.nodes.length; i++) {
var subNode = node.nodes[i];
var mNode = getFirstNodeInTheTree(subNode);
if (mNode)
return mNode;
}
}
return null;
};
var getModelAnalysisPermission = function () {
var list = [];
var modelManageTemp = constant.citPermission.dataAnalysis.modelAnalysis;
list.push(modelManageTemp.queryCode);
list.push(modelManageTemp.filterCode);
$scope.hasQueryPermission = false;
$scope.hasFilterIssuePermission = false;
$scope.$root.checkUserOrganizationPermissionList(list).success(function (data) {
$scope.hasQueryPermission = data[modelManageTemp.queryCode];
$scope.hasFilterIssuePermission = data[modelManageTemp.filterCode];
});
};
$scope.nodeSelected = function (node) {
$scope.selectCategoryId = node.categoryId;
$scope.modelType = node.feature;
};
(function () {
getModelAnalysisPermission();
//检查是否有脏数据
modelConfigurationService.projectHasDirtyData($scope.projectId, $scope.serviceTypeId).success(function (result) {
if (!result) {
loadTreeData();
return;
}
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) {
loadTreeData();
return;
}
$scope.dirtyDataProcess.processBarModalInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
templateUrl: "cit-model-analysis-dirty-data-process-bar.html",
backdrop: 'static',
scope: $scope,
windowClass: "cit-model-analysis-dirty-data-process-bar"
});
$scope.dirtyDataProcess.intervalId = setInterval(function () {
$scope.dirtyDataProcess.progressBarValue++;
if (!$scope.dirtyDataProcess.hasCheckedFinished) {
$scope.dirtyDataProcess.processBarMax++;
}
}, 100);
//重新计算模型数据
modelConfigurationService.updateProjectModelDirtyDataSingleCard($scope.projectId, $scope.serviceTypeId).success(function () {
$scope.dirtyDataProcess.hasCheckedFinished = true;
});
});
});
})();
}
]);
\ No newline at end of file
<div class="cit-model-analysis flex-row-start-stretch">
<div class="ng-template" style="display:none">
<script type="text/ng-template" class="content" id="cit-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">
<perfect-scrollbar class="scroller"
wheel-propagation="true" wheel-speed="1"
min-scrollbar-length="10" style="position: relative;">
<script type="text/ng-template" id="cit-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="'cit-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="'cit-model-analysis-nodes-renderer.html'"
data-scroll-container=".model-configuration-manage #tree-root"></li>
</ol>
</div>
</perfect-scrollbar>
</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">
<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="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>
</div>
\ No newline at end of file
citModule.directive('citModelAnalysis', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/cit/analyzeReport/cit-model-analysis/cit-model-analysis.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'citModelAnalysisController',
link: function ($scope, $element, $attr) {
$scope.element = $element;
}
};
}
]);
\ No newline at end of file
.cit-model-analysis {
height: 100%;
padding: 0 5px 5px;
.func-elem {
cursor: pointer;
&:hover {
background-color: #f2f2f2;
}
}
> div[class*='-container'] {
border-radius: 5px;
border: 1px solid #e4e4e4;
}
.left-container {
width: 250px;
margin-right: 5px;
[ui-tree] {
> .angular-ui-tree-nodes {
padding: 5px;
.angular-ui-tree-nodes {
padding-left: 20px;
}
}
li {
position: relative;
margin: 0;
padding: 10px 0 0 0;
/* 竖线:高度小1像素,可以是连线不交叉重叠,使用虚线时重叠效果会很明显 */
&:before {
content: "";
position: absolute;
top: -11px;
left: -17px;
width: 1px;
height: calc(~"100% - 1px");
border-left: 1px dotted gray;
z-index: -1;
}
/* 横线 */
&:after {
content: "";
position: absolute;
top: 19px;
left: -16px;
width: 16px;
height: 1px;
border-bottom: 1px dotted gray;
}
> ol > li:last-child > ol:not(.ng-hide):before {
content: "";
position: absolute;
top: -11px;
left: -17px;
width: 1px;
height: calc(~"100% - 1px");
background-color: white;
}
.angular-ui-tree-handle {
margin-bottom: 0;
}
}
/* 第一层根节点不需要虚线 */
> ol > li {
&:before, &:after {
display: none;
}
}
}
.tree-node {
&.tree-item-select {
background-color: #f16100 !important;
}
}
.angular-ui-tree-empty {
min-height: 0;
border: none;
}
}
.right-container {
width: calc(~"100% - 250px");
.menu {
padding: 5px 10px;
min-height: 54px;
max-height: 54px;
strong {
font-size: 1.15em;
margin: 0 30px 0 5px;
}
.model-type {
margin-right: 30px;
span {
background-color: #f2f2f2;
cursor: pointer;
padding: 5px 10px;
}
.active {
background-color: #e0301e;
}
}
.operation-wrapper {
margin: 0;
> * {
cursor: pointer;
margin-left: 20px;
outline: none;
}
}
}
}
}
.cit-model-analysis-dirty-data-process-bar {
.modal-content {
margin-top: 50%;
}
}
\ No newline at end of file
This diff is collapsed.
<div id="vat-container">
<div id="vatHeader" class="vat-header animated" animation-end="headerAnimationEnd($event)"
ng-class="[{ 'fadeOutUp': menuState === menuStates.collapsing }, { 'fadeInDown': menuState === menuStates.expanding }, { 'collapsed': menuState === menuStates.collapsed }]">
<div>
<span class="cit-title" translate="CIT"></span>
<a ui-sref="overviewCit"><i class="fa fa-angle-left vat-subheader red-color" style="font-size:30px;margin-top:-5px;"></i></a>
<span class="vat-subheader" style="margin:0px 20px 0px 0px;font-weight:bold" title="{{projectName}}">{{projectName | limitString:15}}</span>
<span class="project-statuts-title">
<i id="imgProjectStatus" class="fa fa-lightbulb-o"
ng-class="{'project-statuts-title-i-inactive' : layoutVatSession.project.projectStatusList[period] === 10}"
aria-hidden="true" ng-click="showProjectStatus()">&nbsp;&nbsp;{{statusTitle}}</i>
</span>
<!--<i id="imgProjectStatus" class="fa fa-info" aria-hidden="true" ng-click="showProjectStatus()"></i>-->
<i class="fa fa-calendar vat-subheader red-color" style="font-size:20px;"></i>
<input type="text" id="citDatePicker" class="datepicker vat-subheader" style="border-width:0;outline:none; width:100px;" readonly="readonly" />
<div id="vat-menu-buttons" style="display:inline-block;">
<a ng-repeat="menu in menus" ui-sref-active="active" ui-sref=".{{menu.state}}"
atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.name | translate}}</a>
</div>
</div>
<!--<div id="vat-menu-buttons">
<a ng-repeat="menu in menus" ui-sref-active="active" ui-sref=".{{menu.name}}"><span>{{menu.num}}</span>{{menu.name | translate}}</a>
</div>-->
</div>
<div id="menuCollapseBtn" ng-class="[{ 'slideup': menuState === menuStates.collapsing }, { 'slidedown': menuState === menuStates.expanding }]">
<a ng-show="menuState === menuStates.expanding || menuState === menuStates.expanded" id="a-up" href="" ng-click="collapseMenu(menuStates.collapsing)"><i class="fa fa-angle-up" aria-hidden="true"></i></a>
<a ng-show="menuState === menuStates.collapsing || menuState === menuStates.collapsed" id="a-down" href="" ng-click="collapseMenu(menuStates.expanding)"><i class="fa fa-angle-down" aria-hidden="true"></i></a>
</div>
<div class="vat-content" animation-end="contentAnimationEnd($event)" ui-view
ng-class="[{ 'slideup': menuState === menuStates.collapsing }, { 'slidedown': menuState === menuStates.expanding }, { 'expanded': menuState === menuStates.collapsing || menuState === menuStates.collapsed }]"></div>
<!-- 项目状态 -->
<script type="text/ng-template" id="model-project-status.html" class="model-project-status">
<!--<div class="modal-header">
<div class="modal-title">
</div>
</div>-->
<div class="modal-body">
<i class="fa fa-times" aria-hidden="true" style="float: right; font-size: 11px; color: #CF2D1B" ng-click="closeModal()"></i>
<ul class="ul-status">
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] === 10}">&nbsp;&nbsp;&nbsp;{{startStatusText}}</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] === 10}">&nbsp;</div>
</li>
<li ng-click="showSubStatus()">
<i class="fa fa-dot-circle-o" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 20}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusImported' | translate }}</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 20, 'verticalLine-add-bottom-line' : displaySubStatus}">&nbsp;</div>
<ul ng-show="displaySubStatus">
<li ng-repeat="item in subStatusList track by $index">
<i class="fa fa-check-circle" aria-hidden="true" ng-class="{'i-inactive' : !item.isImported}">&nbsp;&nbsp;{{item.name }}</i>
<div ng-show="$index < subStatusList.length - 1" class="vertical-bottom-line" ng-class="{'verticalLine-inactive' : !item.isImported}">&nbsp;</div>
</li>
</ul>
</li>
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 30}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusAcccountMapSubmitted' | translate }}</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 30}">&nbsp;</div>
</li>
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 40}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusGenerated' | translate }} </i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 40}">&nbsp;</div>
</li>
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 100}">&nbsp;&nbsp;&nbsp;{{'ProejctStatusCompleted' | translate }} </i>
</li>
</ul>
</div>
<!--<div class="modal-footer">
<button type="button" ng-click="closeModal()">{{'CloseButton' | translate }}</button>
</div>-->
</script>
</div>
\ No newline at end of file

citModule.directive('citLayout', ['$log', 'region', 'enums', 'vatSessionService', '$translate',
function ($log, region, enums, vatSessionService, $translate) {
'use strict';
$log.debug('citLayout.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/cit-layout/cit-layout.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'citLayoutController',
link: function ($scope, $element, $attr) {
var ele = $("#citDatePicker");
ele.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
language: region,
viewMode: 2,
minViewMode: 2,
autoclose: true,//选中之后自动隐藏日期选择框
clearBtn: false,//清除按钮
todayBtn: false,//今日按钮
format: $scope.dateFormat//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).on('changeDate', function (e) {
if (!e || !e.date) {
return;
}
var project = vatSessionService.getProperty("project");
if (e.date.getMonth() + 1 == project.period) {
$scope.changeDate(e);
return;
}
if (project.hasDirtyReportData) {
var a = confirm($translate.instant("LeaveReport"));
if (a == true) {
project.hasDirtyReportData = false;
vatSessionService.setProperty("project", project);
$scope.changeDate(e);
} else {
if (e.date.getMonth() + 1 != project.period) {
ele.datepicker('setDate', project.year + '-' + project.period);
}
}
} else {
$scope.changeDate(e);
}
});
ele.datepicker("setDate", $scope.selectedDate);
$scope.elePicker = ele;
$scope.menuStates = enums.vatMenuStates;
$scope.menuState = enums.vatMenuStates.expanded;
// Click to collapse the top menu
// Param collapseMenu should be 1 to collapse, and 2 to expand.
// 0: Expanded; 1: Collapsing, 2: Expanding, 3: Collapsed
$scope.collapseMenu = function (collapseMenu) {
$scope.menuState = collapseMenu;
};
// Handle css for top menu while collapse animation ended
$scope.headerAnimationEnd = function ($event) {
// Here we have to add class `collapsed` with JQuery grammar, because we want
// it work immediately.
if ($scope.menuState === enums.vatMenuStates.collapsing) {
angular.element('.vat-header').addClass('collapsed');
}
$scope.$apply(function () {
if ($scope.menuState === enums.vatMenuStates.collapsing) {
$scope.menuState = enums.vatMenuStates.collapsed;
}
else if ($scope.menuState === enums.vatMenuStates.expanding) {
$scope.menuState = enums.vatMenuStates.expanded;
}
});
}
// Repaint spreadJS while spreadJS control expanded already
$scope.contentAnimationEnd = function ($event) {
$scope.$broadcast(enums.vatEvent.layoutChanged);
};
}
};
}
]);
\ No newline at end of file
This diff is collapsed.
citModule.service('keyValueDataService', ['enums',
function (enums) {
return {
parseValue: function (keyValueData, targetType) {
// parseValue(50, enums.cellDataType.Accounting)
// or parseValue({ value: 50, type: enums.cellDataType.Accounting })
var type, value;
if (targetType !== undefined) {
type = targetType;
value = keyValueData;
}
else {
type = keyValueData.resultType;
value = keyValueData.value;
}
if (!_.isString(value) || _.isEmpty(value)) {
return value;
}
if (!type || type === enums.cellDataType.Accounting || type === enums.cellDataType.Percentage) {
return parseFloat(value);
}
else if (type === enums.cellDataType.Boolean) {
return value.toLowerCase() === 'true';
}
else if (type === enums.cellDataType.String) {
return value;
}
else if (type === enums.cellDataType.Integer) {
return parseInt(value);
}
return value;
}
};
}]);
\ No newline at end of file
citModule.directive('onFinishRender', ['$timeout', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function () {
scope.$emit(attr.onFinishRender);
}, 500);
}
}
}
}]);
\ No newline at end of file
<div class="cit-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 ng-show="hasEditPermission"><a class="add-chart" ui-sref="{{urlFromAnalyze}}"><i class="material-icons add-icon">add_circle</i>{{'AddChart' | translate}}</a></span>
<span ng-if="showExportButton && hasEditPermission" class="download-chart-report"><a href="{{downloadPath}}"><i class="fa fa-download" aria-hidden="true"></i>&nbsp;{{'ExportReport' | 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-4 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" ng-show="hasEditPermission">
<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 class="clear"></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>
citModule.directive('citOrganizationDashboard', ['$log',
function ($log) {
'use strict';
$log.debug('citOrganizationDashboard.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/dashboard/cit-organization-dashboard/cit-organization-dashboard.html' + '?_=' + Math.random(),
scope: {},
controller: 'citOrganizationDashboardController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.cit-organization-dashboard {
@organge-color0: #DC6900;
background-color: #F2F2F2;
height: 100%;
padding: 15px;
.content {
background-color: white;
height: 100%;
border: 1px solid #f2f2f2;
border-radius: 5px;
-webkit-box-shadow: 0 0 10px #eeeeee;
-moz-box-shadow: 0 0 10px #eeeeee;
box-shadow: 0 0 10px #eeeeee;
padding: 10px;
.header {
.cubeImg {
display: inline-block;
padding: 20px;
background-color: @organge-color0;
border-radius: 5px;
margin-top: -20px;
}
.title {
display: inline-block;
margin-left: 10px;
vertical-align: -webkit-baseline-middle;
}
.indicators_total {
margin-left: 10px;
background-color: #ddd;
border-radius: 10px;
padding: 2px 8px 2px 8px;
text-align: center;
vertical-align: middle;
font-size: 13px;
color:#b4122a;
}
.add-chart {
display: inline-block;
width: 90px;
margin-left: 20px;
vertical-align: top;
height: 34px;
padding: 6px 0px;
cursor: pointer;
.add-icon {
vertical-align: bottom;
font-size: 19px;
padding-right: 5px;
}
}
.download-chart-report {
float: right;
height: 34px;
padding: 6px 0;
.fa-download {
font-size: 16px;
}
}
}
.filter {
padding: 5px 0px;
.add-chart {
display: inline-block;
width: 80px;
margin-left: 20px;
vertical-align: top;
height: 34px;
padding: 6px 0px;
cursor: pointer;
.add-icon {
vertical-align: bottom;
font-size: 19px;
padding-right: 5px;
}
}
}
.summary-result {
overflow-y: auto;
height:calc(~"100% - 50px");
}
.row-block {
/*min-height: 300px;*/
height:100%;
border: 1px solid #ddd;
border-radius: 5px;
-webkit-box-shadow: 0 0 10px #eeeeee;
-moz-box-shadow: 0 0 10px #eeeeee;
box-shadow: 0 0 10px #eeeeee;
width: 100%;
/*padding: 15px;*/
margin: 10px 0px 30px 0px;
font-family: 'Microsoft YaHei';
font-size: 14px;
.title_abstract {
width: 100%;
height: 45px;
background-color: #ddd;
position: relative;
font-size: 16px;
.title_name {
position: absolute;
top: 25%;
}
.title_button {
float: right;
height: 100%;
line-height: 42px;
vertical-align: middle;
a, span, i {
margin-right: 25px;
}
}
}
.title_total {
width: 100%;
padding: 15px 0 0 2px;
& > .col-sm-1 {
width: 10%;
}
.risk_tip_wrapper {
padding-left: 0px;
&.col-sm-11 {
width: 85%;
}
.risk_item {
margin-right: 15px;
i {
margin-right: 5px;
color: #dc6900;
}
}
/* set tooltip width */
.tooltip-inner {
max-width: 300px;
width: 300px;
}
.tooltip.risk_tip .tooltip-inner {
padding: 5px;
font-family: 'Microsoft YaHei';
font-size: 12px;
text-align: left;
background-color: white;
color: black;
box-shadow: 0 6px 12px rgba(0,0,0,.175);
}
/* Hide or show arrow */
.tooltip.risk_tip .tooltip-arrow {
display: none;
}
}
}
.row-content {
width: 100%;
width: calc(~"100% - 30px");
margin: 0 15px 15px;
.table-content {
width: 460px;
float: left;
height: 424px;
border: 1px solid #ddd;
}
.chart-content {
margin-left: 470px;
/*width: calc(~"100% - 470px");*/
/*height: 300px;*/
border: 1px solid #ddd;
width:auto;
}
.no-chart-content {
border: 1px solid #ddd;
color: #777777;
font-size: 25px;
height: 424px;
line-height: 424px;
text-align: center;
vertical-align: middle;
width: 100%;
}
}
}
}
.config-btn {
padding: 6px 12px;
background-color: white;
border: 1px solid #E4E4E4;
border-top-left-radius: 2em;
border-top-right-radius: 2em;
border-bottom-right-radius: 2em;
border-bottom-left-radius: 2em;
float: right;
margin-top: -10px;
i {
margin-left: 10px;
color: #888888;
}
}
.dx-datagrid-rowsview {
.orange-color {
color: rgb(213, 118, 13);
}
}
/*custom gallery UI*/
.dx-gallery .dx-gallery-nav-button-prev:before,
.dx-gallery .dx-gallery-nav-button-next:before {
font-size: 16px;
color: #959595;
}
.dx-gallery .dx-gallery-nav-button-prev.dx-state-hover:after,
.dx-gallery .dx-gallery-nav-button-next.dx-state-hover:after {
background-color: rgba(213, 118, 13, 0.5) !important;
}
.dx-gallery .dx-gallery-nav-button-prev.dx-state-active:after,
.dx-gallery .dx-gallery-nav-button-next.dx-state-active:after {
background-color: rgba(213, 118, 13, 0.8) !important;
}
.dx-gallery-indicator-item {
border: 1px solid rgb(213, 118, 13) !important;
}
.dx-gallery-indicator-item-active,
.dx-gallery-indicator-item-selected {
background: rgb(213, 118, 13);
border: 2px solid rgba(255, 255, 255, 0.8);
}
.dx-state-focused.dx-gallery .dx-gallery-indicator-item-selected {
background: rgb(213, 118, 13);
}
.gallery-table {
margin: 0;
}
.form_datetime {
height: 36px;
}
.dx-gallery-nav-button-prev,
.dx-gallery-nav-button-next {
width: 20px !important;
}
#organizationDirtyProcessBarContainer {
.modal-content {
margin-top: 50%;
}
}
}
<div class="cit-report-analysis-dashboard-config">
<div class="content">
<!-- 标题 -->
<div class="header">
<!-- 图标 -->
<div class="cubeImg">
<img src="../../../../app-resources/images/vat/cube1.png" />
</div>
<span class="title">{{'reportAnalysisConfig' | translate}}</span>
</div>
<div class="top-btn-container">
<div class="left-filter">
<div class="year-filter-title">筛选:</div>
<div id="year-filter" dx-drop-down-box="yearFilterOptions" class="year-filter">
<div data-options="dxTemplate: { name: 'content' }">
<div dx-tree-view="yearFilterOptions.treeView"></div>
</div>
</div>
</div> <!--ng-if="config.id?true:false"-->
<!--<button ng-click="deleteChartConfig()" ng-if="config.id?true:false" class="delete-chart-btn"><i class="fa fa-trash"></i>{{'deleteChartTitle' | translate}}</button>-->
<div class="clear"></div>
</div>
<div class="row-block-left">
<vat-echart-renderer chart-option="chartRenderOption" is-dynamic-option="true"></vat-echart-renderer>
</div>
<div class="row-block-right">
<div class="row-block-right-content">
<div class="line">
<div class="line-title"><span style="color:red;">*&nbsp;</span>{{'chartFullNameTitle' | translate}}:</div>
<div class="dx-inline-box" ng-model="config.chartName" dx-text-box="chartNameOption"></div>
</div>
<div class="line">
<div class="line-title"><span style="color:red;">*&nbsp;</span>{{'dimension' | translate}}:</div>
<div class="dx-inline-box" ng-model="dimension" dx-select-box="dimensionOptions"></div>
</div>
<div class="line">
<div class="line-title"><span style="color:red;">*&nbsp;</span>{{'addMeansures' | translate}}:</div>
<div id="indexMultiSelectorTreeView" dx-drop-down-box="multiSelectAnalysisOption">
<div data-options="dxTemplate: { name: 'content' }">
<div ng-model="searchText" dx-text-box="{valueChangeEvent: 'keyup'}"></div>
<div dx-tree-view="multiSelectAnalysisOption.treeView"></div>
</div>
</div>
</div>
<div class="line">
<div class="line-title">{{'RiskIssue' | translate}}:</div>
<div id="riskTipMultiSelectorTreeView" dx-drop-down-box="riskTipMultiSelectAnalysisOption">
<div data-options="dxTemplate: { name: 'riskContent' }">
<div id="riskTipTree" dx-tree-view="riskTipMultiSelectAnalysisOption.treeView"></div>
</div>
</div>
</div>
<div>
<div class="line"><div class="line-title"><span style="color:red;">*&nbsp;</span>{{'measures' | translate}}:</div></div>
<div class="measures-container">
<div class="line" ng-repeat="item in config.analysisItems">
<div title="{{item.analysisName}}" class="lable-tab">{{item.analysisName}}</div>
<div class="select-tab" dx-select-box="item.chartOptions" data-dx-item-alias="itemObj">
<div data-options="dxTemplate: {name: 'chartTypeItemTemplate'}">
<span title="{{itemObj.typeName}}" style="color:black; font-family: 微软雅黑;">{{itemObj.typeName}}</span>
</div>
</div>
<i ng-click="removeAnalysisItem(item)" class="glyphicon glyphicon-remove revome-icon"></i>
</div>
<div class="line">
<div class="line-title">{{'showData' | translate}}:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary" ng-class="{'active':config.isShowData===1}" ng-click="config.isShowData=1;">
<input type="radio" autocomplete="off" />{{'on'|translate}}
</label>
<label class="btn btn-primary" ng-class="{'active':config.isShowData===0}" ng-click="config.isShowData=0;">
<input type="radio" autocomplete="off" />{{'off'|translate}}
</label>
</div>
</div>
<div ng-show="false" class="line">
<div class="line-title">{{'showGrid' | translate}}:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary" ng-class="{'active':config.isShowGrid===1}" ng-click="config.isShowGrid=1;">
<input type="radio" autocomplete="off" />{{'on'|translate}}
</label>
<label class="btn btn-primary" ng-class="{'active':config.isShowGrid===0}" ng-click="config.isShowGrid=0;">
<input type="radio" autocomplete="off" />{{'off'|translate}}
</label>
</div>
</div>
</div>
</div>
</div>
<div class="right-footer">
<div class="line">
<button ng-click="saveDashboardConfig()" class="btn btn-default btn-focus">{{'saveData' | translate}}</button>
<button ng-click="cancelConfig()" class="btn btn-default btn-second">{{'ButtonCancel' | translate}}</button>
</div>
</div>
</div>
</div>
</div>
citModule.directive('citReportAnalysisDashboardConfig', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/cit/dashboard/cit-report-analysis-dashboard-config/cit-report-analysis-dashboard-config.html' + '?_=' + Math.random(),
scope: {},
controller: 'citReportAnalysisDashboardConfigController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.cit-report-analysis-dashboard-config {
@organge-color0: #DC6900;
@focus: #c00;
@btn-color: white;
@btn-not-focus: #777;
@font: "微软雅黑";
background-color: #F2F2F2;
height: 100%;
padding: 15px;
.content {
font-family: @font;
background-color: white;
height: 100%;
border: 1px solid #f2f2f2;
border-radius: 5px;
-webkit-box-shadow: 0 0 10px #eeeeee;
-moz-box-shadow: 0 0 10px #eeeeee;
box-shadow: 0 0 10px #eeeeee;
padding: 10px;
.header {
.cubeImg {
display: inline-block;
padding: 20px;
background-color: @organge-color0;
border-radius: 5px;
margin-top: -20px;
box-shadow: 2px 2px 10px 1px #999;
}
.title {
display: inline-block;
margin-left: 10px;
vertical-align: -webkit-baseline-middle;
font-size: 16px;
}
}
.top-btn-container {
width: 100%;
height: 70px;
.left-filter {
display: inline-block;
float:left;
width: auto;
margin-top:20px;
.year-filter-title {
width: 60px;
text-align: left;
vertical-align: middle;
display: inline-block;
}
.year-filter {
display: inline-block;
vertical-align: middle;
width: 200px;
height: 36px;
border: 1px solid #ccc;
border-radius: 5px;
.icon {
float: right;
border-radius: 4px;
width: 34px;
height: 100%;
border: 0;
font-size: 8px;
line-height: 32px;
height: 32px;
vertical-align: middle;
text-align: center;
color: #444;
display: inline-block;
margin-right: 1px;
&:hover{
background-color: #ccc;
}
}
}
}
.delete-chart-btn {
padding: 6px 12px;
background-color: white;
border: 1px solid #E4E4E4;
border-top-left-radius: 2em;
border-top-right-radius: 2em;
border-bottom-right-radius: 2em;
border-bottom-left-radius: 2em;
margin-top: 20px;
float: right;
i {
margin-right: 10px;
color: #c00;
}
}
}
.row-block-left {
min-height: 400px;
border: 1px solid #F2F2F2;
border-radius: 5px;
-webkit-box-shadow: 0 0 10px #eeeeee;
-moz-box-shadow: 0 0 10px #eeeeee;
box-shadow: 0 0 10px #eeeeee;
width: 67%;
float: left;
}
.row-block-right {
height: 80%;
border: 1px solid #F2F2F2;
border-radius: 5px;
-webkit-box-shadow: 0 0 10px #eeeeee;
-moz-box-shadow: 0 0 10px #eeeeee;
box-shadow: 0 0 10px #eeeeee;
width: 30%;
float: right;
overflow-y: auto;
overflow-x: hidden;
.row-block-right-content {
min-height: 85%;
width: 100%;
margin-top: 10px;
.line {
display: inline-block;
width: 100%;
line-height: 50px;
vertical-align: middle;
margin: 0 15px;
.line-title {
width: 85px;
display: inline-block;
vertical-align: middle;
font-weight: bold;
}
}
.dx-inline-box {
display: inline-block;
vertical-align: middle;
}
#indexMultiSelectorTreeView, #riskTipMultiSelectorTreeView {
display: inline-block;
vertical-align: middle;
}
.measures-container {
.select-tab {
.dx-inline-box;
width: 140px;
.tab-font {
font-family: @font;
color: black;
}
input {
.tab-font;
}
.dx-placeholder {
.tab-font;
}
}
.lable-tab {
.dx-inline-box;
width: 140px;
font-family: @font;
color: black;
border: solid 1px #ddd;
height: 34px;
line-height: 34px;
vertical-align: middle;
margin-right: 15px;
border-radius: 5px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 5px;
}
.revome-icon {
color: red;
vertical-align: middle;
font-size: 18px;
padding-left: 5px;
cursor: pointer;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.btn-group > .btn {
line-height: 30px;
height: 30px;
min-width: 50px;
vertical-align: middle;
border: 1px solid #ddd;
color: #666;
background-color: #eae6e6;
&.active {
background-color:#fff;
color: #fff;
}
}
}
}
.right-footer {
width: 100%;
display: inline-block;
margin: 10px 15px;
.btn-focus {
background-color: @focus;
color: @btn-color;
font-family: @font;
border: 0;
}
.btn-second {
background-color: @btn-not-focus;
color: @btn-color;
font-family: @font;
margin-left: 20px;
border: 0;
}
}
}
}
}
citModule.directive('citAuditAdjust', ['$log', 'enums',
function ($log, enums) {
'use strict';
$log.debug('citAuditAdjust.ctor()...');
return {
restrict: 'E',
template: '<import-audit-adjust service-type-id="serviceTypeId" period-id="periodId"></import-audit-adjust>',
scope: {},
link: function (scope, element) {
scope.periodId = enums.wholeYearPeriod.import;
scope.serviceTypeId = enums.serviceType.CIT;
}
};
}
]);
\ No newline at end of file
citModule.controller('citDocumentListTreeController', ['$scope', '$rootScope', '$log', '$q', '$timeout', '$filter', 'loginContext',
'$translate', '$location', 'vatSessionService', 'vatReportService', '$state', '$stateParams', 'enums',
function ($scope, $rootScope, $log, $q, $timeout, $filter, loginContext, $translate, $location, vatSessionService,
vatReportService, $state, $stateParams, enums) {
'use strict';
$log.debug('citDocumentListTreeController.ctor()...');
var getNodeLeavel = function (treeNode) {
if (!(treeNode && treeNode.hasOwnProperty("parent")))
throw "参数 treeNode 无效";
if (null === treeNode.parent)
return 1;
return getNodeLeavel(treeNode.parent) + 1;
}
//var reportCode = {
// FinanceLostReport: 'CIT.CL004',
// CurrencyLost: 'CIT.CL00401',
// NonCurrencyLost: 'CIT.CL00402',
// InvestmentLost: 'CIT.CL00403',
// OtherLost: 'CIT.CL00404',
// ResearchCost: 'CIT.CL022'
//};
var taxTypeCode = {
FinanceLost: '1100', //资产损失
ResearchCost: '1250', //研发费用
TaxAudit: '7050' //税务稽查
};
$scope.menuTreeOption = {
bindingOptions: {
dataSource: 'menuTreeDataSource'
},
dataStructure: "plain",
selectByClick: true,
selectionMode: "single",
height: "100%",
width: "100%",
keyExpr: "id",
expandAllEnabled: true,
parentIdExpr: "parentId",
itemTemplate: 'itemTemplate',
onItemRendered: function (e) {
if (e && e.node) {
if ((_.isEmpty($scope.reportParam) || _.isEmpty($scope.reportParam.id))
&& !_.isEmpty(e.node.reportId)) {
$scope.reportParam = {
id: e.node.reportId,
templateid: e.node.templateId,
name: e.node.text
};
}
var leavel = getNodeLeavel(e.node.internalFields.publicNode);
e.itemElement.attr('title', e.node.text);
e.itemData.limitedText = $filter('limitString')(e.node.text, 32 - leavel * 2);
$scope.treeEle = e.element;
}
},
onItemClick: function (e) {
if (e && e.itemData) {
$scope.hasDocument = false;
$scope.selectedReportCode = e.itemData.code;
$scope.selectedReportItem = e.itemData;
$(e.itemElement).parent().find('.dx-treeview-toggle-item-visibility').click();
$timeout(function () {
if (e && e.itemData && e.itemData.templateId) {
$state.go('cit.importData.documentList.reportView', {
id: e.itemData.reportId,
templateid: e.itemData.templateId,
name: e.itemData.text
});
}
}, 300);
//$('#dfiframe').attr("src", baseDFFilePath + 'WorkingPaper1.html' + '?t_' + Math.random() + '&dataFileName=' + e.itemData.dataFileName);
}
}
};
var loadTemplateMenu = function () {
var projectID = vatSessionService.project.id;
$scope.reportParam = _.isEmpty($stateParams.id || $stateParams.docId) ? null : {
id: $stateParams.id || $stateParams.docId,
templateid: $stateParams.templateid || $stateParams.docTemplateId,
name: $stateParams.name || $stateParams.docName
};
return vatReportService.citTryGenerateDocList(projectID, enums.serviceType.CIT, vatSessionService.logUser.ID).then(function (data) {
if (data && data.data&& data.data.result) {
return $q.when(data.data);
}
return $q.reject();
}).then(function () {
return vatReportService.citGetTemplateTree(projectID).success(function (data) {
if (!data || !data.data) {
return;
}
var data = _.filter(data.data, function (item) {
return item.reportType === 4;
});
_.each(data, function (item, index) {
item.expanded = true;
var requiredItems = ['CIT.CL001', 'CIT.CL011', 'CIT.CL021', 'CIT.CL025', 'CIT.CL01502', 'CIT.CL01504', 'CIT.CL01506',
'CIT.CL01507', 'CIT.CL018', 'CIT.CL004', 'CIT.CL00401', 'CIT.CL00402', 'CIT.CL00403', 'CIT.CL00404', 'CIT.CL006',
'CIT.CL007', 'CIT.CL008', 'CIT.CL012', 'CIT.CL027', 'CIT.CL022', 'CIT.CL020', 'CIT.CL002', 'CIT.CL00201', 'CIT.CL003',
'CIT.PL001', 'CIT.CL010'];
if (requiredItems.indexOf(item.code) >= 0) {
item.isRequired = true;
}
item.text = item.code.replace('CIT.', '') + item.text;
//if (!item.parentId && item.reportType == 4) {
item.parentId = 'root';
//}
});
data.push({
id: 'root',
parentId: null,
text: '问卷调查项',
expanded: true,
reportId: null,
templateGrouptId: null
});
//data.push.apply(data, _.map(constant.citDocumentTypeList, function (x) {
// return {
// id: x.value.toString(),
// parentId: 'root',
// text: x.name,
// expanded: false,
// reportId: null,
// templateGrouptId: null
// };
//}));
$scope.menuTreeDataSource = data;
$timeout(function () {
if (!_.isEmpty($scope.reportParam)) {
if ($scope.treeEle) {
$scope.treeEle.dxTreeView("selectItem", $scope.reportParam.templateid);
}
$state.go('cit.importData.documentList.reportView', $scope.reportParam);
}
}, 300);
});
});
};
(function initialize() {
loadTemplateMenu();
})();
}
]);
\ No newline at end of file
<div id="cit-report-nav-menu" class="cit-report-menu" ng-show="!isCollapsed" style="height: 100%;">
<div class="document-list-tip">{{('documentListTip' | translate) + '('}}<span class="doc-required"></span>{{('isRequired' | translate) + ')'}}</div>
<div class="document-list-wrapper">
<div dx-tree-view="menuTreeOption" dx-item-alias="itemObj" style="max-height: calc(100% - 22px);">
<div data-options="dxTemplate: { name: 'itemTemplate' }">
<div class="dx-item-content dx-treeview-item-content">
<span ng-class="{'doc-required': itemObj.isRequired}">{{itemObj.limitedText}}</span>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
citModule.directive('citDocumentListTree', ['$log', '$rootScope', '$timeout', 'enums',
function ($log, $rootScope, $timeout, enums) {
'use strict';
$log.debug('citDocumentListTree.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/import/cit-document-list-tree/cit-document-list-tree.html' + '?_=' + Math.random(),
replace: true,
scope: {
selectedReportCode: '=',
hasDocument: '=',
treeTypeCode: '=',
docNum: '=',
selectedReportItem:'='
},
controller: 'citDocumentListTreeController',
link: function ($scope, $element, $attr) {
//Split(['#cit-report-nav-menu', '#cit-report-content'], {
// sizes: [21, 80],
// minSize: [320, 1240],
// onDragEnd: function () {
// $timeout(function () {
// $rootScope.$broadcast(enums.vatEvent.layoutChanged, {});
// }, 700);
// }
//});
$scope.isCollapsed = false;
}
};
}
]);
\ No newline at end of file
#cit-report-nav-menu {
.flex-0-0-auto;
border-right: 1px solid #f2f2f2;
.document-list-tip {
border-bottom: 1px solid #f2f2f2;
font-size: 13px;
height: 40px;
padding: 10px 10px 10px 30px;
}
.document-list-wrapper {
height: calc(~"100% - 41px");
}
.doc-required:before {
color: red;
content:"*";
}
.dx-treeview-node span {
font-size: 13px;
}
}
\ No newline at end of file
citModule.directive('citImportAssetList', ['$log', '$translate',
function ($log, $translate) {
'use strict';
$log.debug('citImportAssetList.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/import/cit-import-asset-list/cit-import-asset-list.html' + '?_=' + Math.random(),
scope: {},
controller: 'CitImportAssetListController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.cit-import-asset-list {
padding-left: 20px;
height: 96%;
.sweet-alert {
background-color: #eeeeee;
}
.nav-wrapper {
padding-bottom: 10px;
border-bottom: 1px solid #DBD8D3;
.nav-header {
height: 54px;
line-height: 54px;
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #333;
}
.nav-tab {
/*display: inline-block;*/
span {
display: inline-block;
height: 34px;
width: 80px;
text-align: center;
line-height: 34px;
padding: 0 10px;
background-color: #B90808;
color: #FFF;
font-family: "Microsoft YaHei";
font-weight: 400;
font-style: normal;
font-size: 14px;
cursor: pointer;
}
.active {
background-color: #F91000;
}
}
}
.alert-warning {
background-color: #FDE2DE;
cursor: pointer;
}
.alert {
color: #CF2D1B;
font-weight: bold;
display: inline-block;
padding: 5px;
float: left;
margin: -45px 0 0 350px;
i {
font-size: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
.dropdown-common() {
display: inline-block;
.select-button {
background-color: #F5F5F5;
padding: 6px 0;
width: 110px;
}
.caret {
margin-top: 8px;
}
.dropdown-menu {
min-width: 140px;
max-height: 400px;
overflow-y: scroll;
li {
text-align: left;
min-height: 0px;
height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
cursor: pointer;
}
i {
float: right;
font-size: 15px;
}
}
}
}
#tab_total {
display: block;
height: calc(~'100% - 80px');
position: relative;
.operation-wrapper {
margin: -40px 15px 0 0;
span {
cursor: pointer;
}
}
.import-wrapper {
margin-top: 10px;
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.dropdown {
.dropdown-common();
}
input {
width: 50px;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
padding: 2px;
text-align: center;
}
> button:last-child {
float: right;
margin-right: 20px;
}
.btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
.btn-vat-primary {
min-width: 80px;
}
}
.import-info-wrapper {
display: inline-block;
}
}
.dt-init-wrapper {
margin: 10px 0;
max-width: 99%;
height: calc(~'100% - 80px');
position: relative;
z-index: 1;
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
.total-Wrapper {
width: 99%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-bottom: 5px;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
/*.balance-ouput-grid-wrapper {
height: calc(~'100% - -10px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 150px;
left: 0;
right: 0;
background-color: #FFF;
}*/
}
.dt-import-wrapper {
margin: 10px 0;
max-width: 99%;
overflow: auto;
height: calc(~"100% - 70px");
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
button {
color: #333;
}
}
}
.error-info-wrapper {
position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -39px;
z-index: 2;
}
#content-resizer {
width: 110%;
position: absolute;
height: 4px;
bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -39px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -200px;
text-align: center;
display: block !important;
}
}
}
#tab_Assets {
display: block;
height: calc(~'100% - 80px');
position: relative;
.total-Wrapper {
width: 72%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-top: 5px;
position: absolute;
z-index: 9;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
.dt-asset-result {
margin: 0px 0;
max-width: 99%;
height: calc(~'100% - 20px');
position: relative;
margin-top: 10px;
.herder-center {
text-align: center !important;
vertical-align: middle !important;
/*font-size:13px !important;*/
}
}
}
.error-list-modal {
.modal-title {
color: #FF0000;
}
.modal-body {
max-height: 300px;
overflow-y: auto;
table {
border: 1px solid #CCC;
thead tr th {
height: 30px;
border: 1px solid #CCC;
}
tbody tr td {
height: 25px;
border: 1px solid #CCC;
}
}
}
.modal-footer {
text-align: center;
}
}
.page-form-group {
float: right;
margin-top: 10px;
.page-size {
margin: 0;
}
.pagination {
margin: 0;
}
}
#gridInitData {
border-radius: 3px;
border: 1px solid #d4d4d4;
}
}
.set-asset-list-modal .modal-dialog {
height: 500px;
width: 800px;
.modal-content {
height: 100%;
width: 100%;
}
.modal-title {
color: #333;
font-size: 16px;
font-weight: bold;
}
.modal-body {
height: 76%;
max-width: 760px !important;
margin-left: 22px;
overflow-y: auto;
.herder-center {
text-align: center !important;
}
.column-color {
color: red !important;
}
}
.modal-footer {
text-align:left;
}
}
<div class='cit-import-document-list'>
<!--Report SpreadJS-->
<div class="row">
<p class="doc-list-title">{{ 'documentList' | translate }}</p>
<span ng-click="showOperateLogPop();"><i class="fa fa-file-excel-o" aria-hidden="true"></i>&nbsp;{{'Remarks' | translate}}</span>
<span ng-show="hasEditPermission" style="display: none;" ng-click="openExportPop();"><i class="fa fa-download"></i>&nbsp;{{'ExportExcel' | translate}}</span>
<!--<span ng-click="showDocumentDetail(treeTypeCode,DEFAULT_ORGID)"><i class="fa fa-file-text-o"></i>&nbsp;{{'ViewRelatedDocument' | translate}} <span ng-show="hasDocument">({{docNum}})</span></span>-->
<span ng-show="hasEditPermission" ng-click="refreshDocList();"><i class="fa fa-refresh"></i>&nbsp;{{'RefreshTemplate' | translate}}</span>
<span ng-show="hasEditPermission" ng-click="templateDownload()"><i class="fa fa-download"></i>&nbsp;{{'TemplateDownload' | translate}}</span>
<span ng-show="hasEditPermission" ng-click="showImportModal();"><i class="fa fa-arrow-circle-right"></i>&nbsp;{{'ImportDocumentList' | translate}}</span>
<span ng-show="hasEditPermission" ng-click="saveDocumentList();"><i class="fa fa-floppy-o"></i>&nbsp;{{'Save' | translate}}</span>
</div>
<!--ng-show="uploadCertifiBtShow"-->
<div class='doc-list-container' id="reportContainer">
<cit-document-list-tree style="height: calc(100% - 35px); width: calc(21% - 5px);"
selected-report-code="selectedReportCode" has-document="hasDocument"
tree-type-code="treeTypeCode" doc-num="docNum" selected-report-item="selectedReportItem"></cit-document-list-tree>
<div id="cit-report-content" style="overflow: hidden; height: 100%; width: calc(80% - 5px);">
<div class="cit-report-content" ui-view></div><!--ng-if="reportType == 2"-->
</div>
</div>
<vat-operate-log period="period" module-type="moduleid" is-show="isShowLog"></vat-operate-log>
<div class='export-container hidden'></div>
<div id="export" class="hidden"></div>
<!-- 导入 Modal -->
<cit-upload-modal template-model="templateModel" on-closed="refreshReportView(model)" selected-report-item="selectedReportItem" is-update="isUpdateTemplate" operate-type="operateType"></cit-upload-modal>
<!--Select export report pop-->
<div id="exportReportFilesContainer">
<script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{'SelectExportReport' | translate}}</h4>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span>
</div>
<div class="modal-body process-bar-container">
<div id="report-tree-container">
<div dx-tree-view="exportReportTreeOptions"></div>
</div>
</div>
<div class="modal-footer">
<button ng-click="export();" class="btn btn-default" style="background-color: #c00; color: #fff;">{{'Confirm' | translate}}</button>
<button ng-click="$dismiss();" class="btn btn-default" style="background-color: #777; color: #fff;">{{'ButtonCancel' | translate}}</button>
</div>
</script>
</div>
<!--文档上传弹出框-->
<div class="modal fade" id="modalUploadFile" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:800px; height:520px;" role="document">
<div class="modal-content" style="height:520px">
<div id="upload-wrapper">
<div class="" id="upload-header">
<div>上传文档</div>
</div>
<div id="upload-main" class="clearfix">
<div class="upload-left">
<div class="upload-group">
<div>
<label for="ddlDocType">文档类型:</label>
</div>
<!--<div id="ddlDocType"></div>-->
<div id="ddlMultiDocType" dx-drop-down-box="docTypeMultiOptions" class="year-filter">
<div data-options="dxTemplate: { name: 'content' }">
<div id="docTypeMultiDropDown" dx-tree-view="docTypeMultiOptions.treeView"></div>
</div>
</div>
</div>
<div class="upload-group">
<div>
<label for="ddlDocName">文档名称:</label>
</div>
<div id="ddlDocName"></div>
</div>
<div class="upload-group" ng-show="showProjectCode">
<div> <label for="projecCode">项目编号:</label></div>
<div><input type="text" id="projecCode" name="projecCode"></div>
</div>
<div class="upload-group" ng-show="showAmount">
<div> <label for="amount">金额:</label></div>
<div><input type="text" id="amount" name="amount"></div>
</div>
<div class="upload-group">
<div><label for="dllOrg">适用机构:</label></div>
<!--<div><input type="text" id="dllOrg" name="dllOrg"></div>-->
<div id="dllOrg" dx-drop-down-box="orgFilterOptions" class="year-filter">
<div data-options="dxTemplate: { name: 'content' }">
<div dx-tree-view="orgFilterOptions.treeView"></div>
</div>
</div>
</div>
<div class="upload-group">
<div><label>有效期:</label></div>
<div id="uploadDateWrapper" class="clearfix">
<div id="dateExpiredFrom"></div>
<div></div>
<div id="dateExpiredTo"></div>
</div>
</div>
<div class="upload-group">
<div><label for="txtRemark">备注:</label></div>
<div><input type="text" id="txtRemark" name="txtRemark"></div>
</div>
</div>
<div class="upload-right">
<ul style="height: 350px">
<li class="card" ng-repeat="f in selectedUploadFiles track by $index">
<img src="{{f.img}}">
<div>{{f.header}}</div>
</li>
</ul>
</div>
</div>
<div id="upload-foot">
<button id="btUpload" class="upload-bt upload-bt-confirm" type="file" multiple="" ngf-select="uploadFiles($files, $invalidFiles)" accept="*" translate="ButtonBrowser"></button>
<input type="button" id="btUploadCance" class="upload-bt upload-bt-cancel float-right" value="取消" data-dismiss="modal">
<input type="button" id="btUpload" class="upload-bt upload-bt-confirm float-right" value="确定上传" ng-click="uploadFileToServer(fileUploadToServer)">
</div>
</div>
</div>
</div>
</div>
<!-- 查看文档 -->
<div class="modal fade" id="modalDocumentDetail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:1200px; height:800px;" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
<span>{{'DocumentDetail' | translate}}</span>
<span id="viewDocumentUpload" ng-click="showUpload()"><i class="fa fa-upload" aria-hidden="true"></i></span>
</div>
</div>
<div class="modal-body">
<div ui-grid="gridDocumentDetailOptions" style="width: 100%; height: 100%;" ui-grid-resize-columns></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-customer" translate="ButtonClose" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
citModule.directive('citImportDocumentList', ['$log', 'enums',
function ($log, enums) {
'use strict';
$log.debug('citImportDocumentList.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/import/cit-import-document-list/cit-import-document-list.html' + '?_=' + Math.random(),
scope: {
docTemplateId: '=',
docId: '=',
docName: '=',
docTemplateCode: '=',
treeTypeCode: '=', //选中左边TreeNode时的文档类型(第二级)
selectedReportCode: '=', //选中的报表code
hasDocument: '=',//是否有文档
docNum: '=' //文档数量
},
controller: 'citImportDocumentListController',
link: function ($scope, $ele, $attr) {
}
};
}
]);
\ No newline at end of file
citModule.directive('citImportErp', function () {
return {
restrict: 'E',
//transclude: true,
templateUrl: '/app/cit/import/cit-import-erpdata/cit-import-erpdata.html',
scope: {},
replace: true,
controller: 'CitImportDataCtrl'
}
});
citModule.directive('citImportJournalEntry', ['$log', 'enums',
function ($log, enums) {
'use strict';
$log.debug('citImportJournalEntry.ctor()...');
return {
restrict: 'E',
template: '<import-journal-entry service-type-id="serviceTypeId" period-id="periodId"></import-journal-entry>',
scope: {},
link: function (scope, element) {
scope.periodId = enums.wholeYearPeriod.import;
scope.serviceTypeId = enums.serviceType.CIT;
}
};
}
]);
\ No newline at end of file

citModule.directive('citImportLayout', ['$log',
function ($log) {
'use strict';
$log.debug('citImportLayout.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/import/cit-import-layout/cit-import-layout.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'citImportLayoutController',
link: function ($scope, $element, $attr) {
}
};
}
]);
\ No newline at end of file
citModule.controller('citPreviewAccountVoucherController', ['$scope', 'vatSessionService', 'citSessionService',
function ($scope, vatSessionService, citSessionService) {
'use strict';
$scope.citProject = vatSessionService.project;
$scope.month = citSessionService.month;
}
]);
\ No newline at end of file
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