Commit ef965418 by Yujin Seo

Merge branch 'feature/1.4.0' into feature/1.4.0_seo

parents c479f359 bc3a9f61
...@@ -108,8 +108,8 @@ ...@@ -108,8 +108,8 @@
</a> </a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item sort-type" data-sort="0" onclick="CHK.changeSortType(this);">作業名順</a> <a class="dropdown-item sort-type" data-sort="0" onclick="CHK.changeSortType(this);">作業名順</a>
<a class="dropdown-item sort-type" data-sort="1" onclick="CHK.changeSortType(this);">作業期間が新しい順</a> <a class="dropdown-item sort-type active" data-sort="1" id="defaultSort" onclick="CHK.changeSortType(this);">作業期間が新しい順</a>
<a class="dropdown-item sort-type active" data-sort="2" id="defaultSort" onclick="CHK.changeSortType(this);">作業期間が古い順</a> <a class="dropdown-item sort-type" data-sort="2" onclick="CHK.changeSortType(this);">作業期間が古い順</a>
<a class="dropdown-item sort-type" data-sort="3" onclick="CHK.changeSortType(this);">報告タイプ順</a> <a class="dropdown-item sort-type" data-sort="3" onclick="CHK.changeSortType(this);">報告タイプ順</a>
<a class="dropdown-item sort-type" data-sort="4" onclick="CHK.changeSortType(this);">閲覧日が新しい順</a> <a class="dropdown-item sort-type" data-sort="4" onclick="CHK.changeSortType(this);">閲覧日が新しい順</a>
</div> </div>
......
...@@ -247,7 +247,6 @@ CHK_L.sendAppCommand = function (command, operationId, contentId, operationGroup ...@@ -247,7 +247,6 @@ CHK_L.sendAppCommand = function (command, operationId, contentId, operationGroup
param.operationGroupMasterId = operationGroupMasterId; param.operationGroupMasterId = operationGroupMasterId;
CHK.sendABookCheckApi(param); CHK.sendABookCheckApi(param);
} }
/** /**
* 定期点検リストを更新 * 定期点検リストを更新
* *
......
...@@ -2390,6 +2390,7 @@ CHK.showRelatedContent = function(urlPath, contentId, pageNum) { ...@@ -2390,6 +2390,7 @@ CHK.showRelatedContent = function(urlPath, contentId, pageNum) {
} }
} }
CHK.getOneTimeKey = function(url, callback) { CHK.getOneTimeKey = function(url, callback) {
$.ajax({ $.ajax({
type: "GET", type: "GET",
...@@ -2967,6 +2968,8 @@ CHK.startScan = function() { ...@@ -2967,6 +2968,8 @@ CHK.startScan = function() {
try { try {
if (CHK.isAndroid) { if (CHK.isAndroid) {
android.startScan(); android.startScan();
} else if (CHK.isIOS) {
webkit.messageHandlers.startScan.postMessage({});
} }
} catch (e) { } catch (e) {
return; return;
...@@ -2979,6 +2982,8 @@ CHK.scanClose = function() { ...@@ -2979,6 +2982,8 @@ CHK.scanClose = function() {
try { try {
if (CHK.isAndroid) { if (CHK.isAndroid) {
android.stopScan(); android.stopScan();
} else if (CHK.isIOS) {
webkit.messageHandlers.stopScan.postMessage({});
} }
} catch (e) { } catch (e) {
return; return;
...@@ -2987,19 +2992,32 @@ CHK.scanClose = function() { ...@@ -2987,19 +2992,32 @@ CHK.scanClose = function() {
$(".scan-area").addClass("d-none"); $(".scan-area").addClass("d-none");
} }
CHK.scanResult = function(scannedCode) { CHK.scanResult = function(scannedCode, scanType) {
if (scannedCode == null || !(scannedCode.length)) {
return;
}
CHK.scanClose(); CHK.scanClose();
var operationList = CHK.operation.searchOperationList; var operationList = CHK.operation.searchOperationList;
var scannedOperation = operationList.filter(function(operation) { var scannedOperation = operationList.filter(function(operation) {
return operation.permitCode == scannedCode; return operation.permitCode == scannedCode.substring(4);
})[0]; })[0];
if (scannedOperation != null) { if (scannedOperation != null) {
CHK_L.sendAppCommand('goOperation', scannedOperation.operationId, scannedOperation.contentId); CHK.sendScanResult('goOperation', scannedOperation.operationId, scannedOperation.contentId, scanType);
} else { } else {
CHK.displayAlert("notExistCode"); CHK.displayAlert("notExistCode");
} }
} }
CHK.sendScanResult = function (command, operationId, contentId, scanType) {
var param = {};
param.cmd = CHK.getCommand(command);
param.operationId = operationId;
param.contentId = contentId;
param.scanType = scanType;
CHK.sendABookCheckApi(param);
}
CHK.alertClose = function() { CHK.alertClose = function() {
$(".alert-overlay").addClass("d-none"); $(".alert-overlay").addClass("d-none");
$(".alert-area").addClass("d-none"); $(".alert-area").addClass("d-none");
......
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