Commit fc242179 by NGO THI HONG

#49091 Update operation list

parent fc7965f0
......@@ -259,6 +259,10 @@
.tab-label.on {
color: var(--blue);
}
.tab-label.on .task-cnt{
font-weight: normal;
color: var(--secondary);
}
.tab-content.on{
display: block;
animation: show .3s linear 0s;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -25,16 +25,16 @@
<header >
<nav class="navbar navbar-dark bg-primary position-fixed fixed-top w-100">
<a class="navbar-brand category-btn lht-0">
<a href="index.html" class="navbar-brand category-btn lht-0">
<i class="fas fa-chevron-left fs-12 p-1"></i>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonBack">
戻る
</span>
</a>
<h1 class="fs-10 font-weight-bold mb-0 text-white multi-lang" data-msg="labelPickUp">ピックアップ</h1>
<a href="#" class="nav-link text-white lht-0 p-1">
<a class="nav-link text-white lht-0 p-1">
<img class="icon" src="img/icon_update.svg" alt="更新">
<span class="d-none d-md-inline fs-10 align-middle multi-lang" data-msg="buttonRefresh">
<span class="d-none d-md-inline fs-10 align-middle multi-lang" data-msg="buttonRefresh" onclick="CHK_pu.init();">
更新
</span>
</a>
......@@ -49,21 +49,15 @@
<input id="tab-ContinueWork" type="radio" name="tab-task" class="tab-switch" checked>
<input id="tab-ReportWithWarning" type="radio" name="tab-task" class="tab-switch">
<ul class="tab-menu pl-0">
<li class="tab-label list-unstyled on"><label class="tab-label-NewReport fs-9 multi-lang" data-msg="labelNewReport" for="tab-NewReport">新規報告<div class="task-cnt">10</div></label></li>
<li class="tab-label list-unstyled"><label class="tab-label-ContinueWork fs-9 multi-lang" data-msg="labelContinueWork" for="tab-ContinueWork">工程作業<div class="task-cnt">99+</div></label></li>
<li class="tab-label list-unstyled"><label class="tab-label-ReportWithWarning fs- multi-lang" data-msg="labelReportWithWarning" for="tab-ReportWithWarning">警告を含む報告<div class="task-cnt">10</div></label></li>
<li class="tab-label list-unstyled on"><label class="tab-label-NewReport fs-9 multi-lang" data-msg="labelNewReport" for="tab-NewReport" >新規報告</label><div class="task-cnt" id="count-NewReport"></div></li>
<li class="tab-label list-unstyled"><label class="tab-label-ContinueWork fs-9 multi-lang" data-msg="labelContinueWork" for="tab-ContinueWork" >工程作業</label><div class="task-cnt" id="count-ContinueWork"></div></li>
<li class="tab-label list-unstyled"><label class="tab-label-ReportWithWarning fs- multi-lang" data-msg="labelReportWithWarning" for="tab-ReportWithWarning" >警告を含む報告</label><div class="task-cnt" id="count-ReportWithWarning"></div></li>
</ul>
<div class="tab-content-area">
<!-- 新規報告 -->
<div id="tab-content-NewReport" class="tab-content on">
<div class="container-fluid">
<ul class="task-list p-0 mt-3" id="newReport-list">
<li class='item list-unstyled rounded border mb-2' name = 'operationId_x5489'>
<a href="#" class="d-block px-3 py-3 text-decoration-none text-dark">
<div class="title">作業名が入ります。</div>
<i class="fas fa-chevron-right fs-12"></i>
</a>
</li>
</ul>
</div>
</div>
......@@ -79,7 +73,7 @@
<div id="tab-content-ReportWithWarning" class="tab-content">
<div class="container-fluid">
<ul class="task-list p-0 mt-3" id="reportWithWarning-list">
</ul>
</div>
</div>
......
......@@ -26,19 +26,15 @@ CHK_pu.init = function() {
CHK_pu.createNewReportList(CHK.operation.operationList);
CHK_pu.createContinueWorkList(CHK.operation.operationList);
CHK_pu.createReportWithWarning(CHK.operation.operationList);
CHK_pu.setCountElementInPickup();
});
}
CHK_pu.getPickup = function(operationList) {
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].reportType == 3 ) {
CHK_pu.countContinueWorkReport = CHK_pu.countContinueWorkReport + 1;
CHK_pu.continueWorkReport.push(operationList[i]);
}
CHK_pu.countNewReportList = CHK_pu.countNewReportList + 1;
}
CHK_pu.newReportList.list_0 = operationList;
CHK_pu.setCountElementInPickup = function() {
$("#count-NewReport")[0].innerHTML = CHK_pu.countNewReportList;
$("#count-ContinueWork")[0].innerHTML = CHK_pu.countContinueWorkReport;
$("#count-ReportWithWarning")[0].innerHTML = CHK_pu.countReportWithWarning;
}
CHK_pu.createNewReportList = function(operationList, isSearched = false) {
......@@ -61,12 +57,13 @@ CHK_pu.createNewReportList = function(operationList, isSearched = false) {
}
$("#newReport-list").append(operationNameLi);
CHK_pu.countNewReportList = CHK_pu.countNewReportList + 1;
}
if(CHK.isAndroid) {
android.hideLoading();
}
console.log("CHK_pu.countNewReportList " , CHK_pu.countNewReportList );
console.log("end createNewReportList" );
};
......@@ -82,7 +79,7 @@ CHK_pu.createContinueWorkList = function(operationList, isSearched = false) {
if (operationList[i].permitCodeRequiredFlg == 1) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK.displayAlert('onlyRfid');\" 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].operationName
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
......@@ -91,7 +88,7 @@ CHK_pu.createContinueWorkList = function(operationList, isSearched = false) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" 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].operationName
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
......@@ -99,44 +96,75 @@ CHK_pu.createContinueWorkList = function(operationList, isSearched = false) {
}
$("#continueWork-list").append(operationNameLi);
CHK_pu.countContinueWorkReport = CHK_pu.countContinueWorkReport + 1;
}
}
if(CHK.isAndroid) {
android.hideLoading();
}
console.log("CHK_pu.countContinueWorkReport " , CHK_pu.countContinueWorkReport );
};
CHK_pu.createReportWithWarning = function(operationList, isSearched = false) {
console.log("createReportWithWarning" );
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].reportType === 3)
console.log("lengh", operationList[i].warningReportList.length );
if(operationList[i].warningReportList.length === 0) continue;
//TODO aタグlist.html 転移処理
var operationNameLi;
for (var j = 0; j < operationList[i].warningReportList.length; j++)
{
//TODO aタグlist.html 転移処理
var operationNameLi;
if (operationList[i].permitCodeRequiredFlg == 1) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK.displayAlert('onlyRfid');\" 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].operationName
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
} else {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
switch (operationList[i].reportType)
{
case 0:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
+ "');\" 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].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div></div> <div class='sub-title'>" + operationList[i].warningReportList[j].task_name
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
case 1:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
+ "');\" 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].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].operationStartDate + " / " + operationList[i].operationEndDate
+ "</div></div> </div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
case 2:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
+ "');\" 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].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div></div> <div class='sub-title'>" + operationList[i].warningReportList[j].task_name
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
case 3:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" 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].operationName
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
}
break;
}
$("#reportWithWarning-list").append(operationNameLi);
CHK_pu.countReportWithWarning = CHK_pu.countReportWithWarning + 1;
}
}
if(CHK.isAndroid) {
android.hideLoading();
}
console.log("CHK_pu.countReportWithWarning " , CHK_pu.countReportWithWarning );
console.log("End createReportWithWarning" );
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment