Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
0f6a0704
Commit
0f6a0704
authored
Nov 18, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add to display pdfPrint button
parent
739e1686
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
36 deletions
+82
-36
abweb/common/js/common.js
+27
-0
abweb/html/reportForm.html
+0
-4
abweb/html/reportList.html
+1
-0
abweb/js/reportForm/reportForm.js
+25
-5
abweb/js/reportList/reportList.js
+29
-27
No files found.
abweb/common/js/common.js
View file @
0f6a0704
...
...
@@ -1105,6 +1105,33 @@
return
true
;
}
/**
* check quick report
*/
COMMON
.
checkQuickReport
=
function
(
callback
)
{
if
(
sessionStorage
.
getItem
(
"operationId"
))
{
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
sessionStorage
.
getItem
(
"operationId"
);
let
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
IS_QUICK_REPORT
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
function
(
result
)
{
if
(
callback
)
callback
(
result
);
},
function
()
{
COMMON
.
showAlert
(
'msgOperationEmpty'
);
COMMON
.
avwScreenMove
(
'index.html'
);
},
);
}
else
{
COMMON
.
showAlert
(
'error'
);
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
/*
* Operations for session storage [ end ]
*/
...
...
abweb/html/reportForm.html
View file @
0f6a0704
...
...
@@ -35,10 +35,6 @@
<div
id=
"includedMainTitle"
></div>
<div
class=
"quickReportBtn"
id=
"quickReportBtn"
onclick=
"submitForm();"
>
<img
src=
"../common/img/icon_pdf.svg"
alt=
"pdf出力"
class=
"p-1 w-40px"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"pdfPrint"
>
</div>
<!-- report list -->
<div
class=
"mb-5"
id=
"report-form"
></div>
...
...
abweb/html/reportList.html
View file @
0f6a0704
...
...
@@ -31,6 +31,7 @@
$
(
document
).
ready
(
function
()
{
RL
.
init
();
console
.
log
(
"RL.isQuickReport : "
+
RL
.
isQuickReport
);
COMMON
.
closeLoading
();
});
</script>
</head>
...
...
abweb/js/reportForm/reportForm.js
View file @
0f6a0704
...
...
@@ -5,13 +5,21 @@
var
RF
=
{};
RF
.
isQuickReport
;
RF
.
addReportFlg
;
/**
* init
*/
RF
.
init
=
function
()
{
//Check if user is logged in
COMMON
.
checkAuth
(
false
);
COMMON
.
checkQuickReport
(
function
(
result
)
{
if
(
result
)
{
result
.
isQuickReport
=
RF
.
isQuickReport
;
result
.
addReportFlg
=
RF
.
addReportFlg
;
}
})
RF
.
loadCommon
();
RF
.
initFormView
();
};
...
...
@@ -22,7 +30,7 @@ RF.init = function () {
RF
.
loadCommon
=
function
()
{
TEMPLATE
.
loadHeader
(
'#includedHeader'
);
TEMPLATE
.
loadConfirmModal
(
'#includedConfirmModal'
);
RF
.
initBreadcrumb
();
};
/**
...
...
@@ -80,7 +88,7 @@ RF.initBreadcrumb = function () {
}
else
{
if
(
sessionStorage
.
getItem
(
"pickUpType"
))
sessionStorage
.
removeItem
(
"pickUpType"
);
if
((
addReportFlg
)
&&
addReportFlg
==
1
)
{
if
((
RF
.
addReportFlg
)
&&
RF
.
addReportFlg
==
1
)
{
navs
=
[
{
titleLang
:
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
,
...
...
@@ -106,9 +114,22 @@ RF.initBreadcrumb = function () {
]
}
}
TEMPLATE
.
loadMainNavsTitle
(
'#includedMainTitle'
,
CONSTANT
.
PAGE_NAME
.
REPORT_FORM
,
navs
,
null
);
TEMPLATE
.
loadMainNavsTitle
(
'#includedMainTitle'
,
CONSTANT
.
PAGE_NAME
.
REPORT_FORM
,
navs
,
RF
.
loadMainTitleCallback
);
}
/**
* load main title callcack
*/
RF
.
loadMainTitleCallback
=
function
()
{
//add dashboard setting item
if
(
RF
.
isQuickReport
)
{
var
elmA
=
$
(
'<div class="quickReportBtn" id="quickReportBtn" onclick="submitForm();">'
);
let
elmImg
=
$
(
'<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdfPrint">'
);
elmA
.
append
(
elmImg
);
$
(
'#mainTitleHeader'
).
after
(
elmA
);
}
};
/**
* iinit form view
*/
...
...
@@ -136,7 +157,6 @@ RF.initFormView = function () {
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
HTML
.
BASE
+
CONSTANT
.
URL
.
CMS
.
HTML
.
LIST_REPORT_FORM
;
$
(
'#report-form'
).
load
(
url
,
params
,
function
()
{
initPageLoad
();
RF
.
initBreadcrumb
();
COMMON
.
closeLoading
();
});
}
else
{
...
...
abweb/js/reportList/reportList.js
View file @
0f6a0704
...
...
@@ -6,6 +6,8 @@
var
RL
=
{};
RL
.
isQuickReport
;
/**
* init
*/
...
...
@@ -17,7 +19,9 @@
console
.
log
(
"kdh check closeLoading RL.init2"
);
console
.
log
(
'ReportList init start'
);
console
.
log
(
"kdh check closeLoading RL.init3"
);
RL
.
checkQuickReport
();
COMMON
.
checkQuickReport
(
function
(
result
)
{
if
(
result
)
RL
.
isQuickReport
=
result
.
isQuickReport
;
}
);
console
.
log
(
"kdh check closeLoading RL.init4"
);
RL
.
loadCommon
();
console
.
log
(
"kdh check closeLoading RL.init5"
);
...
...
@@ -70,34 +74,32 @@
TEMPLATE
.
loadMainNavsTitle
(
'#includedMainTitle'
,
CONSTANT
.
PAGE_NAME
.
REPORT_LIST
,
navs
,
RL
.
loadMainTitleCallback
);
}
RL
.
isQuickReport
;
/**
* check quick report
*/
RL
.
checkQuickReport
=
function
()
{
if
(
sessionStorage
.
getItem
(
"operationId"
))
{
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
sessionStorage
.
getItem
(
"operationId"
);
let
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
IS_QUICK_REPORT
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
function
(
result
)
{
RL
.
isQuickReport
=
result
.
isQuickReport
;
},
function
()
{
COMMON
.
showAlert
(
'msgOperationEmpty'
);
COMMON
.
avwScreenMove
(
'index.html'
);
},
);
}
else
{
COMMON
.
showAlert
(
'error'
);
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
//
RL.checkQuickReport = function () {
//
if (sessionStorage.getItem("operationId")) {
//
let params = {};
//
params.sid = COMMON.getSid();
//
params.operationId = sessionStorage.getItem("operationId");
//
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.IS_QUICK_REPORT;
//
COMMON.cmsAjax(
//
url,
//
params,
//
false,
//
function (result) {
//
RL.isQuickReport = result.isQuickReport;
//
},
//
function () {
//
COMMON.showAlert('msgOperationEmpty');
//
COMMON.avwScreenMove('index.html');
//
},
//
);
//
} else {
//
COMMON.showAlert('error');
//
COMMON.avwScreenMove('index.html');
//
}
//
};
/**
* init task report list
...
...
@@ -124,7 +126,7 @@
//add dashboard setting item
if
(
RL
.
isQuickReport
)
{
var
elmA
=
$
(
'<div id="btnPdfPrint" onclick="RL.goPdfPrint();">'
);
let
elmImg
=
$
(
'<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdf
出力
">'
);
let
elmImg
=
$
(
'<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdf
Print
">'
);
elmImg
.
attr
(
'title'
,
I18N
.
i18nText
(
'reportList'
));
elmA
.
append
(
elmImg
);
$
(
'#mainTitleHeader'
).
after
(
elmA
);
...
...
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