|
|
@@ -42,10 +42,14 @@
|
|
|
<tr>
|
|
|
<th>업체</th>
|
|
|
<td>
|
|
|
- <select name="supplyCompCd">
|
|
|
- <option th:if="${sessionInfo.supplyCompCd == null}" value="">[전체]</option>
|
|
|
- <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
+<!-- <select name="supplyCompCd"> -->
|
|
|
+<!-- <option th:if="${sessionInfo.supplyCompCd == null}" value="">[전체]</option> -->
|
|
|
+<!-- <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option> -->
|
|
|
+<!-- </select> -->
|
|
|
+ <input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20"/>
|
|
|
+ <button type="button" class="btn icn" onclick="cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');"><i class="fa fa-search"></i></button>
|
|
|
+ <span id="supplyCompTxt"></span>
|
|
|
+ <input type="hidden" name="supplyCompList"/>
|
|
|
</td>
|
|
|
<th>권한</th>
|
|
|
<td>
|
|
|
@@ -77,7 +81,7 @@
|
|
|
<ul class="panelBar">
|
|
|
<li class="center">
|
|
|
<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
|
|
|
- <button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
|
|
|
+ <button type="button" class="btn btn-gray btn-lg" id="btnInit">초기화</button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</form>
|
|
|
@@ -155,6 +159,38 @@
|
|
|
|
|
|
gridOptions.rowSelection = 'multiple';
|
|
|
|
|
|
+ // 업체 조회 팝업에서 호출
|
|
|
+ var fnSetSupplyCompInfo = function(result) {
|
|
|
+ var arrSupplyComp = [];
|
|
|
+ var supplyCompTxt = "";
|
|
|
+ var sIndex = 0;
|
|
|
+ $('#supplyCompTxt').html('');
|
|
|
+ $('#searchForm input[name=supplyCompSearchTxt]').val('');
|
|
|
+
|
|
|
+ result.forEach(function(supplyComp) {
|
|
|
+ sIndex++;
|
|
|
+ arrSupplyComp.push(supplyComp.supplyCompCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회 값이 하나일 경우 화면에 코드 노출. 그 외는 갯수 처리
|
|
|
+ if (sIndex == 1) {
|
|
|
+ $('#searchForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
|
|
|
+ } else {
|
|
|
+ supplyCompTxt = sIndex + " 개";
|
|
|
+ $('#supplyCompTxt').html(supplyCompTxt);
|
|
|
+ }
|
|
|
+
|
|
|
+ var jsonData = JSON.stringify(arrSupplyComp);
|
|
|
+ $("#searchForm input[name=supplyCompList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 초기화 클릭시
|
|
|
+ $('#btnInit').on('click', function() {
|
|
|
+ $('#searchForm')[0].reset();
|
|
|
+ $('#searchForm input[name=supplyCompList]').val('');
|
|
|
+ $('#supplyCompTxt').html('');
|
|
|
+ });
|
|
|
+
|
|
|
// 조회
|
|
|
$('#btnSearch').on('click', function() {
|
|
|
// Fetch data
|