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
06be6385
Commit
06be6385
authored
2 years ago
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update pickup js
parent
a4f21958
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
435 additions
and
354 deletions
+435
-354
abvw/common/css/newdash/app.css
+55
-1
abvw/common/json/lang/lang-en.json
+6
-3
abvw/common/json/lang/lang-ja.json
+4
-1
abvw/common/json/lang/lang-ko.json
+4
-1
abvw/html/pickup.html
+21
-147
abvw/js/pickup/pickup.js
+345
-201
No files found.
abvw/common/css/newdash/app.css
View file @
06be6385
...
...
@@ -2,7 +2,7 @@
* Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
.fa
,
.fab
,
.fad
,
.fal
,
.far
,
.fas
{
.fa
,
.fab
,
.fad
,
.fal
,
.far
,
.fas
{
-moz-osx-font-smoothing
:
grayscale
;
-webkit-font-smoothing
:
antialiased
;
display
:
inline-block
;
...
...
@@ -14392,6 +14392,9 @@ a.bg-white:focus,a.bg-white:hover,button.bg-white:focus,button.bg-white:hover {
.w-120px {
width: 120px!important;
}
.w-250px {
width: 250px!important;
}
.h-25 {
height: 25%!important
...
...
@@ -14733,6 +14736,10 @@ a.bg-white:focus,a.bg-white:hover,button.bg-white:focus,button.bg-white:hover {
padding-left: 3rem!important
}
.pl-6,.px-6 {
padding-left: 3.5rem!important
}
.m-n1 {
margin: -.25rem!important
}
...
...
@@ -20655,6 +20662,53 @@ button {
padding: 4px 7px
}
.type-icon {
line-height: 0;
padding: 5px;
}
.type-icon .report:before{
content: '';
background-image: url("/abvw/common/img/type_icon_report.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 40px;
height: 40px;
display: inline-block;
}
.type-icon .questionary:before{
content: '';
background-image: url("/abvw/common/img/type_icon_questionary.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 40px;
height: 40px;
display: inline-block;
}
.type-icon .inspection:before{
content: '';
background-image: url("/abvw/common/img/type_icon_inspection.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 40px;
height: 40px;
display: inline-block;
}
.type-icon .proccess:before{
content: '
'
;
background-image
:
url("/abvw/common/img/type_icon_proccess.svg")
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
background-position
:
center
;
width
:
40px
;
height
:
40px
;
display
:
inline-block
;
}
.block-title
{
border-bottom
:
1px
solid
#0070ca
}
...
...
This diff is collapsed.
Click to expand it.
abvw/common/json/lang/lang-en.json
View file @
06be6385
...
...
@@ -46,16 +46,18 @@
"newRegistrationTitle"
:
"New Registration"
,
"continousWorkTitle"
:
"Continous Work"
,
"processWorkTitle"
:
"Process work"
,
"reportWarningTitle"
:
"Report With Warning"
,
"reportWarningTitle"
:
"Report With Warning
s
"
,
"workWithWarningsTitle"
:
"Work with warnings"
,
"messageListTitle"
:
"Message List"
,
"sendMessageTitle"
:
"Send Message"
,
"distanceSupportTitle"
:
"DistanceSupport"
,
"chatTitle"
:
"Chat"
,
"makeDashboardAsHome"
:
"
Make dashboard your
home screen"
,
"makeDashboardAsHome"
:
"
Set dashboard to
home screen"
,
"btnKeep"
:
"Keep"
,
"addNew"
:
"Add New"
,
"display"
:
" display"
,
"displayPattern"
:
"Display Pattern"
"reportLevelReport"
:
"Report"
,
"reportLevelAnswer"
:
"Answer"
,
"msgNotFound"
:
"There is no applicable work."
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
abvw/common/json/lang/lang-ja.json
View file @
06be6385
...
...
@@ -56,5 +56,7 @@
"btnKeep"
:
"保存"
,
"addNew"
:
"新規追加"
,
"display"
:
" 件表示"
,
"displayPattern"
:
"件表示パターン"
"reportLevelReport"
:
"報告"
,
"reportLevelAnswer"
:
"回答"
,
"msgNotFound"
:
"該当する作業がありません。"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
abvw/common/json/lang/lang-ko.json
View file @
06be6385
...
...
@@ -56,5 +56,7 @@
"btnKeep"
:
"Keep"
,
"addNew"
:
"Add New"
,
"display"
:
" display"
,
"displayPattern"
:
"Display Pattern"
"reportLevelReport"
:
"Report"
,
"reportLevelAnswer"
:
"Answer"
,
"msgNotFound"
:
"There is no applicable work."
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
abvw/html/pickup.html
View file @
06be6385
...
...
@@ -14,15 +14,15 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/style.css"
>
<!-- vender css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/fontawesome_relative_path.css"
>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/web/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/app.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/common.js"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<!-- main js -->
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboard-setting.js"
></script>
...
...
@@ -35,7 +35,6 @@
<body
onload=
"PICKUP.init();"
>
<!-- header -->
<!-- <?php include('common/header.html');?> -->
<div
id=
"includedHeader"
></div>
<!-- pickup -->
<main>
...
...
@@ -54,25 +53,25 @@
<!-- tab -->
<ul
class=
"nav nav-tabs line"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
id=
"liTabNewReport"
>
<a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#tab
1"
role=
"tab"
aria-controls=
"tab1
"
aria-expanded=
"true"
>
<a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#tab
-content-NewReport"
role=
"tab"
aria-controls=
"tab-content-NewReport
"
aria-expanded=
"true"
>
<div
class=
"text-center lang"
lang=
"addNew"
></div>
</a>
</li>
<li
class=
"nav-item"
id=
"liTabContinousWork"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab
2"
role=
"tab"
aria-controls=
"tab2
"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab
-content-ContinousWork"
role=
"tab"
aria-controls=
"tab-content-ContinousWork
"
>
<div
class=
"text-center lang"
lang=
"processWorkTitle"
></div>
</a>
</li>
<li
class=
"nav-item"
id=
"liTabReportWithWarning"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab
3"
role=
"tab"
aria-controls=
"tab3
"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab
-content-ReportWithWarnings"
role=
"tab"
aria-controls=
"tab-content-ReportWithWarnings
"
>
<div
class=
"text-center lang"
lang=
"reportWarningTitle"
></div>
</a>
</li>
</ul>
</ul>
<!-- tab content-->
<!-- new -->
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade show active"
id=
"tab
1"
role=
"tabpanel"
aria-labelledby=
"1-tab"
>
<div
class=
"tab-pane fade show active"
id=
"tab
-content-NewReport"
role=
"tabpanel"
aria-labelledby=
"1-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
id=
"viewMenuNewReport"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
...
...
@@ -89,15 +88,14 @@
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
id=
"newReport-list"
>
</ul>
</div>
<!-- proccess -->
<div
class=
"tab-pane fade"
id=
"tab
2"
role=
"tabpanel"
aria-labelledby=
"2-tab"
>
<div
class=
"tab-pane fade"
id=
"tab
-content-ContinousWork"
role=
"tabpanel"
aria-labelledby=
"2-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<nav
aria-label=
"view"
class=
"view-menu mt-2"
id=
"viewMenuContinuousWork"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
100
<span>
件表示
</span
></div>
<div
class=
"fs-9"
id=
"count-ContinuousWork"
></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
...
...
@@ -109,53 +107,15 @@
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"proccess"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
工程名が入ります。
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"proccess"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
工程名が入ります。工程名が入ります。工程名が入ります。工程名が入ります。工程名が入ります。
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
id=
"continousWork-list"
>
</ul>
</div>
<!-- alert -->
<div
class=
"tab-pane fade"
id=
"tab
3"
role=
"tabpanel"
aria-labelledby=
"3-tab"
>
<div
class=
"tab-pane fade"
id=
"tab
-content-ReportWithWarnings"
role=
"tabpanel"
aria-labelledby=
"3-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<nav
aria-label=
"view"
class=
"view-menu mt-2"
id=
"viewMenuReportWithWarnings"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
100
<span>
件表示
</span
></div>
<div
class=
"fs-9"
d=
"count-ReportWithWarnings"
></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
...
...
@@ -167,105 +127,18 @@
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"report"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"inspection"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
10/20~10/23
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"questionary"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
報告
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"questionary"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
回答
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<!-- 0 match -->
<div
class=
"tab-pane fade"
id=
"tab4"
role=
"tabpanel"
aria-labelledby=
"4-tab"
>
<ul
class=
"p-0 mt-3 card-list"
>
<li
class=
"card mb-2 not-found"
>
<div
class=
"text-dark mb-1 px-3 py-5 text-center m-auto"
>
<img
src=
"../common/img/icon_not_found.svg"
alt=
"該当する作業がありません。"
class=
"not-found-img mb-2"
>
<div
class=
"fs-9 text-secondary font-weight-bold"
>
該当する作業がありません。
</div>
</div>
</li>
</ul>
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
id=
"reportWithWarnings-list"
>
</ul>
</div>
</div>
</div>
</main>
<!-- confirm -->
<!-- <?php include('common/confirm-modal.html');?> -->
<div
id=
"includedConfirmModal"
></div>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="../common/js/app.js"></script>
<script type="text/javascript" src="../common/js/common.js"></script> -->
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/app.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/common.js?__UPDATEID__"
></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
abvw/js/pickup/pickup.js
View file @
06be6385
// 名前空間
/**
* pickup js in pickup.html
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
PICKUP
=
{};
PICKUP
.
newReportList
;
...
...
@@ -10,12 +13,35 @@ PICKUP.countNewReportList = 0;
PICKUP
.
countContinousWorkReport
=
0
;
PICKUP
.
countReportWithWarning
=
0
;
PICKUP
.
initCommon
=
function
()
{
PICKUP
.
countNewReportList
=
0
;
PICKUP
.
countContinousWorkReport
=
0
;
PICKUP
.
countReportWithWarning
=
0
;
/**
* Report type
*/
PICKUP
.
REPORT_TYPE
=
{
REPORTONLY
:
0
,
//report only
INSPECT
:
1
,
//rountine
WITHREPLY
:
2
,
// report answer
WORKFLOW
:
3
// continuous
}
/**
* operation type
*/
PICKUP
.
OPERATION_TYPE
=
{
LIST
:
"0"
,
DRAWING
:
"1"
,
VTOUR
:
"2"
,
PDF
:
"3"
};
/**
* task type of report answer
*/
PICKUP
.
REPLYREPORT_TASK_TYPE
=
{
REPORT
:
0
,
ANSWER
:
1
}
/**
* default Pickup List
*/
PICKUP
.
defaultPickupList
=
{
operationList
:[]
}
...
...
@@ -89,6 +115,7 @@ PICKUP.init = function() {
console
.
log
(
"PICKUP.init"
);
TEMPLATE
.
loadHearder
();
TEMPLATE
.
loadConfirmModal
();
PICKUP
.
initSettingActivePickup
();
PICKUP
.
settingPickup
();
}
/**
...
...
@@ -96,77 +123,71 @@ PICKUP.init = function() {
*/
PICKUP
.
settingPickup
=
function
()
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
!
settings
.
newReport
)
{
$
(
"#liTabNewReport"
).
addClass
(
'd-none'
);
}
else
$
(
"#liTabNewReport"
).
addClass
(
'd-none'
);
$
(
"#liTabContinousWork"
).
addClass
(
'd-none'
);
$
(
"#liTabReportWithWarning"
).
addClass
(
'd-none'
);
if
(
settings
.
newReport
)
{
$
(
"#liTabNewReport"
).
removeClass
(
'd-none'
);
PICKUP
.
initNewReportTab
();
}
if
(
!
settings
.
continousWork
)
{
$
(
"#liTabContinousWork"
).
addClass
(
'd-none'
);
}
else
if
(
settings
.
continousWork
)
{
$
(
"#liTabContinousWork"
).
removeClass
(
'd-none'
);
PICKUP
.
initContinuosWorkTab
();
}
if
(
!
settings
.
reportWarning
)
{
$
(
"#liTabReportWithWarning"
).
addClass
(
'd-none'
);
}
else
if
(
settings
.
reportWarning
)
{
$
(
"#liTabReportWithWarning"
).
removeClass
(
'd-none'
);
PICKUP
.
initReportWithWarningsTab
();
}
});
}
/**
* init Setting Active Pickup
*/
PICKUP
.
initSettingActivePickup
=
function
()
{
var
urlParam
=
C
HK
.
getUrlParameter
();
var
urlParam
=
C
OMMON
.
getUrlParameter
();
PICKUP
.
pickupActive
=
urlParam
.
pickupActive
;
PICKUP
.
settingActivePickup
(
PICKUP
.
pickupActive
);
}
/**
* setting Active Pickup
* @param {*} pickupActive
* @returns
*/
PICKUP
.
settingActivePickup
=
function
(
pickupActive
)
{
PICKUP
.
pickupActive
=
pickupActive
;
$
(
'#liTabNewReport
'
).
removeClass
(
'on
'
);
$
(
'#liTabContinousWork
'
).
removeClass
(
'on
'
);
$
(
'#liTabReportWithWarning
'
).
removeClass
(
'on
'
);
$
(
'#liTabNewReport
a'
).
removeClass
(
'active
'
);
$
(
'#liTabContinousWork
a'
).
removeClass
(
'active
'
);
$
(
'#liTabReportWithWarning
a'
).
removeClass
(
'active
'
);
$
(
'#tab-content-NewReport'
).
removeClass
(
'
on
'
);
$
(
'#tab-content-ContinousWork'
).
removeClass
(
'
on
'
);
$
(
'#tab-content-ReportWithWarning
'
).
removeClass
(
'on
'
);
$
(
'#tab-content-NewReport'
).
removeClass
(
'
active show
'
);
$
(
'#tab-content-ContinousWork'
).
removeClass
(
'
active show
'
);
$
(
'#tab-content-ReportWithWarning
s'
).
removeClass
(
'active show
'
);
if
(
pickupActive
==
"newReport"
)
{
$
(
'#liTabNewReport
'
).
addClass
(
'on
'
);
$
(
'#tab-content-NewReport'
).
addClass
(
'
on
'
);
$
(
'#liTabNewReport
a'
).
addClass
(
'active
'
);
$
(
'#tab-content-NewReport'
).
addClass
(
'
active show
'
);
return
;
}
if
(
pickupActive
==
"continousWork"
)
{
$
(
'#liTabContinousWork
'
).
addClass
(
'on
'
);
$
(
'#tab-content-ContinousWork'
).
addClass
(
'
on
'
);
$
(
'#liTabContinousWork
a'
).
addClass
(
'active
'
);
$
(
'#tab-content-ContinousWork'
).
addClass
(
'
active show
'
);
return
;
}
if
(
pickupActive
==
"reportWarning"
)
{
$
(
'#liTabReportWithWarning
'
).
addClass
(
'on
'
);
$
(
'#tab-content-ReportWithWarning
'
).
addClass
(
'on
'
);
$
(
'#liTabReportWithWarning
a'
).
addClass
(
'active
'
);
$
(
'#tab-content-ReportWithWarning
s'
).
addClass
(
'active show
'
);
return
;
}
}
PICKUP
.
changeActivePickup
=
function
(
liPickupTab
)
{
PICKUP
.
settingActivePickup
(
$
(
liPickupTab
).
attr
(
"data-active"
));
}
PICKUP
.
goBack
=
function
()
{
history
.
back
();
}
/**
* Initialization show not found pickup item html
* @param {*} elementId
...
...
@@ -176,8 +197,8 @@ PICKUP.showNotFoundPickupItem = function(elementId) {
$
(
elementId
).
addClass
(
'p-0 mt-3 card-list'
);
let
li
=
$
(
"<li class='card mb-2 not-found'></li>"
);
let
div
=
$
(
"<div class='text-dark mb-1 px-3 py-5 text-center m-auto'></div>"
);
let
imgdiv
=
$
(
"<img src=
\"
../common/img/icon_not_found.svg
\"
alt='
該当する作業がありません。
' class='not-found-img mb-2'>"
);
let
childDiv
=
$
(
"<div class='fs-9 text-secondary font-weight-bold'>
該当する作業がありません。
</div>"
);
let
imgdiv
=
$
(
"<img src=
\"
../common/img/icon_not_found.svg
\"
alt='
"
+
I18N
.
i18nText
(
'msgNotFound'
)
+
"
' class='not-found-img mb-2'>"
);
let
childDiv
=
$
(
"<div class='fs-9 text-secondary font-weight-bold'>
"
+
I18N
.
i18nText
(
'msgNotFound'
)
+
"
</div>"
);
div
.
append
(
imgdiv
);
div
.
append
(
childDiv
);
li
.
append
(
div
);
...
...
@@ -203,6 +224,31 @@ PICKUP.initNewReportTab = function() {
PICKUP
.
createNewReportList
(
json
.
operationList
);
});
}
/**
* Initialization continuous work list html
*/
PICKUP
.
initContinuosWorkTab
=
function
()
{
PICKUP
.
getContinuousWorkListData
(
function
(
json
)
{
PICKUP
.
createContinousWorkList
(
json
.
operationList
);
});
}
/**
* Initialization continuous work list html
*/
PICKUP
.
initReportWithWarningsTab
=
function
()
{
PICKUP
.
getReportWithWarningsListData
(
function
(
json
)
{
PICKUP
.
createReportWithWarningList
(
json
.
operationList
);
});
}
/**
* sort New report operation list
* @param {*} operationList
* @returns
*/
PICKUP
.
sortNewReportList
=
function
(
operationList
)
{
operationList
=
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationId
<
b
.
operationId
)
return
1
;
...
...
@@ -211,9 +257,13 @@ PICKUP.sortNewReportList = function(operationList) {
});
return
operationList
;
}
/**
* Implement new report list html
* @param {*} operationListOld
* @returns
*/
PICKUP
.
createNewReportList
=
function
(
operationListOld
)
{
var
operationList
=
PICKUP
.
sortNewReportList
(
operationListOld
);
let
operationList
=
PICKUP
.
sortNewReportList
(
operationListOld
);
$
(
'#viewMenuNewReport'
).
removeClass
(
'd-none'
);
$
(
"#newReport-list"
).
empty
();
PICKUP
.
countNewReportList
=
0
;
...
...
@@ -224,21 +274,35 @@ PICKUP.createNewReportList = function(operationListOld) {
return
;
}
$
(
'#newReport-list'
).
addClass
(
'task-list view-content view-block'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
//TODO aタグlist.html 転移処理operationList[i].reportType == 2 && operationList[i].enableReportEdit == 0
var
messageli
=
$
(
"<li class='card mb-2' name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
var
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK.displayAlert('onlyRfid');
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
else
let
classIcon
;
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
switch
(
operationList
[
i
].
reportType
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'NEW_FORM_INPUT' ,'REPORT_LIST',null);
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
case
PICKUP
.
REPORT_TYPE
.
REPORTONLY
:
classIcon
=
"report"
;
break
;
case
PICKUP
.
REPORT_TYPE
.
INSPECT
:
classIcon
=
"inspection"
;
break
;
case
PICKUP
.
REPORT_TYPE
.
WITHREPLY
:
classIcon
=
"questionary"
;
break
;
case
PICKUP
.
REPORT_TYPE
.
WORKFLOW
:
classIcon
=
"proccess"
;
break
;
}
var
divText
=
$
(
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
let
messageli
=
$
(
"<li class='card mb-2' name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
let
ahrefRequiredFlg
=
$
(
"<a href='report-list.html' class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
let
divIcon
=
$
(
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'>"
+
"<span class='"
+
classIcon
+
"'></span>"
+
"</div></div>"
)
let
divText
=
$
(
"<div class='pl-5 h-100 d-flex align-items-center'>"
+
"<div class='w-100'>"
+
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
+
"</div></div>"
);
ahrefRequiredFlg
.
append
(
divIcon
);
ahrefRequiredFlg
.
append
(
divText
);
messageli
.
append
(
ahrefRequiredFlg
);
...
...
@@ -255,23 +319,27 @@ PICKUP.createNewReportList = function(operationListOld) {
PICKUP
.
showCountDisplayPickupItem
(
"#count-NewReport"
,
PICKUP
.
countNewReportList
)
}
/**
* sort continuous work operation list
* @param {*} operationList
* @returns
*/
PICKUP
.
sortContinousWorkList
=
function
(
operationList
)
{
var
newOperationList
=
[];
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
newOperationList
=
[];
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
if
(
operationList
[
i
].
reportType
===
3
)
{
if
(
typeof
operationList
[
i
].
processList
===
'undefined'
)
continue
;
if
(
operationList
[
i
].
processList
&&
operationList
[
i
].
processList
.
length
!=
0
)
{
for
(
var
j
=
0
;
j
<
operationList
[
i
].
processList
.
length
;
j
++
)
for
(
let
j
=
0
;
j
<
operationList
[
i
].
processList
.
length
;
j
++
)
{
if
(
typeof
operationList
[
i
].
processList
[
j
].
phaseList
===
'undefined'
)
continue
;
for
(
var
g
=
0
;
g
<
operationList
[
i
].
processList
[
j
].
phaseList
.
length
;
g
++
)
for
(
let
g
=
0
;
g
<
operationList
[
i
].
processList
[
j
].
phaseList
.
length
;
g
++
)
{
if
(
operationList
[
i
].
processList
[
j
].
phaseList
[
g
].
phaseStatus
!=
999
)
{
var
item
=
{
reportType
:
operationList
[
i
].
reportType
,
let
item
=
{
reportType
:
operationList
[
i
].
reportType
,
operationType
:
operationList
[
i
].
operationType
,
phaseList
:
operationList
[
i
].
processList
[
j
].
phaseList
,
processKey
:
operationList
[
i
].
processList
[
j
].
processKey
,
...
...
@@ -297,29 +365,106 @@ PICKUP.sortContinousWorkList = function(operationList) {
}
newOperationList
=
newOperationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
updateDate
)
{
a
.
updateDate
=
"1900-01-01 0
9
:00:00"
;
a
.
updateDate
=
"1900-01-01 0
0
:00:00"
;
}
if
(
!
b
.
updateDate
)
{
b
.
updateDate
=
"1900-01-01 0
9
:00:00"
;
b
.
updateDate
=
"1900-01-01 0
0
:00:00"
;
}
if
(
a
.
updateDate
<
b
.
updateDate
)
return
1
;
if
(
a
.
updateDate
>
b
.
updateDate
)
return
-
1
;
return
0
;
});
console
.
log
(
"newOperationList: "
+
JSON
.
stringify
(
newOperationList
));
//
console.log("newOperationList: " + JSON.stringify(newOperationList));
return
newOperationList
;
}
/**
* Implement continous work html
* @param {*} operationListOld
* @returns
*/
PICKUP
.
createContinousWorkList
=
function
(
operationListOld
)
{
let
operationList
=
PICKUP
.
sortContinousWorkList
(
operationListOld
);
$
(
'#viewMenuContinuousWork'
).
removeClass
(
'd-none'
);
$
(
"#continousWork-list"
).
empty
();
PICKUP
.
countContinousWorkReport
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
PICKUP
.
showNotFoundPickupItem
(
"#continousWork-list"
);
$
(
'#viewMenuContinuousWork'
).
addClass
(
'd-none'
);
return
;
}
$
(
'#continousWork-list'
).
addClass
(
'task-list view-content view-block'
);
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
directKey
=
operationList
[
i
].
processKey
;
if
(
operationList
[
i
].
operationType
==
PICKUP
.
OPERATION_TYPE
.
VTOUR
||
operationList
[
i
].
operationType
==
PICKUP
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
operationList
[
i
].
taskKey
;
}
let
messageli
=
$
(
"<li class='card mb-2' id = 'list_"
+
operationList
[
i
].
processKey
+
"$"
+
operationList
[
i
].
phaseNo
+
"'></li>"
)
;
let
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK.displayAlert('onlyRfid');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
}
else
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'CONTINOUS_WORK','"
+
directKey
+
"','"
+
operationList
[
i
].
phaseNo
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
}
let
divProccess
=
$
(
"<div class='position-absolute translate-middle top-50 left-0 ml-3'><div class='type-icon'><span class='proccess'></span></div></div>"
);
let
divInfor
=
$
(
"<div class='pl-5 h-100 d-flex align-items-center'></div>"
);
let
divChildInfor
=
$
(
"<div class='w-100'></div>"
);
let
divOperationName
=
$
(
"<div class='fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100'>"
+
operationList
[
i
].
phaseName
+
"</div>"
);
let
divProcessName
=
$
(
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
let
divReportInfor
=
$
(
"<div class='d-flex justify-content-between align-items-center'></div>"
);
let
divReportName
=
$
(
"<div class='fs-10 text-truncate'>"
+
operationList
[
i
].
taskName
+
"</div>"
);
let
divReportCode
=
$
(
"<div class='fs-8 text-secondary text-truncate'>"
+
operationList
[
i
].
taskCode
+
"</div>"
);
divReportInfor
.
append
(
divReportName
);
divReportInfor
.
append
(
divReportCode
);
divChildInfor
.
append
(
divOperationName
);
divChildInfor
.
append
(
divProcessName
);
divChildInfor
.
append
(
divReportInfor
);
divInfor
.
append
(
divChildInfor
);
ahrefRequiredFlg
.
append
(
divProccess
);
ahrefRequiredFlg
.
append
(
divInfor
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#continousWork-list"
).
append
(
messageli
);
PICKUP
.
countContinousWorkReport
=
PICKUP
.
countContinousWorkReport
+
1
;
}
// show not found if
if
(
PICKUP
.
countContinousWorkReport
==
0
)
{
PICKUP
.
showNotFoundPickupItem
(
"#continousWork-list"
);
$
(
'#viewMenuContinuousWork'
).
addClass
(
'd-none'
);
return
;
}
PICKUP
.
showCountDisplayPickupItem
(
"#count-ContinuousWork"
,
PICKUP
.
countContinousWorkReport
)
};
/**
* sort report with warnings list
* @param {*} operationList
* @returns
*/
PICKUP
.
sortWarningList
=
function
(
operationList
)
{
var
newOperationList
=
[];
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
newOperationList
=
[];
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
if
(
typeof
operationList
[
i
].
warningReportList
===
'undefined'
)
continue
;
if
(
operationList
[
i
].
warningReportList
&&
operationList
[
i
].
warningReportList
.
length
!=
0
)
{
for
(
var
j
=
0
;
j
<
operationList
[
i
].
warningReportList
.
length
;
j
++
)
for
(
let
j
=
0
;
j
<
operationList
[
i
].
warningReportList
.
length
;
j
++
)
{
var
item
=
{
reportType
:
operationList
[
i
].
reportType
,
let
item
=
{
reportType
:
operationList
[
i
].
reportType
,
operationType
:
operationList
[
i
].
operationType
,
permitCodeRequiredFlg
:
operationList
[
i
].
permitCodeRequiredFlg
,
operationId
:
operationList
[
i
].
operationId
,
...
...
@@ -342,173 +487,171 @@ PICKUP.sortWarningList = function(operationList) {
}
newOperationList
=
newOperationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
updateDate
)
{
a
.
updateDate
=
"1900-01-01 0
9
:00:00"
;
a
.
updateDate
=
"1900-01-01 0
0
:00:00"
;
}
if
(
!
b
.
updateDate
)
{
b
.
updateDate
=
"1900-01-01 0
9
:00:00"
;
b
.
updateDate
=
"1900-01-01 0
0
:00:00"
;
}
if
(
a
.
updateDate
<
b
.
updateDate
)
return
1
;
if
(
a
.
updateDate
>
b
.
updateDate
)
return
-
1
;
return
0
;
});
console
.
log
(
"newOperationList: "
+
JSON
.
stringify
(
newOperationList
));
//
console.log("newOperationList: " + JSON.stringify(newOperationList));
return
newOperationList
;
}
PICKUP
.
createContinousWorkList
=
function
(
operationListOld
,
isSearched
=
false
)
{
var
operationList
=
PICKUP
.
sortContinousWorkList
(
operationListOld
);
$
(
"#continousWork-list"
).
empty
();
PICKUP
.
countContinousWorkReport
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundContinousWork'
).
removeClass
(
'd-none'
);
return
;
}
$
(
'#notFoundContinousWork'
).
addClass
(
'd-none'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
var
directKey
=
operationList
[
i
].
processKey
;
if
(
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
VTOUR
||
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
operationList
[
i
].
taskKey
;
}
var
messageli
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
processKey
+
"'></li>"
)
;
var
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK.displayAlert('onlyRfid');
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
else
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'CONTINOUS_WORK','"
+
directKey
+
"','"
+
operationList
[
i
].
phaseNo
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'></a>"
);
}
var
divTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
var
divSubTitleWrap
=
$
(
"<div class='sub-title-wrap'> </div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12''></i>"
);
var
divProccess
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
operationList
[
i
].
phaseName
+
"</div>"
);
var
divCode
=
$
(
" <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div>"
);
var
divSubTitle
=
$
(
"<div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div>"
);
divSubTitleWrap
.
append
(
divCode
);
divSubTitleWrap
.
append
(
divSubTitle
);
ahrefRequiredFlg
.
append
(
divProccess
);
ahrefRequiredFlg
.
append
(
divTitle
);
ahrefRequiredFlg
.
append
(
divSubTitleWrap
);
ahrefRequiredFlg
.
append
(
iIcon
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#continousWork-list"
).
append
(
messageli
);
PICKUP
.
countContinousWorkReport
=
PICKUP
.
countContinousWorkReport
+
1
;
}
// show not found if
if
(
PICKUP
.
countContinousWorkReport
<
1
)
{
$
(
'#notFoundContinousWork'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
};
/**
* init Warning Report With ReportOnly Type
* @param {*} report
* @returns
*/
PICKUP
.
initWarningReportWithReportOnlyType
=
function
(
report
)
{
let
ele
=
$
(
"<li class='card mb-2'>"
+
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
report
.
operationId
+
"', '"
+
report
.
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
report
.
taskKey
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>"
+
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'><span class='report'></span></div></div>"
+
"<div class='pl-5 h-100 d-flex align-items-center'><div class='w-100'>"
+
"<div class='fs-12 text-truncate'>"
+
report
.
operationName
+
"</div>"
+
"<div class='d-flex justify-content-between align-items-center'>"
+
"<div class='fs-10 text-truncate'>"
+
report
.
taskName
+
"</div>"
+
"<div class='fs-8 text-secondary text-truncate'> "
+
report
.
taskCode
+
"</div>"
+
"</div></div></div></a></li>"
);
return
ele
;
}
PICKUP
.
initWarningReportWithInspectType
=
function
(
report
)
{
let
ele
=
$
(
"<li class='card mb-2'>"
+
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
report
.
operationId
+
"', '"
+
report
.
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
report
.
taskKey
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>"
+
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'><span class='inspection'></span></div></div>"
+
"<div class='pl-5 h-100 d-flex align-items-center'><div class='w-100'>"
+
"<div class='fs-12 text-truncate'>"
+
report
.
operationName
+
"</div>"
+
"<div class='d-flex justify-content-between align-items-center'>"
+
"<div class='fs-10 text-truncate'></div>"
+
"<div class='fs-8 text-secondary text-truncate'>"
+
PICKUP
.
getInspectDate
(
report
.
reportStartDateString
)
+
" ~ "
+
PICKUP
.
getInspectDate
(
report
.
reportEndDateString
)
+
"</div></div></div></div></a></li>"
);
return
ele
;
}
/**
* init Warning Report With AnswerReport Type
* @param {*} report
* @param {*} reportTypeMsg
* @returns
*/
PICKUP
.
initWarningReportWithAnswerReportType
=
function
(
report
,
reportTypeMsg
)
{
let
ele
=
$
(
"<li class='card mb-2'>"
+
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
report
.
operationId
+
"', '"
+
report
.
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
report
.
taskKey
+
"','"
+
report
.
taskType
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>"
+
"<div class='position-absolute translate-middle top-50 left-0 ml-3'><div class='type-icon'>"
+
"<span class='questionary'></span></div></div><div class='pl-5 h-100 d-flex align-items-center'><div class='w-100'>"
+
"<div class='fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100'>"
+
reportTypeMsg
+
"</div>"
+
"<div class='fs-12 text-truncate'>"
+
report
.
operationName
+
"</div>"
+
"<div class='d-flex justify-content-between align-items-center'>"
+
"<div class='fs-10 text-truncate'>"
+
report
.
taskName
+
"</div>"
+
"<div class='fs-8 text-secondary text-truncate'>"
+
report
.
taskCode
+
"</div>"
+
"</div></div></div></a></li>"
);
return
ele
;
}
PICKUP
.
createReportWithWarning
=
function
(
operationListOld
,
isSearched
=
false
)
{
var
operationList
=
PICKUP
.
sortWarningList
(
operationListOld
);
$
(
"#reportWithWarning-list"
).
empty
();
/**
* init Warning Report With Continuous Report Type
* @param {*} report
* @returns
*/
PICKUP
.
initWarningReportWithContinuousReportType
=
function
(
report
)
{
let
directKey
=
report
.
processKey
;
if
(
report
.
operationType
==
PICKUP
.
OPERATION_TYPE
.
VTOUR
||
report
.
operationType
==
PICKUP
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
report
.
taskKey
;
if
(
report
.
phaseNo
>
1
)
{
//find taskKey of phaseNo 1
for
(
let
k
=
0
;
k
<
operationList
.
length
;
k
++
)
{
if
(
operationList
[
k
].
phaseNo
==
1
&&
operationList
[
k
].
processKey
==
report
.
processKey
)
{
directKey
=
operationList
[
k
].
taskKey
;
break
;
}
}
}
}
let
ele
=
$
(
"<li class='card mb-2'>"
+
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
report
.
operationId
+
"', '"
+
report
.
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
directKey
+
"','"
+
report
.
phaseNo
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>"
+
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'><span class='proccess'></span></div></div>"
+
"<div class='pl-5 h-100 d-flex align-items-center'><div class='w-100'>"
+
"<div class='fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100'>"
+
report
.
phaseName
+
"</div>"
+
"<div class='fs-12 text-truncate'>"
+
report
.
operationName
+
"</div>"
+
"<div class='d-flex justify-content-between align-items-center'>"
+
"<div class='fs-10 text-truncate'>"
+
report
.
taskName
+
"</div>"
+
"<div class='fs-8 text-secondary text-truncate'>"
+
report
.
taskCode
+
"</div>"
+
"</div></div></div></a></li>"
);
return
ele
;
}
/**
* create Report With Warnings List html
* @param {*} operationListOld
* @returns
*/
PICKUP
.
createReportWithWarningList
=
function
(
operationListOld
)
{
let
operationList
=
PICKUP
.
sortWarningList
(
operationListOld
);
$
(
'#viewMenuReportWithWarnings'
).
removeClass
(
'd-none'
);
$
(
"#reportWithWarnings-list"
).
empty
();
PICKUP
.
countReportWithWarning
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
PICKUP
.
showNotFoundPickupItem
(
"#reportWithWarnings-list"
);
$
(
'#viewMenuReportWithWarnings'
).
addClass
(
'd-none'
);
return
;
}
$
(
'#notFoundReportWithWarning'
).
addClass
(
'd-none'
);
var
msgLevelReport
=
getMsg
(
"reportLevelReport"
)
;
console
.
log
(
"msgLevelReport :"
+
msgLevelReport
);
var
msgLevelAnswer
=
getMsg
(
"reportLevelAnswer"
)
;
console
.
log
(
"msgLevelAnswer :"
+
msgLevelAnswer
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
//TODO aタグlist.html 転移処理
var
operationNameLi
;
$
(
'#reportWithWarnings-list'
).
addClass
(
'task-list view-content view-block'
);
const
msgLevelReport
=
I18N
.
i18nText
(
'reportLevelReport'
);
const
msgLevelAnswer
=
I18N
.
i18nText
(
'reportLevelAnswer'
);
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
operationNameLi
;
switch
(
operationList
[
i
].
reportType
)
{
case
0
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
case
PICKUP
.
REPORT_TYPE
.
REPORTONLY
:
operationNameLi
=
PICKUP
.
initWarningReportWithReportOnlyType
(
operationList
[
i
]);
break
;
case
1
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='sub-title'>"
+
PICKUP
.
getInspectDate
(
operationList
[
i
].
reportStartDateString
)
+
" ~ "
+
PICKUP
.
getInspectDate
(
operationList
[
i
].
reportEndDateString
)
+
"</div></div> </div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
case
PICKUP
.
REPORT_TYPE
.
INSPECT
:
operationNameLi
=
PICKUP
.
initWarningReportWithInspectType
(
operationList
[
i
]);
break
;
case
2
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'></li>"
);
var
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"','"
+
operationList
[
i
].
taskType
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'></a>"
);
var
liTagTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
)
;
var
liTagReportType
;
if
(
operationList
[
i
].
taskType
==
0
)
case
PICKUP
.
REPORT_TYPE
.
WITHREPLY
:
// report answer
if
(
operationList
[
i
].
taskType
==
PICKUP
.
REPLYREPORT_TASK_TYPE
.
REPORT
)
{
liTagReportType
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
msgLevelReport
+
"</div>"
)
;
operationNameLi
=
PICKUP
.
initWarningReportWithAnswerReportType
(
operationList
[
i
],
msgLevelReport
)
;
}
else
{
liTagReportType
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
msgLevelAnswer
+
"</div>"
)
;
operationNameLi
=
PICKUP
.
initWarningReportWithAnswerReportType
(
operationList
[
i
],
msgLevelAnswer
)
;
}
var
divCode
=
$
(
"<div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12'></i>"
);
ahrefRequiredFlg
.
append
(
liTagReportType
);
ahrefRequiredFlg
.
append
(
liTagTitle
);
ahrefRequiredFlg
.
append
(
divCode
);
ahrefRequiredFlg
.
append
(
iIcon
);
operationNameLi
.
append
(
ahrefRequiredFlg
);
break
;
case
3
:
var
directKey
=
operationList
[
i
].
processKey
;
if
(
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
VTOUR
||
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
operationList
[
i
].
taskKey
;
if
(
operationList
[
i
].
phaseNo
>
1
)
{
//find taskKey of phaseNo 1
for
(
var
k
=
0
;
k
<
operationList
.
length
;
k
++
)
{
if
(
operationList
[
k
].
phaseNo
==
1
&&
operationList
[
k
].
processKey
==
operationList
[
i
].
processKey
)
{
directKey
=
operationList
[
k
].
taskKey
;
break
;
}
}
}
}
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
directKey
+
"','"
+
operationList
[
i
].
phaseNo
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
operationList
[
i
].
phaseName
+
"</div> <div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
case
PICKUP
.
REPORT_TYPE
.
WORKFLOW
:
// continouswork
operationNameLi
=
PICKUP
.
initWarningReportWithContinuousReportType
(
operationList
[
i
]);
break
;
}
$
(
"#reportWithWarning-list"
).
append
(
operationNameLi
);
$
(
"#reportWithWarning
s
-list"
).
append
(
operationNameLi
);
PICKUP
.
countReportWithWarning
=
PICKUP
.
countReportWithWarning
+
1
;
}
// show not found if
if
(
PICKUP
.
countReportWithWarning
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
if
(
PICKUP
.
countReportWithWarning
==
0
)
{
PICKUP
.
showNotFoundPickupItem
(
"#reportWithWarnings-list"
);
$
(
'#viewMenuReportWithWarnings'
).
addClass
(
'd-none'
);
return
;
}
PICKUP
.
showCountDisplayPickupItem
(
"#count-ReportWithWarnings"
,
PICKUP
.
countReportWithWarning
)
};
/**
* get Inspect Date format
* @param {*} dateString
* @returns
*/
PICKUP
.
getInspectDate
=
function
(
dateString
)
{
var
date
=
new
Date
(
dateString
)
return
date
.
getFullYear
()
+
"/"
+
(
"0"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
"/"
+
(
"0"
+
date
.
getDate
()).
slice
(
-
2
)
+
" "
+
(
"0"
+
date
.
getHours
()).
slice
(
-
2
)
+
":"
+
(
"0"
+
date
.
getMinutes
()).
slice
(
-
2
);
let
date
=
new
Date
(
dateString
)
return
date
.
getFullYear
()
+
"/"
+
(
"0"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
"/"
+
(
"0"
+
date
.
getDate
()).
slice
(
-
2
)
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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