ソースを参照

발주관리-본사발주요청현황, 매장발주요청현황 요청금액 합계 추가

yhl88 2 年 前
コミット
b9a4ee396f
共有2 個のファイルを変更した47 個の追加48 個の削除を含む
  1. 4 0
      src/main/webapp/app/pomng/POMNG02010.html
  2. 43 48
      src/main/webapp/js/app/pomng/ITP_POMNG02010.js

+ 4 - 0
src/main/webapp/app/pomng/POMNG02010.html

@@ -60,6 +60,10 @@
60 60
 						<div id="ITP_POMNG02010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
61 61
 							<div id="ITP_POMNG02010_jqGridView" class="itp_views fix"></div>
62 62
 							<button type="button" id="ITP_BTN_POMNG02010_EXCEL" class="btn btn-success btn-sm Excel" style="float:right;"><i class="glyphicon "></i>Excel</button>
63
+								<div id="ITP_BTN_STINFO06010_CALCULATE_FORM" style="display:initial; float:right; position:relative; top:0px; margin-right:70px;">
64
+									<label>요청금액합계 :</label>
65
+									<input id="ITP_POMNG02010_REQ_TOTAL_AMT_SUM" style="width:100px; text-align: right;" maxlength="5" readonly="readonly">
66
+								</div>
63 67
 							<table id="ITP_POMNG02010_jqGrid"></table>
64 68
 							<div id="ITP_POMNG02010_jqGridPager"></div>
65 69
 							<div id="ITP_POMNG02010_jqGridEmpty" class="itp_no_data"></div>

+ 43 - 48
src/main/webapp/js/app/pomng/ITP_POMNG02010.js

