|
|
|
@ -169,6 +169,44 @@
|
|
|
|
|
* script 진입
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
const fnBarcodeSearch = (barcode) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do")
|
|
|
|
|
, data : {
|
|
|
|
|
barcodeStr : barcode,
|
|
|
|
|
userId : "${currentUser.account}"
|
|
|
|
|
}
|
|
|
|
|
, success : obj => {
|
|
|
|
|
if (!obj.success){
|
|
|
|
|
dialog.alert(obj.message);
|
|
|
|
|
$("#prductCd--${pageName}").val("");
|
|
|
|
|
$("#prductCd--${pageName}").prop("readonly", true);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let prdInfo = obj.data;
|
|
|
|
|
$P.productFormFields.set(
|
|
|
|
|
$P.productControl,
|
|
|
|
|
{
|
|
|
|
|
prductCd: prdInfo.prductCd,
|
|
|
|
|
prductNm: prdInfo.prductNm,
|
|
|
|
|
prdMinDistbQy: prdInfo.prdMinDistbQy,
|
|
|
|
|
stdPackngStleNm: prdInfo.stdPackngStleNm,
|
|
|
|
|
prdTotPceQy: prdInfo.prdTotPceQy,
|
|
|
|
|
pceCoUnitNm: prdInfo.pceCoUnitNm,
|
|
|
|
|
dsuseQy: prdInfo.dsuseQy,
|
|
|
|
|
prdValidDe: prdInfo.mnfSeqInfos[0].prdValidDe,
|
|
|
|
|
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
|
|
|
|
|
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
$("#prductCd--${pageName}").prop("readonly", true);
|
|
|
|
|
$("#dsuseQy--${pageName}").focus();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// pageObject
|
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
@ -573,40 +611,7 @@
|
|
|
|
|
$("#prductCd--${pageName}").on("change", () => {
|
|
|
|
|
let barcode = $("#prductCd--${pageName}").val();
|
|
|
|
|
if(barcode.length > 20){
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do")
|
|
|
|
|
, data : {
|
|
|
|
|
barcodeStr : barcode,
|
|
|
|
|
userId : "${currentUser.account}"
|
|
|
|
|
}
|
|
|
|
|
, success : obj => {
|
|
|
|
|
if (!obj.success){
|
|
|
|
|
dialog.alert(obj.message);
|
|
|
|
|
$("#prductCd--${pageName}").val("");
|
|
|
|
|
$("#prductCd--${pageName}").prop("readonly", true);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let prdInfo = obj.data;
|
|
|
|
|
$P.productFormFields.set(
|
|
|
|
|
$P.productControl,
|
|
|
|
|
{
|
|
|
|
|
prductCd: prdInfo.prductCd,
|
|
|
|
|
prductNm: prdInfo.prductNm,
|
|
|
|
|
prdMinDistbQy: prdInfo.prdMinDistbQy,
|
|
|
|
|
stdPackngStleNm: prdInfo.stdPackngStleNm,
|
|
|
|
|
prdTotPceQy: prdInfo.prdTotPceQy,
|
|
|
|
|
pceCoUnitNm: prdInfo.pceCoUnitNm,
|
|
|
|
|
dsuseQy: prdInfo.dsuseQy,
|
|
|
|
|
prdValidDe: prdInfo.mnfSeqInfos[0].prdValidDe,
|
|
|
|
|
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
|
|
|
|
|
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
$("#prductCd--${pageName}").prop("readonly", true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
fnBarcodeSearch(barcode);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
@ -619,9 +624,6 @@
|
|
|
|
|
}
|
|
|
|
|
initDatepicker("bssh--${pageName}");
|
|
|
|
|
$("#dsuseAcdtDe--${pageName}").datepicker("setDate", new Date());
|
|
|
|
|
|
|
|
|
|
//FIXME: 바코드 사용시 제거
|
|
|
|
|
//$("#btnProductBarcodeSearch--${pageName}").prop("disabled", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|