fix: 제품검색 기능 수정

dev
Leeyh1121 5 months ago
parent fd46c0ea7b
commit 091b5d9703

@ -60,8 +60,10 @@
<label for="prductCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품코드</label> <label for="prductCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품코드</label>
<input type="text" class="form-control w-60" id="prductCd--${pageName}" name="prductCd" data-map="prductCd" readonly> <input type="text" class="form-control w-60" id="prductCd--${pageName}" name="prductCd" data-map="prductCd" readonly>
</div> </div>
<button type="button" class="btn btn-search w-px-120" id="btnProductBarcodeSearch--${pageName}" title="검색">바코드 검색</button> <div class="col-md-4">
<button type="button" class="btn btn-search w-px-120" id="btnProductSearch--${pageName}" title="검색">제품 검색</button> <button type="button" class="btn btn-search w-px-120" id="btnProductBarcodeSearch--${pageName}" title="검색">바코드 검색</button>
<button type="button" class="btn btn-search w-px-120" id="btnProductSearch--${pageName}" title="검색">제품 검색</button>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label> <label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly> <input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly>
@ -75,18 +77,18 @@
<input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="rgsDt" data-map="rgsDt" readonly> <input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="rgsDt" data-map="rgsDt" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="prdMinDistbQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 량</label> <label for="prdMinDistbQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 량</label>
<input type="text" class="form-control w-60" id="prdMinDistbQy--${pageName}" name="prdMinDistbQy" data-map="prdMinDistbQy" readonly> <input type="text" class="form-control w-30" id="prdMinDistbQy--${pageName}" name="prdMinDistbQy" data-map="prdMinDistbQy" readonly>
<input type="text" class="form-control w-60" id="stdPackngStleNm--${pageName}" name="stdPackngStleNm" data-map="stdPackngStleNm" readonly> <input type="text" class="form-control w-30" id="stdPackngStleNm--${pageName}" name="stdPackngStleNm" data-map="stdPackngStleNm" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="prdTotPceQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label> <label for="prdTotPceQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label>
<input type="text" class="form-control w-60" id="prdTotPceQy--${pageName}" name="prdTotPceQy" data-map="prdTotPceQy" readonly> <input type="text" class="form-control w-30" id="prdTotPceQy--${pageName}" name="prdTotPceQy" data-map="prdTotPceQy" readonly>
<input type="text" class="form-control w-60" id="pceCoUnitNm--${pageName}" name="pceCoUnitNm" data-map="pceCoUnitNm" readonly> <input type="text" class="form-control w-30" id="pceCoUnitNm--${pageName}" name="pceCoUnitNm" data-map="pceCoUnitNm" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="dsuseQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label> <label for="dsuseQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label>
<input type="text" class="form-control w-60" id="dsuseQy--${pageName}" name="dsuseQy" data-map="dsuseQy" readonly> <input type="text" class="form-control w-60" id="dsuseQy--${pageName}" name="dsuseQy" data-map="dsuseQy">
</div> </div>
</div> </div>
<div style=" align-content: center; text-align: center;"> <div style=" align-content: center; text-align: center;">
@ -108,6 +110,7 @@
<th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th> <th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th>
<th class="sorting" style="width: 230.469px;">낱개 단위 수량</th> <th class="sorting" style="width: 230.469px;">낱개 단위 수량</th>
<th class="sorting" style="width: 230.469px;">폐기 수량</th> <th class="sorting" style="width: 230.469px;">폐기 수량</th>
<th class="sorting" style="width: 230.469px;">이미지</th>
</tr> </tr>
</thead> </thead>
<tbody id="userList"> <tbody id="userList">
@ -123,6 +126,7 @@
<td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td> <td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td>
<td {onclick}="" {ondblclick}="">{PCE_QY}</td> <td {onclick}="" {ondblclick}="">{PCE_QY}</td>
<td {onclick}="" {ondblclick}="">{DSUSE_QY}</td> <td {onclick}="" {ondblclick}="">{DSUSE_QY}</td>
<td {onclick}="" {ondblclick}=""></td>
</tr> </tr>
</template> </template>
</table> </table>
@ -157,19 +161,27 @@
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
// FormFields // FormFields
$P.formFields = new FimsFormFields("#frmEdit--${pageName}"); $P.bsshFormFields = new FimsFormFields("#bssh--${pageName}");
$P.productFormFields = new FimsFormFields("#product--${pageName}");
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.control = new DatasetControl({
prefix: "dsuseMgtReceipt" prefix: "dsuseMgtReceiptBssh"
, prefixName: "마약류 폐기 신청서 접수" , prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.MNG_ID : "" , keymapper: info => info ? info.bsshCd : ""
, dataGetter: obj => obj.${infoPrefix}Info , dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl" , infoSize: "xl"
}); });
$P.productControl = new DatasetControl({
prefix: "dsuseMgtReceiptProduct"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
/************************************************************************** /**************************************************************************
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/
@ -177,10 +189,18 @@
$P.control.onCurrentChange = item => { $P.control.onCurrentChange = item => {
if (!item) return; if (!item) return;
$P.bsshFormFields.set($P.control, item);
// 업무구분에 따른 URL 변경
//$P.fnSetURL(item.data.bsshCd);
}
$P.productControl.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅 // Dataset 셋팅
$P.formFields.set($P.control, item); $P.productFormFields.set($P.productControl, item);
// 업무구분에 따른 URL 변경 // 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD); //$P.fnSetURL(item.data.bsshCd);
} }
// 저장 callback // 저장 callback
@ -219,7 +239,7 @@
}); });
} }
$P.control.getProductInfo = () => { $P.productControl.getProductInfo = () => {
let dialogTitle = "마약류 제품 조회"; let dialogTitle = "마약류 제품 조회";
let params = {openPage : "product--${pageName}"}; let params = {openPage : "product--${pageName}"};
@ -231,8 +251,8 @@
id : "productMainDialog" id : "productMainDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.productControl.infoSize
, onClose : () => { $P.control.setData(); } , onClose : () => { $P.productControl.setData(); }
}); });
} }
}); });
@ -256,8 +276,8 @@
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정 // 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => { $P.fnSetURL = (taskSeCd) => {
$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록 // $P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정 // $P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정
} }
// 전자우편 안내문 등록 버튼 이벤트 // 전자우편 안내문 등록 버튼 이벤트
@ -266,7 +286,7 @@
} }
$P.fnSearchProduct = (title) => { $P.fnSearchProduct = (title) => {
$P.control.getProductInfo(); $P.productControl.getProductInfo();
} }
/************************************************************************** /**************************************************************************
@ -281,7 +301,7 @@
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?" content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.control.save($P.formFields.get()); // formFields $P.control.save($P.bsshFormFields.get()); // formFields
} }
}); });
} }
@ -322,6 +342,7 @@
// 3. Dataset 설정 // 3. Dataset 설정
$P.control.setData([${opnnDlbrMbrInfo}]); $P.control.setData([${opnnDlbrMbrInfo}]);
$P.productControl.setData([${opnnDlbrMbrInfo}]);
}); });
</script> </script>

@ -50,7 +50,7 @@
<tbody id="tbody--${pageName}"> <tbody id="tbody--${pageName}">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="productCd"> <tr data-key="prductCd">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcdSeNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcdSeNm}</td>
@ -97,7 +97,7 @@
} }
, prefix: "productMain" , prefix: "productMain"
, prefixName: "마약류 제품 조회" , prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.productCd : "" , keymapper: info => info ? info.prductCd : ""
, dataGetter : obj => obj.productMainList , dataGetter : obj => obj.productMainList
, appendData: true , appendData: true
, infoSize: "xl" , infoSize: "xl"
@ -162,7 +162,7 @@
// //
let replacer = (str, dataItem) => str let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("productCd") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prductCd") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]

Loading…
Cancel
Save