@@ -630,6 +630,12 @@ let listObj = {
630 630
 				loadComplete: function(data) {
631 631
 					itp_fn_grid_load_complete(data, POMNG02010_GRID_ID, true, 'number', 'POMNG02010', listObj.itp_POMNG02010_search, listObj.empty, true, data.gridRecords, true);
632 632
 					var ids = $(POMNG02010_GRID_ID).getDataIDs();
633
+					let pchReqTotalAmtSum = 0;
634
+					for (var i = 0; i < ids.length; i++) {
635
+						var rowData = $(POMNG02010_GRID_ID).jqGrid('getRowData', ids[i]);
636
+						pchReqTotalAmtSum = pchReqTotalAmtSum + Number(rowData.pchReqTotalAmt);
637
+					}
638
+					$('#ITP_POMNG02010_REQ_TOTAL_AMT_SUM').val(itp_fn_number_comma(pchReqTotalAmtSum));
633 639
 					$.each(ids, function(idx, rowId) {
634 640
 						$(POMNG02010_GRID_ID).jqGrid('setCell', rowId, 'pchReqUnqNo', '', ITP_GRID_COL_STYLE.link);
635 641
 					});
@@ -674,7 +680,6 @@ let listObj = {
674 680
 		}
675 681
 	},
676 682
 	excelDown: function() {
677
-		
678 683
 		var param = {
679 684
 			'url': API_DETAIL_GRID_LIST,
680 685
 			'param': $('#ITP_FORM_POMNG02010_SEARCH').serializeObject(),
@@ -736,7 +741,6 @@ let modifyObj = {
736 741
 	},
737 742
 	wishList: function() {
738 743
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
739
-			
740 744
 			fn_call_popup('biz', 'BIZPOP_WISH_LIST_ITEM', '#ITP_ASIDE', function(result) {
741 745
 				
742 746
 				grid=$(POMNG02010_DETAIL_GRID_ID);
@@ -763,47 +767,47 @@ let modifyObj = {
763 767
 			}, key, 'S');
764 768
 	},
765 769
 	safeStck: function() {
766
-			var popFn = function(rowDataPop) {
770
+		var popFn = function(rowDataPop) {
767 771
 				
768
-				var exists = '';
769
-				const rowData = $(POMNG02010_DETAIL_GRID_ID).getRowData();
770
-				$.each(rowData, function(key, value) {
771
-					if (value.viewCd != "D") {
772
-						exists = exists + value.brandUnitUnqNo + ';';
773
-					}
774
-				});
775
-				$.each(rowDataPop, function(key, value) {
776
-					if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
777
-						value.viewCd = "C";
778
-						$(POMNG02010_DETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
779
-					}
780
-				});
781
-				$(POMNG02010_DETAIL_GRID_EMPTY).hide();
782
-			};
783
-			
784
-			let authTpCd = fn_make_user_info.get('authTpCd');
785
-			let URL = '/api/whs/mng/pop-whs-search';
786
-			let param = {};
787
-			param.sbrandId = fn_make_user_info.get('brandId');
788
-			param.sstoreId = fn_make_user_info.get('storeId');
789
-			let firstWhsId, firstWhsNm;
790
-			if (authTpCd == 50) {
791
-				param.swhsDvsn = 'W02';
792
-				let answer = function(result) {
793
-					firstWhsId = result.gridRows[0].whsId;
794
-					firstWhsNm = result.gridRows[0].whsNm;
772
+			var exists = '';
773
+			const rowData = $(POMNG02010_DETAIL_GRID_ID).getRowData();
774
+			$.each(rowData, function(key, value) {
775
+				if (value.viewCd != "D") {
776
+					exists = exists + value.brandUnitUnqNo + ';';
795 777
 				}
796
-				fn_ajax_call(URL, JSON.stringify(param), answer, 'POST');
797
-			} else if (authTpCd == 40) {
798
-				param.swhsDvsn = 'W01';
799
-				let answer = function(result) {
800
-					firstWhsId = result.gridRows[0].whsId;
801
-					firstWhsNm = result.gridRows[0].whsNm;
778
+			});
779
+			$.each(rowDataPop, function(key, value) {
780
+				if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
781
+					value.viewCd = "C";
782
+					$(POMNG02010_DETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
802 783
 				}
803
-				fn_ajax_call(URL, JSON.stringify(param), answer, 'POST');
784
+			});
785
+			$(POMNG02010_DETAIL_GRID_EMPTY).hide();
786
+		};
787
+		
788
+		let authTpCd = fn_make_user_info.get('authTpCd');
789
+		let URL = '/api/whs/mng/pop-whs-search';
790
+		let param = {};
791
+		param.sbrandId = fn_make_user_info.get('brandId');
792
+		param.sstoreId = fn_make_user_info.get('storeId');
793
+		let firstWhsId, firstWhsNm;
794
+		if (authTpCd == 50) {
795
+			param.swhsDvsn = 'W02';
796
+			let answer = function(result) {
797
+				firstWhsId = result.gridRows[0].whsId;
798
+				firstWhsNm = result.gridRows[0].whsNm;
804 799
 			}
805
-			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsId:firstWhsId};
806
-			fn_call_popup('biz', 'BIZPOP_SAFE_STCK_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
800
+			fn_ajax_call(URL, JSON.stringify(param), answer, 'POST');
801
+		} else if (authTpCd == 40) {
802
+			param.swhsDvsn = 'W01';
803
+			let answer = function(result) {
804
+				firstWhsId = result.gridRows[0].whsId;
805
+				firstWhsNm = result.gridRows[0].whsNm;
806
+			}
807
+			fn_ajax_call(URL, JSON.stringify(param), answer, 'POST');
808
+		}
809
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsId:firstWhsId};
810
+		fn_call_popup('biz', 'BIZPOP_SAFE_STCK_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
807 811
 	},
808 812
 	button: {
809 813
 		modify: function (param) {
@@ -862,12 +866,9 @@ let modifyObj = {
862 866
 					
863 867
 			if (loanDvsn != null && loanDvsn != "") {
864 868
 				if (loanDvsn != 'LD03' && arg == 'PR20' ) {
865
-					
866 869
 					var mallId = $('#ITP_FORM_POMNG02010_DETAIL_MALL_ID').val();
867
-					
868 870
 					if (parseInt(pchActAtm) < parseInt(pchReqAtm)) {
869 871
 						dlvReqAmt = itp_fn_number_comma(String(parseInt(pchReqAtm) - parseInt(pchActAtm)));
870
-						
871 872
 						if (mallId == '') {
872 873
 							if (loanDvsn == 'LD01') {
873 874
 								apprTypeCd = 'NPN';
@@ -888,11 +889,8 @@ let modifyObj = {
888 889
 					dlvReqAmt = 0 ;
889 890
 				}  
890 891
 			}        
891
-
892 892
 			if (itp_fn_form_event.isValid(formId)) {
893
-				
894 893
 				const rowData1 = $(POMNG02010_DETAIL_GRID_ID).getRowData();
895
-				
896 894
 				var dataCnt = 0;
897 895
 				var chkQtyYn = "N";
898 896
 				$.each(rowData1, function(key, value) {
@@ -1037,7 +1035,6 @@ let modifyObj = {
1037 1035
 					}
1038 1036
 				}
1039 1037
 			});
1040
-			
1041 1038
 			//if (chkQtyYn == "Y") return;
1042 1039
 			
1043 1040
 			let param = $(formId).serializeObject();
@@ -1115,5 +1112,3 @@ let modifyObj = {
1115 1112
 	},
1116 1113
 	 
1117 1114
 };
1118
-
1119
-