Commit afcf3947 by Lee Munkyeong

検索機能実装

parent 49cc7d88
......@@ -51,12 +51,12 @@
<nav aria-label="search">
<div class="row">
<div class="col-7 col-md-5 col-lg-4">
<div class="form-group has-search">
<i class="fas fa-search form-control-feedback"></i>
<input type="text" class="form-control" placeholder="作業名">
<div class="form-group has-search input-group">
<input type="text" class="form-control" placeholder="作業名" id="searchTaskName">
<div class="input-group-append">
<i class="fas fa-search input-group-text" onclick="CHK.search();"></i>
</div>
</div>
</div>
<div class="col-1 col-md-2 duration-area">
......@@ -70,34 +70,29 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="form-group">
<label>開始日</label>
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" name="start" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker1" placeholder="選択" inputmode="none">
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label>終了日</label>
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" name="end" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker2" placeholder="選択" inputmode="none">
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label>開始日</label>
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" name="start" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker1" placeholder="選択" inputmode="none" id="searchStartDate">
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label>終了日</label>
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" name="end" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker2" placeholder="選択" inputmode="none" id="searchEndDate">
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-4 col-md-5 col-lg-6 text-right">
<a href="#" class="text-decoration-none py-2 lht-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-120, 0">
<i class="fa fa-sort text-dark"></i>
......@@ -111,7 +106,6 @@
<a class="dropdown-item active" href="#">作業期間が古い順</a>
<a class="dropdown-item" href="#">閲覧日が新しい順</a>
</div>
<a href="javascript:CHK_L.sendAppCommand('refreshContent');" class="text-decoration-none py-2 lht-0 d-inline-block ml-3">
<i class="fa fa-redo text-dark"></i>
<span class="d-none d-md-inline text-dark fs-10">
......@@ -119,7 +113,6 @@
</span>
</a>
</div>
</div>
</nav>
......
......@@ -2766,4 +2766,19 @@ CHK.createOperationList = function(operationList) {
function setOperationDate(date){
var operationDate = date.replace(/-/g, "/").substring(0,10);
return operationDate;
};
/**
* 作業一覧検索
*/
CHK.search = function() {
var searchKeyword = $("#searchTaskName").val();
var searchStartDate = $("#searchStartDate").val();
var searchEndDate = $("#searchEndDate").val();
var searchResult;
if (CHK.isAndroid) {
searchResult = JSON.parse(android.searchOperationList(searchKeyword, searchStartDate, searchEndDate));
$('#operationTable').empty();
CHK.createOperationList(searchResult.operationList);
}
};
\ 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