Commit 79b3eaa1 authored by Ken you's avatar Ken you

update gruntfile app to scripts---Ken

parent 7ef966a4
......@@ -339,12 +339,12 @@ grunt.initConfig({
dest: '<%= pkg.bundleTemp %>/taxDocumentManage.js'
},
appJs: {
src: ["app/app.js",
"app/app.config.js",
"app/module-part1.js",
"app/module-part2.js",
"app/module-part3.js",
"app/module-part4.js"
src: ["Scripts/app.js",
"Scripts/app.config.js",
"Scripts/module-part1.js",
"Scripts/module-part2.js",
"Scripts/module-part3.js",
"Scripts/module-part4.js"
],
dest: '<%= pkg.bundleTemp %>/app.js'
},
......
......@@ -120,6 +120,8 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
urlTemplate: '/app-resources/i18n/{lang}/{part}.json'
});
region = window.localStorage.langTemp || region;
$translateProvider
.preferredLanguage(region)
.fallbackLanguage(region);
......@@ -303,9 +305,9 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
return translation;
}
])
.controller('AppController', ['$scope', '$log', '$location', '$translate', '$translatePartialLoader',
.controller('AppController', ['$rootScope','$scope', '$log', '$location', '$translate', '$translatePartialLoader',
'$window', 'appRoute', 'application', 'appTranslation', '$timeout', '$uibModal', 'loginContext', '$ExceptionlessClient', 'signalRSvc',
'exceptionlessServerURL', function ($scope, $log, $location, $translate, $translatePartialLoader, $window, appRoute,
'exceptionlessServerURL', function ($rootScope,$scope, $log, $location, $translate, $translatePartialLoader, $window, appRoute,
application, appTranslation, $timeout, $uibModal, loginContext, $ExceptionlessClient, signalRSvc, exceptionlessServerURL) {
'use strict';
$log.debug('AppController.ctor()...');
......@@ -333,7 +335,29 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
$log.debug('$stateChangeSuccess: ');
});
var langs = {};
try {
var obj= JSON.parse(window.localStorage.lang);
if(typeof obj == 'object' && obj ){
langs = obj;
}
} catch(e) {}
var region = langs[loginContext.userName] || 'en-us';
var flag = window.localStorage.langTemp;
$rootScope.changeLanguage = function(lang){
$translate.use(lang);
appTranslation.loadAll();
$rootScope.currentLanguage = lang;
$rootScope.currentLanguageDesc = $rootScope.currentLanguage == 'en-us' ? 'Switch to Chinese':'切换至英文';
langs[loginContext.userName] = lang;
window.localStorage.lang = JSON.stringify(langs);
window.localStorage.langTemp = lang;
if(flag !== window.localStorage.langTemp){
window.location.reload();
}
};
$rootScope.changeLanguage(region);
// publish unbeforeunload event to child scopes
$scope.onbeforeunload = function () {
$scope.$broadcast(application.events.beforeUnload);
......
......@@ -792,6 +792,22 @@ var vatModule = angular.module('app.vat', ['ui.grid', 'ui.grid.selection', 'ui.g
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.cashFlow',
url: '/cashFlow',
views: {
'@vat.previewData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-preview-cash-flow></vat-preview-cash-flow>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.offBalanceSheet',
......
......@@ -394,7 +394,7 @@ var invoiceModule = angular.module('app.invoice', ['ui.grid', 'ui.grid.selection
}]);
var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.grid.moveColumns', 'ui.grid.grouping', 'ui.grid.expandable', 'ui.grid.treeView', 'ui.grid.exporter', 'ui.grid.resizeColumns', 'mc.resizer', 'ui.select', 'ngAnimate', 'ngSanitize', 'ui.bootstrap', 'ui.grid.edit', 'perfect_scrollbar', 'dx', 'ui.grid.pinning'])
var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.grid.moveColumns', 'ui.grid.grouping', 'ui.grid.expandable', 'ui.grid.treeView', 'ui.grid.exporter', 'ui.grid.resizeColumns', 'mc.resizer', 'ui.select', 'ngAnimate', 'ngSanitize', 'ui.bootstrap', 'ui.grid.edit', 'perfect_scrollbar', 'dx', 'ui.grid.pinning','ngFileSaver'])
.run(['$log', function ($log) {
$log.debug('app.cit.run()...');
}])
......@@ -406,11 +406,11 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
uiSelectConfig.theme = 'select2';
$urlRouterProvider.when('/cit/previewData', '/cit/previewData/balanceSheet');
// $urlRouterProvider.when('/cit/previewData', '/cit/previewData/balanceSheet');
$urlRouterProvider.when('/cit/reductionData', 'cit/reductionData/caculateData');
// $urlRouterProvider.when('/cit/reductionData', 'cit/reductionData/caculateData');
$urlRouterProvider.when('/cit/analyzeReport', 'cit/analyzeReport/citModelAnalysis');
// $urlRouterProvider.when('/cit/analyzeReport', 'cit/analyzeReport/citModelAnalysis');
$stateProvider.state({
name: 'cit',
......@@ -474,7 +474,25 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-import-asset></cit-import-asset>'
template: '<cit-import-asset-list></cit-import-asset-list>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
//demo资产清单页面
$stateProvider.state({
name: 'cit.importData.oldAssetList',
url: '/oldAssetList',
views: {
'@cit.importData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-old-import-asset-list></cit-old-import-asset-list>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -485,7 +503,7 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
$stateProvider.state({
name: 'cit.importData.documentList',
url: '/documentList?{docId:string}&{docTemplateId:string}&{docName:string}&{treeTypeCode:string}&{selectedReportCode:string} \
&{hasDocument}&{docNum}',
&{hasDocument}&{docNum}',
views: {
'@cit.importData': {
controller: ['$scope', '$stateParams', 'appTranslation',
......@@ -500,8 +518,8 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-import-document-list doc-id="docId" doc-template-id="docTemplateId" doc-name="docName" \
tree-type-code="treeTypeCode" selected-report-code="selectedReportCode" has-document="hasDocument" doc-num="docNum"> \
</cit-import-document-list>',
tree-type-code="treeTypeCode" selected-report-code="selectedReportCode" has-document="hasDocument" doc-num="docNum"> \
</cit-import-document-list>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -511,7 +529,7 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
$stateProvider.state({
name: 'cit.importData.documentList.reportView',
url: '/reportView?{id:string}&{templateid:string}&{name:string}',
url: '/reportView?{id:string}&{templateid:string}&{name:string}&{templatecode:string}&{initrow:any}&{initcol:any}&{parentid:string}',
views: {
'@cit.importData.documentList': {
controller: ['$scope', '$stateParams', 'appTranslation',
......@@ -520,9 +538,13 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
$scope.templateId = $stateParams.templateid;
$scope.templateName = $stateParams.name;
$scope.templateCode = $stateParams.templatecode;
$scope.initRow = $stateParams.initrow;
$scope.initCol = $stateParams.initcol;
$scope.parentId = $stateParams.parentId;
appTranslation.load([appTranslation.cit]);
}],
template: '<vat-report-view report-id="reportId" template-id="templateId" template-name="templateName" template-code="templateCode" service-type="\'6\'" is-document-list="true"></vat-report-view>',
template: '<vat-report-view report-id="reportId" template-id="templateId" template-name="templateName" template-code="templateCode" \
init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="true" parent-id="parentId"></vat-report-view>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -666,6 +688,25 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
name: 'cit.importData.importDataView',
url: '/importDataView?{id:string}&{serviceType:string}',
views: {
'@cit.importData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
$scope.tableId = $stateParams.id;
$scope.serviceType = $stateParams.serviceType;
appTranslation.load([appTranslation.cit]);
}],
template: '<import-data-modal table-id="tableId" service-type="serviceType"></import-data-modal>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData',
url: '/previewData',
......@@ -892,7 +933,7 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
$stateProvider.state({
name: 'cit.generateReport.reportView',
url: '/reportView?{id:string}&{templateid:string}&{name:string}&{templatecode:string}',
url: '/reportView?{id:string}&{templateid:string}&{name:string}&{templatecode:string}&{initrow:any}&{initcol:any}&{parentviewid:string}',
views: {
'@cit.generateReport': {
controller: ['$scope', '$stateParams', 'appTranslation',
......@@ -901,10 +942,13 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
$scope.templateId = $stateParams.templateid;
$scope.templateName = $stateParams.name;
$scope.templateCode = $stateParams.templatecode;
$scope.initRow = $stateParams.initrow;
$scope.initCol = $stateParams.initcol;
$scope.parentViewId = $stateParams.parentviewid;
appTranslation.load([appTranslation.cit]);
}],
template: '<vat-report-view report-id="reportId" template-id="templateId" template-name="templateName" template-code="templateCode" \
service-type="\'6\'" is-read-only="true"></vat-report-view>',
init-row="initRow" init-col="initCol" service-type="\'6\'" show-col="false" is-read-only="true" parent-view-id="parentViewId"></vat-report-view>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -912,33 +956,37 @@ service-type="\'6\'" is-read-only="true"></vat-report-view>',
sticky: false
});
// TODO: DCH Demo
$stateProvider.state({
name: 'cit.analyzeReport',
url: '/analyzeReport',
name: 'cit.generateReport.performOCR',
url: '/performOCR',
views: {
'@cit': {
'@cit.generateReport': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
$scope.demoFrameOptions = {};
$scope.demoFrameApi = {};
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-import-layout></cit-import-layout>',
template: '<demo-frame is-show="true" demo-frame-options="demoFrameOptions" demo-review-notes-api="demoFrameApi"></demo-frame>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
deepStateRedirect: false,
sticky: false
});
$stateProvider.state({
name: 'cit.analyzeReport.citModelAnalysis',
url: '/citModelAnalysis',
name: 'cit.analyzeLayout',
url: '/citAnalyzeLayout',
views: {
'@cit.analyzeReport': {
'@cit': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
appTranslation.load([appTranslation.vat, appTranslation.cit]);
}],
template: '<cit-model-analysis></cit-model-analysis>',
template: '<cit-analysis-menu></cit-analysis-menu>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -947,15 +995,15 @@ service-type="\'6\'" is-read-only="true"></vat-report-view>',
});
$stateProvider.state({
name: 'cit.analyzeReport.citIndexAnalysis',
url: '/citIndexAnalysis',
name: 'cit.analyzeLayout.analyzeReport',
url: '/citAnalyzeReport',
views: {
'@cit.analyzeReport': {
'@cit.analyzeLayout': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
appTranslation.load([appTranslation.vat, appTranslation.cit]);
}],
template: '<iframe id="dfiframe" src="/app/df/code/pages/citdashboard.html" scrolling="auto" height="100%" style="border:none" width="100%"></iframe>',
template: '<cit-model-analysis></cit-model-analysis>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -964,15 +1012,16 @@ service-type="\'6\'" is-read-only="true"></vat-report-view>',
});
$stateProvider.state({
name: 'cit.analyzeReport.dataSummary',
url: '/dataSummary',
name: 'cit.analyzeLayout.organizeDashboard',
url: '/citOrganizeDashboard',
views: {
'@cit': {
'@cit.analyzeLayout': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-data-summary></cit-data-summary>',
template: '<cit-organization-dashboard></cit-organization-dashboard>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -980,18 +1029,33 @@ service-type="\'6\'" is-read-only="true"></vat-report-view>',
sticky: true
});
/**********the end of a beautiful separated line for analyzeReport*********/
//$stateProvider.state({
// name: 'cit.analyzeReport',
// url: '/citAnalyzeReport',
// views: {
// '@cit': {
// controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.vat, appTranslation.cit]);
// }],
// template: '<cit-model-analysis></cit-model-analysis>',
// }
// },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
// deepStateRedirect: true,
// sticky: true
//});
$stateProvider.state({
name: 'cit.devGrid',
url: '/devGrid',
name: 'cit.analyzeReport.citModelAnalysis',
url: '/citModelAnalysis',
views: {
'@cit': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}],
template: '<dev-grid></dev-grid>',
template: '<cit-model-analysis></cit-model-analysis>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......@@ -999,5 +1063,4 @@ service-type="\'6\'" is-read-only="true"></vat-report-view>',
sticky: true
});
}]);
\ No newline at end of file
......@@ -324,6 +324,40 @@ var vatDashboardModule = angular.module('app.vatDashboard', ['ui.grid', 'ui.grid
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'citAnalyzeOrganizeDashboard',
url: '/citAnalyzeOrganizeDashboard/{id}',
views: {
'@cit.analyzeLayout': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat, appTranslation.cit]);
}],
template: '<cit-organization-dashboard></cit-organization-dashboard>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'citAnalyzeOrganizeDashboardConfig',
url: '/citAnalyzeOrganizeDashboardConfig/{id}',
views: {
'@cit.analyzeLayout': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat, appTranslation.cit]);
}],
template: '<cit-report-analysis-dashboard-config></cit-report-analysis-dashboard-config>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
}]);
......
......@@ -1839,6 +1839,8 @@
"trialBalance": "科目余额表",
"TrialBalanceDDTitle": "科目余额表",
"cashFlow":"现金流量表",
"CashFlowDDTitle":"现金流量表",
"TBAccountCode": "科目编号",
......@@ -1869,6 +1871,10 @@
"YtdDrBeq": "本年借方发生额",
"YtdCrBeq": "本年贷方发生额",
"dateFormat4YearMonth": " yyyy 年 mm 月",
"dateFormat4YearMonthDay": "yyyy-mm-dd",
"dateFormat4YearMonthDayCh": "yyyy年mm月dd日",
"offlineBilling": "线下开票",
"vatInvoiceRecord": "已开增值税发票记录",
"ApplicationSector": "申请部门",
......
......@@ -482,6 +482,9 @@ constant.vatPermission = {
},
journal: {
queryCode: '02.002.018'
},
cashFlow: {
queryCode: '02.002.019'
}
},
dataManage: {
......
......@@ -55,6 +55,10 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
{
name: 'journal', permission: constant.vatPermission.dataPreview.journal.queryCode,
text: $translate.instant('journal'), icon: 'fa fa-file-text-o', show: true
},
{
name: 'cashFlow', permission: constant.vatPermission.dataPreview.cashFlow.queryCode,
text: $translate.instant('cashFlow'), icon: 'fa fa-file-text-o', show: true
},
{
name: 'invoiceRecord', permission: constant.vatPermission.dataPreview.invoiceRecord.queryCode,
......
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