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
11b32392
Commit
11b32392
authored
May 14, 2019
by
weizhikai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_wzk
parents
2f2499fe
32ff80aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
54 deletions
+54
-54
cit-report-sheet.js
...ebapp/app/cit/report/cit-report-sheet/cit-report-sheet.js
+27
-27
vat-report-sheet.js
.../app/common/controls/vat-report-sheet/vat-report-sheet.js
+27
-27
No files found.
atms-web/src/main/webapp/app/cit/report/cit-report-sheet/cit-report-sheet.js
View file @
11b32392
...
...
@@ -174,33 +174,33 @@
sheet
.
bind
(
GC
.
Spread
.
Sheets
.
Events
.
CellClick
,
function
(
sender
,
args
)
{
scope
.
$apply
(
function
()
{
if
(
window
.
event
.
ctrlKey
)
{
var
data
=
JSON
.
parse
(
args
.
sheet
.
getTag
(
args
.
row
,
args
.
col
));
if
(
!
_
.
isEmpty
(
data
)
&&
!
_
.
isEmpty
(
data
.
dataSourceList
))
{
var
reports
=
_
.
chain
(
data
.
dataSourceList
)
.
where
({
type
:
enums
.
formulaDataSourceType
.
Report
})
.
map
(
function
(
x
)
{
return
{
reportCode
:
x
.
reportCode
,
year
:
x
.
year
,
period
:
x
.
period
};
}).
uniq
(
function
(
x
)
{
return
x
.
reportCode
+
','
+
x
.
year
+
','
+
x
.
period
;
}).
value
();
if
(
reports
.
length
===
1
)
{
var
drillDownArgs
=
_
.
findWhere
(
data
.
dataSourceList
,
{
type
:
enums
.
formulaDataSourceType
.
Report
});
if
(
drillDownArgs
.
period
===
scope
.
projectPeriod
&&
drillDownArgs
.
year
===
scope
.
projectYear
)
{
drillDownArgs
=
{
reportID
:
drillDownArgs
.
reportID
,
reportTemplateID
:
drillDownArgs
.
reportTemplateID
,
reportName
:
drillDownArgs
.
reportName
,
reportCode
:
drillDownArgs
.
reportCode
,
cellName
:
PWC
.
numToExcelChar
(
drillDownArgs
.
rowIndex
,
drillDownArgs
.
columnIndex
)
};
scope
.
$emit
(
enums
.
vatEvent
.
reportDrillDown
,
drillDownArgs
);
}
}
}
//
var data = JSON.parse(args.sheet.getTag(args.row, args.col));
//
if (!_.isEmpty(data) && !_.isEmpty(data.dataSourceList)) {
//
var reports = _.chain(data.dataSourceList)
//
.where({type: enums.formulaDataSourceType.Report})
//
.map(function (x) {
//
return {
//
reportCode: x.reportCode,
//
year: x.year,
//
period: x.period
//
};
//
}).uniq(function (x) {
//
return x.reportCode + ',' + x.year + ',' + x.period;
//
}).value();
//
if (reports.length === 1) {
//
var drillDownArgs = _.findWhere(data.dataSourceList, {type: enums.formulaDataSourceType.Report});
//
if (drillDownArgs.period === scope.projectPeriod && drillDownArgs.year === scope.projectYear) {
//
drillDownArgs = {
//
reportID: drillDownArgs.reportID,
//
reportTemplateID: drillDownArgs.reportTemplateID,
//
reportName: drillDownArgs.reportName,
//
reportCode: drillDownArgs.reportCode,
//
cellName: PWC.numToExcelChar(drillDownArgs.rowIndex, drillDownArgs.columnIndex)
//
};
//
scope.$emit(enums.vatEvent.reportDrillDown, drillDownArgs);
//
}
//
}
//
}
}
else
if
(
_
.
isFunction
(
scope
.
internalApi
.
onCellClick
)
&&
args
.
sheet
.
getTag
(
args
.
row
,
args
.
col
))
{
scope
.
internalApi
.
onCellClick
({
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-sheet/vat-report-sheet.js
View file @
11b32392
...
...
@@ -173,33 +173,33 @@
sheet
.
bind
(
GC
.
Spread
.
Sheets
.
Events
.
CellClick
,
function
(
sender
,
args
)
{
scope
.
$apply
(
function
()
{
if
(
window
.
event
.
ctrlKey
)
{
var
data
=
JSON
.
parse
(
args
.
sheet
.
getTag
(
args
.
row
,
args
.
col
));
if
(
!
_
.
isEmpty
(
data
)
&&
!
_
.
isEmpty
(
data
.
dataSourceList
))
{
var
reports
=
_
.
chain
(
data
.
dataSourceList
)
.
where
({
type
:
enums
.
formulaDataSourceType
.
Report
})
.
map
(
function
(
x
)
{
return
{
reportCode
:
x
.
reportCode
,
year
:
x
.
year
,
period
:
x
.
period
};
}).
uniq
(
function
(
x
)
{
return
x
.
reportCode
+
','
+
x
.
year
+
','
+
x
.
period
;
}).
value
();
if
(
reports
.
length
===
1
)
{
var
drillDownArgs
=
_
.
findWhere
(
data
.
dataSourceList
,
{
type
:
enums
.
formulaDataSourceType
.
Report
});
if
(
drillDownArgs
.
period
===
scope
.
projectPeriod
&&
drillDownArgs
.
year
===
scope
.
projectYear
)
{
drillDownArgs
=
{
reportID
:
drillDownArgs
.
reportID
,
reportTemplateID
:
drillDownArgs
.
reportTemplateID
,
reportName
:
drillDownArgs
.
reportName
,
reportCode
:
drillDownArgs
.
reportCode
,
cellName
:
PWC
.
numToExcelChar
(
drillDownArgs
.
rowIndex
,
drillDownArgs
.
columnIndex
)
};
scope
.
$emit
(
enums
.
vatEvent
.
reportDrillDown
,
drillDownArgs
);
}
}
}
//
var data = JSON.parse(args.sheet.getTag(args.row, args.col));
//
if (!_.isEmpty(data) && !_.isEmpty(data.dataSourceList)) {
//
var reports = _.chain(data.dataSourceList)
//
.where({type: enums.formulaDataSourceType.Report})
//
.map(function (x) {
//
return {
//
reportCode: x.reportCode,
//
year: x.year,
//
period: x.period
//
};
//
}).uniq(function (x) {
//
return x.reportCode + ',' + x.year + ',' + x.period;
//
}).value();
//
if (reports.length === 1) {
//
var drillDownArgs = _.findWhere(data.dataSourceList, {type: enums.formulaDataSourceType.Report});
//
if (drillDownArgs.period === scope.projectPeriod && drillDownArgs.year === scope.projectYear) {
//
drillDownArgs = {
//
reportID: drillDownArgs.reportID,
//
reportTemplateID: drillDownArgs.reportTemplateID,
//
reportName: drillDownArgs.reportName,
//
reportCode: drillDownArgs.reportCode,
//
cellName: PWC.numToExcelChar(drillDownArgs.rowIndex, drillDownArgs.columnIndex)
//
};
//
scope.$emit(enums.vatEvent.reportDrillDown, drillDownArgs);
//
}
//
}
//
}
}
else
if
(
_
.
isFunction
(
scope
.
internalApi
.
onCellClick
)
&&
args
.
sheet
.
getTag
(
args
.
row
,
args
.
col
))
{
scope
.
internalApi
.
onCellClick
({
...
...
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