fit : 제품추가시 - 제거하도록 변경

dev
Leeyh1121 4 months ago
parent 46109263ca
commit 67714e49ae

@ -477,12 +477,11 @@
}
const prdFrm = $P.productFormFields.get();
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe+prdFrm.mnfNo+prdFrm.mnfSeq;
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList
.getDataset()
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe+item.mnfNo+item.mnfSeq)
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.length > 0;
if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
dialog.alert({
@ -491,9 +490,8 @@
return false;
}
console.log($P.productFormFields.get());
const data = {...$P.productFormFields.get(), keyCnt : ""+prdRowKey++};
console.log(data);
data.prdValidDe = data.prdValidDe.replaceAll('-','');
$P.productList.append([data]);
}

Loading…
Cancel
Save