no message

main
이범준 3 months ago
parent 3cd9bf9438
commit 96c4b1b1dc

@ -518,30 +518,30 @@ $(document).ready(function(){
$P.fnRemove = (rcptYmd) => { $P.fnRemove = (rcptYmd) => {
if(rcptYmd != null){ if(rcptYmd != null){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset("item");
var crdnIds = []; let dataIndexs = [];
var filtered = ds.filter(function(item){ var filtered = dsArray.filter(function(item){
if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){ if(item.data['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item.data['CRDN_ID'])){
return true; return true;
} else { } else {
return false; return false;
} }
}); });
for(var i=0; i < filtered.length; i++){ for(var i=0; i < filtered.length; i++){
crdnIds.push(filtered[i].CRDN_ID); dataIndexs.push(filtered[i].index);
} }
ctrl.dataset.select(crdnIds,true); ctrl.dataset.select(dataIndexs, true);
} else { } else {
var cur = ctrl.dataset.getCurrent(); var cur = ctrl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var curKey = cur["CRDN_ID"]; let dataIndex = ctrl.dataset.getCurrent("item").index;
ctrl.dataset.select(curKey,true); ctrl.dataset.select(dataIndex, true);
} }
var selected = ctrl.dataset.getDataset("selected"); var selected = ctrl.dataset.getDataset("selected");

@ -411,8 +411,8 @@ $(document).ready(function(){
return; return;
} }
var curKey = cur["CRDN_ID"]; let dataIndex = ctrl.dataset.getCurrent("item").index;
ctrl.dataset.select(curKey,true); ctrl.dataset.select(dataIndex, true);
var selected = ctrl.dataset.getDataset("selected"); var selected = ctrl.dataset.getDataset("selected");
if (selected.length < 1) { if (selected.length < 1) {

@ -286,18 +286,18 @@ $(document).ready(function(){
Apply.toDataset.current(ctrl.dataset, dataIndex); Apply.toDataset.current(ctrl.dataset, dataIndex);
} }
$P.fnRemove = (allCompleteDataIds) => { $P.fnRemove = (allCompleteDataIndexs) => {
if(allCompleteDataIds != null){ if(allCompleteDataIds != null){
ctrl.dataset.select(allCompleteDataIds,true); ctrl.dataset.select(allCompleteDataIndexs,true);
} else { } else {
var cur = ctrl.dataset.getCurrent(); var cur = ctrl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var curKey = cur["INDIV_ID"]; let dataIndex = ctrl.dataset.getCurrent("item").index;
ctrl.dataset.select(curKey,true); ctrl.dataset.select(dataIndex, true);
} }
var selected = ctrl.dataset.getDataset("selected"); var selected = ctrl.dataset.getDataset("selected");
@ -333,15 +333,17 @@ $(document).ready(function(){
return; return;
} }
var ds = ctrl.dataset.getDataset(); var ds = ctrl.dataset.getDataset("item");
var indivIds = ds.filter(function(item){ let filtered = ds.filter(function(item){
if(item['STTS_CD'] == '9' || item['STTS_CD'] == 'B'){ if(item.data['STTS_CD'] == '9' || item.data['STTS_CD'] == 'B'){
return item["INDIV_ID"]; return true;
} else {
return false;
} }
}); });
if(indivIds.length == 0){ if(filtered.length == 0){
dialog.alert({ dialog.alert({
content : "요청 완료자료가 없습니다.", content : "요청 완료자료가 없습니다.",
init : function() { init : function() {
@ -350,14 +352,15 @@ $(document).ready(function(){
}); });
return; return;
} }
var dataIndexs = filtered.map(item=>item.index);
dialog.alert({ dialog.alert({
content : "완료된 자료를 모두 삭제하시겠습니까?", content : "완료된 자료를 모두 삭제하시겠습니까?",
init : function() { init : function() {
AppSupport.focusOK(); AppSupport.focusOK();
}, },
onOK : () => { onOK : () => {
$P.fnRemove(indivIds); $P.fnRemove(dataIndexs);
} }
}); });

@ -125,7 +125,6 @@ $(document).ready(function(){
var ctrl = newMngt01010Control($P); var ctrl = newMngt01010Control($P);
ctrl.defaultFetchSize = FETCH_XS; ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;
ctrl.dataset.onDatasetChange = (obj, option) => { ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate(); var t = $P.getGridTemplate();

@ -160,7 +160,6 @@ $(document).ready(function(){
var ctrl = newOgdp02020Control($P); var ctrl = newOgdp02020Control($P);
ctrl.defaultFetchSize = FETCH_XS; ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;
ctrl.dataset.onDatasetChange = (obj, option) => { ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate(); var t = $P.getGridTemplate();

Loading…
Cancel
Save