|
@@ -89,22 +89,22 @@ let mobPageObj = {
|
89
|
89
|
return false;
|
90
|
90
|
});
|
91
|
91
|
|
92
|
|
- $(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
|
|
92
|
+ $(document).on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
|
93
|
93
|
var index = $(this).index();
|
94
|
94
|
var item = mobContentObj.list.rows[index];
|
95
|
95
|
(item.rtnReqStCd === RTN_REQ_ST_CD_TEMP_SAVE) ? mobContentObj.modify.init(item) : mobContentObj.detail.init(item);
|
96
|
96
|
});
|
97
|
97
|
|
98
|
|
- $(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li', function(e) {
|
99
|
|
- if($(e.target).hasClass('DETAIL_ITEM_PLUS')) {
|
100
|
|
- mobContentObj.modify.list.actPlus($(this));
|
101
|
|
- } else if($(e.target).hasClass('DETAIL_ITEM_MINUS')) {
|
102
|
|
- mobContentObj.modify.list.actMinus($(this));
|
103
|
|
- } else {
|
104
|
|
- }
|
105
|
|
- });
|
|
98
|
+ // $(document).on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li', function(e) {
|
|
99
|
+ // if($(e.target).hasClass('DETAIL_ITEM_PLUS')) {
|
|
100
|
+ // mobContentObj.modify.list.actPlus($(this));
|
|
101
|
+ // } else if($(e.target).hasClass('DETAIL_ITEM_MINUS')) {
|
|
102
|
+ // mobContentObj.modify.list.actMinus($(this));
|
|
103
|
+ // } else {
|
|
104
|
+ // }
|
|
105
|
+ // });
|
106
|
106
|
|
107
|
|
- $(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_POP_WHS_ROWS li button', function() {
|
|
107
|
+ $(document).on('click', '#ITP_LIST_MRTNMNG02010_POP_WHS_ROWS li button', function() {
|
108
|
108
|
mobPopObj.popWhsNm.choice($(this));
|
109
|
109
|
});
|
110
|
110
|
}
|
|
@@ -281,13 +281,15 @@ let mobContentObj = {
|
281
|
281
|
var $li = $('#ITP_LIST_MRTNMNG02010_MODIFY_AREA .mb_0 > .list-row:last');
|
282
|
282
|
$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
|
283
|
283
|
$li.find('.fnItemNm').text(item.itemNm);
|
284
|
|
- $li.find('.fnRtnQty').text(item.rtnQty);
|
|
284
|
+ $li.find('.fnRtnQty').text(item.rtnReqItemQty);
|
285
|
285
|
$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
|
286
|
286
|
item['viewCd'] = viewCd;
|
287
|
287
|
if(isPush) {
|
288
|
288
|
_this.rows.push(item);
|
289
|
289
|
}
|
290
|
290
|
_this.rtnReqAmtTot();
|
|
291
|
+ $('.list-row .DETAIL_ITEM_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
|
|
292
|
+ $('.list-row .DETAIL_ITEM_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
|
291
|
293
|
};
|
292
|
294
|
var fnChkExist = function() {
|
293
|
295
|
var isExist = false;
|
|
@@ -333,6 +335,24 @@ let mobContentObj = {
|
333
|
335
|
}
|
334
|
336
|
},
|
335
|
337
|
actPlus: function(elem) {
|
|
338
|
+ var $div = $(elem).siblings('div');
|
|
339
|
+ var num = Number($div.text());
|
|
340
|
+ $($div).text((num + 1).toString());
|
|
341
|
+ this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
|
|
342
|
+ this.rtnReqAmtTot();
|
|
343
|
+ },
|
|
344
|
+ actMinus: function(elem) {
|
|
345
|
+ var $div = $(elem).siblings('div');
|
|
346
|
+ var num = Number($div.text());
|
|
347
|
+ if(num <= 1) {
|
|
348
|
+ itp_fn_modal_alert('수량을 확인하세요.');
|
|
349
|
+ } else {
|
|
350
|
+ $($div).text((num - 1).toString());
|
|
351
|
+ this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
|
|
352
|
+ this.rtnReqAmtTot();
|
|
353
|
+ }
|
|
354
|
+ },
|
|
355
|
+ /*ctPlus: function(elem) {
|
336
|
356
|
console.log('actPlus');
|
337
|
357
|
var index = $(elem).index();
|
338
|
358
|
var num = Number($(elem).find('.fnRtnQty').text()) + 1;
|
|
@@ -350,7 +370,7 @@ let mobContentObj = {
|
350
|
370
|
this.rows[index]['rtnQty'] = num;
|
351
|
371
|
this.rtnReqAmtTot();
|
352
|
372
|
}
|
353
|
|
- },
|
|
373
|
+ },*/
|
354
|
374
|
rtnReqAmtTot: function() {
|
355
|
375
|
var reqAmt = 0;
|
356
|
376
|
$.each(this.rows, function(index, item) {
|