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