Commit 1dc0cccc by Lee Munkyeong

検索対応

parent 773ca169
......@@ -372,10 +372,11 @@ CHK.initReport = function(callback) {
CHK.initReportApp = function (callback) {
// 作業一覧JSONデータ
CHK.loadJson(CHK.jsonPath.operationList, function (json) {
CHK.operation = json;
if (CHK.isAndroid) {
$('#operationTable').empty();
CHK.operation.searchOperationList = json.operationList;
}
CHK.operation = json;
//作業一覧描画
CHK.createOperationList(CHK.operation.operationList);
});
......@@ -2734,9 +2735,9 @@ CHK.createCategory = function(operationGroupMasterList) {
/**
* 作業一覧描画
*/
CHK.createOperationList = function(operationList) {
CHK.createOperationList = function(operationList, isSearched = false) {
$('#operationTable').empty();
if (CHK.isSearched) {
if (isSearched) {
operationList = CHK.operation.searchOperationList;
}
if (operationList.length > 1) {
......@@ -2807,14 +2808,13 @@ CHK.search = function() {
var searchResult;
if (CHK.isAndroid) {
searchResult = JSON.parse(android.searchOperationList(searchKeyword, searchStartDate, searchEndDate));
CHK.isSearched = true;
CHK.operation.searchOperationList = searchResult.operationList;
CHK.createOperationList(searchResult.operationList);
CHK.createOperationList(searchResult.operationList, true);
}
};
CHK.changeSortType = function(sortType) {
$(".sort-type").removeClass("active");
$(sortType).addClass("active");
CHK.createOperationList(CHK.operation.operationList);
CHK.createOperationList(CHK.operation.operationList, true);
}
\ 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