|
|
|
@ -120,7 +120,7 @@
|
|
|
|
|
<tbody id="tbody--productList">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="productListRow--productList">
|
|
|
|
|
<tr data-key="{prductCd}">
|
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductCd}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{prductNm}</td>
|
|
|
|
|
<td class="cmn text-end" {onclick}="" {ondblclick}="">{dsuseQy}</td>
|
|
|
|
@ -159,6 +159,7 @@
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
prdRowKey = 0;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* script 진입
|
|
|
|
@ -193,7 +194,7 @@
|
|
|
|
|
$P.productControl = new DatasetControl({
|
|
|
|
|
prefix: "dsuseMgtReceiptProduct"
|
|
|
|
|
, prefixName: "마약류 제품 조회"
|
|
|
|
|
, keymapper: info => info ? info.prductCd : ""
|
|
|
|
|
, keymapper: info => info ? info.keyCnt : ""
|
|
|
|
|
, dataGetter: obj => obj.${infoPrefix}Info
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
});
|
|
|
|
@ -201,7 +202,7 @@
|
|
|
|
|
$P.productList = new Dataset({
|
|
|
|
|
prefix: "dsuseMgtReceiptProductList"
|
|
|
|
|
, prefixName: "마약류 제품 조회"
|
|
|
|
|
, keymapper: info => info ? info.prductCd : ""
|
|
|
|
|
, keymapper: info => info ? info.keyCnt : ""
|
|
|
|
|
, dataGetter: obj => {
|
|
|
|
|
if (!obj.success){
|
|
|
|
|
dialog.alert(obj.message);
|
|
|
|
@ -341,7 +342,7 @@
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
let replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].productList.setCurrent('" + dataItem.getValue("prductCd") + "');");
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].productList.setCurrent('" + dataItem.getValue("keyCnt") + "');");
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("$productListNotFound--productList").content.outerHTML]
|
|
|
|
|
: $P.productList.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
@ -455,8 +456,10 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.productList.addData([$P.productFormFields.get()]);
|
|
|
|
|
console.log($P.productFormFields.get());
|
|
|
|
|
const data = {...$P.productFormFields.get(), keyCnt: prdRowKey++};
|
|
|
|
|
console.log(data);
|
|
|
|
|
$P.productList.addData([data]);
|
|
|
|
|
// FIXME: 상품필드 초기화 코드 추가
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
@ -466,10 +469,12 @@
|
|
|
|
|
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
content: "현재 선택된 row 정보를 제거 하시겠습니까?"
|
|
|
|
|
, init: () => { setDialogZindex(); }
|
|
|
|
|
, onOK: () => {
|
|
|
|
|
$P.control.save($P.bsshFormFields.get()); // formFields
|
|
|
|
|
console.log($P.productList.getCurrent().keyCnt);
|
|
|
|
|
debugger
|
|
|
|
|
$P.productList.remove($P.productList.getCurrent().keyCnt);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|