Commit 0a9dd91e by Lee Munkyeong

RFID連動作業

parent 8a479a47
...@@ -20175,6 +20175,19 @@ button { ...@@ -20175,6 +20175,19 @@ button {
transition: .3s transition: .3s
} }
.alert-overlay {
left: 0;
width: 100%;
top: 0;
height: calc(100%);
display: block;
position: absolute;
background: #000;
opacity: .5;
z-index: 1031;
transition: .3s
}
.scan-area { .scan-area {
border-radius: 15px; border-radius: 15px;
z-index: 1032; z-index: 1032;
...@@ -20186,6 +20199,17 @@ button { ...@@ -20186,6 +20199,17 @@ button {
background-color: white; background-color: white;
} }
.alert-area {
border-radius: 15px;
z-index: 1032;
height: calc(40%);
width: 60%;
position: absolute;
top: 10%;
left: 20%;
background-color: white;
}
.loading-spinner { .loading-spinner {
margin-left: 33%; margin-left: 33%;
margin-top: 10%; margin-top: 10%;
......
...@@ -166,11 +166,16 @@ ...@@ -166,11 +166,16 @@
</footer> </footer>
<div class="scan-overlay d-none"></div> <div class="scan-overlay d-none"></div>
<div class="alert-overlay d-none"></div>
<div class="scan-area d-none"> <div class="scan-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.scanClose();"></i> <i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.scanClose();"></i>
<i class="fas fa-spinner fa-5x fa-spin loading-spinner"></i> <i class="fas fa-spinner fa-5x fa-spin loading-spinner"></i>
<div class="fs-13 mt-4 text-center">読み込み中</div> <div class="fs-13 mt-4 text-center">読み込み中</div>
</div> </div>
<div class="alert-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.alertClose();"></i>
<div class="fs-13 mt-4 text-center" id="alertMsg"></div>
</div>
<script type="text/javascript" src="js/app.js" defer></script> <script type="text/javascript" src="js/app.js" defer></script>
</body> </body>
......
...@@ -57,6 +57,8 @@ var msgMap = { // velocity? ...@@ -57,6 +57,8 @@ var msgMap = { // velocity?
completeUpload: {ja:"登録が完了しました。<br/>右上の閉じるボタンをクリックし、画面を閉じてください。", ko:"등록했습니다. <br/>오른쪽 위의 닫기버튼을 클릭해, 화면을 닫아주세요.", en:"Registered. <br/>Please click the close button in the upper right and close the screen."}, completeUpload: {ja:"登録が完了しました。<br/>右上の閉じるボタンをクリックし、画面を閉じてください。", ko:"등록했습니다. <br/>오른쪽 위의 닫기버튼을 클릭해, 화면을 닫아주세요.", en:"Registered. <br/>Please click the close button in the upper right and close the screen."},
Yes: {ja:"はい", ko:"Yes", en:"Yes"}, Yes: {ja:"はい", ko:"Yes", en:"Yes"},
No: {ja:"いいえ", ko:"No", en:"No"}, No: {ja:"いいえ", ko:"No", en:"No"},
onlyRfid:{ja:"RFID又はバーコードが設定されています。<br/>該当コードを読み込んでください。", ko:"RFID또는 바코드가 설정되어있습니다. <br/>해당코드를 스캔해주십시오.", en:"RFID or barcode is set. <br/>Please scan the code."},
notExistCode:{ja:"読み込んだコードと一致しません。<br/>コードを確認してもう一度お願いします。<br/>", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다. <br/>코드를 확인하고 한번도 시도해주세요. <br/>", en:"No action exists that matches the scanned code. <br/>Please check the code and try it once. <br/>"},
overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"}, overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"},
}; };
...@@ -2825,15 +2827,24 @@ CHK.createOperationList = function(operationList, isSearched = false) { ...@@ -2825,15 +2827,24 @@ CHK.createOperationList = function(operationList, isSearched = false) {
} }
} }
for (var i = 0; i < operationList.length; i++) { for (var i = 0; i < operationList.length; i++) {
var operationTR = $("<tr/>"); var operationTR = $("<tr/>");
//TODO aタグlist.html 転移処理 //TODO aタグlist.html 転移処理
var operationNameTd = $("<td class='operationId_" + operationList[i].operationId var operationNameTd;
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" if (operationList[i].permitCodeRequiredFlg == 1) {
+ operationList[i].operationId + "', '" + operationList[i].contentId operationNameTd = $("<td class='operationId_" + operationList[i].operationId
+ "');\" class='d-block text-black text-decoration-none mb-1'>" + operationList[i].operationName + "'><a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='d-block text-black text-decoration-none mb-1'>" + operationList[i].operationName
+ "</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>" + "</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+ setOperationDate(operationList[i].operationStartDate) + " ~ " + setOperationDate(operationList[i].operationStartDate) + " ~ "
+ setOperationDate(operationList[i].operationEndDate) +"</div></td>"); + setOperationDate(operationList[i].operationEndDate) +"</div></td>");
} else {
operationNameTd = $("<td class='operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '"
+ operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block text-black text-decoration-none mb-1'>" + operationList[i].operationName
+ "</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+ setOperationDate(operationList[i].operationStartDate) + " ~ "
+ setOperationDate(operationList[i].operationEndDate) +"</div></td>");
}
var operationStartDateTd = $("<td/>", {class: "operationStartDate"}).text(setOperationDate(operationList[i].operationStartDate)); var operationStartDateTd = $("<td/>", {class: "operationStartDate"}).text(setOperationDate(operationList[i].operationStartDate));
var operationEndDateTd = $("<td/>", {class: "operationEndDate"}).text(setOperationDate(operationList[i].operationEndDate)); var operationEndDateTd = $("<td/>", {class: "operationEndDate"}).text(setOperationDate(operationList[i].operationEndDate));
...@@ -2909,11 +2920,49 @@ CHK.changeOperationGroupMaster = function(operationGroupMasterId) { ...@@ -2909,11 +2920,49 @@ CHK.changeOperationGroupMaster = function(operationGroupMasterId) {
} }
CHK.startScan = function() { CHK.startScan = function() {
try {
if (CHK.isAndroid) {
android.startScan();
}
} catch (e) {
return;
}
$(".scan-overlay").removeClass("d-none"); $(".scan-overlay").removeClass("d-none");
$(".scan-area").removeClass("d-none"); $(".scan-area").removeClass("d-none");
} }
CHK.scanClose = function() { CHK.scanClose = function() {
try {
if (CHK.isAndroid) {
android.stopScan();
}
} catch (e) {
return;
}
$(".scan-overlay").addClass("d-none"); $(".scan-overlay").addClass("d-none");
$(".scan-area").addClass("d-none"); $(".scan-area").addClass("d-none");
}
CHK.scanResult = function(scannedCode) {
CHK.scanClose();
var operationList = CHK.operation.searchOperationList;
var scannedOperation = operationList.filter(function(operation) {
return operation.permitCode == scannedCode;
})[0];
if (scannedOperation != null) {
CHK_L.sendAppCommand('goOperation', scannedOperation.operationId, scannedOperation.contentId);
} else {
CHK.displayAlert("notExistCode");
}
}
CHK.alertClose = function() {
$(".alert-overlay").addClass("d-none");
$(".alert-area").addClass("d-none");
}
CHK.displayAlert = function(msgCode) {
$("#alertMsg").html(getMsg(msgCode));
$(".alert-overlay").removeClass("d-none");
$(".alert-area").removeClass("d-none");
} }
\ 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