Commit 2c87ebc4 authored by eddie.woo's avatar eddie.woo

add 科目对应

parent a90a6a34
......@@ -167,8 +167,57 @@
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/resources/conf_profile_dev.properties</filter>
</filters>
</build>
<properties>
<env>dev</env>
</properties>
</profile>
<profile>
<id>staging</id>
<build>
<filters>
<filter>src/main/resources/conf_profile_staging.properties</filter>
</filters>
</build>
<properties>
<env>staging</env>
</properties>
</profile>
<profile>
<id>pub</id>
<build>
<filters>
<filter>src/main/resources/conf_profile_pub.properties</filter>
</filters>
</build>
<properties>
<env>pub</env>
</properties>
</profile>
</profiles>
<build>
<finalName>atms-web</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering><!-- replace variable attribute or not -->
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -22,7 +22,7 @@
<!-- Base settings for all environments -->
<value>classpath:conf_base.properties</value>
<!-- Settings for selected environment -->
<value>classpath:conf_profile_${atms_env_id:local}.properties
<value>classpath:conf.properties
</value>
</list>
</property>
......
api.url=${api.url}
cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
\ No newline at end of file
api.url=http://192.168.1.102:8180/atms-api
api.url=http://localhost:8180/
cookie.maxAgeSeconds=3600
api.url=http://192.168.1.102:10001/atms-api
api.url=http://192.168.1.102:8180/atms-api
cookie.maxAgeSeconds=3600
......@@ -22,9 +22,19 @@ grunt.initConfig({
dest: '<%= pkg.bundleDest %>/basicData.js'
},
basicDataLess: {
options: { process },
options: { process },
files: {
'<%= pkg.bundleDest %>/less/basicData.less': ['app/admin/basicData/**/*.less']
}
},
systemConfigurationJs: {
src: ['app/admin/systemConfiguration/**/*.js'],
dest: '<%= pkg.bundleDest %>/systemConfiguration.js'
},
systemConfigurationLess: {
options: { process },
files: {
'<%= pkg.bundleDest %>/less/basicData.less': ['app/admin/basicData/**/*.less']
'<%= pkg.bundleDest %>/less/systemConfiguration.less': ['app/admin/systemConfiguration/**/*.less']
}
},
basicDataCss: {
......
systemConfigurationModule
.controller('EnterpriseSubjectCorrespondingController', ['$scope', '$log', 'uiGridConstants', 'SweetAlert', '$translate', 'stdAccountService', 'enterpriceAccountService', '$interval',
function ($scope, $log, uiGridConstants, SweetAlert, $translate, stdAccountService, enterpriceAccountService, $interval) {
'use strict';
var defaultSelectStandardAccount = {
id: 0,
name: '',
fullName: '',
code: '',
parentCode: '',
acctLevel: 0,
selectValue: ' '
};
var isActiveMap = { false: 'Disable', true: 'Enable' };
var isActivedMap = { false: 'Disabled', true: 'Enabled' };
var InitStdSubject = function () {
stdAccountService.getStdAccountHierarchy().success(function (stdAccountsCategories) {
$scope.stdAccountsCategories = stdAccountsCategories;
});
};
var InitEnterpriseSubject = function () {
enterpriceAccountService.getEnterpriceAccountList().success(function (data) {
data.forEach(function (row) {
row.directionStr = _.find($scope.directionList, function (num) {
return num.id === row.direction
}).name;
row.subjectTypeStr = _.find($scope.acctPropList, function (num) {
return num.id === row.acctProp
}).name;
});
$scope.gridOptionsSubjectList.data = data;
});
};
var mapStdAccount = function (code, name) {
var accountMap = {};
accountMap.enterpriseAccountCodes = [];
accountMap.standardAccountCode = code;
var selectedRows = $scope.gridApi.selection.getSelectedRows();
if (selectedRows.length === 0) {
SweetAlert.warning($translate.instant('SelectOneAccountToMap'));
return;
}
selectedRows.forEach(function (v) {
accountMap.enterpriseAccountCodes.push(v['code']);
});
enterpriceAccountService.mapAccount(accountMap).success(function (or) {
if (or.result === true) {
$scope.gridApi.selection.clearSelectedRows();
SweetAlert.success($translate.instant('AccountMapSuccess'));
selectedRows.forEach(function (v) {
v['stdCode'] = code;
v['stdName'] = name;
});
}
else {
SweetAlert.warning($translate.instant(or.resultMsg).formatObj({ code: or.data.standardAccountCode }));
}
});
};
$scope.autoMap = function () {
enterpriceAccountService.autoMap().success(function () {
// mapping success
InitEnterpriseSubject();
});
};
$scope.showLinkModal = function () {
$scope.isShowLinkModal = true;
$scope.isShowLinkReport = false;
};
$scope.showLinkReport = function () {
$scope.isShowLinkReport = true;
$scope.isShowLinkModal = false;
};
var loadTemplateFormula = function () {
// 先清空上次记录
$scope.reportGridOptions.data = [];
if ($scope.selectStandardAccount && $scope.selectStandardAccount.code) {
templateFormulaService.getByStandardCode($scope.selectStandardAccount.code).success(function (data) {
$scope.reportGridOptions.data = data;
});
}
};
var showDetail = function (entity) {
$scope.dbSelectedModel = entity;
// 选中
enterpriceAccountService.get($scope.dbSelectedModel.id).success(function (data) {
$scope.editModel = data;
if (data.stdCode && data.stdName) {
$scope.editModel.standardAccount = data.stdCode + '-' + data.stdName;
}
else {
$scope.editModel.standardAccount = $translate.instant('NotMap');
}
$scope.isAdd = false;
$scope.editModel.title = $translate.instant('EnterpriceAccount') + '-' + '(' + data.code + ' ' + data.name + ')';
$scope.selectStandardAccount = _.find($scope.standardAccountList, function (num) { return num.code === data.stdCode });
if (!$scope.selectStandardAccount || !data.stdCode || data.stdCode === '') {
$scope.selectStandardAccount = defaultSelectStandardAccount;
}
$scope.selectDirection = _.find($scope.directionList, function (num) { return num.id === data.direction });
$scope.selectAcctProp = _.find($scope.acctPropList, function (num) { return num.id === data.acctProp });
$scope.isShowLinkModal = false;
$scope.isShowLinkReport = true;
$scope.iseditDetail = false;
loadTemplateFormula();
$('#enterpriseAccountDetailPopup').modal('show');
});
};
$scope.reportGridOptions = {
rowHeight: 28,
selectionRowHeaderWidth: 28,
enableFullRowSelection: false,
enableRowSelection: false,
enableSorting: false,
enableFiltering: false,
enableColumnMenus: false,
enableRowHeaderSelection: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
columnDefs: [
{
field: 'templateName', name: $translate.instant('TemplateName'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.templateName}}<span></div>'
},
{
field: 'serviceTypeName', name: $translate.instant('ServiceTypeName'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.serviceTypeName}}<span></div>'
},
{
field: 'cell', name: $translate.instant('Cell'), width: '10%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.cell}}</span></div>'
},
{
field: 'rowName', name: $translate.instant('RowName'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rowName}}</span></div>'
},
{
field: 'columnName', name: $translate.instant('ColumnName'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.columnName}}</span></div>'
},
{
field: 'formula', name: $translate.instant('Formula'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.formula}}</span></div>'
}
]
};
(function initializa() {
$log.debug('EnterpriseSubjectCorrespondingController.ctor()...');
$scope.stdAccountsCategories = [];
$scope.stdSubjectList = [];
$scope.directionList = [
{ id: 1, name: $translate.instant('StandardAccountDebit') },
{ id: -1, name: $translate.instant('StandardAccountCredit') },
];
$scope.acctPropList = [
{ id: 1, name: $translate.instant('StandardAccountAcctPropAsset') },
{ id: 2, name: $translate.instant('StandardAccountAcctPropDebt') },
{ id: 3, name: $translate.instant('StandardAccountAcctPropCommon') },
{ id: 4, name: $translate.instant('StandardAccountAcctPropInterest') },
{ id: 5, name: $translate.instant('StandardAccountAcctPropCost') },
{ id: 6, name: $translate.instant('StandardAccountAcctPropProfitAndLoss') },
];
$scope.gridOptionsSubjectList = {
rowHeight: 55,
selectionRowHeaderWidth: 55,
enableSorting: false,
enableColumnMenus: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
enableRowSelection: true,
enableRowHeaderSelection: false,
columnDefs: [
{
field: 'code', name: $translate.instant('EnterpriseSubjectCodeCol'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>{{row.entity.code}}<span></div>'
},
{
field: 'name', name: $translate.instant('EnterpriseSubjectNameCol'), width: '25%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>{{row.entity.name}}</span></div>'
},
{
field: 'directionStr', name: $translate.instant('SubjectDirectionCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>{{row.entity.directionStr}}</span></div>'
},
{
field: 'subjectTypeStr', name: $translate.instant('SubjectTypeCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>{{row.entity.subjectTypeStr}}</span></div>'
},
{
field: 'stdCode', name: $translate.instant('StandardSubjectCol'), width: '25%', headerCellClass: 'text-align-center',
cellTemplate: '<div class="text-align-center" ng-dblClick="grid.appScope.showDetail(row.entity)"><span><i class="material-icons map-status-flag" ng-if="row.entity.stdCode == null">flag</i>{{row.entity.stdCode === null ? "未对应" : (row.entity.stdCode + "-" + row.entity.stdName)}}</span></div>'
}
],
onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi;
// call resize every 500 ms for 5 s after modal finishes opening - usually only necessary on a bootstrap modal
$interval(function () {
$scope.gridApi.core.handleWindowResize();
}, 500, 60 * 60 * 8);
}
};
InitStdSubject();
InitEnterpriseSubject();
$scope.mapStdAccount = mapStdAccount;
$scope.showDetail = showDetail;
})();
}
]);
\ No newline at end of file
<div class="enterprise-subject-corresponding">
<div class="left-container">
<div class="auto-mapping-div">
<br />
<button class="btn btn-primary " ng-click="autoMap()">{{'EnterpriceAccountMapping' | translate}}</button>
</div>
<div style="width:100%;">
<div id="etsGrid" class="subject-list-grid" ui-grid-auto-resize ui-grid="gridOptionsSubjectList" ui-grid-selection style="height:590px;"></div>
</div>
</div>
<div class="right-container">
<script type="text/ng-template" id="tree_node_template">
<div ng-click="toggle(this)" ng-dblclick="mapStdAccount(stdAccount.code,stdAccount.name)" ui-tree-handle>
<div ng-if="stdAccount.subStdAccounts && stdAccount.subStdAccounts.length > 0" class="expander">
<span ng-class="{hidden: collapsed}"><i class="fa fa-minus" aria-hidden="true"></i></span>
<span ng-class="{hidden: !collapsed}"><i class="fa fa-plus" aria-hidden="true"></i></span>
</div>
<div class="tree-menu-item" ng-bind-template="{{stdAccount.code + '-' + (stdAccount.direction == 1 ? '借':'贷') + '-' + stdAccount.name}}"></div>
</div>
<ul ui-tree-nodes="" ng-model="stdAccount.subStdAccounts" ng-if="!collapsed">
<li ng-repeat="stdAccount in stdAccount.subStdAccounts" collapsed="true;" ui-tree-node ng-include="'tree_node_template'" class="sub-level">
</li>
</ul>
</script>
<div class="std-tree-container">
<div class="standard-subject-title">标准科目表(双击即可对应)</div>
<div class="standard-subject-tree-container">
<div ui-tree data-drag-enabled="false">
<ul ui-tree-nodes="" ng-model="stdAccountsCategories">
<li ng-repeat="stdAccountsCategory in stdAccountsCategories" collapsed="true;" ui-tree-node class="first-level">
<div ng-click="toggle(this)" ui-tree-handle>
<div ng-if="stdAccountsCategory.stdAccounts && stdAccountsCategory.stdAccounts.length > 0" class="expander">
<span ng-class="{hidden: collapsed}"><i class="fa fa-minus" aria-hidden="true"></i></span>
<span ng-class="{hidden: !collapsed}"><i class="fa fa-plus" aria-hidden="true"></i></span>
</div>
<div class="tree-menu-item" ng-bind-template="{{stdAccountsCategory.category}}"></div>
</div>
<ul ui-tree-nodes="" ng-model="stdAccountsCategory.stdAccounts" ng-if="!collapsed">
<li ng-repeat="stdAccount in stdAccountsCategory.stdAccounts" collapsed="true;" ui-tree-node ng-include="'tree_node_template'" class="sub-level">
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="modal fade" id="enterpriseAccountDetailPopup" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:650px;height:200px;" role="document">
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true">×</span>
<div class="modal-title">{{ editModel.title }}</div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="showStandardAccountForm">
<div class="form-group">
<label for="code" class="col-sm-2 control-label">{{'AccountCode' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="code" name="code" disabled ng-model="editModel.code" placeholder="" required>
</div>
<label for="selectAcctProp" class="col-sm-2 control-label">{{'StandardAccountAccountTypes' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" style="width: 40%;" id="selectAcctProp" name="selectAcctProp" disabled ng-model="selectAcctProp.name" placeholder="" required>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">{{'AccountName' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="name" name="name" disabled ng-model="editModel.name" placeholder="" required>
</div>
<label for="selectDirection" class="col-sm-2 control-label">{{'StandardAccountDirection' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" style="width: 40%;" id="selectDirection" name="selectDirection" disabled ng-model="selectDirection.name" placeholder="" required>
</div>
</div>
<div class="form-group">
<label for="selectStandardAccount" class="col-sm-2 control-label">{{'StandardAccount' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="name" name="name" disabled ng-model="editModel.standardAccount" placeholder="" required>
</div>
</div>
</form>
<div class="list">
<div class="row">
<div class="link-modal-tab tab" ng-class="{active:isShowLinkModal}" ng-click="showLinkModal()" translate="LinkModel"></div><div ng-class="{active:isShowLinkReport}" class="link-report-tab tab" ng-click="showLinkReport()" translate="LinkReport"></div><div class="empty-tab">空tab</div>
</div>
<div class="box">
<div ng-if="isShowLinkModal" class="tab-content">关联模型内容</div>
<div ng-if="isShowLinkReport" class="tab-content">
<div id="reportDataList">
<div id="report-data-grid" ui-grid="reportGridOptions" ui-grid-resize-columns ui-grid-selection style="height:140px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
systemConfigurationModule.directive('enterpriseSubjectCorresponding', ['$log',
function ($log) {
'use strict';
$log.debug('enterpriseSubjectCorresponding.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/systemConfiguration/subjectCorresponding/enterpriseSubjectCorresponding/enterprise-subject-corresponding.html' + '?_=' + Math.random(),
scope: {
state: '='
},
controller: 'EnterpriseSubjectCorrespondingController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
.enterprise-subject-corresponding {
.left-container {
width: 76.8%;
margin: 0 20px 0 10px;
border: 1px solid #E4E4E4;
border-top: 0;
.map-status-flag {
color: #fe8400;
font-size: 18px;
vertical-align: middle;
}
.auto-mapping-div {
background-color: white;
padding: 10px 0 10px 20px;
}
.subject-list-grid {
background-color: #FFF;
border: 1px solid #FFF;
border-radius: 5px;
height: 595px;
.ui-grid-header-cell {
color: #000;
background-color: #FFF;
border: none;
}
.ui-grid-row {
line-height: 55px;
&:nth-child(odd) {
.ui-grid-cell {
border-right-width: 0;
background-color: #fdfdfd;
}
}
&:nth-child(even) {
.ui-grid-cell {
border-right-width: 0;
background-color: #f3f3f3;
}
}
&:last-child {
.ui-grid-cell {
border-bottom-width: 1px;
}
}
&.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
background-color: #fed5a9 !important;
}
}
.ui-grid-cell-contents {
padding: 12px 0 12px 12px;
.ui-grid-selection-row-header-buttons {
margin: 5px 0 0 5px;
}
}
i {
font-size: 20px;
color: #ED6E3C;
vertical-align: middle;
}
}
}
.right-container {
height: 670px;
width: 19%;
border: 1px solid #E4E4E4;
float: right;
position: absolute;
right: 0;
top: 123px;
background-color: #FFF;
border-radius: 5px;
.std-tree-container {
width: 100%;
.angular-ui-tree-nodes {
padding-left: 0px;
.angular-ui-tree-nodes {
padding-left: 0px;
}
}
.angular-ui-tree-handle {
padding: 0 0 0 20px;
margin-bottom: 0px;
width: 100%;
&:hover {
background-color: #f8f8f7;
}
}
.standard-subject-title {
height: 54px;
line-height: 54px;
text-align: center;
border-bottom: 1px solid #D4D4D4;
background-color: #F2F2F2;
}
.standard-subject-tree-container {
max-height: 614px;
overflow-y: auto;
overflow-x: hidden;
.tree-menu-item {
height: 44px;
font-size: 14px;
line-height: 44px;
padding: 0px 10px;
}
.first-level {
border: 1px solid #d4d4d4;
&:first-child {
border-top: none;
}
&:not(:last-child ) {
border-bottom: none;
}
}
.sub-level {
border-top: 1px solid #d4d4d4;
}
}
}
}
#enterpriseAccountDetailPopup {
.list {
padding-left: 8px;
.row {
margin-left: 0;
}
.tab {
display: inline-block;
background-color: #F2F2F2;
color: black;
width: 120px;
padding: 7px;
text-align: center;
}
.active {
background-color: #EB8C00;
color: white;
}
.empty-tab {
width: 370px;
height: 30px;
border-bottom: 1px solid #d7d7d7;
display: inline-block;
padding: 3px;
color: white;
}
.box {
border-left: 1px solid #D7D7D7;
border-right: 1px solid #D7D7D7;
border-bottom: 1px solid #D7D7D7;
height: 160px;
padding: 10px;
}
}
#showStandardAccountForm {
.control-label {
font-weight: normal;
}
}
#reportDataList {
.ui-grid-top-panel {
overflow: initial;
background-color: white;
background: none;
}
.ui-grid-header-cell-row {
background-color: #fff;
color: #000;
}
.ui-grid-header-cell-label {
font-weight: normal;
}
.header-center {
text-align: center;
}
// 设置偶数行的颜色
.ui-grid-row:nth-child(even) .ui-grid-cell {
background-color: white;
}
// 设置奇数行背景颜色
.ui-grid-row:nth-child(odd) .ui-grid-cell {
background-color: white;
}
.ui-grid-cell-contents {
padding: 0 5px;
line-height: 28px;
font-size: 13px;
font-weight: normal;
height: 28px;
}
.cell-icon {
&:extend(.ui-grid-cell-contents span);
font-size: 13px;
}
.ui-grid-cell-contents span {
vertical-align: middle;
}
.ui-grid-icon-minus-squared, .ui-grid-icon-plus-squared {
color: #DF6B02;
}
.ui-grid-cell {
cursor: pointer;
border-bottom: 1px solid #d4d4d4;
}
}
}
}
systemConfigurationModule
.controller('StandardSubjectCorrespondingController', ['$scope', '$log', 'uiGridConstants', 'SweetAlert', '$translate', 'stdAccountService', 'enterpriceAccountService', '$interval',
function ($scope, $log, uiGridConstants, SweetAlert, $translate, stdAccountService, enterpriceAccountService, $interval) {
'use strict';
var InitStdSubjectLinkEtsSubject = function () {
stdAccountService.getStdAccountLinkEtsAccount().success(function (data) {
data.forEach(function (row) {
row.directionStr = _.find($scope.directionList, function (num) {
return num.id === row.direction
}).name;
row.subjectTypeStr = _.find($scope.acctPropList, function (num) {
return num.id === row.acctProp
}).name;
});
$scope.gridOptionsStdSubjectList.data = data;
});
};
(function initialize() {
$log.debug('StandardSubjectCorrespondingController.ctor()...');
$scope.stdSubjectList = [];
$scope.directionList = [
{ id: 1, name: $translate.instant('StandardAccountDebit') },
{ id: -1, name: $translate.instant('StandardAccountCredit') },
];
$scope.acctPropList = [
{ id: 1, name: $translate.instant('StandardAccountAcctPropAsset') },
{ id: 2, name: $translate.instant('StandardAccountAcctPropDebt') },
{ id: 3, name: $translate.instant('StandardAccountAcctPropCommon') },
{ id: 4, name: $translate.instant('StandardAccountAcctPropInterest') },
{ id: 5, name: $translate.instant('StandardAccountAcctPropCost') },
{ id: 6, name: $translate.instant('StandardAccountAcctPropProfitAndLoss') },
];
$scope.gridOptionsStdSubjectList = {
rowHeight: 55,
selectionRowHeaderWidth: 55,
enableSorting: false,
enableColumnMenus: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
enableRowSelection: true,
enableRowHeaderSelection: false,
columnDefs: [
{
field: 'code', name: $translate.instant('StdSubjectCodeCol'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span>{{row.entity.code}}<span></div>'
},
{
field: 'name', name: $translate.instant('StdSubjectNameCol'), width: '25%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span>{{row.entity.name}}</span></div>'
},
{
field: 'directionStr', name: $translate.instant('SubjectDirectionCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span>{{row.entity.directionStr}}</span></div>'
},
{
field: 'subjectTypeStr', name: $translate.instant('SubjectTypeCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span>{{row.entity.subjectTypeStr}}</span></div>'
},
{
field: 'etsCode', name: $translate.instant('EtsSubjectNameCol'), width: '25%', headerCellClass: 'text-align-center',
cellTemplate: '<div class="text-align-center"><span><i class="material-icons map-status-flag" ng-if="row.entity.etsCode === null">flag</i>{{row.entity.etsCode === null ? "未对应" : (row.entity.etsCode + "-" + row.entity.etsName)}}</span></div>'
}
],
onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi;
// call resize every 500 ms for 5 s after modal finishes opening - usually only necessary on a bootstrap modal
$interval(function () {
$scope.gridApi.core.handleWindowResize();
}, 500, 60 * 60 * 8);
}
};
InitStdSubjectLinkEtsSubject();
})();
}
]);
\ No newline at end of file
<div class="standard-subject-corresponding">
<div id="stdGrid" class="subject-list-grid" ui-grid-auto-resize ui-grid="gridOptionsStdSubjectList" ui-grid-selection style="height:670px;"></div>
</div>
\ No newline at end of file
systemConfigurationModule.directive('standardSubjectCorresponding', ['$log',
function ($log) {
'use strict';
$log.debug('standardSubjectCorresponding.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/systemConfiguration/subjectCorresponding/standardSubjectCorresponding/standard-subject-corresponding.html' + '?_=' + Math.random(),
scope: {
state: '='
},
controller: 'StandardSubjectCorrespondingController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
systemConfigurationModule.controller('SubjectCorrespondingController', ['$scope', '$log', 'uiGridConstants', 'SweetAlert', '$translate', 'stdAccountService', 'enterpriseAccountService', '$interval', 'orgService', '$timeout', '$q', 'commonWebService', 'loginContext',
function ($scope, $log, uiGridConstants, SweetAlert, $translate, stdAccountService, enterpriseAccountService, $interval, orgService, $timeout, $q, commonWebService, loginContext) {
'use strict';
var defaultSelectStandardAccount = {
id: 0,
name: '',
fullName: '',
code: '',
parentCode: '',
acctLevel: 0,
selectValue: ' '
};
//初始化页面右侧可双击进行对应的标准科目表数据
var InitStdSubject = function () {
//stdAccountService.getStdAccountHierarchy($scope.selectedOrgID).success(function (stdAccountsCategories) {
// $scope.stdAccountsCategories = stdAccountsCategories;
// console.log(stdAccountsCategories);
// commonWebService.initFancyTree('treetable', stdAccountsCategories);
//});
};
//初始化企业科目数据列表
var InitEnterpriseSubject = function (rowIndexArray) {
//企业账套ID
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
var orgID = $scope.selectedOrgID;
//加载复制对应关系下的结构
orgService.getOrgIvhTreeList(0, espID).success(function (treeData) {
console.log(treeData);
$scope.OrgMultiData = treeData;
$scope.dsCheckBoxTreeView = treeData;
});
//Jacob
getEspAccountList(espID, orgID, "-1");
};
///根据标准科目code和name获取最终界面上应该显示的内容
var getStdResult = function (stdCode, stdName) {
var stdResult = stdCode === null ? $translate.instant('NotMapped') : (stdCode === "0000" ? "-" : stdCode + "-" + stdName);
return stdResult;
}
var getEspAccountList = function (espID, orgID, filterType) {
enterpriseAccountService.getEnterpriceAccountList(espID, orgID, filterType).success(function (data) {
if (data === null) return;
data.forEach(function (row) {
var direction = _.find($scope.directionList, function (num) {
return num.id === row.direction;
});
var acctProp = _.find($scope.acctPropList, function (num) {
return num.id === row.acctProp;
});
if (!direction || !acctProp) {
console.log('企业科目数据有问题!借贷方向或者科目类型不完全,请重新导入企业账套! - ' + row.code);
}
row.directionStr = direction ? direction.name : '';
row.subjectTypeStr = acctProp ? acctProp.name : '';
if (row.treeLevel != null) {
row.$$treeLevel = parseInt(row.treeLevel);
}
row.stdResult = getStdResult(row.stdCode, row.stdFullName);
});
$scope.gridOptionsSubjectList.data = data;
$scope.EnterpriceAccountList = data;
});
};
//添加企业科目过滤下拉列表
var InitFilterAccount = function () {
var data = constant.espAccountFilter.data;
data.forEach(function (row) {
row.value = $translate.instant(row.value);
});
$scope.accountFilterList = data;
};
$scope.isSelected = function (id) {
return $scope.filter.selected.indexOf(id) >= 0;
};
//筛选的时候,ng-check event will be triggered
$scope.stateChanged = function ($event, data) {
$scope.filter.selected = [];
$scope.filterConditionDesc = '';
var checkbox = $event.target;
if (checkbox.checked && $scope.filter.selected.indexOf(data.key) < 0) {
$scope.filter.selected.push(data.key);
$scope.filterConditionDesc = data.value;
}
accountFilterChanged();
};
//根据不同的状态过滤,未对应,已对应,借贷方向不一致等
//Jacob
var accountFilterChanged = function () {
var selectArr = $scope.filter.selected;
var data = $scope.EnterpriceAccountList;
var key = $scope.filter.selected[0] || constant.espAccountFilter.key_0;
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
var orgID = $scope.selectedOrgID;
switch (key) {
//所有对应状态,取默认值
case constant.espAccountFilter.key_0:
getEspAccountList(espID, orgID, "-1");
break;
//未对应
case constant.espAccountFilter.key_1:
getEspAccountList(espID, orgID, "0");
break;
//已对应
case constant.espAccountFilter.key_2:
getEspAccountList(espID, orgID, "1");
break;
//借贷方向不一致
case constant.espAccountFilter.key_3:
getEspAccountList(espID, orgID, "2");
break;
//科目类型不一致
case constant.espAccountFilter.key_4:
getEspAccountList(espID, orgID, "3");
break;
}
};
var InitNgData = function () {
$scope.stdCollapsed = true;
$scope.accountFilterList = [];
//初始化选择器为空
$scope.filter = {};
$scope.filter.selected = [];
//初始化企业科目筛选列表
InitFilterAccount();
$timeout(function () {
$scope.isLoadComplete = true;
}, 500);
}
var getUITreeScope = function (uiTreeID) {
return angular.element(document.getElementById(uiTreeID)).scope();
};
//如果没有全部展开,return false.
var isExpandAll = function (uiTreeID) {
var childNodes = getUITreeScope(uiTreeID).childNodes();
var isCollapsed = function (c) {
if (c.collapsed)
return true;
var childs = c.childNodes();
for (var i = 0; i < childs.length; i++) {
if (isCollapsed(childs[i])) {
return true;
}
}
return false;
}
return !_.some(childNodes, isCollapsed);
};
//ui tree 折叠或展开所有
var uiTreeExpandOrCollase = function (uiTreeID, iscollapsed) {
var childNodes = getUITreeScope(uiTreeID).childNodes();
try {
if (iscollapsed) {
PWC.uiTree.collapsedAll(childNodes);
}
else {
PWC.uiTree.expandAll(childNodes);
}
}
catch (ex) {
if (iscollapsed) {
$scope.$broadcast('angular-ui-tree:collapse-all');
}
else {
$scope.$broadcast('angular-ui-tree:expand-all');
}
}
};
//标准科目,单独展开或折叠
$scope.toggle1 = function (scope) {
scope.toggle();
if (scope.collapsed) {
$scope.stdCollapsed = true;
}
else {
//如果全部展开,最顶层也要展开
if (isExpandAll('tree-root')) {
$scope.stdCollapsed = false;
}
}
};
//标准科目,全部展开或折叠
$scope.toggleStdSubject = function () {
$scope.stdCollapsed = !$scope.stdCollapsed;
commonWebService.expandCollapseAll('treetable', $scope.stdCollapsed);
}
var reset = function () {
//清空企业科目列表grid
$scope.gridOptionsSubjectList.data = [];
//清空标准科目对应结果数据列表
$scope.gridOptionsStdSubjectList.data = [];
//清空过滤器选择为空
$scope.filter.selected = [];
};
//清空右侧标准科目
var resetstdAccount = function () {
$scope.stdAccountsCategories = null;
$scope.stdCollapsed = true;
};
//清空账套列表
var resetEspAccountSet = function () {
$scope.enterpriseAccountSetList = null;
};
var loadData = function () {
//企业科目全部折叠
gridOptionsSubjectListCollapseAllRows();
//初始化企业科目
InitEnterpriseSubject();
//初始化对应结果列表
//InitStdSubjectLinkEtsSubject();
};
//根据选择的账套,构造页面数据
var LoadEtsSubjectBySelectedAccpSetID = function () {
reset();
loadData();
$('.subject-corresponding-container').css('display', 'block');
$('.std-subject-container').css('display', 'none');
};
//根据选择的组织机构,构造账套列表和标准科目
var LoadEtsSubjectBySelectedOrg = function () {
reset();
resetEspAccountSet();
resetstdAccount();
InitStdSubject();
loadEnterpriseAccountSetList();
};
//根据机构 获取企业账套
var loadEnterpriseAccountSetList = function () {
enterpriseAccountService.getEnterpriseAccountSetListByOrgID($scope.selectedOrgID).success(function (data) {
if (data && data.length > 0) {
$scope.enterpriseAccountSetList = data;
$scope.enterpriseAccountSetSelect = data[0];
if ($scope.enterpriseAccountSetSelect != null) {
loadData();
}
}
});
};
//初始化标准科目对应结果数据列表
var InitStdSubjectLinkEtsSubject = function () {
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
stdAccountService.getStdAccountLinkEtsAccount($scope.selectedOrgID, espID).success(function (data) {
data.forEach(function (row) {
row.directionStr = _.find($scope.directionList, function (num) {
return num.id === row.direction;
}).name;
row.subjectTypeStr = _.find($scope.acctPropList, function (num) {
return num.id === row.acctProp;
}).name;
if (row.treeLevel != null) {
row.$$treeLevel = parseInt(row.treeLevel);
}
row.etsResult = row.etsCode === null ? $translate.instant('NotMapped') : (row.etsCode + "-" + row.etsName);
});
$scope.gridOptionsStdSubjectList.data = data;
});
};
$scope.toggleRow = function (rowNum) {
$scope.gridApiSubject.treeBase.toggleRowTreeState($scope.gridApiSubject.grid.renderContainers.body.visibleRowCache[rowNum]);
};
//手动对应,双击页面右侧的标准科目列表执行该事件
var mapStdAccount = function (code, name, acctProp, direction) {
if ($scope.selectedOrg && !$scope.selectedOrg.isHaveEditPermission) {
SweetAlert.warning($translate.instant('NoEditPermission'));
return;
}
var accountMap = {};
var rowIndexArray = [];
var isMapped = false;
var isAcctPropMatched = false;
var isDirectionMatched = false;
accountMap.orgID = $scope.selectedOrgID;
accountMap.enterpriseAccountCodes = [];
accountMap.standardAccountCode = code;
accountMap.accountSetID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
var selectedRows = $scope.gridApiSubject.selection.getSelectedRows();
if (selectedRows.length === 0) {
SweetAlert.warning($translate.instant('SelectOneAccountToMap'));
return;
}
var stdAcctProp = acctProp;
var stdDirection = direction;
selectedRows.forEach(function (v) {
accountMap.enterpriseAccountCodes.push(v['code']);
var rowIndex = findIndexByKeyValue($scope.gridOptionsSubjectList.data, "code", v['code'])
rowIndexArray.push(rowIndex);
var stdCode = v['stdCode'];
var acctProp = v['acctProp'];
var direction = v['direction'];
//判断企业科目是否已有对应的标准科目,如果有isMapped=true
if (stdCode != null) {
isMapped = true;
}
//判断企业科目和标准科目的类型否一致,如果不一致,isAcctPropMatched=true
if (acctProp != -1 && acctProp != null && stdAcctProp != acctProp) {
isAcctPropMatched = true;
}
//判断企业科目和标准科目的借贷方是否一致,如果不一致,isDirectionMatched=true
if (stdDirection != direction) {
isDirectionMatched = true;
}
});
//如果已经map过
if (isMapped) {
msgboxOptions.text = $translate.instant('ComfirmToReMap');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
//如果科目类型不一致
if (isAcctPropMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffAcctProp');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
//如果科目类型一致,则判断借贷方向是否一致
if (isDirectionMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffDirection');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
mapAccountParentChild(selectedRows, accountMap, code, name);
} else {
swal.close();
}
});
} else {
mapAccountParentChild(selectedRows, accountMap, code, name);
}
} else {
swal.close();
}
});
}
else {
//如果借贷方向不一致
if (isDirectionMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffDirection');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
mapAccountParentChild(selectedRows, accountMap, code, name);
} else {
swal.close();
}
});
}
else {
mapAccountParentChild(selectedRows, accountMap, code, name);
}
}
} else {
swal.close();
}
});
}
else {
//如果没有map过,则判断科目类型是否一致
if (isAcctPropMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffAcctProp');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
//如果科目类型一致,则判断借贷方向是否一致
if (isDirectionMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffDirection');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
mapAccountParentChild(selectedRows, accountMap, code, name);
} else {
swal.close();
}
});
} else {
mapAccountParentChild(selectedRows, accountMap, code, name);
}
} else {
swal.close();
}
});
}
else {
//如果借贷方向不一致
if (isDirectionMatched) {
msgboxOptions.text = $translate.instant('ConfirmToMapForDiffDirection');
SweetAlert.swal(msgboxOptions, function (isConfirm) {
if (isConfirm) {
mapAccountParentChild(selectedRows, accountMap, code, name);
} else {
swal.close();
}
});
} else {
mapAccountParentChild(selectedRows, accountMap, code, name);
}
}
}
};
//弹出框的默认配置项
var msgboxOptions = {
title: $translate.instant('ConfirmToContinue'),
text: $translate.instant('ComfirmToReMap'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: false,
closeOnCancel: false
};
var mapAccountParentChild = function (selectedRows, accountMap, code, name) {
enterpriseAccountService.mapAccount(accountMap).success(function (or) {
if (or.result === true) {
$scope.gridApiSubject.selection.clearSelectedRows();
//如果重新从数据库加载,数据会重新绑定然后感觉界面被刷新
updateChildrenEnterpriseAccount(selectedRows, code, name);
//更新父级科目的状态
updateParentEnterpriseAccount(or.data.parentAccountMappingResult);
swal.close();
}
else {
SweetAlert.warning($translate.instant(or.resultMsg).formatObj({ code: or.data.standardAccountCode }));
}
});
};
var updateParentEnterpriseAccount = function (parentMapingDict) {
for (var key in parentMapingDict) {
$scope.gridApiSubject.grid.rows.forEach(function (row) {
if (row.entity.code === key) {
row.entity['stdCode'] = parentMapingDict[key][0];
row.entity['stdName'] = parentMapingDict[key][1];
row.entity['stdResult'] = getStdResult(row.entity['stdCode'], row.entity['stdFullName']);
}
});
}
};
//当在取消或者手动对应之后更新界面
//selectedRows: uigrid中当前选中的行集合
//codeToUpdate: 需要将旧的代码设置为该code
//nameToUpdate: 需要将旧的科目名称设置为该name
var updateChildrenEnterpriseAccount = function (selectedRows, codeToUpdate, nameToUpdate) {
selectedRows.forEach(function (v) {
v['stdCode'] = codeToUpdate;
v['stdName'] = nameToUpdate;
v['stdResult'] = getStdResult(codeToUpdate, nameToUpdate);
//找出该选中节点的所有子节点,然后复制,避免再次从数据库获取数据
$scope.gridApiSubject.grid.rows.forEach(function (row) {
if (row.entity.parentCode === v.code) {
row.entity['stdCode'] = codeToUpdate;
row.entity['stdName'] = nameToUpdate;
row.entity['stdResult'] = getStdResult(codeToUpdate, nameToUpdate);
//再次更新该row下面的子节点如果存在的话
updateChildrenMappedCodeNameRecursive($scope.gridApiSubject.grid.rows, row.entity['code'], codeToUpdate, nameToUpdate);
}
});
});
};
var updateChildrenMappedCodeNameRecursive = function (rows, filterCode, codeToUpdate, nameToUpdate) {
$scope.gridApiSubject.grid.rows.forEach(function (row) {
if (row.entity.parentCode === filterCode) {
row.entity['stdCode'] = codeToUpdate;
row.entity['stdName'] = nameToUpdate;
row.entity['stdResult'] = getStdResult(codeToUpdate, nameToUpdate);
//再次更新该row下面的子节点如果存在的话
updateChildrenMappedCodeNameRecursive($scope.gridApiSubject.grid.rows, row.entity['code'], codeToUpdate, nameToUpdate);
}
});
}
var findIndexByKeyValue = function (arrayToSearch, key, valueToSearch) {
for (var i = 0; i < arrayToSearch.length; i++) {
if (arrayToSearch[i][key] == valueToSearch) {
return i;
}
}
return null;
};
//自动对应
$scope.autoMap = function () {
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
enterpriseAccountService.autoMap($scope.selectedOrgID, espID).success(function (or) {
if (or != null && or != undefined) {
if (or.result) {
// mapping success
SweetAlert.success($translate.instant('AutoMappingSuccess'));
InitEnterpriseSubject();
//InitStdSubjectLinkEtsSubject();
}
else {
SweetAlert.warning($translate.instant(or.resultMsg));
}
}
else {
SweetAlert.warning($translate.instant('AccountMapFailed'));
}
});
};
$scope.getGridHeight = function () {
if ($scope.isLoadComplete) {
return {
height: $(".subject-corresponding-container #enterprizeAccount .subject-list-grid-warp").height() + "px"
};
}
};
//针对选中的取消对应
var ClearMap = function () {
var clearEnterpriseAccountIDs = [];
var selectedRows = $scope.gridApiSubject.selection.getSelectedRows();
if (selectedRows.length === 0) {
SweetAlert.warning($translate.instant('SelectOneAccountToClearMap'));
return;
}
selectedRows.forEach(function (v) {
clearEnterpriseAccountIDs.push(v['id']);
});
enterpriseAccountService.clearMap(clearEnterpriseAccountIDs, $scope.selectedOrgID).success(function (or) {
if (or != null && or != undefined) {
if (or.result) {
// clear mapping success
SweetAlert.success($translate.instant('ClearMapSuccess'));
//如果重新从数据库加载,数据会重新绑定然后感觉界面被刷新
updateChildrenEnterpriseAccount(selectedRows, null, '');
updateParentEnterpriseAccount(or.data.parentAccountMappingResult);
$scope.gridApiSubject.selection.clearSelectedRows();
//InitEnterpriseSubject();
//InitStdSubjectLinkEtsSubject();
}
else {
SweetAlert.warning($translate.instant(or.resultMsg));
}
}
else {
SweetAlert.warning($translate.instant('ClearMapFailed'));
}
});
};
var copyMappingCheck = function () {
//判断当前选择的机构是否是同行业的,如果不是同一行业则给出提示
var IsSameIndustry = true;
if ($scope.selectedCopyOrgIndustryIDList.length > 0) {
var fIndustryID = $scope.selectedCopyOrgIndustryIDList[0];
$scope.selectedCopyOrgIndustryIDList.forEach(function (x) {
if (x != fIndustryID) {
IsSameIndustry = false;
return;
}
});
}
//当前选中的账套ID
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
//行业不一致弹出框确认配置
var industryDifferConfirmOptions = {
title: $translate.instant('ConfirmToContinue'),
text: $translate.instant('IndustryConfirmToMapping'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55", confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: false,
closeOnCancel: true
};
//行业不一致的时候需要弹框确认
if (IsSameIndustry) {
checkToCopyMapping(espID);
} else {
SweetAlert.swal(industryDifferConfirmOptions, function (isConfirmI) {
if (isConfirmI) {
checkToCopyMapping(espID);
}
});
}
};
//存在已经对应过的机构的确认配置
var existedMapOrgOption = function (mappingExistOrg) {
return {
title: $translate.instant('ConfirmToContinue'),
text: $translate.instant('ExistMappedOrg') + mappingExistOrg,
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55", confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: false,
closeOnCancel: true
}
};
//检查是否已有科目对应过的机构,并复制对应关系
var checkToCopyMapping = function (espID) {
//需要把当前机构的ID排除
$scope.selectedCopyOrgIDList = _.filter($scope.selectedCopyOrgIDList, function (item) {
return item !== $scope.selectedOrgID;
});
enterpriseAccountService.checkMapped($scope.selectedCopyOrgIDList, espID).success(function (data) {
//检查是否可以复制对应关系,后端返回检查信息
if (data && !data.result) {
//存在已对应过的机构,将对应过的机构组成字符串并弹框确认
var mappingExistOrg = '';
data.data.forEach(function (org) {
mappingExistOrg += org + ', ';
});
mappingExistOrg = '[' + mappingExistOrg + ']';
//弹框确认是否覆盖已对应过的机构
SweetAlert.swal(existedMapOrgOption(mappingExistOrg), function (isConfirmM) {
if (isConfirmM) {
copyMapping();
}
});
} else if (data && data.result) {
copyMapping();
} else {
console.log('data is undefined')
}
});
};
//复制对应关系到选中的组织机构
var copyMapping = function () {
var mappingParam = {};
var espID = $scope.enterpriseAccountSetSelect && $scope.enterpriseAccountSetSelect.id || '';
mappingParam.orgIDs = $scope.selectedCopyOrgIDList;
mappingParam.selectedOrgID = $scope.selectedOrgID;
mappingParam.selectedOrgSetID = espID;
enterpriseAccountService.copyMapping(mappingParam).success(function (or) {
if (or != null && or != undefined) {
if (or.result) {
SweetAlert.success($translate.instant('CopyMappingsSuccess'));
}
else {
SweetAlert.warning($translate.instant(or.resultMsg));
}
}
else {
SweetAlert.warning($translate.instant('CopyMappingsFailed'));
}
});
};
//点击明细数据弹出窗中的关联模型tab
$scope.showLinkModal = function () {
$scope.isShowLinkModal = true;
$scope.isShowLinkReport = false;
};
//点击明细数据弹出窗中的关联报表tab
$scope.showLinkReport = function () {
$scope.isShowLinkReport = true;
$scope.isShowLinkModal = false;
};
//加载明细数据中关联报表tab下的模板中的公式
var loadTemplateFormula = function () {
// 先清空上次记录
$scope.reportGridOptions.data = [];
if ($scope.selectStandardAccount && $scope.selectStandardAccount.code) {
templateFormulaService.getByStandardCode($scope.selectStandardAccount.code).success(function (data) {
$scope.reportGridOptions.data = data;
});
}
};
//双击企业科目grid中的单条数据,显示明细数据
var showDetail = function (entity) {
$scope.dbSelectedModel = entity;
//如果该条数据未进行对应,则不弹出明细窗口
if (entity.stdCode === null) {
$('.list').css('display', 'none');
}
else {
$('.list').css('display', 'block');
}
// 选中
enterpriseAccountService.get($scope.dbSelectedModel.id).success(function (data) {
$scope.editModel = data;
if (data.stdCode && data.stdName) {
$scope.editModel.standardAccount = data.stdCode + '-' + data.stdName;
}
else {
$scope.editModel.standardAccount = $translate.instant('NotMap');
}
$scope.isAdd = false;
$scope.editModel.title = $translate.instant('EnterpriseAccount') + '-' + '(' + data.code + ' ' + data.name + ')';
$scope.selectStandardAccount = _.find($scope.standardAccountList, function (num) {
return num.code === data.stdCode
});
if (!$scope.selectStandardAccount || !data.stdCode || data.stdCode === '') {
$scope.selectStandardAccount = defaultSelectStandardAccount;
}
$scope.selectDirection = _.find($scope.directionList, function (num) {
return num.id === data.direction
});
$scope.selectAcctProp = _.find($scope.acctPropList, function (num) {
return num.id === data.acctProp
});
$scope.isShowLinkModal = false;
$scope.isShowLinkReport = true;
$scope.iseditDetail = false;
loadTemplateFormula();
$('#enterpriseAccountDetailPopup').modal('show');
});
};
//加载复制对应关系下的组织机构数据
var loadOrgMultiData = function () {
//orgService.getOrgIvhTreeList(0).success(function (data) {
// if (data.length > 0) {
// $scope.selectedOrgName = data[0].value.name;
// $scope.selectedOrgID = data[0].value.id;
// }
//});
};
//勾选组织机构事件
var checkboxCheckStateChangeHandling = function (node, disabled) {
if (disabled) return;
var isSelected = node.selected;
var org = node.itemData.data.value;
if (isSelected) {
$scope.checkedSet[org.id] = org.industryID == constant.organization.EstateIndustryId ? org.industryID : constant.organization.NonEstateIndustryId;
}
else {
delete $scope.checkedSet[org.id];
}
$scope.selectedCopyOrgIDList = _.keys($scope.checkedSet);
$scope.selectedCopyOrgIndustryIDList = _.values($scope.checkedSet);
};
var otherAwesomeCallbackSpan = function (node, disabled) {
if (disabled) return;
node.selected = !node.selected;
otherAwesomeCallback(node);
};
$scope.showOperateLogPop = function () {
$scope.isShowLog = true;
// $('#showOperatePop').modal('show');
};
var gridOptionsSubjectListCollapseAllRows = function () {
$scope.gridApiSubject.treeBase.collapseAllRows();
};
$scope.$watch('selectedOrgID', function (newVal, oldVal) {
if (newVal !== oldVal) {
//初始化右侧标准科目的树,使用jquery fancytree的方式来显示树,所以需要用到ajax的方式
var stdAccountUrl = '/stdAccount/stdAccountHierarchy?orgID=' + $scope.selectedOrgID;
commonWebService.initFancyTreeAjax('treetable', stdAccountUrl, mapStdAccount);
$scope.LoadEtsSubjectBySelectedOrg();
}
});
//加载复制对应关系 机构选择树形结构
var loadOrgCheckboxTreeViewSettings = function () {
$scope.orgCheckboxTreeViewOptions = {
bindingOptions: {
dataSource: 'dsCheckBoxTreeView',
searchValue: 'searchValue'
},
selection: {
mode: "multiple"
},
loadPanel: {
enabled: true
},
scrolling: {
mode: "virtual"
},
keyExpr: "id",
showRowLines: true,
showColumnLines: true,
expandAllEnabled: true,
rowAlternationEnabled: true,
expandedRowKeys: [1],
showBorders: true,
noDataText: $translate.instant('NoDataText'),
selectAllText: $translate.instant('SelectAll'),
displayExpr: 'text', //显示的属性名称,默认为text
itemsExpr: 'items', //子层的数组名称,默认为items
selectNodesRecursive: false, //级联选择
showCheckBoxesMode: 'normal', //Accepted Values: 'none' | 'normal' | 'selectAll'
onInitialized: function (e) {
$scope.gridInstance = e.component;
},
onItemSelectionChanged: function (e) {
checkboxCheckStateChangeHandling(e.node);
},
//点击行,选中
onItemClick: function (e) {
var data = e.itemData;
},
onContentReady: function (object, container) {
//object.element.find('.dx-checkbox-checked').addClass('dx-state-disabled');
}
};
};
//初始化企业科目grid的设置
var loadStdAccountListOptions = function () {
//标准科目对应结果列表grid
$scope.gridOptionsStdSubjectList = {
rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.selectionRowHeaderWidth,
enableSorting: false,
enableColumnMenus: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
enableRowSelection: true,
enableSelectAll: true,
enableRowHeaderSelection: false,
enableFiltering: false,
enableColumnResizing: true,
showTreeExpandNoChildren: false,
columnDefs: [
{
field: 'code', name: $translate.instant('StdSubjectCodeCol'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span title="{{row.entity.code}}">{{row.entity.code}}<span></div>'
},
{
field: 'name', name: $translate.instant('StdSubjectNameCol'), width: '25%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span title="{{row.entity.fullName}}">{{row.entity.fullName}}</span></div>'
},
{
field: 'directionStr', name: $translate.instant('SubjectDirectionCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span title="{{row.entity.directionStr}}">{{row.entity.directionStr}}</span></div>'
},
{
field: 'subjectTypeStr', name: $translate.instant('SubjectTypeCol'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding"><span title="{{row.entity.subjectTypeStr}}">{{row.entity.subjectTypeStr}}</span></div>'
},
{
field: 'etsCode', name: $translate.instant('EtsSubjectNameCol'), width: '25%', headerCellClass: 'text-align-center',
cellTemplate: '<div class="text-align-left-padding" style="margin-right:40px"><i class="material-icons map-status-flag" ng-if="row.entity.etsCode === null">flag</i><span title="{{row.entity.etsResult}}">{{row.entity.etsResult}}</span></div>'
}
],
onRegisterApi: function (gridApi) {
$scope.gridApiStdSubject = gridApi;
// call resize every 500 ms for 5 s after modal finishes opening - usually only necessary on a bootstrap modal
$interval(function () {
$scope.gridApiStdSubject.core.handleWindowResize();
}, 500, 60 * 60 * 8);
}
};
};
//初始化标准科目grid的设置
var loadEnterpriseAccountListOptions = function () {
//企业科目列表grid
$scope.gridOptionsSubjectList = {
enableColumnResizing: true,
enableRowSelection: false,
enableSelectAll: true,
rowHeight: constant.UIGrid.rowHeight,
enableRowHeaderSelection: true,
modifierKeysToMultiSelect: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.enableHorizontalScrollbar,
enableVerticalScrollbar: uiGridConstants.scrollbars.enableVerticalScrollbar,
selectionRowHeaderWidth: constant.UIGrid.selectionRowHeaderWidth,
enableSorting: false,
enableColumnMenus: false,
enableFiltering: false,
showTreeExpandNoChildren: false,
enableFullRowSelection: true, //是否点击行任意位置后选中,默认为false
multiSelect: true,// 是否可以选择多个,默认为true;
columnDefs: [
{
field: 'code',
width: '17%',
name: $translate.instant('EnterpriseSubjectCodeCol'),
headerCellClass: '',
cellTemplate: '<div ng-if="row.entity.acctLevel==1" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==2" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==3" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;&nbsp{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==4" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;&nbsp;&nbsp{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==5" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;&nbsp;&nbsp;&nbsp;{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==6" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{row.entity.code}}<span></div>' +
'<div ng-if="row.entity.acctLevel==7" class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp{{row.entity.code}}<span></div>'
},
{
field: 'name',
name: $translate.instant('EnterpriseSubjectNameCol'),
headerCellClass: '',
width: '20%',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span title="{{row.entity.name}}">{{row.entity.name}}</span></div>'
},
{
field: 'directionStr',
name: $translate.instant('SubjectDirectionCol'),
headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span title="{{row.entity.directionStr}}">{{row.entity.directionStr}}</span></div>'
},
{
field: 'subjectTypeStr',
name: $translate.instant('SubjectTypeCol'),
headerCellClass: '',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span title="{{row.entity.subjectTypeStr}}">{{row.entity.subjectTypeStr}}</span></div>'
},
{
field: 'stdCode',
name: $translate.instant('StandardSubjectCol'),
headerCellClass: '',
width: '25%',
cellTemplate: '<div class="text-align-left-padding" ng-dblClick="grid.appScope.showDetail(row.entity)"><span title={{row.entity.stdResult}}><i class="material-icons map-status-flag" ng-if="row.entity.stdCode == null">flag</i>{{row.entity.stdResult}}</span></div>'
}
],
onRegisterApi: function (gridApi) {
$scope.gridApiSubject = gridApi;
$scope.gridSelectCount = $scope.gridApiSubject.selection.getSelectedRows().length;
var onRowsRenderedOff = gridApi.core.on.rowsRendered(null, function () {
onRowsRenderedOff(); // run once
PWC.triggerRowSelectOnClick('#etsGrid'); // requires '.ui-grid-canvas'
});
// call resize every 500 ms for 5 s after modal finishes opening - usually only necessary on a bootstrap modal
$interval(function () {
$scope.gridApiSubject.core.handleWindowResize();
}, 500, 60 * 60 * 8);
}
};
};
var loadReportGridOptions = function () {
//明细数据弹出框中的关联报表tab下的grid
$scope.reportGridOptions = {
rowHeight: 28,
selectionRowHeaderWidth: 28,
enableFullRowSelection: false,
enableRowSelection: false,
enableSorting: false,
enableFiltering: false,
enableColumnMenus: false,
enableColumnResizing: true,
enableRowHeaderSelection: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
columnDefs: [
{
field: 'templateName', name: $translate.instant('TemplateName'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.templateName}}">{{row.entity.templateName}}<span></div>'
},
{
field: 'serviceTypeName', name: $translate.instant('ServiceTypeName'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.serviceTypeName}}">{{row.entity.serviceTypeName}}<span></div>'
},
{
field: 'cell', name: $translate.instant('Cell'), width: '10%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.cell}}">{{row.entity.cell}}</span></div>'
},
{
field: 'rowName', name: $translate.instant('RowName'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.rowName}}">{{row.entity.rowName}}</span></div>'
},
{
field: 'columnName', name: $translate.instant('ColumnName'), width: '15%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.columnName}}">{{row.entity.columnName}}</span></div>'
},
{
field: 'formula', name: $translate.instant('Formula'), width: '20%', headerCellClass: '',
cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.formula}}">{{row.entity.formula}}</span></div>'
}
],
onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi;
// call resize every 500 ms for 5 s after modal finishes opening - usually only necessary on a bootstrap modal
$interval(function () {
$scope.gridApi.core.handleWindowResize();
}, 500, 60 * 60 * 8);
}
};
};
(function initializa() {
$log.debug('SubjectCorrespondingController.ctor()...');
$scope.stdAccountsCategories = [];
$scope.selectedOrgName = '';
$scope.selectedOrgID = '';
$scope.checkedSet = {};
$scope.selectedCopyOrgIDList = [];
$scope.selectedOrg = {};
$scope.directionList = [
{ id: 1, name: $translate.instant('StandardAccountDebit') },
{ id: -1, name: $translate.instant('StandardAccountCredit') },
];
$scope.acctPropList = [
{ id: 1, name: $translate.instant('StandardAccountAcctPropAsset') },
{ id: 2, name: $translate.instant('StandardAccountAcctPropDebt') },
{ id: 3, name: $translate.instant('StandardAccountAcctPropCommon') },
{ id: 4, name: $translate.instant('StandardAccountAcctPropInterest') },
{ id: 5, name: $translate.instant('StandardAccountAcctPropCost') },
{ id: 6, name: $translate.instant('StandardAccountAcctPropProfitAndLoss') },
];
loadEnterpriseAccountListOptions();
loadStdAccountListOptions();
loadReportGridOptions();
loadOrgCheckboxTreeViewSettings();
loadOrgMultiData();
InitStdSubject();
InitNgData();
$scope.mapStdAccount = mapStdAccount;
$scope.showDetail = showDetail;
$scope.copyMappingCheck = copyMappingCheck;
$scope.InitFilterAccount = InitFilterAccount;
$scope.LoadEtsSubjectBySelectedOrg = LoadEtsSubjectBySelectedOrg;
$scope.LoadEtsSubjectBySelectedAccpSetID = LoadEtsSubjectBySelectedAccpSetID;
$scope.ClearMap = ClearMap;
$scope.otherAwesomeCallbackSpan = otherAwesomeCallbackSpan;
$scope.accountFilterChanged = accountFilterChanged;
$scope.InitStdSubjectLinkEtsSubject = InitStdSubjectLinkEtsSubject;
orgService.getOrgList(0).success(function (data) {
if ($scope.selectNoOption) {
data.splice(0, 0, NoOptions);
}
$scope.selectedOrgName = data[0].name;
$scope.selectedOrgID = data[0].id;
});
//初始化右侧标准科目的树,使用jquery fancytree的方式来显示树,所以需要用到ajax的方式
//var stdAccountUrl = loginContext.apiHost + constant.webapi.prefix + '/stdAccount/stdAccountHierarchy?orgID=' + $scope.selectedOrgID;
//commonWebService.initFancyTree('treetable', stdAccountUrl);
})();
}]);
\ No newline at end of file
<div class="subject-corresponding-manage" style="background-color:#f2f2f2">
<div class="menu-header">
<div class="menu-title">
{{'SubjectCorresponding' | translate}}
</div>
<div class="menu-log">
<button class="btn btn-not-important log-btn" ng-click="showOperateLogPop()"><i class="material-icons">description</i><span translate="log"></span></button>
</div>
</div>
<div class="content-container" style="background-color: white;">
<div class="general-tab">
{{'SelectEnterprise'| translate}}
<!--<org-selector id="orgSelector" selected-org-name="selectedOrgName" selected-org-id="selectedOrgID"
component-selected-org="selectedOrg"
is-show-all=false
load-data="LoadEtsSubjectBySelectedOrg()"
query-organization-code="$root.adminPermission.systemConfiguration.subjectCorresponding.queryCode"
edit-organization-code="$root.adminPermission.systemConfiguration.subjectCorresponding.editCode"
is-first-default=true i
tem-max-length="30"
style="width: 250px">
</org-selector>-->
<org-search-selector style="width: 250px" selected-org-name="selectedOrgName"
selected-org-id="selectedOrgID"
selected-org-model="selectedOrg"
is-first-default=true
edit-permission-code="$root.adminPermission.systemConfiguration.subjectCorresponding.editCode"
query-permission-code="$root.adminPermission.systemConfiguration.subjectCorresponding.queryCode"></org-search-selector>
<div class="account-set-list">
{{'SelectEnterpriseAccountSet'| translate}} <span></span>
<select class="form-control account-set-select" id='enterpriseAccountSetSelect' ng-change="LoadEtsSubjectBySelectedAccpSetID()" name="enterpriseAccountSetSelect" ng-model="enterpriseAccountSetSelect" ng-options="x.name for x in enterpriseAccountSetList" required></select>
</div>
<span export-button="" style="float: right; margin-right: 15px; margin-top: 7px;"></span>
</div>
<div class="subject-corresponding-container" style="margin-top:18px;">
<div class="left-container" id="left-container" style="float:left;">
<div class="tab-content">
<div id="enterprizeAccount" class="tab-pane active">
<div class="auto-mapping-div">
<!--自动对应-->
<button class="btn btn-primary " ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="autoMap()" translate="EnterpriceAccountMapping"></button>
<!--取消对应-->
<button class="btn btn-secondary " ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="ClearMap()" translate="ClearMapping"></button>
<!--复制对应关系-->
<button class="btn btn-third" ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="displayMultiOrg()" translate="CopyMapping"></button>
<!--查看标准科目对应结果-->
<button class="btn btn-not-important" ng-click="SwitchAccount('detail')" translate="StdAccountMappingResult"></button>
<!--筛选-->
<div class="account-filter">
<span>{{'Filter' | translate }}&nbsp;&nbsp;{{filterConditionDesc}}&nbsp;</span>
<i class="fa fa-filter" aria-hidden="true" ng-click="showFilter()"></i>
<div class="filter-select" tabindex="-1" style="display:none">
<div>
{{'FilterMapStatus'| translate}}
</div>
<ul ng-repeat=" x in accountFilterList">
<li>
<input type="radio" checklist-model="filter.selected" checklist-value="x" ng-click="stateChanged($event,x)" ng-checked="isSelected(x.key)"> {{x.value}}
</li>
</ul>
</div>
</div>
<!--复制对应关系的弹出框-->
<div class="multi-org-container">
<div class="org-multi-tree-container" style="display: block;min-height:118px;">
<!--复制对应关系机构checkbox列表-->
<perfect-scrollbar class="scroller"
wheel-propagation="true"
wheel-speed="1"
min-scrollbar-length="20"
style="position: relative;height: 350px;">
<div id="regionCheckboxTreeView" dx-tree-view="orgCheckboxTreeViewOptions"></div>
</perfect-scrollbar>
</div>
<button class="btn btn-primary" ng-click="copyMappingCheck()" ng-disabled="OrgMultiData.length===0 || OrgMultiData.branch.length===0 || enterpriseAccountSetSelect===undefined">{{'Confirm' | translate}}</button>
<button class="btn btn-third" ng-click="closeMultiOrg()">{{'Cancel' | translate}}</button>
</div>
</div>
<div style="width: 100%; " class="subject-list-grid-warp">
<div id="etsGrid" class="subject-list-grid" style="height: 543px;" ui-grid="gridOptionsSubjectList"
ui-grid-tree-view ui-grid-selection ui-grid-auto-resize ui-grid-resize-columns ng-style="getGridHeight()"></div>
</div>
</div>
</div>
</div>
<div class="right-container" id="right-container">
<div class="std-tree-container">
<!--顶部全部展开收缩以及标题-->
<div class="standard-subject-title">
<div class="headerIcon" ng-click="toggleStdSubject()">
<span ng-class="{hidden: stdCollapsed}"><i class="fa fa-minus" aria-hidden="true"></i></span>
<span ng-class="{hidden: !stdCollapsed}"><i class="fa fa-plus" aria-hidden="true"></i></span>
</div>
{{'StandardAccoutDoubleClick' | translate}}
</div>
<div>
<input class="form-control" placeholder="{{'SearchHintText' | translate}}" name="fancytree-search" />
</div>
<div class="standard-subject-tree-container">
<table id="treetable" class="table table-condensed table-hover table-striped fancytree-fade-expander">
<colgroup>
<col width="0px" />
<col width="15px" />
<col width="*" />
</colgroup>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="std-subject-container">
<div class="general-tab">
<a ng-click="SwitchAccount('home')">{{'SubjectCorresponding'|translate}}</a> < <span style="font-size:13px;">{{'StdAccountMappingResult'|translate}}</span>
</div>
<div class="std-grid-container">
<div id="stdGrid" class="subject-list-grid" ui-grid="gridOptionsStdSubjectList" ui-grid-tree-view ui-grid-selection style="height: 559px;"></div>
</div>
</div>
</div>
<div class="modal fade" id="enterpriseAccountDetailPopup" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:650px;height:200px;" role="document">
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true">×</span>
<div class="modal-title">{{ editModel.title }}</div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="showStandardAccountForm">
<div class="form-group">
<label for="code" class="col-sm-2 control-label">{{'AccountCode' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="code" name="code" disabled ng-model="editModel.code" placeholder="" required>
</div>
<label for="selectAcctProp" class="col-sm-2 control-label">{{'StandardAccountAccountTypes' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" style="width: 40%;" id="selectAcctProp" name="selectAcctProp" disabled ng-model="selectAcctProp.name" placeholder="" required>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">{{'AccountName' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="name" name="name" disabled ng-model="editModel.name" placeholder="" required>
</div>
<label for="selectDirection" class="col-sm-2 control-label">{{'StandardAccountDirection' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" style="width: 40%;" id="selectDirection" name="selectDirection" disabled ng-model="selectDirection.name" placeholder="" required>
</div>
</div>
<div class="form-group">
<label for="selectStandardAccount" class="col-sm-2 control-label">{{'StandardAccount' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" id="name" name="name" disabled ng-model="editModel.standardAccount" placeholder="" required>
</div>
</div>
</form>
<div class="list">
<div class="row">
<div class="link-modal-tab tab" ng-class="{active:isShowLinkModal}" ng-click="showLinkModal()" translate="LinkModel"></div><div ng-class="{active:isShowLinkReport}" class="link-report-tab tab" ng-click="showLinkReport()" translate="LinkReport"></div><div class="empty-tab">空tab</div>
</div>
<div class="box">
<div ng-if="isShowLinkModal" class="tab-content">{{'AssociateModelContent' | translate}} </div>
<div ng-if="isShowLinkReport" class="tab-content">
<div id="reportDataList">
<div id="report-data-grid" ui-grid="reportGridOptions" ui-grid-resize-columns ui-grid-selection style="height:140px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<operate-log is-show="isShowLog" query-organization-code="$root.adminPermission.systemConfiguration.subjectCorresponding.queryCode"></operate-log>
</div>
\ No newline at end of file
systemConfigurationModule.directive('subjectCorresponding', ['$log',
function ($log) {
'use strict';
$log.debug('subjectCorresponding.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/admin/systemConfiguration/subjectCorresponding/subject-corresponding.html' + '?_=' + Math.random(),
replace: true,
scope: {},
controller: 'SubjectCorrespondingController',
link: function (scope, element) {
Split(['#left-container', '#right-container'], {
//An array of initial sizes of the elements, specified as percentage values. Example: Setting the initial sizes to 25% and 75%.
sizes: [78, 22],
//An array of minimum sizes of the elements, specified as pixel values. Example: Setting the minimum sizes to 100px and 300px, respectively.
minSize: [750, 250],
onDragEnd: function () {
//$timeout(function () {
// $rootScope.$broadcast(enums.vatEvent.layoutChanged, {});
//}, 700);
}
});
$(".multi-org-container").on("click", function (e) {
e.stopPropagation();
});
var ClearSelectedTreeNode = function () {
ClearSelectedTreeNodeRecursion(scope.OrgMultiData);
scope.selectedCopyOrgIDList = [];
scope.checkedSet = {};
};
//递归清除选中的节点
var ClearSelectedTreeNodeRecursion = function (tree) {
tree.forEach(function (o) {
o.selected = false;
if (o.children) {
ClearSelectedTreeNodeRecursion(o.children);
}
});
};
//显示复制对应关系下的组织机构多选列表
scope.displayMultiOrg = function () {
//ClearSelectedTreeNode();
scope.gridInstance.unselectAll();
if ($('.multi-org-container').is(":hidden")) {
$(".multi-org-container").show();
} else {
$(".multi-org-container").hide();
}
$(document).one("click", function () {
$(".multi-org-container").hide();
});
event.stopPropagation();
};
scope.closeMultiOrg = function () {
$(".multi-org-container").hide();
};
var previousOrgID, previousEspID;
//企业科目列表和标准科目列表切换
scope.SwitchAccount = function (flag) {
$('.subject-corresponding-container').toggle();
$('.std-subject-container').toggle();
var currentOrgID = scope.enterpriseAccountSetSelect && scope.enterpriseAccountSetSelect.id || '';
var currentEspID = scope.selectedOrgID;
if (flag == 'detail') {
if (previousEspID === currentEspID && currentOrgID === previousOrgID) {
return;
}
scope.InitStdSubjectLinkEtsSubject();
previousOrgID = currentOrgID;
previousEspID = currentEspID;
}
};
$(".filter-select").on("click", function (e) {
e.stopPropagation();
});
scope.showFilter = function () {
if ($('.filter-select').is(":hidden")) {
$(".filter-select").show();
} else {
$(".filter-select").hide();
}
$(document).one("click", function () {
$(".filter-select").hide();
});
event.stopPropagation();
};
}
};
}
]);
\ No newline at end of file
@bgcolor-white: #FFF;
@bgcolor-common: #F2F2F2;
@border-color: #E4E4E4;
@accountset-width: 300px;
.page-font() {
font-family: 'Microsoft YaHei';
font-weight: 400;
font-style: normal;
}
.text-ellipsis() {
white-space: nowrap;
word-break: normal;
text-overflow: ellipsis;
overflow-x: hidden;
}
.subject-corresponding-manage {
.fancytree-expanded span.fancytree-expander {
color: #999 !important;
}
/* fix width issue under IE*/
#treetable tr td:first-child {
width: 0px !important;
}
.ui-grid-tree-base-row-header-buttons {
font-size: 16px;
color: #a1a1a1;
vertical-align: middle;
}
span.fancytree-icon {
display: none !important;
}
span.fancytree-node span.fancytree-expander:hover {
color: #db6942;
}
.fancytree-fade-expander span.fancytree-expander {
transition: opacity 1.0s;
opacity: 1.0;
}
table.fancytree-ext-table.fancytree-container > tbody > tr.fancytree-active > td {
background-color: #fed5a9 !important;
color: black !important;
}
table.fancytree-ext-table.fancytree-container > tbody > tr.fancytree-active > td, table.fancytree-ext-table.fancytree-container > tbody > tr.fancytree-active > td span.fancytree-title {
color: black !important;
}
.gutter {
background-color: #eee;
background-repeat: no-repeat;
background-position: 50%;
height: 100%;
float: left;
width: 5px !important;
}
.gutter.gutter-horizontal {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
cursor: ew-resize;
}
background-color: #FFF;
//调整UIGrid
.ui-grid-header-canvas {
height: 53px !important;
}
.ui-grid-row {
line-height: 40px !important;
}
.ui-grid-tree-header-row {
font-weight: normal !important;
}
.content-container {
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
border: 0;
}
.nav-tabs > li > a {
margin-right: 0px;
color: black !important;
}
ul > li > a {
height: 52px;
line-height: 52px;
border-radius: 0px;
overflow: hidden;
padding: 0px 10px;
min-width: 188px;
text-align: center;
font-size: 15px;
border: 0;
border-bottom: 1px solid #dadada;
}
ul li.active a {
color: #dc6900 !important;
-webkit-box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
-moz-box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
border: 0;
}
.nav > li {
background-color: transparent;
}
.nav > li > a:hover,
.nav > li > a:focus {
color: #dc6900 !important;
border: 0;
background-color: white;
-webkit-box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
-moz-box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
box-shadow: inset 0px -3px 0px 0px rgba(220,105,0,1);
}
.tab-pane {
background-color: #FFF;
border-radius: 5px;
}
.general-tab {
/*height: 65px;*/
padding-left: 20px;
padding-top: 10px;
font-family: 'Microsoft YaHei';
font-style: normal;
font-size: 14px;
margin-top: 10px;
a {
font-family: 'Microsoft YaHei';
font-style: normal;
color: #D04A02;
text-decoration: none;
cursor: pointer;
&:hover, &:active, &:visited, &:focus {
text-decoration: none;
cursor: pointer;
}
}
.account-set-list {
margin-left: 10px;
display: inline-block;
.account-set-select {
width: @accountset-width;
display: inline-block;
font-family: 'Microsoft YaHei Bold', 'Microsoft YaHei Regular', 'Microsoft YaHei';
color: #434343;
}
}
span {
font-family: 'Microsoft YaHei Bold', 'Microsoft YaHei Regular', 'Microsoft YaHei';
color: #434343;
padding: 2px;
margin-right: 13px;
}
.custom-tree-wrapper {
.scoreDropDownBtn {
width: @accountset-width;
}
.dropdown-menu {
width: @accountset-width;
}
}
}
.text-align-center {
text-align: center;
.text-ellipsis();
}
.text-align-left {
text-align: left;
.text-ellipsis();
}
.text-align-left-padding {
text-align: left;
padding-left: 12px;
.text-ellipsis();
}
.subject-corresponding-container {
height: 100%;
.left-container {
width: 75%;
height: calc(~"100% - 65px");
border: 1px solid #E4E4E4;
border-radius: 5px;
display: inline-block;
.tab-content {
height: 100%;
#enterprizeAccount {
height: 100%;
.auto-mapping-div {
background-color: white;
padding: 20px 0 10px 20px;
/*border-radius: 5px;*/
position: relative;
.account-filter {
display: inline-block;
float: right;
margin-right: 5%;
position: relative;
.fa-filter {
margin-right: 30px;
cursor: pointer;
font-size: 20px;
vertical-align: sub;
}
.filter-select {
width: 180px;
line-height: 20px;
display: inline-block;
color: #434343;
border: 1px solid #bcbcbc;
-moz-box-shadow: 2px 2px 5px #adaaaa;
-webkit-box-shadow: 2px 2px 5px #adaaaa;
box-shadow: 2px 2px 5px #adaaaa;
position: absolute;
z-index: 999;
background-color: #fff;
border-radius: 3px;
top: 25px;
right: 0px;
div {
height: 30px;
font-weight: bold;
text-align: center;
line-height: 30px;
font-size: 15px;
border-bottom: 1px solid #B1ADA7;
}
ul {
list-style-type: none;
padding: 0px 20px 0 10px;
line-height: 10px;
}
}
}
button {
margin-right: 10px;
}
.multi-org-container {
display: none;
position: absolute;
width: 310px;
min-height: 190px;
border: 1px solid #E4E4E4;
left: 247px;
top: 57px;
z-index: 2;
background-color: #FFF;
box-shadow: #9E9C9C 5px 5px 5px;
border-radius: 5px;
overflow-y: hidden;
padding: 10px;
.tree-org-multi-item-disabled {
color: gray;
cursor: not-allowed;
}
button {
margin-top: 10px;
}
//复制对应关系下拉框样式
.org-multi-tree {
overflow: hidden;
&:hover {
/*overflow: auto;*/
}
}
}
}
}
}
.map-status-flag {
color: #fe8400;
font-size: 18px;
vertical-align: middle;
}
.subject-list-grid-warp {
height: calc(~"100% - 66px");
.subject-list-grid {
background-color: #FFF;
border: 1px solid #FFF;
border-radius: 5px;
.ui-grid-header-cell {
color: #000;
background-color: #FFF;
border: none;
}
.ui-grid-row {
line-height: 40px !important;
&:nth-child(odd) {
.ui-grid-cell {
border-right-width: 0;
background-color: #fdfdfd;
}
}
&:nth-child(even) {
.ui-grid-cell {
border-right-width: 0;
background-color: #f3f3f3;
}
}
&:last-child {
.ui-grid-cell {
border-bottom-width: 1px;
}
}
&.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
background-color: #fed5a9 !important;
}
}
.ui-grid-cell-contents {
padding: 12px 0 12px 12px;
.ui-grid-selection-row-header-buttons {
margin: 0;
}
}
/*i {
font-size: 16px;
color: rgb(161, 161, 161);
vertical-align: middle;
}*/
.map-status-flag {
color: #ED6E3C;
}
}
}
}
.right-container {
height: calc(~"100% - 65px");
width: calc(~"25% - 3px");
border: 1px solid #E4E4E4;
float: right;
background-color: #FFF;
border-radius: 5px;
.std-tree-container {
width: 100%;
.angular-ui-tree-nodes {
padding-left: 0px;
.angular-ui-tree-nodes {
padding-left: 0px;
}
}
.angular-ui-tree-handle {
padding: 0 0 0 20px;
margin-bottom: 0px;
width: 100%;
&:hover {
background-color: #f8f8f7;
}
}
.standard-subject-title {
height: 54px;
line-height: 54px;
text-align: center;
border-bottom: 1px solid #D4D4D4;
background-color: #A1A1A1;
color: #FFF;
.headerIcon {
color: #fff;
text-align: left;
float: left;
display: inline-block;
padding-left: 10px;
cursor: pointer;
margin-left: 11px;
}
}
.standard-subject-tree-container {
max-height: 575px;
overflow-y: auto;
overflow-x: hidden;
#treetable {
table-layout: fixed;
tr td:nth-of-type(1) {
text-align: right;
}
tr td:nth-of-type(2) {
text-align: center;
}
tr td:nth-of-type(3) {
min-width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fancytree-icon {
/*display:none;*/
}
}
.tree-menu-item {
height: 44px;
font-size: 14px;
line-height: 44px;
padding: 0px 10px;
}
.first-level {
border: 1px solid #d4d4d4;
&:first-child {
border-top: none;
}
&:not(:last-child ) {
border-bottom: none;
}
}
.sub-level {
border-top: 1px solid #d4d4d4;
padding-left: 10px;
}
}
}
}
}
.std-subject-container {
display: none;
.std-grid-container {
background-color: #FFF;
margin: 20px 10px 10px 20px;
padding: 30px 20px;
border-radius: 5px;
border: 1px solid #E4E4E4;
}
.ui-grid-cell-contents {
padding: 10px 0 12px 12px !important;
}
}
}
#enterpriseAccountDetailPopup {
.list {
padding-left: 8px;
.row {
margin-left: 0;
}
.tab {
display: inline-block;
background-color: #F2F2F2;
color: black;
width: 120px;
padding: 7px;
text-align: center;
}
.active {
background-color: #EB8C00;
color: white;
}
.empty-tab {
width: 370px;
height: 30px;
border-bottom: 1px solid #d7d7d7;
display: inline-block;
padding: 3px;
color: white;
}
.box {
border-left: 1px solid #D7D7D7;
border-right: 1px solid #D7D7D7;
border-bottom: 1px solid #D7D7D7;
height: 160px;
padding: 10px;
}
}
#showStandardAccountForm {
.control-label {
font-weight: normal;
}
}
#reportDataList {
.ui-grid-top-panel {
overflow: initial;
background-color: white;
background: none;
}
.ui-grid-header-cell-row {
background-color: #fff;
color: #000;
}
.ui-grid-header-cell-label {
font-weight: normal;
}
.header-center {
text-align: center;
}
// 设置偶数行的颜色
.ui-grid-row:nth-child(even) .ui-grid-cell {
background-color: white;
}
// 设置奇数行背景颜色
.ui-grid-row:nth-child(odd) .ui-grid-cell {
background-color: white;
}
.ui-grid-cell-contents {
padding: 0 5px;
line-height: 28px;
font-size: 13px;
font-weight: normal;
height: 28px;
}
.cell-icon {
&:extend(.ui-grid-cell-contents span);
font-size: 13px;
}
.ui-grid-cell-contents span {
vertical-align: middle;
}
.ui-grid-icon-minus-squared, .ui-grid-icon-plus-squared {
color: #DF6B02;
cursor: pointer !important;
}
.ui-grid-icon-plus-squared:before {
font-size: 15px !important;
cursor: pointer !important;
}
.ui-grid-cell {
cursor: pointer;
border-bottom: 1px solid #d4d4d4;
}
}
}
}
systemConfigurationModule
.controller('SubjectCorrespondingInfrastructureController', ['$scope', '$log',
function ($scope, $log) {
'use strict';
(function initialize() {
$log.debug('SubjectCorrespondingInfrastructureController.ctor()...');
})();
}
]);
\ No newline at end of file
<div class="subject-corresponding-infrastructure">
<div class="page-nav-header">
{{'SubjectCorresponding' | translate}}
</div>
<div class="panel">
<div class="row menu">
<div class="tab" ui-sref-active="active"><a ui-sref=".enterpriseSubjectCorresponding"><span>企业科目</span></a></div>
<div class="tab" ui-sref-active="active"><a ui-sref=".standardSubjectCorresponding"><span>标准科目</span></a></div>
</div>
<div class="subject-corresponding-content">
<div ui-view="enterpriseSubjectCorresponding" ng-show="state.includes('subjectCorresponding.enterpriseSubjectCorresponding')"></div>
<div ui-view="standardSubjectCorresponding" ng-show="state.includes('subjectCorresponding.standardSubjectCorresponding')"></div>
</div>
</div>
</div>
\ No newline at end of file
systemConfigurationModule.directive('subjectCorrespondingInfrastructure', ['$log',
function ($log) {
'use strict';
$log.debug('subjectCorrespondingInfrastructure.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/systemConfiguration/subjectCorresponding/subjectCorrespondingInfrastructure/subject-corresponding-infrastructure.html' + '?_=' + Math.random(),
scope: {
state: '='
},
controller: 'SubjectCorrespondingInfrastructureController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@bgcolor-white: #FFF;
@bgcolor-common: #F2F2F2;
@border-color: #E4E4E4;
.page-font() {
font-family: 'Microsoft YaHei';
font-weight: 400;
font-style: normal;
}
.subject-corresponding-infrastructure {
.page-nav-header {
padding: 25px 0 0 40px;
height: 70px;
background-color: @bgcolor-white;
border-bottom: 1px solid @border-color;
color: #0D0D0D;
font-size: 16px;
.page-font;
}
.text-align-center {
text-align: center;
}
.text-align-left {
text-align: left;
}
.text-align-left-padding {
text-align: left;
padding-left: 30px;
}
.panel {
margin-bottom: 0;
.row {
margin-left: 12px;
margin-right: 0;
border-bottom: 1px solid #ddd;
}
.menu {
.tab {
height: 52px;
min-width: 180px;
width: 19%;
text-align: center;
display: inline-block;
vertical-align: middle;
margin: 0 -2px;
border: 0;
line-height: 52px;
font-size: 15px;
text-decoration: none;
a {
text-decoration: none;
display: inline-block;
height: 52px;
width: 188px;
&:hover,
&:active,
&:focus,
&:visited {
text-decoration: none;
}
}
&.active {
line-height: 52px;
color: #dc6900 !important;
box-shadow: inset 0 -3px 0 0 #dc6900;
min-width: 188px;
font-size: 15px;
text-decoration: none;
}
&:hover,
&:active,
&:focus,
&:visited {
line-height: 52px;
color: #dc6900 !important;
box-shadow: inset 0 -3px 0 0 #dc6900;
min-width: 188px;
font-size: 15px;
}
}
}
}
}
......@@ -4,7 +4,7 @@
var app = angular.module('adminApp', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls', 'ui.event', 'pascalprecht.translate', 'ngMessages', 'ui.utils',
'ngRoute', 'ngCookies', 'ngSanitize', 'ct.ui.router.extras', 'chieffancypants.loadingBar', 'ngDraggable', 'ngFileUpload', 'LocalStorageModule', 'exceptionless',
'app.config', 'app.common', 'app.webservices', 'app.framework', 'app.infrastructure', 'app.basicData', 'app.adminHomePage', 'app.noPermissionPage', 'pasvaz.bindonce', 'vs-repeat', 'ivh.treeview', 'angular-cache',
'app.cache', 'angularBootstrapNavTree', 'ngAnimate', 'cgNotify', 'angularInlineEdit'
'app.systemConfiguration', 'app.cache', 'angularBootstrapNavTree', 'ngAnimate', 'cgNotify', 'angularInlineEdit'
])
//run blocks are executed after the injector is created and are the first
//methods that are executed in any Angular app.
......
......@@ -156,7 +156,7 @@ var commonModule = angular.module('app.common', ['pascalprecht.translate', 'ngAn
url: '/bundles/systemConfiguration.js?v=' + version,
type: 'text/javascript'
}, {
url: '/bundles/systemConfiguration.less?v=' + version,
url: '/bundles/less/systemConfiguration.less?v=' + version,
type: 'text/css'
}];
......@@ -751,6 +751,189 @@ var basicDataModule = angular.module('app.basicData', ["isteven-multi-select", '
}]);
var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMessages', 'ngAnimate', 'ui.bootstrap', "isteven-multi-select", 'ui.grid', 'ui.grid.treeView', 'ui.grid.selection', 'dx', 'remoteValidation', 'ui.select', 'ngSanitize'])
.run(['$log', function ($log) {
$log.debug('app.systemConfiguration.run()...');
}])
.config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', 'scriptDependencyProvider', '$stateProvider', '$urlRouterProvider',
function ($controllerProvider, $compileProvider, $filterProvider, $provide, scriptDependencyProvider, $stateProvider, $urlRouterProvider) {
'use strict';
$urlRouterProvider.when('/subjectCorrespondingInfrastructure', '/subjectCorrespondingInfrastructure/enterpriseSubjectCorresponding');
$urlRouterProvider.when('/ruleEngineConfiguration', '/ruleEngineConfiguration/vatRuleEnginee');
// this is required to add controller/directive/filter/service after angular bootstrap
bindModule(systemConfigurationModule, $controllerProvider, $compileProvider, $filterProvider, $provide);
$stateProvider.state({
name: 'declarationFormConfiguration',
url: '/declarationFormConfiguration',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
}],
template: '<declaration-form-configuration></declaration-form-configuration>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'declarationTemplateConfiguration',
url: '/declarationTemplateConfiguration',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
}],
template: '<declaration-template-configuration></declaration-template-configuration>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'declarationFormConfigurationLocation',
url: '/declarationFormConfiguration/{templateGroupId}/{templateId}/{cellTemplateId}',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
$scope.templateGroupId = $stateParams.templateGroupId;
$scope.templateId = $stateParams.templateId;
$scope.cellTemplateId = $stateParams.cellTemplateId;
}],
template: '<declaration-form-configuration template-group-id="{{templateGroupId}}" template-id="{{templateId}}" cell-template-id="{{cellTemplateId}}"></declaration-form-configuration>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'subjectCorresponding',
url: '/subjectCorresponding',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
}],
template: '<subject-corresponding></subject-corresponding>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'modelConfiguration',
url: '/modelconfiguration',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
}],
template: '<model-configuration></model-configuration>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'modelConfigurationLocation',
url: '/modelconfiguration/{organizationId}/{selectedModelCode}',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
$scope.organizationId = $stateParams.organizationId;
$scope.selectedModelCode = $stateParams.selectedModelCode;
}],
template: '<model-configuration organization-id="{{organizationId}}" selected-model-code="{{selectedModelCode}}"></model-configuration>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'keyCodeConfiguration',
url: '/keyCodeConfiguration',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.systemConfiguration]);
}],
template: '<key-value-config></key-value-config>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'ruleEngineConfiguration',
url: '/ruleEngineConfiguration',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation','$state',
function ($scope, $stateParams, appTranslation, $state) {
appTranslation.load([appTranslation.systemConfiguration]);
$scope.state = $state;
}],
template: '<rule-engine-infrastructure state="state"></rule-engine-infrastructure>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state('ruleEngineConfiguration.vatRuleEnginee', {
url: "/vatRuleEnginee",
sticky: true,
dsr: true,
views: {
'vat-rule@ruleEngineConfiguration': {
//template: '<rule-enginee-config></rule-enginee-config>'
template: '<rule-engine-config></rule-engine-config>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration)
});
$stateProvider.state('ruleEngineConfiguration.fixedAssets', {
url: "/fixedAssets",
sticky: true,
dsr: true,
views: {
'fixed-assets@ruleEngineConfiguration': {
//template: '<rule-enginee-config></rule-enginee-config>'
template: '<fixed-assets-rule-enginee></fixed-assets-rule-enginee>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration)
});
}]);
var adminHomePageModule = angular.module('app.adminHomePage', ["isteven-multi-select", 'ui.grid', 'ui.grid.treeView', 'ui.grid.selection', 'dx', 'remoteValidation', 'ui.select', 'ngSanitize'])
.run(['$log', function ($log) {
$log.debug('app.systemConfiguration.run()...');
......
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