Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
6c96d113
Commit
6c96d113
authored
Oct 25, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] delete unused js in approval ctrl js
parent
20b6f4e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
1165 deletions
+106
-1165
app-approve.ctrl.js
...main/webapp/app/framework/app-approve/app-approve.ctrl.js
+6
-1163
app-approve.html
...rc/main/webapp/app/framework/app-approve/app-approve.html
+100
-2
No files found.
atms-web/src/main/webapp/app/framework/app-approve/app-approve.ctrl.js
View file @
6c96d113
...
@@ -6,18 +6,12 @@
...
@@ -6,18 +6,12 @@
orgService
,
serviceTypeService
,
userService
,
loginContext
,
enums
,
citSessionService
,
region
,
SweetAlert
,
productService
,
orgService
,
serviceTypeService
,
userService
,
loginContext
,
enums
,
citSessionService
,
region
,
SweetAlert
,
productService
,
localStorageService
,
assetsManageSessionService
,
serviceLogService
,
ackUibModal
,
Upload
,
apiInterceptor
)
{
localStorageService
,
assetsManageSessionService
,
serviceLogService
,
ackUibModal
,
Upload
,
apiInterceptor
)
{
'use strict'
;
'use strict'
;
$log
.
debug
(
'app
Overview
Controller.ctor()...'
);
$log
.
debug
(
'app
Approve
Controller.ctor()...'
);
var
uploadUrl
=
apiInterceptor
.
webApiHostUrl
+
'/product/NewFile'
;
var
uploadUrl
=
apiInterceptor
.
webApiHostUrl
+
'/product/NewFile'
;
var
resumable
=
true
;
var
resumable
=
true
;
$scope
.
chunkSize
=
100000
;
$scope
.
chunkSize
=
100000
;
$scope
.
conditionChange
=
false
;
$scope
.
conditionChange
=
false
;
var
token
=
$
(
'input[name="__RequestVerificationToken"]'
).
val
();
var
token
=
$
(
'input[name="__RequestVerificationToken"]'
).
val
();
//$scope.randomDemoData = {
// projectId:null,
// taxAmount: 0,
// prepadidTaxAmount: 0,
// taxRate: 0
//};
//**********************************************************************************************
//**********************************************************************************************
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4Year'
);
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4Year'
);
...
@@ -58,12 +52,6 @@
...
@@ -58,12 +52,6 @@
vatSessionService
.
logUser
=
userData
;
vatSessionService
.
logUser
=
userData
;
});
});
$scope
.
doWorkflowSort
=
function
(
sortstr
)
{
$scope
.
randomCounter
++
;
$scope
.
sortString
=
sortstr
+
"_"
+
$scope
.
randomCounter
;
};
//设置项目状态Title
//设置项目状态Title
function
setLayoutStatusTitle
(
statusIds
)
{
function
setLayoutStatusTitle
(
statusIds
)
{
...
@@ -71,7 +59,6 @@
...
@@ -71,7 +59,6 @@
var
currentMonth
=
vatSessionService
.
month
;
var
currentMonth
=
vatSessionService
.
month
;
var
statusId
;
var
statusId
;
//(p.projectStatusList !== null && p.projectStatusList[1] !== undefined) ? setLayoutStatusTitle(p.projectStatusList[1]) : $scope.translateProjectStatus(p.haveCreateProject)
if
(
statusIds
===
null
||
(
statusIds
!==
null
&&
statusIds
[
currentMonth
]
===
undefined
))
if
(
statusIds
===
null
||
(
statusIds
!==
null
&&
statusIds
[
currentMonth
]
===
undefined
))
statusId
=
0
;
statusId
=
0
;
else
{
else
{
...
@@ -85,62 +72,6 @@
...
@@ -85,62 +72,6 @@
status
+=
'en-US'
;
status
+=
'en-US'
;
}
}
// $log.debug("setLayoutStatusTitle");
// $scope.statusTitle = $translate.instant('ProjectStatusTitle');
switch
(
statusId
)
{
case
constant
.
ProjectStatusEnum
.
UnStarted
:
status
+=
"/01.png"
;
//$translate.instant('ProjectStatusUnStarted');
break
;
case
constant
.
ProjectStatusEnum
.
Imported
:
status
+=
"/02.png"
;
// $translate.instant('ProjectStatusImported');
break
;
case
constant
.
ProjectStatusEnum
.
AccountMapSubmitted
:
status
+=
"/03.png"
;
// $translate.instant('ProjectStatusAcccountMapSubmitted');
break
;
case
constant
.
ProjectStatusEnum
.
Generated
:
status
+=
"/04.png"
;
// $translate.instant('ProjectStatusGenerated');
break
;
case
constant
.
ProjectStatusEnum
.
ReportSubmitted
:
status
+=
"/05.png"
;
//$translate.instant('ProjectStatusReportSubmitted');
break
;
case
constant
.
ProjectStatusEnum
.
ReportApproved
:
status
+=
"/07.png"
;
//$translate.instant('ProjectStatusReportApproved');
break
;
case
constant
.
ProjectStatusEnum
.
ReportRejected
:
status
+=
"/06.png"
;
//$translate.instant('ProjectStatusReportRejected');
break
;
case
constant
.
ProjectStatusEnum
.
Completed
:
status
+=
"/08.png"
;
// $translate.instant('ProejctStatusCompleted');
break
;
default
:
status
+=
"/01.png"
;
}
return
status
;
}
function
setLayoutStatusTitleForCIT
(
statusIds
)
{
var
currentMonth
=
vatSessionService
.
month
;
var
statusId
;
//(p.projectStatusList !== null && p.projectStatusList[1] !== undefined) ? setLayoutStatusTitle(p.projectStatusList[1]) : $scope.translateProjectStatus(p.haveCreateProject)
if
(
statusIds
===
null
||
(
statusIds
!==
null
&&
statusIds
.
length
===
0
))
statusId
=
0
;
else
{
statusId
=
statusIds
[
Object
.
keys
(
statusIds
)[
Object
.
keys
(
statusIds
).
length
-
1
]]
// statusId = statusIds[currentMonth];
}
var
status
=
"../../../app-resources/images/overview/"
;
if
(
region
===
'zh-CN'
)
{
status
+=
'zh-CN'
;
}
else
{
status
+=
'en-US'
;
}
// $log.debug("setLayoutStatusTitle");
// $scope.statusTitle = $translate.instant('ProjectStatusTitle');
switch
(
statusId
)
{
switch
(
statusId
)
{
case
constant
.
ProjectStatusEnum
.
UnStarted
:
case
constant
.
ProjectStatusEnum
.
UnStarted
:
status
+=
"/01.png"
;
//$translate.instant('ProjectStatusUnStarted');
status
+=
"/01.png"
;
//$translate.instant('ProjectStatusUnStarted');
...
@@ -173,222 +104,7 @@
...
@@ -173,222 +104,7 @@
return
status
;
return
status
;
}
}
function
initListGrid
()
{
var
listColumns
=
[
{
caption
:
$translate
.
instant
(
'SequenceNo'
),
dataField
:
"index"
,
width
:
100
,
},
//{ caption: $translate.instant('SapDate'), dataField: "sapDate", dataType: "date", format: "yyyy-MM-dd", },
//{ caption: $translate.instant('ProjectNameCol'), dataField: "name", },
{
caption
:
$translate
.
instant
(
'ProjectCompanyCol'
),
dataField
:
"organizationName"
,
},
{
caption
:
$translate
.
instant
(
'PIndustry'
),
dataField
:
"industryName"
,
},
//{
// caption: $translate.instant('SapProductType'), dataField: "sapProductType",
// calculateCellValue: function (rowData) {
// return rowData.sapProductType ? convertProductTypeToStr(rowData.sapProductType) : null;
// },
//},
{
caption
:
$translate
.
instant
(
'ProjectYearCol'
),
dataField
:
"year"
,
width
:
100
,
},
{
caption
:
$translate
.
instant
(
'ProjectServiceCol'
),
dataField
:
"serviceTypeName"
,
},
{
caption
:
$translate
.
instant
(
'ProjectStatus'
),
dataField
:
"projectStatusDisplay"
,
},
// {
// caption: $translate.instant('TotalBuildAmount'), dataField: "totalAmount",
// format: { type: 'fixedPoint', precision: 2 },
// },
];
$scope
.
deferStatus
=
true
;
$scope
.
gridListOptions
=
{
columns
:
listColumns
,
bindingOptions
:
{
"dataSource"
:
"queryResults"
},
loadPanel
:
{
enabled
:
true
},
//scrolling: {
// mode: "virtual"
//},
hoverStateEnabled
:
true
,
paging
:
{
pageSize
:
20
},
noDataText
:
$translate
.
instant
(
'AccountVoucher_DataGrid_NoDataText'
),
selection
:
{
mode
:
"single"
},
onRowClick
:
function
(
e
)
{
$scope
.
goToService
(
e
.
data
);
}
}
};
// TODO: REAL Translation for Industry and Region
// TODO: REAL Translation for Industry and Region
var
initIndustryName
=
function
(
industryID
,
industryName
)
{
var
industryKey
=
''
;
switch
(
industryID
)
{
case
'0'
:
industryKey
=
'GeneralIndustry'
;
break
;
case
'1'
:
industryKey
=
'IndustryIndustry'
;
break
;
case
'10'
:
industryKey
=
'AssetManagement'
;
break
;
case
'13'
:
industryKey
=
'MobileManufacturingIndustry'
;
break
;
case
'14'
:
industryKey
=
'FinancialServiceIndustry'
;
break
;
case
'20'
:
industryKey
=
'ManufacturingIndustry'
;
break
;
case
'23'
:
industryKey
=
'EstateIndustry'
;
break
;
default
:
break
;
}
if
(
!
_
.
isEmpty
(
industryKey
))
{
industryName
=
$translate
.
instant
(
industryKey
);
}
return
industryName
;
};
var
initRegionName
=
function
(
regionID
,
regionName
)
{
var
regionKey
=
''
;
switch
(
regionID
)
{
case
'310000'
:
case
'310100'
:
regionKey
=
'Shanghai'
;
break
;
case
'110000'
:
case
'110100'
:
regionKey
=
'Beijing'
;
break
;
case
'440300'
:
regionKey
=
'Shenzhen'
;
break
;
default
:
break
;
}
if
(
!
_
.
isEmpty
(
regionKey
))
{
regionName
=
$translate
.
instant
(
regionKey
);
}
return
regionName
;
};
$scope
.
initCitDataProcessMockData
=
function
()
{
var
task
=
function
(
id
,
status
,
name
,
tasklevel
,
parentId
,
hasButton
,
seqNo
)
{
this
.
id
=
id
;
this
.
name
=
_
.
isEmpty
(
name
)
?
$translate
.
instant
(
id
)
:
name
;
this
.
status
=
status
;
this
.
text
=
$translate
.
instant
(
status
);
this
.
tasklevel
=
tasklevel
;
this
.
parentId
=
parentId
;
this
.
hasButton
=
hasButton
;
this
.
ngClassCol
=
''
;
this
.
seqNo
=
seqNo
;
};
var
result
=
[];
result
.
push
(
new
task
(
1
,
constant
.
DataProccessStatus
.
ToUpdate
,
'DataProcessDataName_UpdateTB'
,
1
,
0
,
true
,
1
));
result
.
push
(
new
task
(
2
,
constant
.
DataProccessStatus
.
Unstarted
,
'DataProcessDataName_GenerateReport'
,
1
,
0
,
false
,
2
));
result
.
push
(
new
task
(
3
,
constant
.
DataProccessStatus
.
ToUpdate
,
'DataProcessDataName_UpdateReportConfig'
,
2
,
2
,
true
,
3
));
result
.
push
(
new
task
(
4
,
constant
.
DataProccessStatus
.
ToUpdate
,
'DataProcessDataName_FinanceReport'
,
2
,
2
,
true
,
4
));
result
.
push
(
new
task
(
5
,
constant
.
DataProccessStatus
.
Unstarted
,
'DataProcessDataName_CITQuarterly'
,
2
,
2
,
false
,
5
));
result
.
push
(
new
task
(
6
,
constant
.
DataProccessStatus
.
Completed
,
'DataProcessDataName_CITFirstQuarterly'
,
3
,
5
,
true
,
6
));
result
.
push
(
new
task
(
7
,
constant
.
DataProccessStatus
.
Unstarted
,
'DataProcessDataName_CITSecondQuarterly'
,
3
,
5
,
true
,
6
));
result
.
push
(
new
task
(
8
,
constant
.
DataProccessStatus
.
NoData
,
'DataProcessDataName_CITThirdQuarterly'
,
3
,
5
,
true
,
6
));
result
.
push
(
new
task
(
9
,
constant
.
DataProccessStatus
.
NoData
,
'DataProcessDataName_CITForthQuarterly'
,
3
,
5
,
true
,
6
));
result
.
push
(
new
task
(
10
,
constant
.
DataProccessStatus
.
Unstarted
,
'DataProcessDataName_YearWorkPaper'
,
2
,
2
,
true
,
7
));
result
.
push
(
new
task
(
11
,
constant
.
DataProccessStatus
.
Unstarted
,
'DataProcessDataName_AnnualSettlement'
,
2
,
2
,
true
,
8
));
result
.
push
(
new
task
(
12
,
constant
.
DataProccessStatus
.
Completed
,
'DataProcessDataName_ModelAnalysis'
,
1
,
0
,
true
,
9
));
return
result
;
}
$scope
.
initProjectList
=
function
(
orgID
,
serviceID
,
projectYear
)
{
$scope
.
currentView
=
'cardView'
;
if
(
!
orgID
)
{
orgID
=
''
;
}
if
(
!
serviceID
)
{
serviceID
=
''
;
}
if
(
!
projectYear
)
{
projectYear
=
null
;
}
projectService
.
getAllProjectList
(
orgID
,
serviceID
,
projectYear
).
success
(
function
(
projectListData
)
{
if
(
projectListData
&&
projectListData
.
length
>
0
)
{
var
index
=
1
;
$timeout
(
function
()
{
projectListData
.
forEach
(
function
(
p
)
{
//if (thisDataService.isHaveOrganizationPermission(p.organizationID)) {
if
(
PWC
.
isHavePermissionForOrg
(
p
.
organizationID
,
vatSessionService
.
userPermission
))
// && $scope.haveVatPermission)
{
$scope
.
allResults
.
push
({
index
:
index
++
,
id
:
p
.
id
,
name
:
p
.
name
,
year
:
p
.
year
,
code
:
p
.
code
,
clientCode
:
p
.
clientCode
,
isActive
:
p
.
isActive
,
createTime
:
p
.
createTime
,
updateTime
:
p
.
updateTime
,
regionID
:
p
.
regionID
,
industryID
:
p
.
industryID
,
ruleType
:
p
.
ruleType
,
organizationID
:
p
.
organizationID
,
dbName
:
p
.
dbName
,
serviceTypeID
:
p
.
serviceTypeID
,
region
:
p
.
region
,
haveCreateProject
:
p
.
haveCreateProject
,
yearDisplay
:
$scope
.
getYearDisplay
(
p
),
projectStatusDisplay
:
$scope
.
translateProjectStatus
(
p
.
haveCreateProject
),
serviceIcon
:
getServiceIcon
(
p
.
serviceTypeID
),
color
:
getColor
(
p
.
serviceTypeID
),
organizationName
:
p
.
organizationName
,
serviceTypeName
:
getServiceTypeName
(
p
.
serviceTypeID
),
industryName
:
initIndustryName
(
p
.
industryID
,
p
.
industryName
),
//p.industryName,
enterpriseAccountSetID
:
p
.
enterpriseAccountSetID
,
templateGroupID
:
p
.
templateGroupID
,
startPeriod
:
p
.
startPeriod
,
endPeriod
:
p
.
endPeriod
,
projectStatusList
:
p
.
projectStatusList
,
//Dictionary<int,int>类型,存放当前项目每个期间的状态的。第一个int:期间,第二个int:状态
importSubStatus
:
null
,
//当前项目,当前期间的子状态(是否导入Tb,序时账等等)
workflow
:
null
,
//当前项目workflow数据
regionName
:
initRegionName
(
p
.
regionID
,
p
.
regionName
),
//p.regionName,
finalStatus
:
setLayoutStatusTitle
(
null
)
//(p.projectStatusList !== null && p.projectStatusList[1] !== undefined) ? setLayoutStatusTitle(p.projectStatusList[1]) : $scope.translateProjectStatus(p.haveCreateProject)
,
taxAmount
:
0
,
prepadidTaxAmount
:
0
,
taxRate
:
0
,
periodDate
:
getPeriodDate
(
p
.
serviceTypeID
)
,
modelAbnormal
:
false
,
riskWarning
:
false
,
reportAbnormal
:
false
,
citDataProcessMockData
:
$scope
.
initCitDataProcessMockData
()
});
}
});
vatSessionService
.
projects
=
_
.
clone
(
$scope
.
allResults
);
$scope
.
queryResults
=
_
.
clone
(
$scope
.
allResults
);
$scope
.
gridListOptions
.
bindingOptions
=
{
"dataSource"
:
"queryResults"
};
//$scope.query();
goQueryState
();
},
300
);
}
else
{
vatSessionService
.
projects
=
[];
$scope
.
queryResults
=
[];
$scope
.
gridListOptions
.
bindingOptions
=
[];
}
});
};
$scope
.
smartSearch
=
function
(
isReset
)
{
$scope
.
smartSearch
=
function
(
isReset
)
{
if
(
isReset
)
{
if
(
isReset
)
{
...
@@ -400,93 +116,6 @@
...
@@ -400,93 +116,6 @@
}
}
};
};
$scope
.
translateProjectStatus
=
function
(
isCreate
)
{
if
(
isCreate
)
{
return
$translate
.
instant
(
'OnGoing'
);
}
else
{
return
$translate
.
instant
(
'NotBegin'
);
}
}
$scope
.
getYearDisplay
=
function
(
p
)
{
if
(
p
.
serviceTypeID
===
enums
.
serviceType
.
VAT
||
p
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
return
p
.
year
+
"."
+
p
.
startPeriod
+
"-"
+
p
.
year
+
"."
+
p
.
endPeriod
;
}
else
{
return
p
.
year
;
}
}
var
getColor
=
function
(
serType
)
{
var
color
=
"#e0301e"
;
switch
(
serType
)
{
case
enums
.
serviceType
.
VAT
:
color
=
"#e0301e"
;
break
;
case
enums
.
serviceType
.
FDD
:
color
=
"#d04a02"
;
break
;
case
enums
.
serviceType
.
CIT
:
color
=
"#a32020"
;
break
;
case
enums
.
serviceType
.
TaxAudit
:
color
=
"#602320"
;
break
;
case
enums
.
serviceType
.
RPT
:
color
=
"#d93954"
;
break
;
}
return
color
;
};
var
getServiceIcon
=
function
(
serType
)
{
var
type
=
"fa fa-diamond"
;
switch
(
serType
)
{
case
enums
.
serviceType
.
VAT
:
type
=
"fa fa-diamond"
;
break
;
case
enums
.
serviceType
.
FDD
:
type
=
"fa fa-credit-card"
;
break
;
case
enums
.
serviceType
.
CIT
:
type
=
"fa fa-building"
;
break
;
case
enums
.
serviceType
.
TaxAudit
:
type
=
"fa fa-money"
;
break
;
case
enums
.
serviceType
.
RPT
:
type
=
"fa fa-globe"
;
break
;
}
return
type
;
};
var
getServiceTypeName
=
function
(
serType
)
{
var
rtn
;
switch
(
serType
)
{
case
enums
.
serviceType
.
VAT
:
rtn
=
$translate
.
instant
(
"VATType"
);
break
;
case
enums
.
serviceType
.
CIT
:
rtn
=
$translate
.
instant
(
"CITType"
);
break
;
default
:
rtn
=
$translate
.
instant
(
"VATType"
);
break
;
}
return
rtn
;
};
var
getPeriodDate
=
function
(
serType
)
{
var
periodDate
;
if
(
serType
===
enums
.
serviceType
.
CIT
)
{
periodDate
=
$scope
.
currentSelectedYear
+
""
;
}
else
{
periodDate
=
$scope
.
currentSelectedYear
+
"."
+
$scope
.
currentSelectedMonth
;
}
return
periodDate
;
};
$scope
.
query
=
function
()
{
$scope
.
query
=
function
()
{
if
(
!
$scope
.
allResults
)
return
;
if
(
!
$scope
.
allResults
)
return
;
var
temp
=
$scope
.
allResults
;
var
temp
=
$scope
.
allResults
;
...
@@ -496,9 +125,6 @@
...
@@ -496,9 +125,6 @@
return
_
.
contains
(
_
.
values
(
$scope
.
checkedOrgs
),
i
.
organizationName
);
return
_
.
contains
(
_
.
values
(
$scope
.
checkedOrgs
),
i
.
organizationName
);
});
});
}
}
//if ($scope.checkedYears && $scope.checkedYears.length > 0) {
// temp = _.filter(temp, function (i) { return _.contains(_.pluck($scope.checkedYears, 'name'), i.year) })
//}
if
(
$scope
.
serviceTypeId
)
{
if
(
$scope
.
serviceTypeId
)
{
temp
=
_
.
filter
(
temp
,
function
(
i
)
{
temp
=
_
.
filter
(
temp
,
function
(
i
)
{
return
$scope
.
serviceTypeId
==
i
.
serviceTypeID
;
return
$scope
.
serviceTypeId
==
i
.
serviceTypeID
;
...
@@ -542,8 +168,8 @@
...
@@ -542,8 +168,8 @@
temp
.
forEach
(
function
(
project
)
{
temp
.
forEach
(
function
(
project
)
{
setWarningToTrue
=
false
;
setWarningToTrue
=
false
;
project
.
finalStatus
=
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
?
setLayoutStatusTitle
(
project
.
projectStatusList
)
:
setLayoutStatusTitleForCIT
(
project
.
projectStatusList
);
project
.
finalStatus
=
setLayoutStatusTitle
(
project
.
projectStatusList
);
project
.
periodDate
=
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
?
(
$scope
.
currentSelectedYear
+
"."
+
$scope
.
currentSelectedMonth
)
:
(
$scope
.
currentSelectedYear
+
""
)
;
project
.
periodDate
=
$scope
.
currentSelectedYear
+
"."
+
$scope
.
currentSelectedMonth
;
var
oneDemoData
=
_
.
find
(
demoData
,
function
(
one
)
{
return
one
.
id
===
project
.
id
});
var
oneDemoData
=
_
.
find
(
demoData
,
function
(
one
)
{
return
one
.
id
===
project
.
id
});
...
@@ -556,40 +182,6 @@
...
@@ -556,40 +182,6 @@
}
}
// START: For --->> Edmond Meng, CIT Demo
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
&&
project
.
id
===
"8d8b13e7-07e1-4d84-8984-7b86e8ec6137"
&&
project
.
code
===
"Demo111"
&&
project
.
periodDate
===
'2017.1'
)
{
project
.
taxAmount
=
"38669.27"
;
project
.
prepadidTaxAmount
=
"53866925.13"
;
project
.
taxRate
=
15
;
project
.
hasWarning
=
true
;
}
// END: For --->> Edmond Meng, CIT Demo
}
else
{
if
(
project
.
projectStatusList
!==
null
&&
(
Object
.
keys
(
project
.
projectStatusList
).
length
>
0
&&
project
.
projectStatusList
[
Object
.
keys
(
project
.
projectStatusList
)[
Object
.
keys
(
project
.
projectStatusList
).
length
-
1
]]
!==
10
)
&&
oneDemoData
!==
undefined
)
{
project
.
taxAmount
=
oneDemoData
.
taxAmount
;
project
.
prepadidTaxAmount
=
oneDemoData
.
prepadidTaxAmount
;
project
.
taxRate
=
oneDemoData
.
taxRate
;
project
.
hasWarning
=
oneDemoData
.
hasWarning
;
}
// START: For --->> Edmond Meng, CIT Demo
if
(
project
.
serviceTypeID
!==
enums
.
serviceType
.
VAT
&&
project
.
id
===
"8d8b13e7-07e1-4d84-8984-7b86e8ec6137"
&&
project
.
code
===
"Demo111"
)
{
var
status
=
"../../../app-resources/images/overview/"
;
if
(
region
===
'zh-CN'
)
{
status
+=
'zh-CN'
;
}
else
{
status
+=
'en-US'
;
}
status
+=
'/04.png'
;
project
.
finalStatus
=
status
;
project
.
taxAmount
=
"38669.27"
;
project
.
prepadidTaxAmount
=
"53866925.13"
;
project
.
taxRate
=
15
;
project
.
hasWarning
=
true
;
}
// END: For --->> Edmond Meng, CIT Demo
}
}
counter
++
;
counter
++
;
...
@@ -597,7 +189,6 @@
...
@@ -597,7 +189,6 @@
$scope
.
queryResults
=
temp
;
$scope
.
queryResults
=
temp
;
$scope
.
gridListOptions
.
data
=
$scope
.
queryResults
;
$scope
.
projectMsg
=
$translate
.
instant
(
'ProjectResultMsg'
).
formatObj
({
"ProjectNum"
:
$scope
.
queryResults
.
length
});
$scope
.
projectMsg
=
$translate
.
instant
(
'ProjectResultMsg'
).
formatObj
({
"ProjectNum"
:
$scope
.
queryResults
.
length
});
var
notBeginTemp
=
_
.
filter
(
temp
,
function
(
i
)
{
var
notBeginTemp
=
_
.
filter
(
temp
,
function
(
i
)
{
...
@@ -674,333 +265,7 @@
...
@@ -674,333 +265,7 @@
return
demoData
;
return
demoData
;
};
};
$scope
.
fileSort
=
function
(
sortstr
)
{
if
(
$scope
.
queryResults
.
length
>
0
)
{
if
(
sortstr
==
'year'
)
{
if
(
$scope
.
orderYear
)
{
$scope
.
orderYear
=
false
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'year'
);
$scope
.
queryResults
=
list
;
}
else
{
$scope
.
orderYear
=
true
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'year'
);
$scope
.
queryResults
=
list
.
reverse
();
}
}
if
(
sortstr
==
'name'
)
{
if
(
$scope
.
orderName
)
{
$scope
.
orderName
=
false
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'name'
);
$scope
.
queryResults
=
list
;
}
else
{
$scope
.
orderName
=
true
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'name'
);
$scope
.
queryResults
=
list
.
reverse
();
}
}
if
(
sortstr
==
'status'
)
{
if
(
$scope
.
orderStatus
)
{
$scope
.
orderStatus
=
false
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'haveCreateProject'
);
$scope
.
queryResults
=
list
;
}
else
{
$scope
.
orderStatus
=
true
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'haveCreateProject'
);
$scope
.
queryResults
=
list
.
reverse
();
}
}
if
(
sortstr
==
'type'
)
{
if
(
$scope
.
orderType
)
{
$scope
.
orderType
=
false
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'serviceTypeID'
);
$scope
.
queryResults
=
list
;
}
else
{
$scope
.
orderType
=
true
;
var
list
=
_
.
sortBy
(
$scope
.
queryResults
,
'serviceTypeID'
);
$scope
.
queryResults
=
list
.
reverse
();
}
}
}
}
$scope
.
goToService
=
function
(
project
)
{
if
(
!
project
.
clicked
)
{
project
.
clicked
=
true
;
$log
.
debug
(
'goToService()...'
);
serviceLogService
.
addEnterProjectLog
(
loginContext
.
displayUserName
,
'Enter project (id: '
+
project
.
id
+
', serviceType: '
+
project
.
serviceTypeID
+
')'
).
then
(
function
()
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
$state
.
go
(
'assetsManage.importData.productItem'
);
assetsManageSessionService
.
product
.
fSetCode
=
project
.
fSetCode
;
assetsManageSessionService
.
product
.
productIDs
=
project
.
productIDs
;
assetsManageSessionService
.
project
.
organizationName
=
project
.
fSetName
;
assetsManageSessionService
.
project
.
id
=
project
.
id
;
assetsManageSessionService
.
project
.
serviceTypeID
=
project
.
serviceTypeID
;
//window.location.href = '/#/assetsManage/importData/productItem';
}
else
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
{
if
(
project
.
haveCreateProject
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
vatSessionService
.
month
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
vatSessionService
.
month
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
id
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
id
,
vatSessionService
.
month
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
else
{
// project.serviceTypeID === enums.serviceType.CIT
if
(
project
.
haveCreateProject
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
id
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
id
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
id
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
id
,
enums
.
wholeYearPeriod
.
import
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
$timeout
(
function
()
{
project
.
clicked
=
false
;
},
1000
);
});
}
};
$scope
.
toggleExpand
=
function
(
item
)
{
item
.
expand
=
!
item
.
expand
;
};
var
goRightPath
=
function
(
project
)
{
// TODO: CIT 权限
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
$state
.
go
(
'cit.importData.balanceSheet'
);
}
else
{
var
menuList
=
[
// constant.vatPermission.dataImport.balanceSheet.queryCode,
// constant.vatPermission.dataImport.journalEntry.queryCode,
// constant.vatPermission.dataImport.erpImport.queryCode,
// constant.vatPermission.dataImport.outputInvoice.queryCode,
// constant.vatPermission.dataImport.inputInvoice.queryCode,
// constant.vatPermission.dataImport.customInvoice.queryCode,
// constant.vatPermission.dataImport.voucherMapping.queryCode,
// constant.vatPermission.dataImport.invoiceMapping.queryCode,
// constant.vatPermission.dataImport.auditAdjust.queryCode,
// constant.vatPermission.dataPreview.balanceSheet.queryCode,
// constant.vatPermission.dataPreview.accountVoucher.queryCode,
// constant.vatPermission.dataPreview.customInvoice.queryCode,
constant
.
vatPermission
.
dataPreview
.
outputInvoice
.
queryCode
,
constant
.
vatPermission
.
dataPreview
.
inputInvoice
.
queryCode
,
// constant.vatPermission.dataManage.accountMappingCode,
// constant.vatPermission.dataManage.goodsMappingCode,
constant
.
vatPermission
.
dataManage
.
caculateDataCode
,
// constant.vatPermission.dataManage.unbilledInvoiceCode,
constant
.
vatPermission
.
reportView
.
bsplCode
,
constant
.
vatPermission
.
reportView
.
taxReturnCode
,
constant
.
vatPermission
.
dataAnalysis
.
modelAnalysisCode
,
constant
.
vatPermission
.
dataAnalysis
.
dashboard
.
dashboardCode
,
//constant.vatPermission.dataAnalysis.vatTaxDifferenceCode,
];
$scope
.
$root
.
checkUserOrganizationPermissionList
(
menuList
).
success
(
function
(
data
)
{
if
(
data
)
{
// if (data[constant.vatPermission.dataImport.balanceSheet.queryCode]) {
// $state.go('vat.importData.balanceSheet');
// } else if (data[constant.vatPermission.dataImport.journalEntry.queryCode]) {
// $state.go('vat.importData.journalEntry');
// } else if (data[constant.vatPermission.dataImport.erpImport.queryCode]) {
// $state.go('vat.importData.erpData');
// } else if (data[constant.vatPermission.dataImport.auditAdjust.queryCode]) {
// $state.go('vat.importData.auditAdjust');
// } else if (data[constant.vatPermission.dataImport.outputInvoice.queryCode]) {
// $state.go('vat.importData.outputInvoice');
// } else if (data[constant.vatPermission.dataImport.inputInvoice.queryCode]) {
// $state.go('vat.importData.inputInvoice');
// } else if (data[constant.vatPermission.dataImport.customInvoice.queryCode]) {
// $state.go('vat.importData.customInvoice');
// } else if (data[constant.vatPermission.dataImport.voucherMapping.queryCode]) {
// $state.go('vat.importData.voucherMapping');
// } else if (data[constant.vatPermission.dataImport.invoiceMapping.queryCode]) {./
// $state.go('vat.importData.invoiceMapping');
// } else
// if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
// $state.go('vat.previewData.balanceSheet');
// } else if (data[constant.vatPermission.dataPreview.accountVoucher.queryCode]) {
// $state.go('vat.previewData.accountVoucher');
// } else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
inputInvoice
.
queryCode
])
{
$state
.
go
(
'vat.previewData.inputInvoice'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
outputInvoice
.
queryCode
])
{
$state
.
go
(
'vat.previewData.outputInvoice'
);
}
// else if (data[constant.vatPermission.dataPreview.customInvoice.queryCode]) {
// $state.go('vat.previewData.customInvoice');
// }
// else if (data[constant.vatPermission.dataManage.accountMappingCode]) {
// $state.go('vat.reductionData.accountMapping');
// } else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
// $state.go('vat.reductionData.goodsMapping');
// }
else
if
(
data
[
constant
.
vatPermission
.
dataManage
.
caculateDataCode
])
{
$state
.
go
(
'vat.reductionData.caculateData'
);
}
/*else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
$state.go('vat.reductionData.unbilledInvoice');
}*/
else
if
(
data
[
constant
.
vatPermission
.
reportView
.
bsplCode
]
||
data
[
constant
.
vatPermission
.
reportView
.
taxReturnCode
])
{
$state
.
go
(
'vat.generateReport'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataAnalysis
.
modelAnalysisCode
])
{
$state
.
go
(
'vat.analyzeLayout.analyzeReport'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataAnalysis
.
dashboard
.
dashboardCode
])
{
$state
.
go
(
'analyzeOrganizeDashboard'
);
}
//else if (data[constant.vatPermission.dataAnalysis.vatTaxDifferenceCode]) {
// $state.go('vat.analyzeLayout.vatTaxDifference');
//}
}
});
}
}
$scope
.
toggleItemSub
=
function
(
item
,
parent
)
{
// orgDisplay.showBusy();
if
(
item
.
isChecked
)
{
if
(
!
item
.
dimensionId
)
{
$scope
.
checkedOrgs
[
item
.
id
]
=
item
.
name
;
}
else
{
item
.
subOrgs
.
forEach
(
function
(
org
)
{
$scope
.
checkedOrgs
[
org
.
id
]
=
org
.
name
;
org
.
isChecked
=
true
;
});
}
}
else
{
if
(
!
item
.
dimensionId
)
{
delete
$scope
.
checkedOrgs
[
item
.
id
];
}
else
{
item
.
subOrgs
.
forEach
(
function
(
org
)
{
org
.
isChecked
=
false
;
delete
$scope
.
checkedOrgs
[
org
.
id
];
});
}
}
$scope
.
checkedIds
=
_
.
keys
(
$scope
.
checkedOrgs
);
vatSessionService
.
queryDto
.
checkedOrgs
=
$scope
.
checkedOrgs
;
if
(
$scope
.
serviceTypeId
!==
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
query
();
}
// orgDisplay.hideBusy();
};
$scope
.
toggleItemSubSpan
=
function
(
item
)
{
if
(
item
.
isChecked
)
{
item
.
isChecked
=
false
;
}
else
{
item
.
isChecked
=
true
;
}
$scope
.
toggleItemSub
(
item
,
null
);
};
$scope
.
toggleView
=
function
(
clickedView
)
{
if
(
clickedView
==
$scope
.
currentView
)
return
;
$scope
.
currentView
=
clickedView
;
};
var
thisDataService
=
{
var
thisDataService
=
{
isHaveOrganizationPermission
:
function
(
orgID
)
{
isHaveOrganizationPermission
:
function
(
orgID
)
{
...
@@ -1044,11 +309,7 @@
...
@@ -1044,11 +309,7 @@
$scope
.
viewMode
=
1
;
$scope
.
viewMode
=
1
;
$scope
.
dateFormat
=
$translate
.
instant
(
' yyyy 年 mm 月'
);
$scope
.
dateFormat
=
$translate
.
instant
(
' yyyy 年 mm 月'
);
}
}
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
systemTitle
=
$translate
.
instant
(
'AssetTitle'
);
$scope
.
viewMode
=
1
;
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4YearMonth'
);
}
var
ele1
=
$
(
"#overviewDatepicker"
);
var
ele1
=
$
(
"#overviewDatepicker"
);
ele1
.
datepicker
({
ele1
.
datepicker
({
...
@@ -1102,9 +363,7 @@
...
@@ -1102,9 +363,7 @@
$scope
.
conditionChange
=
!
$scope
.
conditionChange
;
$scope
.
conditionChange
=
!
$scope
.
conditionChange
;
});
});
}
}
if
(
$scope
.
serviceTypeId
!==
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
query
();
}
}
}
};
};
...
@@ -1171,13 +430,7 @@
...
@@ -1171,13 +430,7 @@
var
result
=
[];
var
result
=
[];
//如果是资产管理,则只获取资产管理类型的组织机构
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
AssetsManage
)
{
result
=
_
.
filter
(
data
,
function
(
item
)
{
return
item
.
industryID
==
'10'
;
});
}
else
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
var
item
=
data
[
i
];
var
item
=
data
[
i
];
...
@@ -1185,7 +438,6 @@
...
@@ -1185,7 +438,6 @@
result
.
push
(
item
);
result
.
push
(
item
);
}
}
}
}
}
orgDisplay
.
orgList
=
result
;
orgDisplay
.
orgList
=
result
;
...
@@ -1369,13 +621,6 @@
...
@@ -1369,13 +621,6 @@
}
}
}
}
var
goQueryState
=
function
()
{
$scope
.
searchKeyword
=
vatSessionService
.
queryDto
.
searchKeyword
;
$scope
.
checkedOrgs
=
vatSessionService
.
queryDto
.
checkedOrgs
;
if
(
$scope
.
serviceTypeId
!==
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
query
();
}
};
//function to get random number upto m
//function to get random number upto m
function
randomXToY
(
minVal
,
maxVal
,
floatVal
)
{
function
randomXToY
(
minVal
,
maxVal
,
floatVal
)
{
...
@@ -1383,338 +628,8 @@
...
@@ -1383,338 +628,8 @@
return
typeof
floatVal
==
'undefined'
?
Math
.
round
(
randVal
)
:
randVal
.
toFixed
(
floatVal
);
return
typeof
floatVal
==
'undefined'
?
Math
.
round
(
randVal
)
:
randVal
.
toFixed
(
floatVal
);
}
}
/**********************************资产配置*************************************/
//初始化产品列表
function
initProductListGrid
()
{
var
listColumns
=
[
{
caption
:
'年份'
,
dataField
:
'fYear'
},
{
caption
:
'产品标识'
,
dataField
:
"fSetID"
},
{
caption
:
'产品编号'
,
dataField
:
"fSetCode"
},
{
caption
:
'产品描述(名称)'
,
dataField
:
"fSetName"
},
{
caption
:
'财务主管'
,
dataField
:
"fManager"
},
{
caption
:
'启用年份'
,
dataField
:
"fStartYear"
},
{
caption
:
'启用月份'
,
dataField
:
"fStartMonth"
},
{
caption
:
'所属机构'
,
dataField
:
"accountDepartment"
}
];
$scope
.
gridListOptions
=
{
showBorders
:
true
,
columns
:
listColumns
,
bindingOptions
:
{
"dataSource"
:
"productListQueryResult"
},
loadPanel
:
{
enabled
:
true
},
hoverStateEnabled
:
true
,
paging
:
{
pageSize
:
20
},
noDataText
:
$translate
.
instant
(
'AccountVoucher_DataGrid_NoDataText'
),
selection
:
{
mode
:
"single"
},
onRowClick
:
function
(
e
)
{
$scope
.
goToService
(
e
.
data
);
},
onContentReady
:
function
(
e
)
{
$scope
.
productListGridInstance
=
e
.
component
;
}
}
};
$scope
.
initProductList
=
function
()
{
productService
.
getProductList
().
success
(
function
(
data
)
{
$scope
.
productListQueryResult
=
data
;
$scope
.
totolCount
=
data
.
length
;
var
index
=
1
;
data
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
serviceTypeID
=
enums
.
serviceType
.
AssetsManage
;
});
});
};
//重新设置产品列表grid
$scope
.
updateProductList
=
function
()
{
$scope
.
updateStatus
=
true
;
};
$scope
.
addNewProduct
=
function
()
{
$scope
.
modalService
.
newProductModal
.
open
();
};
$scope
.
product
=
{
fYear
:
""
,
fSetId
:
""
,
fSetName
:
""
,
fManager
:
""
};
$scope
.
modalService
=
{
newProductModal
:
{
open
:
function
()
{
$scope
.
product
=
{
fYear
:
""
,
fSetId
:
""
,
fSetName
:
""
,
fManager
:
""
};
var
treeView
;
var
syncTreeViewSelection
=
function
(
treeView
)
{
if
(
!
treeView
)
return
;
if
(
!
$scope
.
treeBoxValue
)
{
treeView
.
unselectAll
();
return
;
}
$scope
.
treeBoxValue
.
forEach
(
function
(
key
)
{
treeView
.
selectItem
(
key
);
});
};
$scope
.
treeBoxValue
=
[
""
];
$scope
.
treeDataSource
=
[];
$scope
.
treeBoxNameValue
=
[
""
];
productService
.
getProductList
().
success
(
function
(
data
)
{
data
.
forEach
(
function
(
v
)
{
if
(
!
v
.
productIDs
)
{
var
item
=
new
Object
;
item
.
name
=
v
.
fSetName
;
item
.
content
=
{
id
:
v
.
fSetCode
,
guid
:
v
.
id
};
$scope
.
treeDataSource
.
push
(
item
);
}
});
});
$scope
.
treeBoxOptions
=
{
bindingOptions
:
{
value
:
'treeBoxNameValue'
},
valueExpr
:
"ID"
,
displayExpr
:
"name"
,
placeholder
:
"选择..."
,
showClearButton
:
false
,
dataSource
:
$scope
.
treeDataSource
,
onValueChanged
:
function
()
{
syncTreeViewSelection
(
treeView
);
},
treeView
:
{
dataSource
:
$scope
.
treeDataSource
,
dataStructure
:
"plain"
,
keyExpr
:
"ID"
,
parentIdExpr
:
"categoryId"
,
displayExpr
:
"name"
,
selectByClick
:
true
,
selectNodesRecursive
:
false
,
showCheckBoxesMode
:
"normal"
,
bindingOptions
:
{
selectionMode
:
"selectionMode"
},
onContentReady
:
function
(
e
)
{
treeView
=
e
.
component
;
syncTreeViewSelection
(
treeView
);
},
onItemSelectionChanged
:
function
(
args
)
{
var
keyValue
=
args
.
component
.
getSelectedNodesKeys
();
if
(
keyValue
.
length
===
0
)
{
keyValue
=
[
""
];
}
var
value
=
[
""
];
var
nodes
=
args
.
component
.
getNodes
();
var
newValue
=
[
""
];
var
nameValue
=
[
""
];
keyValue
.
forEach
(
function
(
v
)
{
var
findResult
=
_
.
find
(
nodes
,
function
(
node
)
{
return
node
.
key
===
v
;
});
if
(
findResult
)
{
newValue
.
push
(
findResult
.
itemData
.
content
.
guid
);
value
.
push
(
findResult
.
itemData
.
content
.
id
);
nameValue
.
push
(
findResult
.
itemData
.
name
);
}
});
$scope
.
treeBoxValue
=
keyValue
;
$scope
.
newNewtreeBoxValue
=
value
;
$scope
.
newTreeBoxValue
=
newValue
;
var
tempArray
=
nameValue
.
length
===
1
?
nameValue
:
nameValue
.
shift
();
$scope
.
treeBoxNameValue
=
nameValue
;
}
}
};
$timeout
(
function
()
{
var
ele2
=
$
(
"#productStartDate"
);
ele2
.
datepicker
({
startDate
:
$scope
.
startDate
,
endDate
:
$scope
.
endDate
,
language
:
region
,
viewMode
:
$scope
.
viewMode
,
minViewMode
:
$scope
.
viewMode
,
autoclose
:
true
,
//选中之后自动隐藏日期选择框
clearBtn
:
true
,
//清除按钮
todayBtn
:
false
,
//今日按钮
format
:
$scope
.
dateFormat
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
e
)
{
$scope
.
changeStartDate
(
e
);
});
ele2
.
datepicker
(
"setDate"
,
$scope
.
selectedStartDate
);
},
100
);
$scope
.
newProductModalInstance
=
ackUibModal
(
$scope
,
'addNewProduct.html'
,
'addNewProduct'
,
'.app-overview '
,
'static'
)
$scope
.
newProductModalInstance
.
open
();
},
save
:
function
(
result
)
{
$scope
.
saveProduct
();
$scope
.
newProductModalInstance
.
close
();
},
cancel
:
function
()
{
$scope
.
newProductModalInstance
.
cancel
();
}
}
};
$scope
.
changeWithZeroNumber
=
function
(
sourceNumber
)
{
if
(
sourceNumber
.
length
>
1
)
{
if
(
sourceNumber
<
10
)
{
return
sourceNumber
.
replace
(
/0/g
,
''
);
}
else
{
return
sourceNumber
;
}
}
else
{
return
sourceNumber
;
}
};
$scope
.
saveProduct
=
function
()
{
//$scope.product.fSetCode = $scope.treeBoxValue.toString();
$scope
.
product
.
fStartYear
=
$scope
.
currentSelectedStartYear
;
$scope
.
product
.
fStartMonth
=
$scope
.
changeWithZeroNumber
(
$scope
.
currentSelectedStartMonth
);
$scope
.
product
.
productIDs
=
$scope
.
newTreeBoxValue
.
toString
();
//调用service插入数据库
productService
.
addNewProduct
(
$scope
.
product
).
success
(
function
()
{
$scope
.
initProductList
();
})
};
var
successCount
=
0
;
var
doUploadProductFileName
=
function
(
file
)
{
if
(
file
)
{
var
arr
=
file
.
name
.
split
(
'.'
);
if
(
arr
[
arr
.
length
-
1
]
!==
'xls'
&&
arr
[
arr
.
length
-
1
]
!==
'xlsx'
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'ImportFileInvalidType'
));
return
;
}
//$scope.initJournalEntryList = [];
//$scope.gridOptionsJournalEntry.data = [];
successCount
=
0
;
if
(
!
file
.
$error
)
{
var
tempFileName
=
PWC
.
newGuid
()
+
'.dat'
;
Upload
.
upload
({
url
:
uploadUrl
,
data
:
{
filename
:
file
.
name
,
tempFileName
:
tempFileName
,
file
:
file
},
resumeChunkSize
:
resumable
?
$scope
.
chunkSize
:
null
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
Authorization
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
()
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
uploadJournalEntrySuccess
);
}
}
};
//上传成功后执行函数
var
uploadJournalEntrySuccess
=
function
(
resp
)
{
console
.
log
(
resp
);
successCount
++
;
if
(
successCount
===
1
)
{
$scope
.
tempFileName
=
resp
.
data
;
//初始化到excel文件的第一个sheet
getUploadFileContent
(
0
);
}
};
var
getUploadFileContent
=
function
()
{
if
(
_
.
isString
(
$scope
.
tempFileName
))
{
productService
.
getFileContent
(
$scope
.
tempFileName
,
0
,
0
).
success
(
function
(
data
)
{
//将导入文件的sheet赋值到数组
$scope
.
sheetData
=
data
;
//加入index序号
var
index
=
1
;
data
.
dataList
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
});
//先将完整数据深拷贝存放到变量中
$scope
.
sheetData
.
excelSheetAllData
=
angular
.
copy
(
data
.
dataList
);
var
number
=
1
;
$scope
.
sheetData
.
excelSheetAllData
.
forEach
(
function
(
v
)
{
v
.
index
=
number
++
;
});
//将导入文件的sheet赋值到数组
//只赋值data的前500条到sheetData的dataList中,防止数据量太大渲染的时候卡死浏览器
$scope
.
sheetData
.
dataList
=
data
.
dataList
.
slice
(
0
,
500
);
if
(
data
&
data
.
result
===
false
)
{
SweetAlert
.
warning
(
data
.
resultMsg
);
return
;
}
//upload data to DB
saveProductDataToDatabase
();
});
}
};
var
saveProductDataToDatabase
=
function
()
{
//将需要导入的数据组装到list中
var
importProductList
=
[];
var
startRowNum
=
3
;
for
(
var
i
=
startRowNum
-
1
;
i
<
$scope
.
sheetData
.
dataList
.
length
;
i
++
)
{
var
productInfo
=
{
'Index'
:
$scope
.
sheetData
.
dataList
[
i
].
index
,
'FYear'
:
$scope
.
sheetData
.
dataList
[
i
][
0
],
'FSETID'
:
$scope
.
sheetData
.
dataList
[
i
][
1
],
'FSETCODE'
:
$scope
.
sheetData
.
dataList
[
i
][
2
],
'FSETNAME'
:
$scope
.
sheetData
.
dataList
[
i
][
3
],
'FMANAGER'
:
$scope
.
sheetData
.
dataList
[
i
][
4
],
'FSTARTYEAR'
:
$scope
.
sheetData
.
dataList
[
i
][
5
],
'FSTARTMONTH'
:
$scope
.
changeWithZeroNumber
(
$scope
.
sheetData
.
dataList
[
i
][
6
]),
'FMONTH'
:
$scope
.
changeWithZeroNumber
(
$scope
.
sheetData
.
dataList
[
i
][
7
]),
'ACCOUNTDEPARTMENT'
:
$scope
.
sheetData
.
dataList
[
i
][
8
]
};
importProductList
.
push
(
productInfo
);
}
productService
.
importProductData
(
importProductList
).
success
(
function
()
{
//logDto.UpdateState = $translate.instant('ImportSuccess');
//vatOperationLogService.addOperationLog(logDto);
//vatCommonService.importSetProjectStatus(projectDbName, curPeriod
// , constant.DictionaryDictKey.WFImportJournalEntry
// , enums.FinishStatusEnum.Finished);
//vatCommonService.setImportSubStatus(enums.VatImportSubStatus.isEntryImport, true);
//$log.debug("import entry importJournalEntryData: " + vatSessionService.project.importSubStatus.isEntryImport);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
$scope
.
initProductList
();
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
//logDto.UpdateState = $translate.instant('ImportFail');
//vatOperationLogService.addOperationLog(logDto);
});
};
/**********************************资产配置*************************************/
(
function
initialize
()
{
(
function
initialize
()
{
if
(
$scope
.
serviceTypeId
!==
enums
.
serviceType
.
AssetsManage
)
{
initListGrid
();
}
initDatePickers
();
initDatePickers
();
$scope
.
updateStatus
=
false
;
$scope
.
updateStatus
=
false
;
...
@@ -1728,15 +643,6 @@
...
@@ -1728,15 +643,6 @@
});
});
vatSessionService
.
userPermission
=
userPermission
;
vatSessionService
.
userPermission
=
userPermission
;
orgDisplay
.
main
();
orgDisplay
.
main
();
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
projectMsg
=
$translate
.
instant
(
'ProjectResultMsg'
).
formatObj
({
"ProjectNum"
:
66
});
initProductListGrid
();
$scope
.
initProductList
();
$scope
.
toggleView
(
'listView'
);
}
else
{
$scope
.
initProjectList
();
}
});
});
$scope
.
$watch
(
'productFileName'
,
function
(
newValue
,
oldValue
)
{
$scope
.
$watch
(
'productFileName'
,
function
(
newValue
,
oldValue
)
{
...
@@ -1747,66 +653,3 @@
...
@@ -1747,66 +653,3 @@
})();
})();
}
}
]);
]);
frameworkModule
.
factory
(
'assetsManageSessionService'
,
[
'$log'
,
function
(
$log
)
{
'use strict'
;
$log
.
debug
(
'assetsManageSessionService.ctor()...'
);
var
date
=
new
Date
();
var
month
=
date
.
getMonth
();
var
projectyear
=
2017
;
if
(
month
<=
0
)
{
month
=
1
;
}
var
logUser
=
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
var
reset
=
function
()
{
var
date
=
new
Date
();
var
m
=
date
.
getMonth
();
if
(
m
<=
0
)
{
m
=
1
;
}
this
.
month
=
m
;
};
return
{
month
:
6
,
year
:
projectyear
,
project
:
{
year
:
projectyear
,
projectStatusList
:
[
30
,
30
,
30
,
30
,
30
,
30
,
30
,
30
,
30
,
30
,
30
],
importSubStatus
:
1
,
dbName
:
'AssetsManage'
,
id
:
'99999'
,
name
:
'阳光证券有限公司增值税申报项目'
,
organizationName
:
'阳光证券有限公司增值税申报项目'
},
projects
:
[],
dataChanged
:
false
,
logUser
:
logUser
,
reset
:
reset
,
product
:
{
fSetCode
:
'11111111111111111111'
,
productIDs
:
'xxxxxxxxxxxxxxxxxxxx'
}
}
}]);
frameworkModule
.
factory
(
"demoDataService"
,
function
(
$window
,
$rootScope
)
{
'use strict'
;
return
{
setData
:
function
(
val
)
{
$window
.
localStorage
&&
$window
.
localStorage
.
setItem
(
'overview-demo-data'
,
val
);
return
this
;
},
getData
:
function
()
{
return
$window
.
localStorage
&&
$window
.
localStorage
.
getItem
(
'overview-demo-data'
);
}
};
});
atms-web/src/main/webapp/app/framework/app-approve/app-approve.html
View file @
6c96d113
...
@@ -21,7 +21,104 @@
...
@@ -21,7 +21,104 @@
</perfect-scrollbar>
</perfect-scrollbar>
</div>
</div>
<div
class=
"app-overview-right"
>
<div
class=
"app-overview-right"
>
<div
class=
"head-row"
>
报表审批
</div>
<div
class=
"row"
style=
"margin:20px; display:none;"
>
<div>
审批列表
</div>
<div
class=
"col-lg-2 col-md-2 col-sm-2"
>
<span
class=
"textLabelHeader"
translate=
"TotalProjectRecords"
></span>
<span
class=
"textLabelHeader"
>
{{queryResults.length}}
</span>
<span
translate=
"NumberOfTaskes"
></span>
</div>
<div
class=
"col-lg-8 col-md-8 col-sm-8"
>
<span
translate=
"CurrentlyInProgress"
class=
""
>
</span>
<i
class=
"badge progressNumberBadges marginRight10"
>
3
</i>
<span
translate=
"AlreadyCompleted"
class=
""
>
</span>
<i
class=
"badge progressNumberBadges marginRight10"
>
4
</i>
<span
translate=
"NotYetStart"
class=
""
>
</span>
<i
class=
"badge progressNumberBadges marginRight10 "
>
5
</i>
</div>
<div
class=
"col-lg-2 col-md-2 col-sm-2"
>
<div
id=
"app-workflow-action-panel"
class=
"pull-right"
>
<i
class=
"fa fa-calendar red-color"
style=
"font-size:20px;"
></i>
<input
type=
"text"
class=
"datepicker"
style=
"border-width: 0; outline: none; width: 100px; cursor: pointer; z-index: 1000"
readonly=
"readonly"
/>
<i
class=
"fa fa-caret-down red-color"
style=
"font-size:10px;"
></i>
</div>
</div>
</div>
<div
style=
"display:none;"
>
<span
translate=
"AssignmentsList"
class=
"textLabelHeader"
></span>
<hr
/>
</div>
<div
class=
"new-right-header"
>
<div
class=
"head-row"
>
<span
class=
"total-projects"
>
报表审批
</span>
</div>
<div
class=
"project-staus"
>
<span
style=
"padding-right: 10px;"
class=
"result-style"
>
{{projectMsg}}
</span>
<span
style=
"padding-right:10px;"
>
提审中
</span><span
class=
"num-style"
>
{{ongoingNum}}
</span>
<span
style=
"padding-right:10px;padding-left:20px;"
>
通过
</span><span
class=
"num-style"
>
{{notBeginNum}}
</span>
<span
style=
"padding-right:10px;padding-left:20px;"
>
未通过
</span><span
class=
"num-style"
>
{{completedNum}}
</span>
<span
style=
"padding-right:10px;padding-left:20px;"
>
作废
</span><span
class=
"num-style"
>
{{completedNum}}
</span>
</div>
<div
class=
"task-list"
>
<span
class=
"taskMsg"
ng-show=
"serviceTypeId !=='12'"
>
审批列表
</span>
</div>
</div>
<div
class=
"new-right-body"
>
<div
class=
"right-header"
>
<div
class=
"col-lg-3 col-md-3"
style=
"padding-left:20px;"
>
<div
class=
"search-container"
>
<input
id=
"txtSmartSearch"
class=
"search-input"
type=
"text"
value=
""
placeholder=
"提审人"
ng-model=
"searchKeyword"
ng-change=
"smartSearch(false)"
/><span
ng-class=
"(searchKeyword!==undefined && searchKeyword.length>0)? 'glyphicon glyphicon-remove input-group-addon search-icon':'glyphicon glyphicon-search input-group-addon search-icon'"
search
ng-click=
"smartSearch(true)"
></span>
</div>
</div>
<div
class=
"overview-picker"
>
<input
type=
"text"
id=
"overviewDatepicker"
class=
"datepicker vat-subheader"
style=
"width:120px;"
readonly=
"readonly"
/>
<i
class=
"fa fa-calendar vat-subheader red-color"
style=
"width:20px;"
></i>
</div>
<span
class=
"clear"
></span>
</div>
</div>
</div>
</div>
<!--<div class="app-overview-right">-->
<!--<div class="vat-preview-input-invoice" id="mainPreviewDiv">-->
<!--<div class="top-area-wrapper">-->
<!--<button class="filter-button"-->
<!--atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"-->
<!--popover-container="body" popover-auto-hide="true" data-overwrite="true"-->
<!--use-optimized-placement-algorithm="true"-->
<!--data-placement="bottom"-->
<!--data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">-->
<!--<i class="fa fa-filter" aria-hidden="true"></i>-->
<!--</button>-->
<!--<span translate="IncomeInvoiceTitle" class="text-bold"></span> | <span class="text-bold" translate="InvoiceQJ"></span>:-->
<!--<input type="text" class="form-control input-width-middle" style="position: relative; top: -33px; left: 160px;" id="input-invoice-period-picker" />-->
<!--<span ng-click="downloadInputInvoice()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>-->
<!--</div>-->
<!--<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">-->
<!--<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:-->
<!--<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow">-->
<!--<span title="{{criteria.fullName}}">-->
<!--{{criteria.name}}-->
<!--</span>-->
<!--<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>-->
<!--</span>-->
<!--<span ng-if="criteriaList.length>6"><br /></span>-->
<!--<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span>-->
<!--<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow">-->
<!--<span title="{{criteria.fullName}}">-->
<!--{{criteria.name}}-->
<!--</span>-->
<!--<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>-->
<!--</span>-->
<!--</div>-->
<!--<div id="mainAreaDiv" class="main-area">-->
<!--<div class="inputInvoiceGrid" ui-grid-expandable ui-grid="gridOptions">-->
<!--<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span></div>-->
<!--</div>-->
<!--<div class="pagination-container">-->
<!--<span>本页{{curPageItemCount}}条记录,共{{queryIncomeInvoiceItemResult.pageInfo.totalCount}}条记录</span>-->
<!--<div id="totalInvoicePage" class="common-pagination" style="display:none;">-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment