Parcourir la source

구매요청시 결재 팝업 수정

dwkim il y a 2 ans
Parent
commit
33a0917985

+ 22 - 5
src/main/webapp/js/app/config.js

@@ -2411,11 +2411,15 @@ function itp_fn_modal_confirm(msg, fn, args) {
2411 2411
 };
2412 2412
 // 구매요청확인
2413 2413
 function itp_fn_modal_confirm_req1(param, fn, args) {
2414
+	
2415
+	
2414 2416
 	$('#ITP_MODAL_PR_ALERT_CANCEL').show();
2415 2417
 	$('#ITP_MODAL_PR_ALERT').modal('show');
2416 2418
 	$('#ITP_MODAL_PR_ALERT').find('.fnDlvReqDt').html(param.dlvReqDt);
2417 2419
 	$('#ITP_MODAL_PR_ALERT').find('.fnItemcnt').html(param.itemcnt + " 개");
2418
-	$('#ITP_MODAL_PR_ALERT').find('.fnPchReqAmt').html(param.dlvReqAmt + " 원");
2420
+	$('#ITP_MODAL_PR_ALERT').find('.fnPchReqAmt').html(param.pchReqAtm + " 원");
2421
+	$('#ITP_MODAL_PR_ALERT').find('.fnPchPssblAmt').html(param.pchPssblAtm + " 원");
2422
+	$('#ITP_MODAL_PR_ALERT').find('.fnPchAmt').html(param.dlvReqAmt + " 원");
2419 2423
 	
2420 2424
 	if (fn !== undefined || typeof fn !== 'undefined') {
2421 2425
 		console.log("config button");
@@ -2429,11 +2433,15 @@ function itp_fn_modal_confirm_req1(param, fn, args) {
2429 2433
 };
2430 2434
 //선불매장결제확인
2431 2435
 function itp_fn_modal_confirm_req2(param, fn, args) {
2436
+	
2432 2437
 	$('#ITP_MODAL_ALERT_ADV_CANCEL').show();
2433 2438
 	$('#ITP_MODAL_ADV_ALERT').modal('show');
2434 2439
 	$('#ITP_MODAL_ADV_ALERT').find('.fnDlvReqDt').html(param.dlvReqDt);
2435 2440
 	$('#ITP_MODAL_ADV_ALERT').find('.fnItemcnt').html(param.itemcnt + " 개");
2436
-	$('#ITP_MODAL_ADV_ALERT').find('.fnDlvReqAmt').html(param.dlvReqAmt + " 원");
2441
+	$('#ITP_MODAL_ADV_ALERT').find('.fnPchReqAmt').html(param.pchReqAtm + " 원");
2442
+	$('#ITP_MODAL_ADV_ALERT').find('.fnPchPssblAmt').html(param.pchPssblAtm + " 원");
2443
+	$('#ITP_MODAL_ADV_ALERT').find('.fnPchAmt').html(param.dlvReqAmt + " 원");
2444
+	
2437 2445
 	if (fn !== undefined || typeof fn !== 'undefined') {
2438 2446
 		$('#ITP_MODAL_ALERT_ADV_CONFIRM').off('click');
2439 2447
 		$('#ITP_MODAL_ALERT_ADV_CONFIRM').on('click', function() {
@@ -2444,11 +2452,14 @@ function itp_fn_modal_confirm_req2(param, fn, args) {
2444 2452
 };
2445 2453
 //구매한도부족알림
2446 2454
 function itp_fn_modal_confirm_req3(param, fn, args) {
2455
+	
2447 2456
 	$('#ITP_MODAL_ALERT_LM_CANCEL').show();
2448 2457
 	$('#ITP_MODAL_LM_ALERT').modal('show');
2449 2458
 	$('#ITP_MODAL_LM_ALERT').find('.fnDlvReqDt').html(param.dlvReqDt);
2450 2459
 	$('#ITP_MODAL_LM_ALERT').find('.fnItemcnt').html(param.itemcnt + " 개");
2451
-	$('#ITP_MODAL_LM_ALERT').find('.fnDlvReqAmt').html(param.dlvReqAmt + " 원");
2460
+	$('#ITP_MODAL_LM_ALERT').find('.fnPchReqAmt').html(param.pchReqAtm + " 원");
2461
+	$('#ITP_MODAL_LM_ALERT').find('.fnPchPssblAmt').html(param.pchPssblAtm + " 원");
2462
+	$('#ITP_MODAL_LM_ALERT').find('.fnPchAmt').html(param.dlvReqAmt + " 원");
2452 2463
 	if (fn !== undefined || typeof fn !== 'undefined') {
2453 2464
 		$('#ITP_MODAL_ALERT_LM_CONFIRM').off('click');
2454 2465
 		$('#ITP_MODAL_ALERT_LM_CONFIRM').on('click', function() {
@@ -2459,11 +2470,14 @@ function itp_fn_modal_confirm_req3(param, fn, args) {
2459 2470
 };
2460 2471
 //선불매장결제확인-임시저장
2461 2472
 function itp_fn_modal_confirm_req4(param, fn, args) {
2473
+	
2462 2474
 	$('#ITP_MODAL_ALERT_SAVE_ADV_CANCEL').show();
2463 2475
 	$('#ITP_MODAL_SAVE_ADV_ALERT').modal('show');
2464 2476
 	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnDlvReqDt').html(param.dlvReqDt);
2465 2477
 	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnItemcnt').html(param.itemcnt + " 개");
2466
-	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnDlvReqAmt').html(param.dlvReqAmt + " 원");
2478
+	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnPchReqAmt').html(param.pchReqAtm + " 원");
2479
+	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnPchPssblAmt').html(param.pchPssblAtm + " 원");
2480
+	$('#ITP_MODAL_SAVE_ADV_ALERT').find('.fnPchAmt').html(param.dlvReqAmt + " 원");
2467 2481
 	if (fn !== undefined || typeof fn !== 'undefined') {
2468 2482
 		$('#ITP_MODAL_ALERT_SAVE_ADV_CONFIRM').off('click');
2469 2483
 		$('#ITP_MODAL_ALERT_SAVE_ADV_CONFIRM').on('click', function() {
@@ -2474,11 +2488,14 @@ function itp_fn_modal_confirm_req4(param, fn, args) {
2474 2488
 };
2475 2489
 //구매한도부족알림-임시저장
2476 2490
 function itp_fn_modal_confirm_req5(param, fn, args) {
2491
+	
2477 2492
 	$('#ITP_MODAL_ALERT_SAVE_LM_CANCEL').show();
2478 2493
 	$('#ITP_MODAL_SAVE_LM_ALERT').modal('show');
2479 2494
 	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnDlvReqDt').html(param.dlvReqDt);
2480 2495
 	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnItemcnt').html(param.itemcnt + " 개");
2481
-	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnDlvReqAmt').html(param.dlvReqAmt + " 원");
2496
+	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnPchReqAmt').html(param.pchReqAtm + " 원");
2497
+	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnPchPssblAmt').html(param.pchPssblAtm + " 원");
2498
+	$('#ITP_MODAL_SAVE_LM_ALERT').find('.fnPchAmt').html(param.dlvReqAmt + " 원");
2482 2499
 	if (fn !== undefined || typeof fn !== 'undefined') {
2483 2500
 		$('#ITP_MODAL_ALERT_SAVE_LM_CONFIRM').off('click');
2484 2501
 		$('#ITP_MODAL_ALERT_SAVE_LM_CONFIRM').on('click', function() {

+ 10 - 12
src/main/webapp/js/app/pomng/ITP_POMNG01010.js

@@ -361,19 +361,11 @@ let createObj = {
361 361
 					var pchActAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG01010_DETAIL .fnPchActAmt').text(),"","");
362 362
 					var pchReqAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG01010_DETAIL .fnPchReqAmt').text(),"","");
363 363
 					var mallId = $('#ITP_FORM_POMNG01010_DETAIL_MALL_ID').val();
364
-					
365
-					let pchActAtmNum;
366
-					if (loanDvsn == 'loanDvsn') {
367
-						if(pchActAtm == '0' || pchActAtm == 0 || pchActAtm == Infinity || pchActAtm == 'Infinity') {
368
-							pchActAtmNum = 'Infinity';
369
-						} else {
370
-							pchActAtmNum = pchActAtm
371
-						}
372
-					}
373
-					
374
-					if (parseFloat(pchActAtmNum) < parseFloat(pchReqAtm)) {
375
-						dlvReqAmt = itp_fn_number_comma(String(parseInt(pchReqAtm) - parseInt(pchActAtm)));
376 364
 						
365
+					if (parseFloat(pchActAtm) < parseFloat(pchReqAtm)) {
366
+						
367
+						dlvReqAmt = itp_fn_number_comma(String(parseInt(pchReqAtm) - parseInt(pchActAtm)));
368
+						console.log(dlvReqAmt);
377 369
 						if (mallId == '') {
378 370
 							if (loanDvsn == 'LD01') {
379 371
 								apprTypeCd = 'NPN';
@@ -388,6 +380,8 @@ let createObj = {
388 380
 							}
389 381
 							
390 382
 						}
383
+					} else {
384
+						dlvReqAmt = 0 ;
391 385
 					}
392 386
 				}    
393 387
 			}        
@@ -427,8 +421,12 @@ let createObj = {
427 421
 					
428 422
 					apprArg.dlvReqDt = dlvReqDt;
429 423
 					apprArg.itemcnt = itemcnt;
424
+					apprArg.pchReqAtm = itp_fn_number_comma(pchReqAtm);
425
+					apprArg.pchPssblAtm = itp_fn_number_comma(pchActAtm);
430 426
 					apprArg.dlvReqAmt = dlvReqAmt;
431 427
 					
428
+					console.log(apprArg);
429
+					
432 430
 					if (apprTypeCd == "Y") {  // 여신 구분, 여신금액
433 431
 						
434 432
 						var prIngFn =  {

+ 11 - 5
src/main/webapp/js/app/pomng/ITP_POMNG02010.js

@@ -792,10 +792,12 @@ let modifyObj = {
792 792
 			
793 793
 			
794 794
 			//console.log(loanDvsn);
795
+			var pchActAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG02010_DETAIL .fnPchActAmt').text(),"","");
796
+			var pchReqAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG02010_DETAIL .fnPchReqTotalAmt').text(),"","");
797
+					
795 798
 			if (loanDvsn != null && loanDvsn != "") {
796 799
 				if (loanDvsn != 'LD03' && arg == 'PR20' ) {
797
-					var pchActAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG02010_DETAIL .fnPchActAmt').text(),"","");
798
-					var pchReqAtm = itp_fn_currency_unfmatter($('#ITP_FORM_POMNG02010_DETAIL .fnPchReqTotalAmt').text(),"","");
800
+					
799 801
 					var mallId = $('#ITP_FORM_POMNG02010_DETAIL_MALL_ID').val();
800 802
 					
801 803
 					if (parseInt(pchActAtm) < parseInt(pchReqAtm)) {
@@ -814,6 +816,8 @@ let modifyObj = {
814 816
 								apprTypeCd = 'NA';
815 817
 							}
816 818
 						} 
819
+					} else {
820
+						dlvReqAmt = 0 ;
817 821
 					}
818 822
 				}    
819 823
 			}        
@@ -844,13 +848,15 @@ let modifyObj = {
844 848
 				if (chkQtyYn == "Y") return;
845 849
 				
846 850
 				if (arg == 'PR20') {
847
-					
851
+					console.log("=========");
852
+					console.log(pchReqAtm);
853
+					console.log(pchActAtm);
848 854
 					apprArg.dlvReqDt = dlvReqDt;
849 855
 					apprArg.itemcnt = itemcnt;
856
+					apprArg.pchReqAtm = itp_fn_number_comma(pchReqAtm);
857
+					apprArg.pchPssblAtm = itp_fn_number_comma(pchActAtm);
850 858
 					apprArg.dlvReqAmt = dlvReqAmt;
851 859
 					
852
-					console.log("-----------------------");
853
-					console.log(dlvReqAmt, apprArg.dlvReqAmt);
854 860
 					
855 861
 					if (apprTypeCd == "Y") {  // 여신 구분, 여신금액
856 862
 						

+ 25 - 25
src/main/webapp/main.html

@@ -402,7 +402,7 @@
402 402
 										<label>납품요청일</label>
403 403
 									</div>
404 404
 									<div class="itp_info_area">
405
-										<div class="fnDlvReqDt"></div>
405
+										<div class="fnDlvReqDt" style="text-align:center;"></div>
406 406
 									</div>
407 407
 								</div>
408 408
 								<div class="itp_alt_box">
@@ -410,7 +410,7 @@
410 410
 										<label>품목수</label>
411 411
 									</div>
412 412
 									<div class="itp_info_area">
413
-										<div class="fnItemcnt"></div>
413
+										<div class="fnItemcnt" style="text-align:right;"></div>
414 414
 									</div>
415 415
 								</div>
416 416
 								<div class="itp_alt_box">
@@ -418,7 +418,7 @@
418 418
 										<label>구매요청금액</label>
419 419
 									</div>
420 420
 									<div class="itp_info_area">
421
-										<div class="fnPchReqAmt"></div>
421
+										<div class="fnPchReqAmt" style="text-align:right;"></div>
422 422
 									</div>
423 423
 								</div>
424 424
 								<div class="itp_alt_box">
@@ -426,7 +426,7 @@
426 426
 										<label>구매가능금액</label>
427 427
 									</div>
428 428
 									<div class="itp_info_area">
429
-										<div class="fnPchPssblAmt"></div>
429
+										<div class="fnPchPssblAmt" style="text-align:right;"></div>
430 430
 									</div>
431 431
 								</div>
432 432
 								<div class="itp_alt_box border">
@@ -434,7 +434,7 @@
434 434
 										<label>결제금액</label>
435 435
 									</div>
436 436
 									<div class="itp_info_area">
437
-										<div class="fnPchAmt"></div>
437
+										<div class="fnPchAmt" style="text-align:right;"></div>
438 438
 									</div>
439 439
 								</div>
440 440
 								<label class="error_info">구매요청 하시겠습니까?</label>
@@ -458,7 +458,7 @@
458 458
 										<label>납품요청일</label>
459 459
 									</div>
460 460
 									<div class="itp_info_area">
461
-										<div class="fnDlvReqDt"></div>
461
+										<div class="fnDlvReqDt" style="text-align:center;"></div>
462 462
 									</div>
463 463
 								</div>
464 464
 								<div class="itp_alt_box">
@@ -466,7 +466,7 @@
466 466
 										<label>품목수</label>
467 467
 									</div>
468 468
 									<div class="itp_info_area">
469
-										<div class="fnItemcnt"></div>
469
+										<div class="fnItemcnt" style="text-align:right;"></div>
470 470
 									</div>
471 471
 								</div>
472 472
 								<div class="itp_alt_box">
@@ -474,7 +474,7 @@
474 474
 										<label>구매요청금액</label>
475 475
 									</div>
476 476
 									<div class="itp_info_area">
477
-										<div class="fnPchReqAmt"></div>
477
+										<div class="fnPchReqAmt" style="text-align:right;"></div>
478 478
 									</div>
479 479
 								</div>
480 480
 								<div class="itp_alt_box">
@@ -482,7 +482,7 @@
482 482
 										<label>구매가능금액</label>
483 483
 									</div>
484 484
 									<div class="itp_info_area">
485
-										<div class="fnPchPssblAmt"></div>
485
+										<div class="fnPchPssblAmt" style="text-align:right;"></div>
486 486
 									</div>
487 487
 								</div>
488 488
 								<div class="itp_alt_box border">
@@ -490,7 +490,7 @@
490 490
 										<label>결제금액</label>
491 491
 									</div>
492 492
 									<div class="itp_info_area">
493
-										<div class="fnPchAmt"></div>
493
+										<div class="fnPchAmt" style="text-align:right;"></div>
494 494
 									</div>
495 495
 								</div>
496 496
 								<label class="error_info">선불매장이므로 결재를 하셔야<br> 구매요청이 진행이 됩니다.<br>결재를 하시겠습니까?</label>
@@ -514,7 +514,7 @@
514 514
 										<label>납품요청일</label>
515 515
 									</div>
516 516
 									<div class="itp_info_area">
517
-										<div class="fnDlvReqDt"></div>
517
+										<div class="fnDlvReqDt" style="text-align:center;"></div>
518 518
 									</div>
519 519
 								</div>
520 520
 								<div class="itp_alt_box">
@@ -522,7 +522,7 @@
522 522
 										<label>품목수</label>
523 523
 									</div>
524 524
 									<div class="itp_info_area">
525
-										<div class="fnItemcnt"></div>
525
+										<div class="fnItemcnt" style="text-align:right;"></div>
526 526
 									</div>
527 527
 								</div>
528 528
 								<div class="itp_alt_box">
@@ -530,7 +530,7 @@
530 530
 										<label>구매요청금액</label>
531 531
 									</div>
532 532
 									<div class="itp_info_area">
533
-										<div class="fnPchReqAmt"></div>
533
+										<div class="fnPchReqAmt" style="text-align:right;"></div>
534 534
 									</div>
535 535
 								</div>
536 536
 								<div class="itp_alt_box">
@@ -538,7 +538,7 @@
538 538
 										<label>구매가능금액</label>
539 539
 									</div>
540 540
 									<div class="itp_info_area">
541
-										<div class="fnPchPssblAmt"></div>
541
+										<div class="fnPchPssblAmt" style="text-align:right;"></div>
542 542
 									</div>
543 543
 								</div>
544 544
 								<div class="itp_alt_box border">
@@ -546,7 +546,7 @@
546 546
 										<label>결제금액</label>
547 547
 									</div>
548 548
 									<div class="itp_info_area">
549
-										<div class="fnPchAmt"></div>
549
+										<div class="fnPchAmt" style="text-align:right;"></div>
550 550
 									</div>
551 551
 								</div>
552 552
 								<label class="error_info" style="line-height: 1.5;">구매한도가 부족합니다.<br> 선결재를 하신 후에 구매요청이 진행이 됩니다.<br>결재를 하시겠습니까?</label>
@@ -570,7 +570,7 @@
570 570
 										<label>납품요청일</label>
571 571
 									</div>
572 572
 									<div class="itp_info_area">
573
-										<div class="fnDlvReqDt"></div>
573
+										<div class="fnDlvReqDt" style="text-align:center;"></div>
574 574
 									</div>
575 575
 								</div>
576 576
 								<div class="itp_alt_box">
@@ -578,7 +578,7 @@
578 578
 										<label>품목수</label>
579 579
 									</div>
580 580
 									<div class="itp_info_area">
581
-										<div class="fnItemcnt"></div>
581
+										<div class="fnItemcnt" style="text-align:right;"></div>
582 582
 									</div>
583 583
 								</div>
584 584
 								<div class="itp_alt_box">
@@ -586,7 +586,7 @@
586 586
 										<label>구매요청금액</label>
587 587
 									</div>
588 588
 									<div class="itp_info_area">
589
-										<div class="fnPchReqAmt"></div>
589
+										<div class="fnPchReqAmt" style="text-align:right;"></div>
590 590
 									</div>
591 591
 								</div>
592 592
 								<div class="itp_alt_box">
@@ -594,7 +594,7 @@
594 594
 										<label>구매가능금액</label>
595 595
 									</div>
596 596
 									<div class="itp_info_area">
597
-										<div class="fnPchPssblAmt"></div>
597
+										<div class="fnPchPssblAmt" style="text-align:right;"></div>
598 598
 									</div>
599 599
 								</div>
600 600
 								<div class="itp_alt_box border">
@@ -602,7 +602,7 @@
602 602
 										<label>결제금액</label>
603 603
 									</div>
604 604
 									<div class="itp_info_area">
605
-										<div class="fnPchAmt"></div>
605
+										<div class="fnPchAmt" style="text-align:right;"></div>
606 606
 									</div>
607 607
 								</div>
608 608
 								<label class="error_info">선불매장이므로 입급을 하시고, 입금등록 후 브랜드에서 승인이 되어야 구매요청을 하실 수 있습니다.</label>
@@ -626,7 +626,7 @@
626 626
 										<label>납품요청일</label>
627 627
 									</div>
628 628
 									<div class="itp_info_area">
629
-										<div class="fnDlvReqDt"></div>
629
+										<div class="fnDlvReqDt" style="text-align:center;"></div>
630 630
 									</div>
631 631
 								</div>
632 632
 								<div class="itp_alt_box">
@@ -634,7 +634,7 @@
634 634
 										<label>품목수</label>
635 635
 									</div>
636 636
 									<div class="itp_info_area">
637
-										<div class="fnItemcnt"></div>
637
+										<div class="fnItemcnt" style="text-align:right;"></div>
638 638
 									</div>
639 639
 								</div>
640 640
 								<div class="itp_alt_box">
@@ -642,7 +642,7 @@
642 642
 										<label>구매요청금액</label>
643 643
 									</div>
644 644
 									<div class="itp_info_area">
645
-										<div class="fnPchReqAmt"></div>
645
+										<div class="fnPchReqAmt" style="text-align:right;"></div>
646 646
 									</div>
647 647
 								</div>
648 648
 								<div class="itp_alt_box">
@@ -650,7 +650,7 @@
650 650
 										<label>구매가능금액</label>
651 651
 									</div>
652 652
 									<div class="itp_info_area">
653
-										<div class="fnPchPssblAmt"></div>
653
+										<div class="fnPchPssblAmt" style="text-align:right;"></div>
654 654
 									</div>
655 655
 								</div>
656 656
 								<div class="itp_alt_box border">
@@ -658,7 +658,7 @@
658 658
 										<label>결제금액</label>
659 659
 									</div>
660 660
 									<div class="itp_info_area">
661
-										<div class="fnPchAmt"></div>
661
+										<div class="fnPchAmt" style="text-align:right;"></div>
662 662
 									</div>
663 663
 								</div>
664 664
 								<label class="error_info" style="line-height: 1.5;">구매한도가 부족합니다.<br>선입금을 하시고, 입금등록 후 브랜드에서 승인이 되어야 구매요청을 하실 수 있습니다.</label>