Explorar el Código

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

juney hace 2 años
padre
commit
4d97f9f947
Se han modificado 26 ficheros con 1222 adiciones y 447 borrados
  1. 15 9
      src/main/webapp/app/inoutmng/INOUTMNG01010.html
  2. 14 4
      src/main/webapp/app/loanmng/LOANMNG03010.html
  3. 7 6
      src/main/webapp/app/ordmng/ORDMNG03010.html
  4. 15 16
      src/main/webapp/app/popup/biz/BIZPOP_DLV_STTMT_PRN.html
  5. 6 1
      src/main/webapp/app/popup/biz/BIZPOP_PO_PAYMENT.html
  6. 2 1
      src/main/webapp/app/popup/biz/BIZPOP_WHS_LOCATION.html
  7. 19 7
      src/main/webapp/app/settmng/SETTMNG03010.html
  8. 19 13
      src/main/webapp/easypay/oqpo/mobile_order_req.jsp
  9. 59 58
      src/main/webapp/easypay/oqpo/mobile_order_res_submit.jsp
  10. 448 0
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG01010.js
  11. 11 1
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js
  12. 7 7
      src/main/webapp/js/app/loanmng/ITP_LOANMNG01010.js
  13. 13 4
      src/main/webapp/js/app/loanmng/ITP_LOANMNG03010.js
  14. 3 1
      src/main/webapp/js/app/locales/locale-ko.js
  15. 1 1
      src/main/webapp/js/app/ordmng/ITP_ORDMNG01010.js
  16. 118 26
      src/main/webapp/js/app/ordmng/ITP_ORDMNG03010.js
  17. 49 48
      src/main/webapp/js/app/pomng/ITP_POMNG01010.js
  18. 72 37
      src/main/webapp/js/app/pomng/ITP_POMNG02010.js
  19. 95 62
      src/main/webapp/js/app/pomng/ITP_POMNG03010.js
  20. 4 2
      src/main/webapp/js/app/pomng/ITP_POMNG04010.js
  21. 5 3
      src/main/webapp/js/app/pomng/ITP_POMNG07010.js
  22. 171 121
      src/main/webapp/js/app/popup/biz/ITP_BIZPOP_DLV_STTMT_PRN.js
  23. 25 8
      src/main/webapp/js/app/popup/biz/ITP_BIZPOP_PO_PAYMENT.js
  24. 1 0
      src/main/webapp/js/app/popup/biz/ITP_BIZPOP_WHS_LOCATION.js
  25. 39 9
      src/main/webapp/js/app/settmng/ITP_SETTMNG03010.js
  26. 4 2
      src/main/webapp/js/app/stockmng/ITP_STOCKMNG04010.js

+ 15 - 9
src/main/webapp/app/inoutmng/INOUTMNG01010.html

@@ -4,7 +4,8 @@
4 4
 			<div class="itp_det_head fix">
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>출하지시</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7
-					<button type="button" id="ITP_BTN_INOUTMNG01010_SRH" class="btn btn-success btn-sm OUD" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;출하지시&nbsp;&nbsp;</button>
7
+					<button type="button" id="ITP_BTN_INOUTMNG01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_INOUTMNG01010_OUT" class="btn btn-success btn-sm OUD" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;출하지시&nbsp;&nbsp;</button>
8 9
 				</div>
9 10
 			</div>
10 11
 			<div class="itp_det_in">
@@ -21,24 +22,29 @@
21 22
 										</div>
22 23
 										<div class="col-xs-3 itp_ip itp_noMar">
23 24
 											<div class="input-daterange input-group date">
24
-												<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_DLV_REQ_DT" class="form-control itp_input" name="dlvReqDt" value="">
25
+												<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
25 26
 												<span class="input-group-addon itp_date_to">~</span>
26
-												<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_DLV_DT" class="form-control itp_input" name="dlvDt" value="">
27
+												<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
27 28
 											</div>
28 29
 										</div>
30
+										
29 31
 										<div class="col-xs-2 itp_ip itp_noMar">
30
-											<select id="ITP_FORM_INOUTMNG01010_SEARCH_SHMT_WHS_ID" class="form-control itp_input" name="sShmtWhsId">
31
-												<option value="A">출하창고*</option>											
32
-											</select>
32
+											<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM" class="form-control itp_input" name="sshmtWhsNm" placeholder="출고창고" />
33
+											<input type="hidden" id="ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID" class="form-control itp_input" name="sshmtWhsId"  />
33 34
 										</div>
35
+										<div class="col-xs-1 itp_in" style="padding:0px; width:10%;">
36
+											<button type="button" id="ITP_FORM_INOUTMNG01010_SEARCH_SHMT_WHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
37
+											<button type="button" id="ITP_FORM_INOUTMNG01010_DELETE_SHMT_WHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
38
+						                </div>
34 39
 									</div>
35 40
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
36 41
 										<div class="col-xs-2 itp_ip itp_noMar">
37
-											<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_DLV_PLACE" class="form-control itp_input" name="sDlvPlace" placeholder="납품매장" />
42
+											<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM" class="form-control itp_input" name="swhsNm" placeholder="납품매장창고" />
43
+											<input type="hidden" id="ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID" class="form-control itp_input" name="swhsId" placeholder="납품창고" />
38 44
 										</div>
39 45
 										<div class="col-xs-1 itp_in" style="width:11%; padding:0px;">
40
-											<button type="button" id="ITP_BTN_INOUTMNG01010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
41
-											<button type="button" id="ITP_BTN_INOUTMNG01010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
46
+											<button type="button" id="ITP_FORM_INOUTMNG01010_SEARCH_WHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
47
+											<button type="button" id="ITP_FORM_INOUTMNG01010_DELETE_WHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
42 48
 						                </div>
43 49
 										<div class="col-xs-4 itp_ip itp_noMar">
44 50
 											<input type="text" id="ITP_FORM_INOUTMNG01010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />

+ 14 - 4
src/main/webapp/app/loanmng/LOANMNG03010.html

@@ -61,7 +61,7 @@
61 61
 				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_STORE_ID" name="storeId" value="">
62 62
 				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="">
63 63
 				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_RCPT_YN" value="">
64
-				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_STTL_REQ_AMT" value="">
64
+				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_UNPAID_AMT" value="">
65 65
 				    
66 66
 				                <section class="itp_form_sec">
67 67
 				                    <h4 class="itp_form_tit">정산 상세정보</h4>
@@ -76,6 +76,16 @@
76 76
 				                                <div class="col-xs-8 itp_in fnStoreNm"></div>
77 77
 				                            </div>
78 78
 				                        </div>
79
+				                        <div class="form-group">
80
+				                            <label class="col-xs-2 itp_lb">매장 계좌잔액</label>
81
+				                            <div class="col-xs-4 itp_ip">
82
+				                                <div class="col-xs-8 itp_in fnAcctBal"></div>
83
+				                            </div>
84
+				                            <label class="col-xs-2 itp_lb">매장 사용가능한도금액</label>
85
+				                            <div class="col-xs-4 itp_ip">
86
+				                                <div class="col-xs-8 itp_in fnUseAmtTotal"></div>
87
+				                            </div>
88
+				                        </div>
79 89
 				                        <div class="form-group">
80 90
 				                            <label class="col-xs-2 itp_lb">정산요청일자</label>
81 91
 				                            <div class="col-xs-4 itp_ip">
@@ -91,13 +101,13 @@
91 101
 				                            <div class="col-xs-4 itp_ip">
92 102
 				                                <div class="col-xs-8 itp_in fnSttlReqAmt"></div>
93 103
 				                            </div>
94
-				                            <label class="col-xs-2 itp_lb">사용가능한도금액</label>
104
+				                            <label class="col-xs-2 itp_lb">미납금액</label>
95 105
 				                            <div class="col-xs-4 itp_ip">
96
-				                                <div class="col-xs-8 itp_in fnUseAmtTotal"></div>
106
+				                                <div class="col-xs-8 itp_in fnUnpaidAmt"></div>
97 107
 				                            </div>
98 108
 				                        </div>
99 109
 				                        <div class="form-group">
100
-				                            <label class="col-xs-2 itp_lb">정산확일자</label>
110
+				                            <label class="col-xs-2 itp_lb">정산확일자</label>
101 111
 				                            <div class="col-xs-4 itp_ip">
102 112
 				                                <div class="col-xs-5 itp_in fnSttlDt"></div>
103 113
 				                            </div>

+ 7 - 6
src/main/webapp/app/ordmng/ORDMNG03010.html

@@ -15,10 +15,10 @@
15 15
 							<div class="col-xs-12">
16 16
 								<form id="ITP_FORM_ORDMNG03010_SEARCH" class="form-horizontal">
17 17
 								<input type="hidden" id="ITP_FORM_ORDMNG03010_SEARCH_SPPLY_ID" name="sspplyId" value="">
18
-									
18
+								<input type="hidden" id="ITP_FORM_ORDMNG03010_SEARCH_BRAND_ID" name="sbrandId" value="">
19 19
 									<div class="form-group">
20 20
 										<div class="col-xs-2 itp_ip itp_noMar">
21
-											<select id="ITP_FORM_ORDMNG03010_SERVICE_" class="form-control itp_input" name="">
21
+											<select id="ITP_FORM_ORDMNG03010_SERVICE_DLV_DT" class="form-control itp_input" name="">
22 22
 												<option value="A">납품일자 *</option>											
23 23
 											</select>
24 24
 										</div>										
@@ -30,14 +30,15 @@
30 30
 											</div>
31 31
 										</div>
32 32
 										<div class="col-xs-2 itp_in itp_noMar">
33
-											<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_DLV_PLACE" class="form-control itp_input" name="sDlvPlace" placeholder="납품장소(매장/창고)" />
33
+											<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_SWHS_NM" class="form-control itp_input" name="swhsNm" placeholder="납품장소(매장/창고)" />
34
+											<input type="hidden" id="ITP_FORM_ORDMNG03010_SEARCH_SWHS_ID" class="form-control itp_input" name="swhsId" />
34 35
 										</div>
35 36
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
36
-											<button type="button" id="ITP_BTN_ORDMNG03010_PO_POPUP" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
37
-											<button type="button" id="ITP_BTN_ORDMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
37
+											<button type="button" id="ITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
38
+											<button type="button" id="ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
38 39
 						                </div>
39 40
 										<div class="col-xs-4 itp_ip itp_noMar">
40
-											<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="발주번호/품목번호 /품목명" />
41
+											<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="발주번호/품목번호 /품목명" />
41 42
 										</div>
42 43
 									</div>
43 44
 								</form>

+ 15 - 16
src/main/webapp/app/popup/biz/BIZPOP_DLV_STTMT_PRN.html

@@ -2,10 +2,12 @@
2 2
 	<div class="modal-dialog" style="width:1200px;">
3 3
 		<div class="modal-content">
4 4
 			<form id="ITP_FORM_BIZPOP_DLV_STTMT_PRN">
5
-				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_FORM_DT" name="fromDt" value="">
5
+				<!-- <input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_FORM_DT" name="fromDt" value="">
6 6
 				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_TO_DT" name="toDt" value="">
7 7
 				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID" name="sbrandId" value="">
8
-				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_SPPLY_ID" name="sspplyId" value="">
8
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_SPPLY_ID" name="sspplyId" value=""> -->
9
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID" name="brandId" value="">
10
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_DLV_STTMT_UNQ_NO" name="dlvSttmtUnqNo" value="">
9 11
 				<div id="ITP_POPUP_CONTAINER">
10 12
 					<div class="modal-header">
11 13
 						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@@ -51,7 +53,6 @@
51 53
 										<label style="width:100px;">납품담당</label>
52 54
 										<label>:</label>
53 55
 										<span class="fnDlvMgrNm"></span>
54
-										<span class="fnDlvMgrTelNo"></span>
55 56
 									</div>
56 57
 								</div>
57 58
 								<div class="col-xs-6">
@@ -65,7 +66,7 @@
65 66
 										<div class="itp_sign_header">
66 67
 											<label>납품확인일</label>
67 68
 										</div>
68
-										<div class="itp_sign_area fnDlvCnfmDt"></div>
69
+										<div class="itp_sign_area"></div>
69 70
 									</div>
70 71
 								</div>
71 72
 							</div>	
@@ -74,14 +75,12 @@
74 75
 									<div>
75 76
 										<label style="width:100px;">납품 장소</label>
76 77
 										<label>:</label>
77
-										<span style="margin:0px; " class="fnZipNo"></span>
78
-										<span class="fnLoadAddr"></span>
79
-										<span class="fnDtlAddr"></span>
78
+										<span style="margin:0px; " class="fnDlvAddr"></span>
80 79
 									</div>
81 80
 									<div>
82 81
 										<label style="width:100px;">전화번호</label>
83 82
 										<label>:</label>
84
-										<span class="fnVndrTelNo"></span>
83
+										<span class="fnWhsMgrTelNo"></span>
85 84
 									</div>
86 85
 								</div>
87 86
 							</div>	
@@ -93,25 +92,25 @@
93 92
 									<div class="col-xs-11" style="padding:0; width:90%;">
94 93
 										<label class="col-xs-4">등록번호</label>
95 94
 										<div class="col-xs-8 itp_form_it">
96
-											<div class="col-xs-12 itp_in fnBsnsRegNo"></div>
95
+											<div class="col-xs-12 itp_in fnDlvBsnsRegno"></div>
97 96
 										</div>
98 97
 									</div>	
99 98
 									<div class="col-xs-11" style="padding:0; width:90%;">
100 99
 										<label class="col-xs-2">상호</label>
101 100
 										<div class="col-xs-8 itp_form_it">
102
-											<div class="col-xs-12 itp_in fnSpplyNm"></div>
101
+											<div class="col-xs-12 itp_in fnDlvNm"></div>
103 102
 										</div>
104 103
 									</div>
105 104
 									<div class="col-xs-11" style="padding:0; width:90%;">
106 105
 										<label class="col-xs-2">성명</label>
107 106
 										<div class="col-xs-8 itp_form_it">
108
-											<div class="col-xs-12 itp_in fnBrandNm"></div>
107
+											<div class="col-xs-12 itp_in fnDlvOwnerNm"></div>
109 108
 										</div>
110 109
 									</div>
111 110
 									<div class="col-xs-11" style="padding:0; width:90%;">
112 111
 										<label class="col-xs-2">주소</label>
113 112
 										<div class="col-xs-8 itp_form_it">
114
-											<div class="col-xs-12 itp_in fnBrandNm"></div>
113
+											<div class="col-xs-12 itp_in fnDlvAddr"></div>
115 114
 										</div>
116 115
 									</div>
117 116
 								</div>	
@@ -124,25 +123,25 @@
124 123
 									<div class="col-xs-11" style="padding:0; width:90%;">
125 124
 										<label class="col-xs-4">등록번호</label>
126 125
 										<div class="col-xs-8 itp_form_it">
127
-											<div class="col-xs-12 itp_in fnBrandNm"></div>
126
+											<div class="col-xs-12 itp_in fnPoBsnsRegno"></div>
128 127
 										</div>
129 128
 									</div>	
130 129
 									<div class="col-xs-11" style="padding:0; width:90%;">
131 130
 										<label class="col-xs-2">상호</label>
132 131
 										<div class="col-xs-8 itp_form_it">
133
-											<div class="col-xs-12 itp_in fnBrandNm"></div>
132
+											<div class="col-xs-12 itp_in fnPoNm"></div>
134 133
 										</div>
135 134
 									</div>
136 135
 									<div class="col-xs-11" style="padding:0; width:90%;">
137 136
 										<label class="col-xs-2">성명</label>
138 137
 										<div class="col-xs-8 itp_form_it">
139
-											<div class="col-xs-12 itp_in fnDlvSttmtUnqNo"></div>
138
+											<div class="col-xs-12 itp_in fnPoOwnerNm"></div>
140 139
 										</div>
141 140
 									</div>
142 141
 									<div class="col-xs-11" style="padding:0; width:90%;">
143 142
 										<label class="col-xs-2">주소</label>
144 143
 										<div class="col-xs-8 itp_form_it">
145
-											<div class="col-xs-12 itp_in fnBrandNm"></div>
144
+											<div class="col-xs-12 itp_in fnDlvQty"></div>
146 145
 										</div>
147 146
 									</div>
148 147
 								</div>	

+ 6 - 1
src/main/webapp/app/popup/biz/BIZPOP_PO_PAYMENT.html

@@ -23,13 +23,17 @@
23 23
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_BRAND_ID" name="brandId" value="" />
24 24
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_BRAND_NM" name="brandNm" value="" />
25 25
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_STORE_ID" name="storeId" value="" />
26
+								<!--  
26 27
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="" />
28
+								-->
29
+								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO_LIST" name="sttlMgntUnqNoList" value="" />
27 30
 								
28 31
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_PO_ORD_NO" name="poOrdNo" value="" />
29 32
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_ORD_NM" name="ordNm" value="" />
30 33
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_GOODS_NM" name="goodsNm" value="" />
31 34
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_KICC_JAVASCRIPT_URL" name="kiccJavascriptUrl" value="" />
32 35
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_KICC_ACTION_WEB_URL" name="kiccActionWebUrl" value="" />
36
+								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_KICC_ACTION_MOBILE_URL" name="kiccActionMobileUrl" value="" />
33 37
 								<input type="hidden" id="ITP_FORM_PO_PAYMENT_POPUP_MALL_ID" name="mallId" value="" />
34 38
 							
35 39
 								<div class="form-group">
@@ -82,7 +86,8 @@
82 86
 							<input type="hidden" id="brandId" name="brandId" value="" />
83 87
 							<input type="hidden" id="storeId" name="storeId" value="" />
84 88
 							
85
-							<input type="hidden" id="kiccActionWebUrl" 	name="kiccActionWebUrl"		value="">
89
+							<input type="hidden" id="kiccActionWebUrl" 		name="kiccActionWebUrl"			value="">
90
+							<input type="hidden" id="kiccActionMobileUrl" 	name="kiccActionMobileUrl"		value="">
86 91
 							
87 92
 							<!-- WEB -->
88 93
 							

+ 2 - 1
src/main/webapp/app/popup/biz/BIZPOP_WHS_LOCATION.html

@@ -4,9 +4,10 @@
4 4
 			<form id="ITP_FORM_BIZPOP_WHS_LOCATION">
5 5
 				<input type="hidden" id="ITP_FORM_BIZPOP_WHS_LOCATION_BRAND_ID" name="sbrandId" value="">
6 6
 				<input type="hidden" id="ITP_FORM_BIZPOP_WHS_LOCATION_STORE_ID" name="sstoreId" value="">
7
+				<input type="hidden" id="ITP_FORM_BIZPOP_WHS_LOCATION_WHS_DVSN" name="swhsDvsn" value="">
7 8
 				<div class="modal-header">
8 9
 					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
9
-					<h5 class="modal-title">납품장소 검색</h5>
10
+					<h5 class="modal-title">창고 검색</h5>
10 11
 				</div>
11 12
 				<div class="modal-body">
12 13
 					<div class="itp_form fix">

+ 19 - 7
src/main/webapp/app/settmng/SETTMNG03010.html

@@ -5,7 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>정산현황</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_SETTMNG03010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_SETTMNG03010_STTL_END" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;정산완료&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_SETTMNG03010_STTL_END" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;정산확정&nbsp;&nbsp;</button>
9 9
 					<button type="button" id="ITP_BTN_SETTMNG03010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon"></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
10 10
 				</div>
11 11
 			</div>
@@ -82,6 +82,8 @@
82 82
 								<input type="hidden" id="ITP_FORM_SETTMNG03010_DETAIL_STORE_ID" name="storeId" value="">
83 83
 								<input type="hidden" id="ITP_FORM_SETTMNG03010_DETAIL_SPPLY_ID" name="spplyId" value="">
84 84
 								<input type="hidden" id="ITP_FORM_SETTMNG03010_DETAIL_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="">
85
+								<input type="hidden" id="ITP_FORM_SETTMNG03010_DETAIL_ACCT_BAL" name="acctBal" value="">
86
+								<input type="hidden" id="ITP_FORM_SETTMNG03010_DETAIL_STTL_REQ_AMT" name="sttlReqAmt" value="">
85 87
 					
86 88
 								<section class="itp_form_sec">
87 89
 									<h4 class="itp_form_tit">정산 상세정보</h4>
@@ -98,6 +100,16 @@
98 100
 												</div>
99 101
 											</div>
100 102
 										</div>
103
+										<div class="form-group">
104
+											<label class="col-xs-2 itp_lb">매장 정산타입</label>
105
+											<div class="col-xs-4 itp_ip">
106
+												<div class="col-xs-8 itp_in fnLoanDvsnNm"></div>
107
+											</div>
108
+											<label class="col-xs-2 itp_lb">매장 계좌잔액</label>
109
+											<div class="col-xs-4 itp_ip">
110
+												<div class="col-xs-8 itp_in fnAcctBal"></div>
111
+											</div>											
112
+										</div>
101 113
 										<div class="form-group">
102 114
 											<label class="col-xs-2 itp_lb">정산상태</label>
103 115
 											<div class="col-xs-4 itp_ip">
@@ -119,23 +131,23 @@
119 131
 											</div>											
120 132
 										</div>
121 133
 										<div class="form-group">
122
-											<label class="col-xs-2 itp_lb">정산일자</label>
134
+											<label class="col-xs-2 itp_lb">정산확정일자</label>
123 135
 											<div class="col-xs-4 itp_ip">
124 136
 												<div class="col-xs-8 itp_in fnSttlDt"></div>
125 137
 											</div>
126
-											<label class="col-xs-2 itp_lb">정산금액</label>
138
+											<label class="col-xs-2 itp_lb">정산확정금액</label>
127 139
 											<div class="col-xs-4 itp_ip">
128 140
 												<div class="col-xs-10 itp_in fnSttlAmt"></div>
129 141
 											</div>
130 142
 										</div>
131 143
 										<div class="form-group">
132
-											<label class="col-xs-2 itp_lb">수납여부(후불)</label>
144
+											<label class="col-xs-2 itp_lb">수납완료여부(수납완료일자)</label>
133 145
 											<div class="col-xs-4 itp_ip">
134
-												<div class="col-xs-8 itp_in fnRcptYn"></div>
146
+												<div class="col-xs-8 itp_in fnRcptYnDate"></div>
135 147
 											</div>
136
-											<label class="col-xs-2 itp_lb">수납일자(후불)</label>
148
+											<label class="col-xs-2 itp_lb">미납금액</label>
137 149
 											<div class="col-xs-4 itp_ip">
138
-												<div class="col-xs-10 itp_in fnRcptDt"></div>
150
+												<div class="col-xs-10 itp_in fnUnpaidAmt"></div>
139 151
 											</div>
140 152
 										</div>
141 153
 										<div class="form-group">

+ 19 - 13
src/main/webapp/easypay/oqpo/mobile_order_req.jsp

@@ -1,6 +1,8 @@
1
+<!--인증요청 페이지-->
2
+<!--메뉴얼 '인증페이지 작성' 인증요청 파라미터 포함.-->
3
+
1 4
 <!DOCTYPE html>
2 5
 <%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
3
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
4 6
 <%
5 7
 /* -------------------------------------------------------------------------- */
6 8
 /* 캐쉬 사용안함                                                              */
@@ -8,28 +10,32 @@
8 10
 response.setHeader("cache-control","no-cache");
9 11
 response.setHeader("expires","-1");
10 12
 response.setHeader("pragma","no-cache");
11
-
12 13
 request.setCharacterEncoding("utf-8");
14
+
15
+String kiccActionMobileUrl = request.getParameter("kiccActionMobileUrl");
13 16
 %>
14
-<c:set var="contextPath" value="${pageContext.request.contextPath}" /> 
15
-<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
17
+<html style="height: 100%;">
16 18
 <head>
17 19
 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
18 20
 <meta name="robots" content="noindex, nofollow" />
19
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21
+<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
20 22
 <script type="text/javascript">
21 23
     window.onload = function()
22 24
     {
23 25
         document.frm.submit();
24 26
     } 
25 27
 </script>
26
-<title>오더퀸 주문(모바일)</title>
27
-</head>
28
+<title>오더퀸 수발주 모바일 결제</title>
28 29
 </head>
29 30
 <body>
30
-    <form name="frm" method="post" action="<spring:eval expression="@applicationProperties.getProperty('kicc.action.mobile.url')" />"> <!-- 테스트 -->
31
-    <!--form name="frm" method="post" action="https://pg.easypay.co.kr/webpay/MainAction.do"--> <!-- 운영 -->
32
-
31
+    <!-- KICC 서버로 인증요청 -->
32
+    
33
+    <!-- TEST -->
34
+    <form name="frm" method="post" action="<%= kiccActionMobileUrl %>" >
35
+    <!-- REAL -->
36
+    <!--form name="frm" method="post" action="https://sp.easypay.co.kr/ep8/MainAction.do" -->
37
+    
38
+            
33 39
         <!--공통-->
34 40
         <input type="hidden" id="sp_mall_id"           name="sp_mall_id"           value="<%=request.getParameter("sp_mall_id")           %>" /> <!--[필수]가맹점ID -->
35 41
         <input type="hidden" id="sp_mall_nm"           name="sp_mall_nm"           value="<%=request.getParameter("sp_mall_nm")           %>" /> <!--[선택]가맹점명 -->
@@ -85,7 +91,7 @@ request.setCharacterEncoding("utf-8");
85 91
                    
86 92
         <!--선불카드-->
87 93
         <input type="hidden" id="sp_prepaid_cp"       name="sp_prepaid_cp"         value="<%=request.getParameter("sp_prepaid_cp")        %>" /> <!--[선택]선불카드 CP -->
88
-        
89
-    </form>
94
+             
95
+     </form>
90 96
 </body>
91
-</html>
97
+</html>

+ 59 - 58
src/main/webapp/easypay/oqpo/mobile_order_res_submit.jsp

@@ -29,65 +29,67 @@ request.setCharacterEncoding("utf-8");
29 29
 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
30 30
 <meta name="robots" content="noindex, nofollow" />
31 31
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
32
-<script type="text/javascript">
33
-	/*--KICC 서버로부터 인증응답 파라미터 수신--*/
34
-	window.onload = function() {
35
-	    // <!--공통-->
36
-	    window.document.getElementById("sp_res_cd").value             = "<%=getNullToSpace(request.getParameter("sp_res_cd"))           %>";  // [필수]응답코드
37
-	    window.document.getElementById("sp_res_msg").value            = "<%=getNullToSpace(request.getParameter("sp_res_msg"))          %>";  // [필수]응답메세지
38
-	    window.document.getElementById("sp_tr_cd").value              = "<%=getNullToSpace(request.getParameter("sp_tr_cd"))            %>";  // [필수]결제창 요청구분
39
-	    window.document.getElementById("sp_ret_pay_type").value       = "<%=getNullToSpace(request.getParameter("sp_ret_pay_type"))     %>";  // [필수]결제수단
40
-	    window.document.getElementById("sp_trace_no").value           = "<%=getNullToSpace(request.getParameter("sp_trace_no"))         %>";  // [선택]추적번호     
41
-	    window.document.getElementById("sp_order_no").value           = "<%=getNullToSpace(request.getParameter("sp_order_no"))         %>";  // [필수]가맹점 주문번호
42
-	    window.document.getElementById("sp_sessionkey").value         = "<%=getNullToSpace(request.getParameter("sp_sessionkey"))       %>";  // [필수]세션키
43
-	    window.document.getElementById("sp_encrypt_data").value       = "<%=getNullToSpace(request.getParameter("sp_encrypt_data"))     %>";  // [필수]암호화전문
44
-	    window.document.getElementById("sp_mall_id").value            = "<%=getNullToSpace(request.getParameter("sp_mall_id"))          %>";  // [필수]가맹점 ID
45
-	    window.document.getElementById("sp_mobilereserved1").value    = "<%=getNullToSpace(request.getParameter("sp_mobilereserved1"))  %>";  // [선택]여유필드
46
-	    window.document.getElementById("sp_mobilereserved2").value    = "<%=getNullToSpace(request.getParameter("sp_mobilereserved2"))  %>";  // [선택]여유필드
47
-	    window.document.getElementById("sp_reserved1").value          = "<%=getNullToSpace(request.getParameter("sp_reserved1"))        %>";  // [선택]여유필드 
48
-	    window.document.getElementById("sp_reserved2").value          = "<%=getNullToSpace(request.getParameter("sp_reserved2"))        %>";  // [선택]여유필드
49
-	    window.document.getElementById("sp_reserved3").value          = "<%=getNullToSpace(request.getParameter("sp_reserved3"))        %>";  // [선택]여유필드
50
-	    window.document.getElementById("sp_reserved4").value          = "<%=getNullToSpace(request.getParameter("sp_reserved4"))        %>";  // [선택]여유필드
51
-	
52
-	    // <!--신용카드-->
53
-	    window.document.getElementById("sp_card_code").value          = "<%=getNullToSpace(request.getParameter("sp_card_code"))        %>";  // [필수]카드코드 
54
-	    window.document.getElementById("sp_eci_code").value           = "<%=getNullToSpace(request.getParameter("sp_eci_code"))         %>";  // [선택]ECI코드(MPI인 경우)
55
-	    window.document.getElementById("sp_card_req_type").value      = "<%=getNullToSpace(request.getParameter("sp_card_req_type"))    %>";  // [필수]거래구분
56
-	    window.document.getElementById("sp_save_useyn").value         = "<%=getNullToSpace(request.getParameter("sp_save_useyn"))       %>";  // [선택]카드사 세이브 여부
57
-	    window.document.getElementById("sp_card_prefix").value        = "<%=getNullToSpace(request.getParameter("sp_card_prefix"))      %>";  // [선택]신용카드 Prefix 
58
-	    window.document.getElementById("sp_card_no_7").value          = "<%=getNullToSpace(request.getParameter("sp_card_no_7"))        %>";  // [선택]신용카드번호 앞7자리   
59
-	    
60
-	    // <!--간편결제-->
61
-	    window.document.getElementById("sp_spay_cp").value            = "<%=getNullToSpace(request.getParameter("sp_spay_cp"))          %>";  // [선택]간편결제 CP코드
62
-	    
63
-	    // <!--선불카드-->
64
-	    window.document.getElementById("sp_prepaid_cp").value         = "<%=getNullToSpace(request.getParameter("sp_prepaid_cp"))       %>";  // [선택]선불카드 CP코드
65
-	                      
66
-		if( "<%=request.getParameter("sp_res_cd") %>" == "0000" )
67
-	    {
68
-	        frm_pay.target = "_self";
69
-	        frm_pay.action = "/moblie_easypay_request.itp";
70
-	        frm_pay.submit();
71
-	    }
72
-	    else
73
-	    {
74
-	        alert( urldecode("<%=request.getParameter("sp_res_cd") %> : <%=request.getParameter("sp_res_msg") %>"));
75
-	        location.href="/hmpage_member_order_confirm.itp";
76
-	    }
77
-	}
78
-	
32
+<script>
33
+    /*--KICC 서버로부터 인증응답 파라미터 수신--*/
34
+    window.onload = function() 
35
+    {
36
+        // <!--공통-->
37
+        window.document.getElementById("sp_res_cd").value             = "<%=getNullToSpace(request.getParameter("sp_res_cd"))           %>";  // [필수]응답코드
38
+        window.document.getElementById("sp_res_msg").value            = "<%=getNullToSpace(request.getParameter("sp_res_msg"))          %>";  // [필수]응답메세지
39
+        window.document.getElementById("sp_tr_cd").value              = "<%=getNullToSpace(request.getParameter("sp_tr_cd"))            %>";  // [필수]결제창 요청구분
40
+        window.document.getElementById("sp_ret_pay_type").value       = "<%=getNullToSpace(request.getParameter("sp_ret_pay_type"))     %>";  // [필수]결제수단
41
+        window.document.getElementById("sp_trace_no").value           = "<%=getNullToSpace(request.getParameter("sp_trace_no"))         %>";  // [선택]추적번호     
42
+        window.document.getElementById("sp_order_no").value           = "<%=getNullToSpace(request.getParameter("sp_order_no"))         %>";  // [필수]가맹점 주문번호
43
+        window.document.getElementById("sp_sessionkey").value         = "<%=getNullToSpace(request.getParameter("sp_sessionkey"))       %>";  // [필수]세션키
44
+        window.document.getElementById("sp_encrypt_data").value       = "<%=getNullToSpace(request.getParameter("sp_encrypt_data"))     %>";  // [필수]암호화전문
45
+        window.document.getElementById("sp_mall_id").value            = "<%=getNullToSpace(request.getParameter("sp_mall_id"))          %>";  // [필수]가맹점 ID
46
+        window.document.getElementById("sp_mobilereserved1").value    = "<%=getNullToSpace(request.getParameter("sp_mobilereserved1"))  %>";  // [선택]여유필드
47
+        window.document.getElementById("sp_mobilereserved2").value    = "<%=getNullToSpace(request.getParameter("sp_mobilereserved2"))  %>";  // [선택]여유필드
48
+        window.document.getElementById("sp_reserved1").value          = "<%=getNullToSpace(request.getParameter("sp_reserved1"))        %>";  // [선택]여유필드 
49
+        window.document.getElementById("sp_reserved2").value          = "<%=getNullToSpace(request.getParameter("sp_reserved2"))        %>";  // [선택]여유필드
50
+        window.document.getElementById("sp_reserved3").value          = "<%=getNullToSpace(request.getParameter("sp_reserved3"))        %>";  // [선택]여유필드
51
+        window.document.getElementById("sp_reserved4").value          = "<%=getNullToSpace(request.getParameter("sp_reserved4"))        %>";  // [선택]여유필드
79 52
 
80
-   	function urldecode( str ) {
81
-       // 공백 문자인 + 를 처리하기 위해 +('%20') 을 공백으로 치환
82
-       return decodeURIComponent((str + '').replace(/\+/g, '%20'));
83
-   	}
53
+        // <!--신용카드-->
54
+        window.document.getElementById("sp_card_code").value          = "<%=getNullToSpace(request.getParameter("sp_card_code"))        %>";  // [필수]카드코드 
55
+        window.document.getElementById("sp_eci_code").value           = "<%=getNullToSpace(request.getParameter("sp_eci_code"))         %>";  // [선택]ECI코드(MPI인 경우)
56
+        window.document.getElementById("sp_card_req_type").value      = "<%=getNullToSpace(request.getParameter("sp_card_req_type"))    %>";  // [필수]거래구분
57
+        window.document.getElementById("sp_save_useyn").value         = "<%=getNullToSpace(request.getParameter("sp_save_useyn"))       %>";  // [선택]카드사 세이브 여부
58
+        window.document.getElementById("sp_card_prefix").value        = "<%=getNullToSpace(request.getParameter("sp_card_prefix"))      %>";  // [선택]신용카드 Prefix 
59
+        window.document.getElementById("sp_card_no_7").value          = "<%=getNullToSpace(request.getParameter("sp_card_no_7"))        %>";  // [선택]신용카드번호 앞7자리   
60
+        
61
+        // <!--간편결제-->
62
+        window.document.getElementById("sp_spay_cp").value            = "<%=getNullToSpace(request.getParameter("sp_spay_cp"))          %>";  // [선택]간편결제 CP코드
63
+        
64
+        // <!--선불카드-->
65
+        window.document.getElementById("sp_prepaid_cp").value         = "<%=getNullToSpace(request.getParameter("sp_prepaid_cp"))       %>";  // [선택]선불카드 CP코드
66
+                          
67
+       if( "<%=request.getParameter("sp_res_cd") %>" == "0000" )
68
+        {
69
+    	   	// alert('TODO 결제승인처리');
70
+            frm_pay.target = "_self";
71
+            frm_pay.action = "../easypay_request.jsp";
72
+            frm_pay.submit();
73
+        }
74
+        else
75
+        {
76
+            alert( urldecode("<%=request.getParameter("sp_res_cd") %> : <%=request.getParameter("sp_res_msg") %>"));
77
+            // 에러 발생시 어떻게 처리할까?
78
+            // 이전 팝업으로는 돌아갈 수 없다.
79
+            // location.href="./order.jsp";
80
+            history.back(-1);
81
+        }
82
+    }
83
+    
84
+    function urldecode( str ) {
85
+        // 공백 문자인 + 를 처리하기 위해 +('%20') 을 공백으로 치환
86
+        return decodeURIComponent((str + '').replace(/\+/g, '%20'));
87
+    }
84 88
 </script>
85
-<title>오더퀸 수발주 결제하기(모바일)</title>
86
-</head>
89
+<title>EasyPay 8.0 webpay mobile</title>
87 90
 </head>
88 91
 <body>
89
-  <form name="frm_pay" method="post" >  
90
-    
92
+	<form name="frm_pay" method="post" >      
91 93
     <!-- [START] 인증응답 필드 -->     
92 94
     
93 95
     <!--공통-->
@@ -122,7 +124,6 @@ request.setCharacterEncoding("utf-8");
122 124
     <input type="hidden" id="sp_prepaid_cp"           name="sp_prepaid_cp"           value="" />          <!-- [선택]선불카드 CP코드 -->
123 125
     
124 126
     <!-- [END] 인증응답 필드  --> 
125
-
126
-   </form>
127
+    </form>
127 128
 </body>
128
-</html>
129
+</html>

+ 448 - 0
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG01010.js

@@ -0,0 +1,448 @@
1
+require(['config'], function() {
2
+	require([], function($) {
3
+		listObj.init();
4
+	});
5
+});
6
+
7
+/********************************************************
8
+ --------------------------------------------------------
9
+ - Object 목록								            -
10
+ --------------------------------------------------------
11
+ * const gridColModel = {}	: 화면 Grid Object			*
12
+ * let pageObj = {}			: 화면공통 Object			*
13
+ * let listObj = {}			: 목록화면 Object			*
14
+ * let viewObj = {}			: 상세화면 Object			*
15
+ * let modifyObj = {}		: 수정화면 Object			*
16
+ * let createObj = {}		: 신규화면 Object			*
17
+ *******************************************************/
18
+
19
+/*화면 변수*/
20
+const INOUTMNG01010_GRID_ID = '#ITP_INOUTMNG01010_jqGrid';
21
+const INOUTMNG01010_GRID_LIST = '#ITP_INOUTMNG01010_jqGrid_list';
22
+const INOUTMNG01010_GRID_PAGER = '#ITP_INOUTMNG01010_jqGridPager';
23
+const INOUTMNG01010_GRID_EMPTY = '#ITP_INOUTMNG01010_jqGridEmpty';
24
+
25
+let ITP_FORM_INOUTMNG01010_DETAIL_IS_WRITING = false;
26
+let INOUTMNG01010_LAST_ROW_ID;
27
+
28
+
29
+/*API URL*/
30
+let API_DETAIL_GRID_LIST 		= '/api/pomng/inoutmng/target-grid-list';	// 목록
31
+
32
+
33
+/*화면 Grid ColModel*/
34
+const gridColModel = {
35
+	list: [
36
+		{
37
+			index: 'BRAND_ID', name: 'brandId',
38
+			label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
39
+			width: '13', fixed: false, align: 'center',
40
+			sortable: false, hidden: true
41
+		},
42
+		{
43
+			index: 'BRAND_NM', name: 'brandNm',
44
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드명
45
+			width: '10', fixed: false, align: 'center',
46
+			sortable: false, hidden: false
47
+		},
48
+		{
49
+			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
50
+			label: ITP_MSG_LOCALE.label.pchPodrUnqNo, //구매발주번호
51
+			width: '10', fixed: false, align: 'center',
52
+			sortable: false, hidden: false
53
+		},
54
+		{
55
+			index: 'PCH_PODR_DTL_NO', name: 'pchPodrDtlNo',
56
+			label: ITP_MSG_LOCALE.label.pchPodrDtlNo, //구매발주항번
57
+			width: '10', fixed: false, align: 'center',
58
+			sortable: false, hidden: false
59
+		},
60
+		{
61
+			index: 'ITEM_ID', name: 'itemId',
62
+			label: ITP_MSG_LOCALE.label.itemId, //품목아이디
63
+			width: '10', fixed: false, align: 'center',
64
+			sortable: false, hidden: false
65
+		},
66
+		{
67
+			index: 'ITEM_NM', name: 'itemNm',
68
+			label: ITP_MSG_LOCALE.label.itemNm, //품목명
69
+			width: '10', fixed: false, align: 'left',
70
+			sortable: false, hidden: false
71
+		},
72
+		{
73
+			index: 'WHS_ID', name: 'whsId',
74
+			label: ITP_MSG_LOCALE.label.whsId, //납품창고아이디
75
+			width: '13', fixed: false, align: 'center',
76
+			sortable: false, hidden: true
77
+		},
78
+		{
79
+			index: 'WHS_NM', name: 'whsNm',
80
+			label: ITP_MSG_LOCALE.label.whsNm, //납품창고명
81
+			width: '15', fixed: false, align: 'left',
82
+			sortable: false, hidden: false
83
+		},
84
+		{
85
+			index: 'LOCATION', name: 'location',
86
+			label: ITP_MSG_LOCALE.label.location, //납품LOCATION
87
+			width: '15', fixed: false, align: 'center',
88
+			sortable: false, hidden: true
89
+		},
90
+		{
91
+			index: 'UNIT_AMT', name: 'unitAmt',
92
+			label: ITP_MSG_LOCALE.label.unitAmt, //단가
93
+			width: '6', fixed: false, align: 'right',
94
+			sortable: false, hidden: false,
95
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
96
+		},
97
+		{
98
+			index: 'PODR_QTY', name: 'podrQty',
99
+			label: ITP_MSG_LOCALE.label.podrQty, //발주수량
100
+			width: '10', fixed: false, align: 'right',
101
+			sortable: false, hidden: false,
102
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
103
+		},
104
+		{
105
+			index: 'SHMT_QTY', name: 'shmtQty',
106
+			label: ITP_MSG_LOCALE.label.shmtQty, //출고수량
107
+			width: '10', fixed: false, align: 'right',
108
+			sortable: true, editable: true, edittype: 'text',
109
+			editrules: {required: true, number:true},
110
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
111
+		},
112
+		{
113
+			index: 'STCK_QTY', name: 'stckQty',
114
+			label: ITP_MSG_LOCALE.label.stckQty, //현 재고
115
+			width: '10', fixed: false, align: 'right',
116
+			sortable: false, hidden: false,
117
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
118
+		},
119
+		{
120
+			index: 'EXPRY_YN', name: 'expryYn',
121
+			label: ITP_MSG_LOCALE.label.expryYn, //유통기한여부
122
+			width: '10', fixed: false, align: 'center',
123
+			sortable: false, hidden: false
124
+		},
125
+		{
126
+			index: 'EXPRY_PERIOD', name: 'expryPeriod',
127
+			label: ITP_MSG_LOCALE.label.expryPeriod, //유통기한기간
128
+			width: '10', fixed: false, align: 'center',
129
+			sortable: false, hidden: true
130
+		},
131
+		{
132
+			index: 'EXPRY_DATE', name: 'expryDate',
133
+			label: ITP_MSG_LOCALE.label.expryDate, //유통일자
134
+			width: '20', fixed: false, align: 'center',
135
+			sortable: false, hidden: false,
136
+			editable:true, sorttype:"date", 
137
+			editoptions : { dataInit : function(e) { $(e).datepicker( ITP_DATE_LANGUAGE ); } }
138
+		},
139
+		{
140
+			index: 'PODR_AMT', name: 'podrAmt',
141
+			label: ITP_MSG_LOCALE.label.podrAmt, //발주금액
142
+			width: '10', fixed: false, align: 'right',
143
+			sortable: false, hidden: false,
144
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
145
+		},
146
+		{
147
+			index: 'DLV_REQ_DT', name: 'dlvReqDt',
148
+			label: ITP_MSG_LOCALE.label.dlvReqDt, //납품요청일
149
+			width: '10', fixed: false, align: 'center',
150
+			sortable: false, hidden: false
151
+		},
152
+		{
153
+			index: 'SHMT_WHS_ID', name: 'shmtWhsId',
154
+			label: ITP_MSG_LOCALE.label.shmtWhsId, //출고창고아이디
155
+			width: '10', fixed: false, align: 'right',
156
+			sortable: false, hidden: true
157
+		},
158
+		{
159
+			index: 'SHMT_LOCATION', name: 'shmtLocation',
160
+			label: ITP_MSG_LOCALE.label.shmtLocation, //출고LOCATION
161
+			width: '10', fixed: false, align: 'center',
162
+			sortable: false, hidden: true
163
+		},
164
+		{
165
+			index: 'SHMT_WHS_NM', name: 'shmtWhsNm',
166
+			label: ITP_MSG_LOCALE.label.shmtWhsNm, //출고창고명
167
+			width: '10', fixed: false, align: 'center',
168
+			sortable: false, hidden: false
169
+		}
170
+	]
171
+};
172
+
173
+
174
+
175
+/*목록화면 Object*/
176
+let listObj = {
177
+	init: function () {
178
+		this.view();
179
+		this.action();
180
+		this.event.init();
181
+		this.grid.init();
182
+	},
183
+	view: function() {
184
+		// 버튼 권한설정
185
+		fn_proc_btn_auth('INOUTMNG01010');
186
+
187
+		// 공통코드 표시
188
+		$('select').each(function() {
189
+			if($(this).data('select-code')) {
190
+				fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
191
+			}
192
+		});
193
+		
194
+		var now = new Date();
195
+		$('#ITP_TAB_INOUTMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
196
+		$('#ITP_FORM_INOUTMNG01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setDate(now.getDate())));
197
+		$('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+30)));
198
+		
199
+		
200
+	},
201
+	itp_INOUTMNG01010_search: false,
202
+	button: {
203
+		search: function() {
204
+			console.log("search event");
205
+			listObj.itp_INOUTMNG01010_search = true;
206
+			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
207
+			param.gridSize = $.jgrid.defaults.rowNum;
208
+			param.gridPage = $.jgrid.defaults.page;
209
+			param.sbrandId = fn_make_user_info.get('brandId');
210
+			$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
211
+		},
212
+		shmtout: function() {
213
+			
214
+			
215
+			
216
+			
217
+			
218
+			console.log("search event");
219
+			listObj.itp_INOUTMNG01010_search = true;
220
+			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
221
+			param.gridSize = $.jgrid.defaults.rowNum;
222
+			param.gridPage = $.jgrid.defaults.page;
223
+			param.sbrandId = fn_make_user_info.get('brandId');
224
+			$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
225
+			
226
+			
227
+			
228
+			
229
+			
230
+		}
231
+	},
232
+	action: function () {
233
+		var _this = this;
234
+		// 출하창고 조회 버튼 클릭
235
+		$('#ITP_FORM_INOUTMNG01010_SEARCH_SHMT_WHS_NM').on('click', function() {
236
+			console.log("=================================");
237
+			_this.popup('S');
238
+		});
239
+		// 출하창고 텍스트 삭제 버튼 클릭
240
+		$('#ITP_FORM_INOUTMNG01010_DELETE_SHMT_WHS_NM').on('click', function() {
241
+			console.log("=================================");
242
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val('');
243
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val('');
244
+			
245
+		});
246
+		
247
+		// 납품장소 조회 버튼 클릭
248
+		$('#ITP_FORM_INOUTMNG01010_SEARCH_WHS_NM').on('click', function() {
249
+			console.log("=================================");
250
+			_this.popup('W');
251
+		});
252
+		// 납품장소 텍스트 삭제 버튼 클릭
253
+		$('#ITP_FORM_INOUTMNG01010_DELETE_WHS_NM').on('click', function() {
254
+			console.log("=================================");
255
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val('');
256
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val('');
257
+		});
258
+		
259
+	},
260
+	popup: function (arg) {
261
+		var popFn ;
262
+		// 팝업
263
+		if (arg == "S") {
264
+			popFn = this.callback.shmtwhs;
265
+		} else {
266
+			popFn = this.callback.whs;
267
+		}
268
+		
269
+		var whsDvsn = "";
270
+		
271
+		if (arg == "S") {
272
+			whsDvsn = "W01";
273
+		} else {
274
+			whsDvsn = "W02";
275
+		}
276
+		
277
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn: whsDvsn};
278
+		
279
+		
280
+		 
281
+		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
282
+		
283
+	},
284
+	callback: {
285
+		shmtwhs: function(rowDataPop) {
286
+			console.log(rowDataPop);
287
+			if(rowDataPop) {
288
+				$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val(rowDataPop.whsNm);
289
+				$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val(rowDataPop.whsId);
290
+			}
291
+			
292
+		},
293
+		whs: function(rowDataPop) {
294
+			console.log(rowDataPop);
295
+			if(rowDataPop) {
296
+				$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
297
+				$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
298
+			}
299
+			
300
+		}
301
+	},
302
+	event: {
303
+		init: function () {
304
+			this.button();
305
+		},
306
+		button: function () {
307
+			// 버튼 클릭 이벤트
308
+			$('button').each(function() {
309
+				var id = $(this).attr('id');
310
+				$(this).on('click', function() {
311
+					console.log("button");
312
+					console.log(id);
313
+					switch (id) {
314
+						case 'ITP_BTN_INOUTMNG01010_SRH'					: listObj.button.search();		break;	// 조회 버튼 클릭
315
+						case 'ITP_BTN_INOUTMNG01010_OUT'				: listObj.button.shmtout();	break;	// 출하지시 버튼
316
+						
317
+					}
318
+				});
319
+			});
320
+			
321
+			$('body').on('click', function(e) {
322
+				var gridId = INOUTMNG01010_GRID_ID.replace('#', '');
323
+				var rids = $(INOUTMNG01010_GRID_ID).jqGrid('getDataIDs');
324
+				var last_row_id = rids[rids.length - 1];
325
+				
326
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'INOUTMNG01010');	
327
+			});
328
+
329
+			
330
+		}
331
+	},
332
+	empty: {
333
+		init: function() {
334
+			var _this = this;
335
+			this.push();
336
+			$(INOUTMNG01010_GRID_EMPTY).on('click', function() {
337
+				_this.back();
338
+				_this.itp_INOUTMNG01010_param.gridSize = $.jgrid.defaults.rowNum;
339
+				$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_INOUTMNG01010_param)}).trigger('reloadGrid');
340
+			});
341
+		},
342
+		itp_INOUTMNG01010_param: {},
343
+		push: function() {
344
+			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
345
+			listObj.itp_INOUTMNG01010_param = param;
346
+		},
347
+		back: function() {
348
+			/*
349
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_FROM_DT').val(this.itp_INOUTMNG01010_param.fromDt);
350
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').val(this.itp_INOUTMNG01010_param.toDt);
351
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SPPLY_ID').val(this.itp_INOUTMNG01010_param.sspplyId);
352
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_SPPLY_NM').val(this.itp_INOUTMNG01010_param.sspplyNm);
353
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_WHS_NM').val(this.itp_INOUTMNG01010_param.swhsNm);
354
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_WHS_ID').val(this.itp_INOUTMNG01010_param.swhsId);
355
+			$('#ITP_FORM_INOUTMNG01010_SEARCH_ITEM_NM').val(this.itp_INOUTMNG01010_param.sitemNm);
356
+			*/
357
+		}
358
+	},
359
+	grid: {
360
+		init: function () {
361
+			// 데이터 없을때
362
+			listObj.empty.push();
363
+			itp_fn_jqgrid_resize(INOUTMNG01010_GRID_ID, INOUTMNG01010_GRID_LIST, 'lg');
364
+			itp_fn_fire_window_resize();
365
+			this.search();
366
+			
367
+		},
368
+		colModel: gridColModel.list,
369
+		search: function() {
370
+			this.unload();
371
+			this.load();
372
+		},
373
+		load: function() {
374
+			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
375
+			param.gridSize = $.jgrid.defaults.rowNum;
376
+			param.sbrandId = fn_make_user_info.get('brandId');
377
+			
378
+			var option = {
379
+				multiselect: true,
380
+				autowidth: true,
381
+				gridId: INOUTMNG01010_GRID_ID,
382
+				colModel: gridColModel.list,
383
+				param: param,
384
+				url: DOMAIN + API_DETAIL_GRID_LIST,
385
+				pager: INOUTMNG01010_GRID_PAGER,
386
+				
387
+				onCellSelect: function(rowid, cellIdx, cellValue) {
388
+					INOUTMNG01010_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, INOUTMNG01010_LAST_ROW_ID, INOUTMNG01010_GRID_ID, ['pchPodrUnqNo']);
389
+					/*
390
+					if(rowid && rowid!==INOUTMNG01010_LAST_ROW_ID){
391
+						console.log("onCellSelect  if in");
392
+						console.log(INOUTMNG01010_LAST_ROW_ID);
393
+						jQuery(INOUTMNG01010_GRID_ID).jqGrid('restoreRow',INOUTMNG01010_LAST_ROW_ID);
394
+						jQuery(INOUTMNG01010_GRID_ID).jqGrid('editRow',rowid,true,pickdates);
395
+						INOUTMNG01010_LAST_ROW_ID=rowid;
396
+					}
397
+					
398
+					function pickdates(rowid){
399
+						console.log("pickdates  if in");
400
+						jQuery("#"+id+"_expryDate",INOUTMNG01010_GRID_ID).datepicker({dateFormat:"yyyy.mm.dd"});
401
+					}
402
+					*/
403
+				},
404
+				/*
405
+				onSelectRow: function(id){
406
+					console.log("onSelectRow");
407
+					console.log(id);
408
+					if(id && id!==INOUTMNG01010_LAST_ROW_ID){
409
+						console.log("onSelectRow  if in");
410
+						console.log(INOUTMNG01010_LAST_ROW_ID);
411
+						jQuery(INOUTMNG01010_GRID_ID).jqGrid('restoreRow',INOUTMNG01010_LAST_ROW_ID);
412
+						jQuery(INOUTMNG01010_GRID_ID).jqGrid('editRow',id,true,pickdates);
413
+						INOUTMNG01010_LAST_ROW_ID=id;
414
+					}
415
+					
416
+					function pickdates(id){
417
+						console.log("pickdates  if in");
418
+						jQuery("#"+id+"_expryDate",INOUTMNG01010_GRID_ID).datepicker({dateFormat:"yyyy.mm.dd"});
419
+					}
420
+				}, */
421
+				loadComplete: function(data) {
422
+					itp_fn_grid_load_complete(data, INOUTMNG01010_GRID_ID, true, 'number', 'INOUTMNG01010', listObj.itp_INOUTMNG01010_search, listObj.empty, true, data.gridRecords, true);
423
+					var ids = $(INOUTMNG01010_GRID_ID).getDataIDs();
424
+					$.each(ids, function(idx, rowId) {
425
+						$(INOUTMNG01010_GRID_ID).jqGrid('setCell', rowId, 'storeId', '', ITP_GRID_COL_STYLE.link);
426
+					});
427
+				},
428
+				onPaging: function(action) {
429
+					itp_fn_grid_paging(INOUTMNG01010_GRID_ID, action, param);
430
+				}
431
+			};
432
+			itp_fn_grid_make_remote(option);
433
+		},
434
+		button: {
435
+		},
436
+		unload : function() {
437
+			$.jgrid.gridUnload(INOUTMNG01010_GRID_ID);
438
+		},
439
+		clearData : function() {
440
+			$(INOUTMNG01010_GRID_ID).jqGrid('clearGridData', true);
441
+			$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
442
+			$(INOUTMNG01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
443
+			$(INOUTMNG01010_GRID_EMPTY).show();
444
+		}
445
+	}
446
+};
447
+
448
+

+ 11 - 1
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

@@ -405,12 +405,22 @@ let listObj = {
405 405
 	},
406 406
 	popup: function(keyword) {
407 407
 		var popFn ;
408
+		
408 409
 		if(keyword == 'shmtWhs') {
409 410
 			popFn = this.callback.shmtWhs;
410 411
 		} else if(keyword == 'whs'){
411 412
 			popFn = this.callback.whs;
412 413
 		}
413
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
414
+		
415
+		var whsDvsn = "";
416
+		if(keyword == 'shmtWhs') {
417
+			whsDvsn = "W01";
418
+		} else if(keyword == 'whs'){
419
+			whsDvsn = "W02";
420
+		}
421
+		
422
+		
423
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: whsDvsn};
414 424
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
415 425
 		
416 426
 	},

+ 7 - 7
src/main/webapp/js/app/loanmng/ITP_LOANMNG01010.js

@@ -80,26 +80,26 @@ const gridColModel = {
80 80
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
81 81
 		},
82 82
 		{
83
-			index: 'POSB_LIMIT_AMT', name: 'posbLimitAmt',
84
-			label: "가용한도금액", 
83
+			index: 'ACCT_BAL', name: 'acctBal',
84
+			label: "입금금액", 
85 85
 			width: '10', fixed: false, align: 'center',
86 86
 			sortable: false, hidden: false, 
87 87
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
88
-		},
88
+		},		
89 89
 		{
90
-			index: 'TMP_RCV_ACCT_TOTAL', name: 'tmpRcvAcctTotal',
91
-			label: '가수금액', 
90
+			index: 'POSB_LIMIT_AMT', name: 'posbLimitAmt',
91
+			label: "사용가능금액", 
92 92
 			width: '10', fixed: false, align: 'center',
93 93
 			sortable: false, hidden: false, 
94 94
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
95 95
 		},
96 96
 		{
97 97
 			index: 'USE_AMT_TOTAL', name: 'useAmtTotal',
98
-			label: '사용금액', 
98
+			label: '사용금액', 
99 99
 			width: '10', fixed: false, align: 'center',
100 100
 			sortable: false, hidden: false, 
101 101
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
102
-		},		
102
+		},
103 103
 		{
104 104
 			index: 'USE_YN_NM', name: 'useYnNm',
105 105
 			label: "사용여부", 

+ 13 - 4
src/main/webapp/js/app/loanmng/ITP_LOANMNG03010.js

@@ -101,10 +101,17 @@ const gridColModel = {
101 101
 		},
102 102
 		{
103 103
 			index: 'STTL_DT', name: 'sttlDt',
104
-			label: "정산확일", 
104
+			label: "정산확일", 
105 105
 			width: '10', fixed: false, align: 'center',
106 106
 			sortable: false, hidden: false
107 107
 		},	
108
+		{
109
+			index: 'UNPAId_AMT', name: 'unpaidAmt',
110
+			label: '미납금액', 
111
+			width: '10', fixed: false, align: 'center',
112
+			sortable: false, hidden: false, 
113
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
114
+		},		
108 115
 		{
109 116
 			index: 'USE_AMT_TOTAL', name: 'useAmtTotal',
110 117
 			label: '사용가능한도', 
@@ -473,8 +480,8 @@ let viewObj = {
473 480
 			var args = {'payTpCd': '20', 
474 481
 				'brandId': $('#ITP_FORM_LOANMNG03010_VIEW_BRAND_ID').val(), 
475 482
 				'storeId': $('#ITP_FORM_LOANMNG03010_VIEW_STORE_ID').val(), 
476
-				'sttlMgntUnqNo': $('#ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO').val(), 
477
-				'goodsAmt': $('#ITP_FORM_LOANMNG03010_VIEW_STTL_REQ_AMT').val() };
483
+				'sttlMgntUnqNoList': $('#ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO').val(), 
484
+				'goodsAmt': $('#ITP_FORM_LOANMNG03010_VIEW_UNPAID_AMT').val() }; 
478 485
 			fn_call_popup('biz', 'BIZPOP_PO_PAYMENT', '#ITP_ASIDE', popFn, args, 'S');
479 486
 		}
480 487
 	}, 
@@ -488,7 +495,7 @@ let viewObj = {
488 495
 		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STORE_ID').val(result.storeId);
489 496
 		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
490 497
 		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_RCPT_YN').val(result.rcptYn);
491
-		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STTL_REQ_AMT').val(result.sttlReqAmt);
498
+		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_UNPAID_AMT').val(result.unpaidAmt);
492 499
 		
493 500
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnBrandNm').text(result.brandNm);
494 501
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnStoreNm').text(result.storeNm);
@@ -499,6 +506,8 @@ let viewObj = {
499 506
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnSysRegNm').text(result.sysRegNm + ' (' + result.sysRegDttm + ')');
500 507
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnSttlReqAmt').text(itp_fn_number_comma(result.sttlReqAmt));
501 508
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnUseAmtTotal').text(itp_fn_number_comma(result.useAmtTotal));
509
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
510
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnUnpaidAmt').text(itp_fn_number_comma(result.unpaidAmt));
502 511
 		
503 512
 		if(result.rcptYn == 'Y') { // 수납여부
504 513
 			$('#ITP_BTN_LOANMNG03010_PAYMENT').hide();

+ 3 - 1
src/main/webapp/js/app/locales/locale-ko.js

@@ -227,7 +227,9 @@ const ITP_MSG_LOCALE = (function() {
227 227
 			"shmtReqStCd": "출하상태코드",
228 228
 			"shmtQty": "출하수량",
229 229
 			"shmtAmt": "출하금액",
230
-			"whsDt": "입고일"
230
+			"whsDt": "입고일",
231
+			"pchReqDtlStNm": "요청상세상태",
232
+			"dlvDvsnNm": "배송구분"
231 233
 		},
232 234
 		"table": {
233 235
 			"brandId": "브랜드ID",

+ 1 - 1
src/main/webapp/js/app/ordmng/ITP_ORDMNG01010.js

@@ -406,7 +406,7 @@ let listObj = {
406 406
 	popup: function() {
407 407
 		// 팝업
408 408
 		var popFn = this.callback.create;
409
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
409
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
410 410
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
411 411
 	},
412 412
 	callback: {

+ 118 - 26
src/main/webapp/js/app/ordmng/ITP_ORDMNG03010.js

@@ -29,7 +29,7 @@ let ITP_FORM_ORDMNG03010_DETAIL_IS_WRITING = false;
29 29
 
30 30
 /*API URL*/
31 31
 let API_DELI_GRID_LIST 	= '/api/pomng/inoutmng/spply-deli-grid-list';// 목록
32
-let API_INFO_INV 		= '/api/pomng/inoutmng/info-inv';	// 상세
32
+let API_INFO_INV 		= '/api/pomng/inoutmng/init-spply-inv';	// 상세
33 33
 let API_SAVE_SPPLY_INV 	= '/api/pomng/inoutmng/save-spply-inv';// 저장
34 34
 let API_ITEM_CLASS_LEVEL= '/api/item/class-level-list';		//품목분류 level 검색
35 35
 
@@ -37,10 +37,16 @@ let API_ITEM_CLASS_LEVEL= '/api/item/class-level-list';		//품목분류 level 
37 37
 const gridColModel = {
38 38
 	list: [
39 39
 	
40
+			{
41
+				index: 'Brand_ID', name: 'brandId',
42
+				label: ITP_MSG_LOCALE.label.brandId, //브랜드
43
+				width: '18', fixed: false, align: 'center',
44
+				sortable: false, hidden: true
45
+			},
40 46
 			{
41 47
 				index: 'Brand_Nm', name: 'brandNm',
42 48
 				label: ITP_MSG_LOCALE.label.brandNm, //브랜드
43
-				width: '10', fixed: false, align: 'center',
49
+				width: '20', fixed: false, align: 'center',
44 50
 				sortable: false, hidden: false
45 51
 			},
46 52
 			{
@@ -51,25 +57,31 @@ const gridColModel = {
51 57
 			},
52 58
 			{
53 59
 				index: 'ITEM_ST_CD', name: 'dlvStCd',
54
-				label: ITP_MSG_LOCALE.label.dlvStCd, //납품서상태
55
-				width: '6', fixed: false, align: 'center',
60
+				label: '납품상태', //납품서상태
61
+				width: '12', fixed: false, align: 'center',
56 62
 				sortable: false, hidden: false
57 63
 			},
58 64
 			{
59
-				index: 'poBsnsRegno', name: 'podrRegDt',
60
-				label: ITP_MSG_LOCALE.label.podrRegDt, //수주일자
61
-				width: '10', fixed: false, align: 'center',
65
+				index: 'PODR_REG_DT', name: 'podrRegDt',
66
+				label: '수주일자', //수주일자
67
+				width: '14', fixed: false, align: 'center',
62 68
 				sortable: false, hidden: false
63 69
 			},
64 70
 			{
65 71
 				index: 'PCH_ITEM_YN', name: 'dlvReqDt',
66 72
 				label: ITP_MSG_LOCALE.label.dlvReqDt, //납품요청일
67
-				width: '10', fixed: false, align: 'center',
73
+				width: '14', fixed: false, align: 'center',
68 74
 				sortable: false, hidden: false
69 75
 			},
70 76
 			{
71 77
 				index: 'PCH_ITEM_YN', name: 'dlvSchDt',
72 78
 				label: ITP_MSG_LOCALE.label.dlvSchDt, //납품예정일
79
+				width: '14', fixed: false, align: 'center',
80
+				sortable: false, hidden: false
81
+			},
82
+			{
83
+				index: 'PCH_ITEM_YN', name: 'dlvCmpltDt',
84
+				label: ITP_MSG_LOCALE.label.dlvCmpltDt, //납품완료일
73 85
 				width: '10', fixed: false, align: 'center',
74 86
 				sortable: false, hidden: false
75 87
 			},
@@ -86,7 +98,7 @@ const gridColModel = {
86 98
 				sortable: false, hidden: false
87 99
 			},
88 100
 			{
89
-				index: 'UNIT', name: 'podrQty',
101
+				index: 'PODR_QTY', name: 'podrQty',
90 102
 				label: ITP_MSG_LOCALE.label.podrQty, //수주수량
91 103
 				width: '6', fixed: false, align: 'center',
92 104
 				sortable: false, hidden: false
@@ -97,12 +109,24 @@ const gridColModel = {
97 109
 				width: '6', fixed: false, align: 'center',
98 110
 				sortable: false, hidden: false
99 111
 			},
112
+			{
113
+				index: 'UNIT', name: 'unit',
114
+				label: ITP_MSG_LOCALE.label.unit, //납품수량
115
+				width: '6', fixed: false, align: 'center',
116
+				sortable: false, hidden: false
117
+			},
100 118
 			{
101 119
 				index: 'PCH_ITEM_YN', name: 'unitAmt',
102 120
 				label: ITP_MSG_LOCALE.label.unitAmt, //납품금액
103 121
 				width: '6', fixed: false, align: 'center',
104 122
 				sortable: false, hidden: false
105 123
 			},
124
+			{
125
+				index: 'SALE_ITEM_YN', name: 'whsNm',
126
+				label: ITP_MSG_LOCALE.label.whsNm, //납품장소
127
+				width: '6', fixed: false, align: 'center',
128
+				sortable: false, hidden: false
129
+			},
106 130
 			{
107 131
 				index: 'PCH_ITEM_YN', name: 'dlvMgrNm',
108 132
 				label: ITP_MSG_LOCALE.label.dlvMgrNm, //납품담당자
@@ -158,6 +182,7 @@ let pageObj = {
158 182
 			this.ui.init();
159 183
 			this.event.init();
160 184
 			this.fileUpload();
185
+			this.action();
161 186
 	},
162 187
 	ui: {
163 188
 			init: function () {
@@ -186,6 +211,53 @@ let pageObj = {
186 211
 			ready: function() {
187 212
 					listObj.init();
188 213
 			}
214
+	},
215
+	action: function () {
216
+		var _this = this;
217
+		// 검색 납품장소
218
+		$('#ITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM').on('click', function() {
219
+			_this.popup('SW');
220
+		});
221
+		// 검색 납품장소 텍스트 삭제 버튼 클릭
222
+		$('#ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM').on('click', function() {
223
+			$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_NM').val('');
224
+			$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_ID').val('');
225
+		});
226
+	
227
+	},
228
+	popup: function (arg) {
229
+		var popFn ;
230
+		// 팝업
231
+		if (arg == "SW") {
232
+			popFn = this.callback.searWhs;
233
+		} 
234
+		
235
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
236
+		if (arg == "SW" ) {
237
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
238
+		} 
239
+		
240
+		
241
+	},
242
+	callback: {
243
+		searWhs: function(rowDataPop) {
244
+			if(rowDataPop) {
245
+				$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
246
+				$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
247
+			}
248
+			
249
+		},
250
+		poRej: function(rowDataPop) {
251
+			if(rowDataPop) {
252
+				console.log(rowDataPop);
253
+				
254
+				if (rowDataPop.retVal == "Y") {
255
+				  modifyObj.button.rejectSave(rowDataPop);
256
+				}
257
+			}
258
+		}
259
+		
260
+		
189 261
 	},
190 262
 	event: {
191 263
 			init: function () {
@@ -198,7 +270,7 @@ let pageObj = {
198 270
 							$(this).on('click', function() {
199 271
 									switch (id) {
200 272
 											case 'ITP_BTN_ORDMNG03010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
201
-											case 'ITP_BTN_ORDMNG03010_POPUP'			: listObj.button.create(); 		break;	// 신규등록 버튼
273
+											case 'ITP_BTN_ORDMNG03010_POPUP'			: listObj.button.create(); 		break;	// 납품서출력
202 274
 											case 'ITP_BTN_ORDMNG03010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
203 275
 											case 'ITP_BTN_ORDMNG03010_CANCELLIST'		: createObj.button.cancel(); 	break;	// 취소/목록 버튼
204 276
 											case 'ITP_BTN_ORDMNG03010_DELETE'			: 								break;	// 삭제 버튼
@@ -239,7 +311,8 @@ let pageObj = {
239 311
 			});
240 312
 			if(mode == 'LIST') { // 목록
241 313
 				$('#ITP_FORM_ORDMNG03010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('userId'));
242
-					$('#ITP_AJAX_ORDMNG03010_LIST_CONTAINER').show();
314
+				$('#ITP_FORM_ORDMNG03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));					$('#ITP_AJAX_ORDMNG03010_LIST_CONTAINER').show();
315
+					$('#ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM').show();
243 316
 					fn_show_btn_auth_array(['#ITP_BTN_ORDMNG03010_SRH', '#ITP_BTN_ORDMNG03010_POPUP']);
244 317
 			} else if(mode == 'ADD') { // 등록
245 318
 					$('#ITP_AJAX_ORDMNG03010_DETAIL_CONTAINER').show();
@@ -287,36 +360,55 @@ let listObj = {
287 360
 			this.grid.init();
288 361
 	},
289 362
 	itp_ORDMNG03010_search: false,
363
+	
290 364
 	button: {
291 365
 			search: function() {
292 366
 					listObj.itp_ORDMNG03010_search = true;
367
+					console.log(1);
293 368
 					let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
294 369
 					param.gridSize = $.jgrid.defaults.rowNum;
295
-					param.gridPage = $.jgrid.defaults.page;
370
+					param.gridPage = $.jgrid.defaults.pageITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM;
296 371
 					$(ORDMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
297 372
 			},
373
+			
298 374
 			create: function() {
299 375
 					if(!fn_make_user_info.isEmpty()) {
300 376
 						// 팝업
301
-						var popFn = (result) => {
302
-							console.log(result);
377
+//						var popFn = this.callback.deliPrt;
378
+
379
+						const rowKey = $(ORDMNG03010_GRID_ID).getGridParam('selrow');
380
+						if (!rowKey) {
381
+							alert("납품서를 선택해주세요 (대표 납품서번호)") ;
382
+							return;
383
+						}
384
+						
385
+						var selectedIds = $(ORDMNG03010_GRID_ID).getGridParam('selarrrow');
386
+						
387
+						if(selectedIds.length > 1) { // 1개만 선택
388
+						   alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;
389
+							return;
390
+						} 
391
+						
392
+						var selRowData ;
393
+						
394
+						for (var i=selectedIds.length-1; i>=0; i--) {
395
+							selRowData = $(ORDMNG03010_GRID_ID).jqGrid('getRowData', selectedIds[i]);
303 396
 						}
304
-					    var selectedIds = $(ORDMNG03010_GRID_ID).getGridParam('selarrrow');
305
-					    console.log(selectedIds);
306
-					    if(selectedIds.length !== 1) {
307
-					    	return;
308
-					    }
309
-						var param = {
310
-							'dlvSttmtUnqNo':selectedIds[0].dlvSttmtUnqNo,
311
-							'fromDt': $('#ITP_FORM_ORDMNG03010_SEARCH #ITP_FORM_ORDMNG03010_SEARCH_DLV_REQ_DT').val(),
312
-							'toDt': $('#ITP_FORM_ORDMNG03010_SEARCH #ITP_FORM_ORDMNG03010_SEARCH_DLV_CMPLT_DT').val()
313
-						};
314
-						console.log(param);
315
-						fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE', popFn, param, 'S');
397
+						console.log(selRowData);
398
+						const key = {brandId :fn_make_user_info.get('brandId'), dlvSttmtUnqNo : selRowData.dlvSttmtUnqNo};
399
+						console.log(key);
400
+						fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE',null, key, 'S');
401
+						console.log(fn_call_popup);
402
+						// fn_call_popup(type, popnm, container,  popFn, args, returnType)
316 403
 					}
317 404
 			}
318 405
 			
319 406
 	},
407
+//	callback: {
408
+//		deliPrt: function(rowDataPop) {
409
+//			console.log(rowDataPop);
410
+//		}
411
+//	},
320 412
 	empty: {
321 413
 			init: function() {
322 414
 					var _this = this;

+ 49 - 48
src/main/webapp/js/app/pomng/ITP_POMNG01010.js

@@ -18,35 +18,16 @@ require(['config'], function() {
18 18
  *******************************************************/
19 19
 
20 20
 /*화면 변수*/
21
-/*
22
-const POMNG01010_GRID_ID = '#ITP_POMNG01010_jqGrid';
23
-const POMNG01010_GRID_LIST = '#ITP_POMNG01010_jqGrid_list';
24
-const POMNG01010_GRID_PAGER = '#ITP_POMNG01010_jqGridPager';
25
-const POMNG01010_GRID_EMPTY = '#ITP_POMNG01010_jqGridEmpty';
26
-
27
-const POMNG01010_VIEW_GRID_ID = '#ITP_POMNG01010_VIEW_jqGrid';
28
-const POMNG01010_VIEW_GRID_LIST = '#ITP_POMNG01010_VIEW_jqGrid_list';
29
-const POMNG01010_VIEW_GRID_PAGER = '#ITP_POMNG01010_VIEW_jqGridPager';
30
-const POMNG01010_VIEW_GRID_EMPTY = '#ITP_POMNG01010_VIEW_jqGridEmpty';
31
-*/
32 21
 const POMNG01010_DETAIL_GRID_ID = '#ITP_POMNG01010_DETAIL_jqGrid';
33 22
 const POMNG01010_DETAIL_GRID_LIST = '#ITP_POMNG01010_DETAIL_jqGrid_list';
34 23
 const POMNG01010_DETAIL_GRID_PAGER = '#ITP_POMNG01010_DETAIL_jqGridPager';
35 24
 const POMNG01010_DETAIL_GRID_EMPTY = '#ITP_POMNG01010_DETAIL_jqGridEmpty';  // ==>dwkim html확인필요
36 25
 
37
-/*
38
-let ITP_FORM_POMNG01010_DETAIL_IS_DUPLICATE = false;
39
-let ITP_FORM_POMNG01010_DETAIL_IS_WRITING = false;
40
-*/
26
+let POMNG01010_DETAIL_GRID_LAST_ROW_ID;
41 27
 
42 28
 /*API URL*/
43 29
 let API_DETAIL_INIT_INFO = '/api/pomng/init-pchReq'
44
-//let API_DETAIL_GRID_LIST = '/api/affl/detail-grid-list';
45
-//let API_DETAIL_INFO = '/api/affl/info-affl';
46
-//let COMPANY_INFO_COMPANY = '/api/affl/info-affl';
47 30
 let API_DETAIL_SAVE = '/api/pomng/save-pchReq';
48
-//let API_CHECK_DUPLICATE = '/api/affl/check-duplicate';
49
-//let API_INTI_USERPW = '/api/user/inti-userpw';
50 31
 
51 32
 /*화면 Grid ColModel   ==>선택박스 항목 추가 부분  */
52 33
 const gridColModel = {
@@ -81,20 +62,23 @@ const gridColModel = {
81 62
 			index: 'UNIT_AMT', name: 'unitAmt',
82 63
 			label: ITP_MSG_LOCALE.label.unitAmt,
83 64
 			width: '10', fixed: false, align: 'center',
84
-			sortable: false, editable: false, edittype: 'text', hidden: false
65
+			sortable: false, editable: false, edittype: 'text', hidden: false, 
66
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
85 67
 		},
86 68
 		{
87 69
 			index: 'PCH_REQ_QTY', name: 'pchReqQty',
88 70
 			label: ITP_MSG_LOCALE.label.pchReqQty, //수량
89 71
 			width: '10', fixed: false, align: 'right',
90
-			sortable: true, editable: true, edittype: 'text',
91
-			editrules: { number:true}
72
+			sortable: false, editable: true, edittype: 'text',
73
+			editrules: { number:true }, 
74
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
92 75
 		},
93 76
 		{
94 77
 			index: 'PCH_REQ_AMT', name: 'pchReqAmt',
95 78
 			label: ITP_MSG_LOCALE.label.pchReqAmt,
96 79
 			width: '10', fixed: false, align: 'right',
97
-			sortable: false, editable: false, edittype: 'text', hidden: false
80
+			sortable: false, editable: false, edittype: 'text', hidden: false, 
81
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
98 82
 		},
99 83
 
100 84
 		{
@@ -143,7 +127,15 @@ let pageObj = {
143 127
 	popup: function () {
144 128
 		// 팝업
145 129
 		var popFn = this.callback.create;
146
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
130
+		
131
+		var whsDvsn = "";
132
+		if (fn_make_user_info.get('storeId') == '' ) {
133
+			whsDvsn = "W01";
134
+		} else {
135
+			whsDvsn = "W02";
136
+		}
137
+		
138
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: whsDvsn};
147 139
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
148 140
 		
149 141
 	},
@@ -184,8 +176,6 @@ let pageObj = {
184 176
 			$('#ITP_TAB_POMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
185 177
 			$('#ITP_FORM_POMNG01010_DETAIL_DLV_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 5)));
186 178
 			
187
-			
188
-			
189 179
 			//납품장소 필드 readonly
190 180
 			$('#ITP_FORM_POMNG01010_DETAIL_WHS_NM').attr('readonly', true);
191 181
 			$('#ITP_FORM_POMNG01010_DETAIL_LOCATION_NM').attr('readonly', true);
@@ -217,9 +207,15 @@ let pageObj = {
217 207
 					}
218 208
 				});
219 209
 			});
220
-
210
+			
221 211
 			$('body').on('click', function(e) {
222
-				// afflUserObj.grid.resetGrid(e);
212
+				var gridId = POMNG01010_DETAIL_GRID_ID.replace('#', '');
213
+				var rids = $(POMNG01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
214
+				var last_row_id = rids[rids.length - 1];
215
+				
216
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'POMNG01010_DETAIL');	
217
+				
218
+				pageObj.grid.recal();			
223 219
 			});
224 220
 
225 221
 		}
@@ -269,22 +265,18 @@ let pageObj = {
269 265
 				colModel: gridColModel.detail,
270 266
 				data: gridData,
271 267
 				multiselect: true,
272
-				cellEdit: true,
268
+				// cellEdit: true,
269
+				onCellSelect: function(rowId, cellIdx, cellValue) {
270
+					POMNG01010_DETAIL_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowId, cellIdx, POMNG01010_DETAIL_GRID_LAST_ROW_ID, POMNG01010_DETAIL_GRID_ID, ['pchReqQty']);
271
+		   		},
273 272
 				loadComplete: function(data) {
274 273
 					_this.clearData();
275
-				},
276
-				afterSaveCell: function(rowid,name,val,iRow,iCol) {
277
-					// 구매요청금액 계산 (기존금액과 )
278
-					var unitAmt = jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('getCell',rowid,iCol-1);
279
-					jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('setRowData',rowid,{pchReqAmt: parseInt(val)*parseInt(unitAmt)});
280
-					// 그리드 포문으로 금액 재계산후 구매요청금액에 넣어줌
281
-					_this.recal();
282 274
 				}
283 275
 			};
284 276
 			itp_fn_grid_make_local(option);
285 277
 		},
286 278
 		clearData: function() {
287
-			console.log(this.gridId);
279
+			// console.log(this.gridId);
288 280
 			$(POMNG01010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
289 281
 			$(POMNG01010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
290 282
 			$(POMNG01010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
@@ -292,19 +284,28 @@ let pageObj = {
292 284
 			$(POMNG01010_DETAIL_GRID_EMPTY).show();
293 285
 		},
294 286
 		recal: function() {
295
-			//PCH_REQ_AMT
296
-			console.log("==========================================");
287
+			
288
+			var ids = $(POMNG01010_DETAIL_GRID_ID).getDataIDs();
289
+			$.each(ids, function(idx, rowId) {
290
+				
291
+				var viewCd = jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'viewCd');
292
+				var unitAmt = jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'unitAmt');
293
+				var pchReqQty = jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'pchReqQty');
294
+				
295
+				if(viewCd != 'D' && unitAmt != null && unitAmt != '' && pchReqQty != null && pchReqQty != '') {		
296
+					jQuery(POMNG01010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{pchReqAmt: parseInt(unitAmt)*parseInt(pchReqQty)});
297
+				}
298
+			});
299
+			
297 300
 			const rowData = $(POMNG01010_DETAIL_GRID_ID).getRowData();
298
-			console.log("####################################");
299 301
 			var pchReqAmt = 0 ;
300 302
 			$.each(rowData, function(key, value) {
301
-				 console.log(rowData);
303
+				// console.log(JSON.stringify(rowData));
302 304
 				if (value.pchReqAmt != null && value.pchReqAmt != "" && value.viewCd != "D") {
303 305
 					pchReqAmt = pchReqAmt + parseInt(value.pchReqAmt) ;
304
-				}
305
-				
306
+				}				
306 307
 			});
307
-			$('#ITP_FORM_POMNG01010_DETAIL .fnPchReqAmt').text(pchReqAmt);
308
+			$('#ITP_FORM_POMNG01010_DETAIL .fnPchReqAmt').text(itp_fn_number_comma(pchReqAmt));
308 309
 		},
309 310
 		unload: function() {
310 311
 			$.jgrid.gridUnload(this.gridId);
@@ -336,6 +337,8 @@ let createObj = {
336 337
 	},
337 338
 	button: {
338 339
 		save: function(arg) {
340
+			$('body').trigger('click');
341
+			
339 342
 			const formId = '#ITP_FORM_POMNG01010_DETAIL';
340 343
 			itp_fn_form_clear_validate(null, formId);
341 344
 			$('#ITP_FORM_POMNG01010_DETAIL_PCH_REQ_ST_CD').val(arg);
@@ -414,7 +417,6 @@ let createObj = {
414 417
 		fn_ajax_call(API_DETAIL_INIT_INFO, key, this.callback, 'GET');
415 418
 	},
416 419
 	callback: function(result) {
417
-		console.log(result);
418 420
 
419 421
 		$('#ITP_FORM_POMNG01010_DETAIL #ITP_FORM_POMNG01010_DETAIL_VIEW_CD').val('C');
420 422
 
@@ -432,8 +434,7 @@ let createObj = {
432 434
 		$('#ITP_FORM_POMNG01010_DETAIL .fnPchReqMgrNm').text(result.userNm);
433 435
 		$('#ITP_FORM_POMNG01010_DETAIL .fnPchReqAmt').text("0");
434 436
 		$('#ITP_FORM_POMNG01010_DETAIL .fnLoanDvsnNm').text(result.loanDvsnNm);
435
-		$('#ITP_FORM_POMNG01010_DETAIL .fnPchActAmt').text(result.ordUseAmt);
436
-		
437
+		$('#ITP_FORM_POMNG01010_DETAIL .fnPchActAmt').text(result.ordUseAmt);		
437 438
 
438 439
 		pageObj.grid.init();
439 440
 	}

+ 72 - 37
src/main/webapp/js/app/pomng/ITP_POMNG02010.js

@@ -38,6 +38,7 @@ const POMNG02010_DETAIL_GRID_EMPTY = '#ITP_POMNG02010_DETAIL_jqGridEmpty';
38 38
 let ITP_FORM_POMNG02010_DETAIL_IS_WRITING = false;
39 39
 
40 40
 let POMNG02010_GRID_LAST_ROW_ID;
41
+let SCREEN_MODE;
41 42
 
42 43
 
43 44
 //let ITP_COMMON_ASSGN_TASK = fn_make_common_cd_list(CODE_LIST, 'ASSGN_TASK', true, '담당업무');
@@ -149,7 +150,7 @@ const gridColModel = {
149 150
 			index: 'VIEW_CD', name: 'viewCd',
150 151
 			label: ITP_MSG_LOCALE.label.viewCd,
151 152
 			width: '10', fixed: false, align: 'center',
152
-			sortable: false, hidden: false
153
+			sortable: false, hidden: true
153 154
 		},
154 155
 		{
155 156
 			index: 'PCH_REQ_UNQ_NO', name: 'pchReqUnqNo',
@@ -189,22 +190,36 @@ const gridColModel = {
189 190
 			index: 'UNIT_AMT', name: 'unitAmt',
190 191
 			label: ITP_MSG_LOCALE.label.unitAmt,
191 192
 			width: '10', fixed: false, align: 'center',
192
-			sortable: false, editable: false, edittype: 'text', hidden: false
193
+			sortable: false, editable: false, edittype: 'text', hidden: false,
194
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
193 195
 		},
194 196
 		{
195 197
 			index: 'PCH_REQ_QTY', name: 'pchReqQty',
196 198
 			label: ITP_MSG_LOCALE.label.pchReqQty, //단가
197 199
 			width: '10', fixed: false, align: 'right',
198 200
 			sortable: true, editable: true, edittype: 'text',
199
-			editrules: {required: true, number:true}
201
+			editrules: {required: true, number:true},
202
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
200 203
 		},
201 204
 		{
202 205
 			index: 'PCH_REQ_AMT', name: 'pchReqAmt',
203 206
 			label: ITP_MSG_LOCALE.label.pchReqAmt,
204 207
 			width: '10', fixed: false, align: 'right',
208
+			sortable: false, editable: false, edittype: 'text', hidden: false,
209
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
210
+		},
211
+		{
212
+			index: 'PCH_REQ_DTL_ST_NM', name: 'pchReqDtlStNm',
213
+			label: ITP_MSG_LOCALE.label.pchReqDtlStNm,
214
+			width: '10', fixed: false, align: 'center',
205 215
 			sortable: false, editable: false, edittype: 'text', hidden: false
206 216
 		},
207
-
217
+		{
218
+			index: 'PCH_REQ_DTL_ST_CD', name: 'pchReqDtlStCd',
219
+			label: ITP_MSG_LOCALE.label.pchReqDtlStNm,
220
+			width: '10', fixed: false, align: 'right',
221
+			sortable: false, editable: false, edittype: 'text', hidden: true
222
+		},
208 223
 		{
209 224
 			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
210 225
 			label: ITP_MSG_LOCALE.label.brandUnitUnqNo,
@@ -314,7 +329,15 @@ let pageObj = {
314 329
 			popFn = this.callback.modify;
315 330
 		}
316 331
 		
317
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
332
+		var whsDvsn = "";
333
+		if (fn_make_user_info.get('storeId') == '' ) {
334
+			whsDvsn = "W01";
335
+		} else {
336
+			whsDvsn = "W02";
337
+		}
338
+		
339
+		
340
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn: whsDvsn};
318 341
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
319 342
 		
320 343
 	},
@@ -359,13 +382,18 @@ let pageObj = {
359 382
 					}
360 383
 				});
361 384
 			});
362
-
385
+			
363 386
 			$('body').on('click', function(e) {
364 387
 				var gridId = POMNG02010_DETAIL_GRID_ID.replace('#', '');
365 388
 				var rids = $(POMNG02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
366 389
 				var last_row_id = rids[rids.length - 1];
367
-				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'POMNG02010_DETAIL');
390
+				
391
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'POMNG02010_DETAIL');	
392
+				
393
+				pageObj.grid.recal();
368 394
 			});
395
+
396
+			
369 397
 		}
370 398
 	},
371 399
 	switchScreen: function(mode) {
@@ -380,6 +408,7 @@ let pageObj = {
380 408
 			$('#ITP_AJAX_POMNG02010_LIST_CONTAINER').show();
381 409
 			$('#ITP_FORM_POMNG02010_DETAIL_SBRAND_ID').val(fn_make_user_info.get('brandId'));
382 410
 			$('#ITP_FORM_POMNG02010_DETAIL_SSTORE_ID').val(fn_make_user_info.get('storeId'));
411
+			SCREEN_MODE = 'LIST' ;
383 412
 		} else if(mode == 'ADD') { // 등록
384 413
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG02010_CANCELLIST', '#ITP_BTN_POMNG02010_SAVE']);
385 414
 			$('#ITP_AJAX_POMNG02010_DETAIL_CONTAINER').show();
@@ -390,6 +419,7 @@ let pageObj = {
390 419
 					$(this).val('').prop('selected', true);
391 420
 				}
392 421
 			});
422
+			SCREEN_MODE = 'DETAIL' ;
393 423
 			
394 424
 		} else if(mode == 'MODIFY') { // 수정
395 425
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG02010_CANCELLIST', '#ITP_BTN_POMNG02010_SAVE', '#ITP_BTN_POMNG02010_REQ']);
@@ -397,15 +427,16 @@ let pageObj = {
397 427
 			$('#ITP_AJAX_POMNG02010_DETAIL_CONTAINER').show();
398 428
 			$('#ITP_FORM_POMNG02010_DETAIL .itp_form_info').show();
399 429
 			$('#ITP_FORM_POMNG02010_DETAIL .itp_form_change').hide();
400
-			
430
+			SCREEN_MODE = 'DETAIL' ;
401 431
 		} else if(mode == 'VIEW') { // 보기
402 432
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG02010_MODIFY', '#ITP_BTN_POMNG02010_CANCELLIST']);
403 433
 			$('#ITP_AJAX_POMNG02010_VIEW_CONTAINER').show();
434
+			SCREEN_MODE = 'VIEW' ;
404 435
 		}
405 436
 	},
406 437
 	grid: {
407 438
 		init: function(mode, gridRows) {
408
-			
439
+			console.log(mode);
409 440
 			this.gridId = (mode === 'VIEW') ? POMNG02010_VIEW_GRID_ID : POMNG02010_DETAIL_GRID_ID;
410 441
 			this.gridList = (mode === 'VIEW') ? POMNG02010_VIEW_GRID_LIST : POMNG02010_DETAIL_GRID_LIST;
411 442
 			this.gridEmpty = (mode === 'VIEW') ? POMNG02010_VIEW_GRID_EMPTY : POMNG02010_DETAIL_GRID_EMPTY;
@@ -455,7 +486,7 @@ let pageObj = {
455 486
 				colModel: gridColModel.detail,
456 487
 				data: gridRows,
457 488
 				multiselect: true,
458
-				cellEdit: (mode !== 'VIEW'),
489
+				//cellEdit: (mode !== 'VIEW'),
459 490
 				loadComplete: function(data) {
460 491
 					//console.log(data);
461 492
 					//$(_this.gridList).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
@@ -465,37 +496,38 @@ let pageObj = {
465 496
 				},
466 497
 				onCellSelect: function(rowid, cellIdx, cellValue) {
467 498
 					if(mode !== 'VIEW') {
468
-						//POMNG02010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowId, cellIdx, POMNG02010_GRID_LAST_ROW_ID, _this.gridId, ['pchReqDtlNo']);
499
+						POMNG02010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG02010_GRID_LAST_ROW_ID, POMNG02010_DETAIL_GRID_ID, ['pchReqUnqNo']);
469 500
 					}
470 501
 				}
471
-				,
472
-				afterSaveCell: function(rowid,name,val,iRow,iCol) {
473
-					
474
-					POMNG02010_GRID_LAST_ROW_ID = itp_fn_set_chg_editable(rowid, POMNG02010_GRID_LAST_ROW_ID, POMNG02010_DETAIL_GRID_ID);
475
-					//POMNG02010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, iCol, POMNG02010_GRID_LAST_ROW_ID,  _this.gridId); 
476
-					
477
-					var unitAmt = jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('getCell',rowid,iCol-1);
478
-					jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('setRowData',rowid,{pchReqAmt: parseInt(val)*parseInt(unitAmt)});
479
-					// 그리드 포문으로 금액 재계산후 구매요청금액에 넣어줌
480
-					_this.recal();
481
-				}
482 502
 			};
483 503
 			itp_fn_grid_make_local(option);
484 504
 		},
485 505
 		recal: function() {
486
-			//PCH_REQ_AMT
487
-			
488
-			const rowData = $(POMNG02010_DETAIL_GRID_ID).getRowData();
489
-			var pchReqAmt = 0 ;
490
-			$.each(rowData, function(key, value) {
491
-				console.log(rowData);
492
-				if (value.pchReqAmt != null && value.pchReqAmt != "" && value.viewCd != "D") {
493
-					pchReqAmt = pchReqAmt + parseInt(value.pchReqAmt) ;
494
-				}
506
+			console.log("recal call");
507
+			if (SCREEN_MODE === 'DETAIL') {
508
+				var ids = $(POMNG02010_DETAIL_GRID_ID).getDataIDs();
509
+				$.each(ids, function(idx, rowId) {
510
+					console.log("recal start");
511
+					var viewCd = jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'viewCd');
512
+					var unitAmt = jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'unitAmt');
513
+					var pchReqQty = jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'pchReqQty');
514
+					
515
+					if(viewCd != 'D' && unitAmt != null && unitAmt != '' && pchReqQty != null && pchReqQty != '') {		
516
+						jQuery(POMNG02010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{pchReqAmt: parseInt(unitAmt)*parseInt(pchReqQty)});
517
+					}
518
+				});
495 519
 				
496
-			});
520
+				const rowData = $(POMNG02010_DETAIL_GRID_ID).getRowData();
521
+				var pchReqAmt = 0 ;
522
+				$.each(rowData, function(key, value) {
523
+					// console.log(JSON.stringify(rowData));
524
+					if (value.pchReqAmt != null && value.pchReqAmt != "" && value.viewCd != "D") {
525
+						pchReqAmt = pchReqAmt + parseInt(value.pchReqAmt) ;
526
+					}				
527
+				});
528
+				$('#ITP_FORM_POMNG02010_DETAIL .fnPchReqTotalAmt').text(itp_fn_number_comma(pchReqAmt));
529
+			}
497 530
 			
498
-			$('#ITP_FORM_POMNG02010_DETAIL .fnPchReqTotalAmt').text(pchReqAmt);
499 531
 		},
500 532
 		clearData : function() {
501 533
 			$(this.gridId).jqGrid('clearGridData', true);
@@ -664,15 +696,17 @@ let viewObj = {
664 696
 		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqNm').text(result.pchReqNm);
665 697
 		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqStNm').text(result.pchReqStNm);
666 698
 		$('#ITP_FORM_POMNG02010_VIEW .pchReqMgrNm').text(result.pchReqMgrNm);
667
-		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqTotalAmt').text(result.pchReqTotalAmt);
699
+		
700
+		
701
+		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqTotalAmt').text(itp_fn_number_comma(result.pchReqTotalAmt));
668 702
 		$('#ITP_FORM_POMNG02010_VIEW .fnDlvReqDt').text(result.dlvReqDt);
669 703
 		$('#ITP_FORM_POMNG02010_VIEW .fnWhsNm').text(result.whsNm + " - " + result.locationNm);
670 704
 		$('#ITP_FORM_POMNG02010_VIEW .fnLoanDvsnNm').text(result.loanDvsnNm);
671 705
 		$('#ITP_FORM_POMNG02010_VIEW .fnOrdUseAmt').text(result.ordUseAmt);
672 706
 		$('#ITP_FORM_POMNG02010_VIEW .fnNote').text(result.note);
673
-		$('#ITP_FORM_POMNG02010_VIEW .fnRjctDt').text(result.pchReqRjctDt);
674
-		$('#ITP_FORM_POMNG02010_VIEW .fnRjctMgrNm').text(result.pchReqRjctNm);
675
-		$('#ITP_FORM_POMNG02010_VIEW .fnRjctRsn').text(result.pchReqRjctRsn);
707
+		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqRjctDt').text(result.pchReqRjctDt);
708
+		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqRjctNm').text(result.pchReqRjctNm);
709
+		$('#ITP_FORM_POMNG02010_VIEW .fnPchReqRjctRsn').text(result.pchReqRjctRsn);
676 710
 		
677 711
 		
678 712
 		
@@ -712,6 +746,7 @@ let modifyObj = {
712 746
 			modifyObj.load(param);
713 747
 		},
714 748
 		save: function(arg) {
749
+			$('body').trigger('click');
715 750
 			const formId = '#ITP_FORM_POMNG02010_DETAIL';
716 751
 			itp_fn_form_clear_validate(null, formId);
717 752
 			

+ 95 - 62
src/main/webapp/js/app/pomng/ITP_POMNG03010.js

@@ -51,12 +51,6 @@ let API_DETAIL_PASSQTY 		    = '/api/stock/mng/whs-passqty-list';			// 창고선
51 51
 /*화면 Grid ColModel*/
52 52
 const gridColModel = {
53 53
 	list: [
54
-		{
55
-			index: 'PCH_REQ_UNQ_NO', name: 'pchReqUnqNo',
56
-			label: ITP_MSG_LOCALE.label.pchReqUnqNo, //구매요청고유번호
57
-			width: '10', fixed: false, align: 'center',
58
-			sortable: false, hidden: true
59
-		},
60 54
 		{
61 55
 			index: 'PCH_REQ_DTL_NO', name: 'pchReqDtlNo',
62 56
 			label: ITP_MSG_LOCALE.label.pchReqDtlNo, //구매요청상세번호
@@ -75,6 +69,24 @@ const gridColModel = {
75 69
 			width: '10', fixed: false, align: 'center',
76 70
 			sortable: false, hidden: false
77 71
 		},
72
+		{
73
+			index: 'DLV_DVSN', name: 'dlvDvsn',
74
+			label: ITP_MSG_LOCALE.label.dlvDvsnNm, //배송구분
75
+			width: '10', fixed: false, align: 'center',
76
+			sortable: false, hidden: true
77
+		},
78
+		{
79
+			index: 'PCH_REQ_UNQ_NO', name: 'pchReqUnqNo',
80
+			label: ITP_MSG_LOCALE.label.pchReqUnqNo, //구매요청고유번호
81
+			width: '10', fixed: false, align: 'center',
82
+			sortable: false, hidden: false
83
+		},
84
+		{
85
+			index: 'DLV_DVSN_NM', name: 'dlvDvsnNm',
86
+			label: ITP_MSG_LOCALE.label.dlvDvsnNm, //배송구분
87
+			width: '10', fixed: false, align: 'center',
88
+			sortable: false, hidden: false
89
+		},
78 90
 		{
79 91
 			index: 'STORE_ID', name: 'storeId',
80 92
 			label: ITP_MSG_LOCALE.label.storeId, //매장아이디
@@ -139,19 +151,22 @@ const gridColModel = {
139 151
 			index: 'UNIT_AMT', name: 'unitAmt',
140 152
 			label: ITP_MSG_LOCALE.label.unitAmt, //구매요청단가
141 153
 			width: '10', fixed: false, align: 'right',
142
-			sortable: false, hidden: true
154
+			sortable: false, hidden: true,
155
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
143 156
 		},
144 157
 		{
145 158
 			index: 'PO_UNIT_AMT', name: 'poUnitAmt',
146 159
 			label: ITP_MSG_LOCALE.label.poUnitAmt, //발주단가
147 160
 			width: '10', fixed: false, align: 'right',
148
-			sortable: false, hidden: true
161
+			sortable: false, hidden: true,
162
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
149 163
 		},
150 164
 		{
151 165
 			index: 'PCH_REQ_QTY', name: 'pchReqQty',
152 166
 			label: ITP_MSG_LOCALE.label.pchReqQty, //구매요청수량
153 167
 			width: '10', fixed: false, align: 'right',
154
-			sortable: false, hidden: false
168
+			sortable: false, hidden: false,
169
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
155 170
 		},
156 171
 		{
157 172
 			index: 'DLV_REQ_DT', name: 'dlvReqDt',
@@ -163,13 +178,15 @@ const gridColModel = {
163 178
 			index: 'PCH_REQ_AMT', name: 'pchReqAmt',
164 179
 			label: ITP_MSG_LOCALE.label.pchReqAmt, //납품요청금액
165 180
 			width: '10', fixed: false, align: 'right',
166
-			sortable: false, hidden: false
181
+			sortable: false, hidden: false,
182
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
167 183
 		},
168 184
 		{
169 185
 			index: 'PCH_ORD_AMT', name: 'pchOrdAmt',
170 186
 			label: ITP_MSG_LOCALE.label.pchOrdSpplyAmt, //본사납품금액
171 187
 			width: '10', fixed: false, align: 'right',
172
-			sortable: false, hidden: false
188
+			sortable: false, hidden: false,
189
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
173 190
 		},
174 191
 		{
175 192
 			index: 'LEAD_TIME', name: 'leadTime',
@@ -183,13 +200,13 @@ const gridColModel = {
183 200
 			index: 'VIEW_CD', name: 'viewCd',
184 201
 			label: ITP_MSG_LOCALE.label.viewCd,
185 202
 			width: '10', fixed: false, align: 'center',
186
-			sortable: false, hidden: false
203
+			sortable: false, hidden: true
187 204
 		},
188 205
 		{
189 206
 			index: 'PCH_REQ_UNQ_NO', name: 'pchReqUnqNo',
190 207
 			label: ITP_MSG_LOCALE.label.pchReqUnqNo,  //구매요청번호
191 208
 			width: '20', fixed: false, align: 'center',
192
-			sortable: false, hidden: true, edittype: 'text',
209
+			sortable: false, hidden: false, edittype: 'text',
193 210
 			 editable: false
194 211
 		},
195 212
 		{
@@ -218,7 +235,8 @@ const gridColModel = {
218 235
 			label: ITP_MSG_LOCALE.label.unitAmt, //단가
219 236
 			width: '10', fixed: false, align: 'right',
220 237
 			sortable: false, editable: false, edittype: 'text',
221
-			hidden: false
238
+			hidden: false,
239
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
222 240
 		},
223 241
 		{
224 242
 			index: 'UNIT', name: 'unit',
@@ -232,21 +250,24 @@ const gridColModel = {
232 250
 			label: ITP_MSG_LOCALE.label.pchReqQty, //구매요청수량
233 251
 			width: '10', fixed: false, align: 'right',
234 252
 			sortable: false, editable: false, edittype: 'text',
235
-			hidden: false
253
+			hidden: false,
254
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
236 255
 		},
237 256
 		{
238 257
 			index: 'PODR_QTY', name: 'podrQty',
239 258
 			label: ITP_MSG_LOCALE.label.podrQty, //발주수량
240 259
 			width: '10', fixed: false, align: 'right',
241 260
 			sortable: false, editable: true, edittype: 'text',
242
-			editrules: {required: true}, hidden: false
261
+			editrules: {required: true}, hidden: false,
262
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
243 263
 		},
244 264
 		{
245 265
 			index: 'PODR_AMT', name: 'podrAmt',
246 266
 			label: ITP_MSG_LOCALE.label.podrAmt, //발주금액
247 267
 			width: '10', fixed: false, align: 'right',
248 268
 			sortable: false, editable: false, edittype: 'text',
249
-			hidden: false
269
+			hidden: false,
270
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
250 271
 		},
251 272
 		{
252 273
 			index: 'DLV_REQ_DT', name: 'dlvReqDt',
@@ -260,7 +281,8 @@ const gridColModel = {
260 281
 			label: ITP_MSG_LOCALE.label.whsPassQty, //출고가능수량
261 282
 			width: '10', fixed: false, align: 'right',
262 283
 			sortable: false, editable: false, edittype: 'text',
263
-			hidden: false
284
+			hidden: false,
285
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
264 286
 		},
265 287
 		{
266 288
 			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
@@ -421,12 +443,13 @@ let pageObj = {
421 443
 		
422 444
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
423 445
 		if (arg == "SW" ) {
424
-			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
446
+			const keya = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
447
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, keya, 'S');
425 448
 		} else if (arg == "SS" || arg == "NS" ) {
426 449
 			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
427 450
 		} else if (arg == "SHW" || arg == "NHW") {
428
-			const key1 = {brandId:fn_make_user_info.get('brandId')};
429
-			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
451
+			const keyb = {brandId:fn_make_user_info.get('brandId'),storeId:"", whsDvsn:"W01"};
452
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, keyb, 'S');
430 453
 		} else if (arg == "REJ" ) {
431 454
 			/* 선택ROW가져오기 */
432 455
 			const rowKey = $(POMNG03010_GRID_ID).getGridParam('selrow');
@@ -445,9 +468,9 @@ let pageObj = {
445 468
 			for (var i=selectedIds.length-1; i>=0; i--) {
446 469
 				selRowData = $(POMNG03010_GRID_ID).jqGrid('getRowData', selectedIds[i]);
447 470
 			}
448
-			console.log(selRowData);
471
+			
449 472
 			const key1 = {pchReqUnqNo:selRowData.pchReqUnqNo, storeId:selRowData.storeId};
450
-			//console.log(key);
473
+			
451 474
 			fn_call_popup('biz', 'BIZPOP_PO_REJECT', '#ITP_ASIDE', popFn, key1, 'S');
452 475
 		} 
453 476
 		
@@ -470,16 +493,14 @@ let pageObj = {
470 493
 		},
471 494
 		searNSpply: function(rowDataPop) {
472 495
 			if(rowDataPop) {
473
-				//console.log(rowDataPop);
496
+			
474 497
 				var pspplyId = $('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val();
475
-				//console.log(pspplyId);
498
+			
476 499
 				if (pspplyId == "") {
477
-				//	console.log("null");
500
+				
478 501
 					$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val(rowDataPop.spplyNm);
479 502
 					$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val(rowDataPop.spplyId);
480 503
 				} else {
481
-					//$('#Table_ID').getGridParam('reccount');
482
-				//	console.log("cpzm");
483 504
 					var records = $(POMNG03010_NDETAIL_GRID_ID).getGridParam('reccount')
484 505
 					if (records != 0) {
485 506
 						if (pspplyId != rowDataPop.spplyId ) {
@@ -526,7 +547,6 @@ let pageObj = {
526 547
 		},
527 548
 		poRej: function(rowDataPop) {
528 549
 			if(rowDataPop) {
529
-				console.log(rowDataPop);
530 550
 				
531 551
 				if (rowDataPop.retVal == "Y") {
532 552
 				  modifyObj.button.rejectSave(rowDataPop);
@@ -559,6 +579,16 @@ let pageObj = {
559 579
 					}
560 580
 				});
561 581
 			});
582
+			
583
+			$('body').on('click', function(e) {
584
+				
585
+				var gridId = ((SCREEN_MODE === 'NPC') ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).replace('#', '');
586
+				var rids = $( (SCREEN_MODE === 'NPC') ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('getDataIDs');
587
+				var last_row_id = rids[rids.length - 1];
588
+				
589
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, (SCREEN_MODE === 'NPC') ?  'POMNG03010_NDETAIL' : 'POMNG03010_DETAIL');	
590
+				pageObj.grid.recal();
591
+			});
562 592
 
563 593
 		}
564 594
 	},
@@ -654,8 +684,7 @@ let pageObj = {
654 684
 					});
655 685
 					
656 686
 					if (diffchk == "Y") return;
657
-					//console.log(chkSpplyNm);
658
-					//console.log(diffchk);
687
+				
659 688
 					if (spplyId == "" ) {
660 689
 						$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val(chkSpplyId);
661 690
 						$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val(chkSpplyNm);
@@ -717,7 +746,7 @@ let pageObj = {
717 746
 				gridId: _this.gridId,
718 747
 				colModel: gridColModel.detail,
719 748
 				data: gridRows,
720
-				cellEdit: true,
749
+				//cellEdit: true,
721 750
 				multiselect: (mode === 'NPC'),
722 751
 				loadComplete: function(data) {
723 752
 					$(mode === 'NPC' ? POMNG03010_NDETAIL_GRID_LIST : POMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
@@ -726,36 +755,41 @@ let pageObj = {
726 755
 					
727 756
 				},
728 757
 				onCellSelect: function(rowid, cellIdx, cellValue) {
729
-					//POMNG03010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG03010_GRID_LAST_ROW_ID, _this.gridId, ['actionId']);
730
-				},
731
-				afterSaveCell: function(rowid,name,val,iRow,iCol) {
732
-					// 구매요청금액 계산 (기존금액과 )
733
-					var	unitAmt  = jQuery(_this.gridId).jqGrid('getCell',rowid,iCol-3);
734
-					jQuery(_this.gridId).jqGrid('setRowData',rowid,{podrAmt: parseInt(val)*parseInt(unitAmt)});	
735
-					
736
-					// 그리드 포문으로 금액 재계산후 구매요청금액에 넣어줌
737
-					pageObj.grid.recal( mode,_this.gridId);
758
+					POMNG03010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG03010_GRID_LAST_ROW_ID, _this.gridId, ['pchReqDtlNo']);
738 759
 				}
739 760
 			};
740 761
 			itp_fn_grid_make_local(option);
741 762
 		},
742
-		recal: function(mode, gridId) {
763
+		recal: function() {
743 764
 			//PCH_REQ_AMT
744
-			const rowData = $(gridId).getRowData();
745
-			var podrAmt = 0 ;
746
-			$.each(rowData, function(key, value) {
747
-				if (value.podrAmt != null && value.podrAmt != "" && value.viewCd != "D") {
748
-					podrAmt = podrAmt + parseInt(value.podrAmt) ;
749
-				}
765
+			if (SCREEN_MODE == 'NPC' || SCREEN_MODE === 'POC') {
766
+				var ids = $((SCREEN_MODE === 'NPC') ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).getDataIDs();
767
+				$.each(ids, function(idx, rowId) {
768
+					var viewCd = jQuery(SCREEN_MODE === 'NPC' ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'viewCd');
769
+					var unitAmt = jQuery(SCREEN_MODE === 'NPC' ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'unitAmt');
770
+					var podrQty = jQuery(SCREEN_MODE === 'NPC' ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'podrQty');
771
+					
772
+					if(viewCd != 'D' && unitAmt != null && unitAmt != '' && podrQty != null && podrQty != '') {
773
+					
774
+						jQuery(SCREEN_MODE === 'NPC' ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{podrAmt: parseInt(unitAmt)*parseInt(podrQty)});
775
+					}
776
+				});
750 777
 				
751
-			});
778
+				const rowData = $((SCREEN_MODE == 'NPC') ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).getRowData();
779
+				var podrAmt = 0 ;
780
+				$.each(rowData, function(key, value) {
781
+					if (value.podrAmt != null && value.podrAmt != "" && value.viewCd != "D") {
782
+						podrAmt = podrAmt + parseInt(value.podrAmt) ;
783
+					}
784
+					
785
+				});
752 786
 			
753
-			if (mode == 'NPC')  {
754
-				$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrAmt').text(podrAmt);	
755
-			} else {
756
-				$('#ITP_FORM_POMNG03010_DETAIL .fnPodrAmt').text(podrAmt);
787
+				if (SCREEN_MODE == 'NPC')  {
788
+					$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrAmt').text(podrAmt);	
789
+				} else {
790
+					$('#ITP_FORM_POMNG03010_DETAIL .fnPodrAmt').text(podrAmt);
791
+				}
757 792
 			}
758
-			
759 793
 		},
760 794
 		clearData : function(mode) {
761 795
 			$(mode === 'NPC' ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
@@ -920,7 +954,7 @@ let modifyObj = {
920 954
 			listObj.grid.search();
921 955
 		},
922 956
 		rejectSave: function(param) {
923
-			console.log(param);
957
+		
924 958
 			var modalFn = {
925 959
 					callBack: () => {
926 960
 						var searhFn = function () {
@@ -934,7 +968,7 @@ let modifyObj = {
934 968
 				itp_fn_modal_confirm('구매요청 반려 하시겠습니까?', modalFn);
935 969
 		},
936 970
 		save: function() {
937
-			
971
+			$('body').trigger('click');
938 972
 			const formId = (SCREEN_MODE == 'NPC' ? '#ITP_FORM_POMNG03010_NDETAIL' : '#ITP_FORM_POMNG03010_DETAIL');
939 973
 			itp_fn_form_clear_validate(null, formId);
940 974
 
@@ -943,16 +977,16 @@ let modifyObj = {
943 977
 				
944 978
 				if (SCREEN_MODE == 'NPC') {
945 979
 					const rowData1 = $(POMNG03010_NDETAIL_GRID_ID).getRowData();
946
-					//console.log("stsrt");
980
+				
947 981
 					var dataCnt = 0;
948 982
 					$.each(rowData1, function(key, value) {
949 983
 						console.log(value.viewCd);
950 984
 						if (value.viewCd != 'D') {
951
-							console.log("count");
985
+						
952 986
 							dataCnt = dataCnt + 1;
953 987
 						} 
954 988
 					});
955
-					//console.log(dataCnt);
989
+					
956 990
 					
957 991
 					if (dataCnt == 0) {
958 992
 						alert( "발주 생성할 품목내역이 없습니다.");
@@ -1011,6 +1045,7 @@ let modifyObj = {
1011 1045
 							pageObj.grid.clearData();
1012 1046
 							modifyObj.button.cancel();
1013 1047
 						}
1048
+						console.log(JSON.stringify(param));
1014 1049
 						fn_ajax_call(API_DETAIL_SAVE, JSON.stringify(param), searhFn, 'POST');
1015 1050
 					}
1016 1051
 				};
@@ -1040,7 +1075,7 @@ let modifyObj = {
1040 1075
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_PODR_MGR_TEL_NO').val(result.podrMgrTelNo);
1041 1076
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_DLV_DVSN').val(result.dlvDvsn);
1042 1077
 		//$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_').val(result.dlvDvsnNm);
1043
-		$('#ITP_FORM_POMNG03010_DETAIL .fnPodrAmt').text(result.podrTotalAmt);
1078
+		$('#ITP_FORM_POMNG03010_DETAIL .fnPodrAmt').text(itp_fn_number_comma(result.podrTotalAmt));
1044 1079
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_DLV_REQ_DT').val(result.dlvReqDt);
1045 1080
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_ID').val(result.shmtWhsId);
1046 1081
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DELETE_SHMT_WHS_NM').val(result.shmtWhsNm + " - " + result.shmtLocationNm );
@@ -1057,8 +1092,6 @@ let modifyObj = {
1057 1092
 	},
1058 1093
 	passQtyCallback: function (result) {
1059 1094
 		
1060
-		console.log(result);
1061
-		console.log(result.size());
1062 1095
 		
1063 1096
 		/*
1064 1097
 		if ($(gridId).jqGrid('getCell', rowId, 'viewCd') === 'R') {

+ 4 - 2
src/main/webapp/js/app/pomng/ITP_POMNG04010.js

@@ -408,11 +408,13 @@ let listObj = {
408 408
 	},
409 409
 	popup: function(keyword) {
410 410
 		var popFn = this.callback.create;
411
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
411
+		
412 412
 		if(keyword === 'spply'){
413
+			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
413 414
 			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
414 415
 		} else if(keyword === 'whs'){
415
-			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
416
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
417
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
416 418
 		}
417 419
 	},
418 420
 	callback: {

+ 5 - 3
src/main/webapp/js/app/pomng/ITP_POMNG07010.js

@@ -334,11 +334,13 @@ let listObj = {
334 334
 	},
335 335
 	popup: function(keyword) {
336 336
 		var popFn = this.callback.create;
337
-		// const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
337
+		 
338 338
 		if(keyword === 'spply'){
339
-			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, /*key*/null, 'S');
339
+			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
340
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
340 341
 		} else if(keyword === 'whs'){
341
-			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, /*key*/null, 'S');
342
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
343
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
342 344
 		}
343 345
 	},
344 346
 	callback: {

+ 171 - 121
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_DLV_STTMT_PRN.js

@@ -6,46 +6,26 @@ require(['config'], function() {
6 6
 	});
7 7
 });
8 8
 
9
-let FRCOMP_POP_GRID_LIST = '/api/pomng/inoutmng/spply-deli-grid-list';
10
-let FRCOMP_POP_INFO_INV  = '/api/pomng/inoutmng/info-inv';	// 상세
11
-function itp_fn_BIZPOP_DLV_STTMT_PRN(parentPopFn, args, schParam, returnType) {
12
-	// 공통코드
13
-	// fn_make_select(CODE_LIST, 'CMPY_TYPE_CD', 'ITP_FORM_BIZPOP_DLV_STTMT_PRN_CMPY_TYPE_CD', true, '가맹점타입 선택');
9
+let API_POP_INV_INFO = '/api/pomng/inoutmng/info-inv';
10
+
11
+const THIS_FORM_ID = '#ITP_FORM_BIZPOP_DLV_STTMT_PRN';
12
+const THIS_GIRD_ID = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid';
13
+const THIS_GIRD_LIST = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid_list';
14
+const THIS_GIRD_PAGER = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGridPager';
15
+const THIS_GIRD_EMPTY = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGridEmpty';
16
+
17
+function itp_fn_BIZPOP_DLV_STTMT_PRN(parentPopFn, args, returnType) {
18
+	
14 19
 	
15
-	let itp_BIZPOP_DLV_STTMT_PRN_param = {};
20
+	let itp_BIZPOP_DLV_STTMT_PRN_param = args;
16 21
 	let itp_BIZPOP_DLV_STTMT_PRN_search = false;
17 22
 
18
-	const THIS_FORM_ID = '#ITP_FORM_BIZPOP_DLV_STTMT_PRN';
19
-	const THIS_GIRD_ID = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid';
20
-	const THIS_GIRD_PAGER = '#ITP_BIZPOP_DLV_STTMT_PRN_jqGridPager';
21
-	let viewObj = {
22
-		init: function (param) {
23
-			this.load(param);
24
-		},
25
-		load: function(param) {
26
-			fn_ajax_call(FRCOMP_POP_INFO_INV, param, this.callback, 'GET');
27
-		},
28
-		callback: function (result) {
29
-			console.log(result);
30
-			$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvSttmtUnqNo').text(args.dlvSttmtUnqNo);
31
-			$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvRegDt').text(args.dlvRegDt);
32
-			$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvMgrTelNo').text(args.dlvMgrTelNo);
33
-			var divMgrTelNo = "(" + args.divMgrTelNo + ")";
34
-			
35
-			$('#ITP_BIZPOP_DLV_STTMT_PRN .fnZipNo').val(args.zipNo);
36
-			var zipNo = "(" + args.zipNo + ")";
37
-		},	
38
-	};
39 23
 	
24
+	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID').val(args.brandId);
25
+	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_DLV_STTMT_UNQ_NO').val(args.dlvSttmtUnqNo);
40 26
 	
41
-	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID').val(fn_make_user_info.get('brandId'));
42
-	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_SPPLY_ID').val(fn_make_user_info.get('spplyId'));
43
-	if(args) {
44
-		$('#ITP_FORM_BIZPOP_DLV_STTMT_PRN_CMPY_NM').val(args.brandNm);
45
-		$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_FORM_DT').val(args.fromDt);
46
-		$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_TO_DT').val(args.toDt);
47
-	}
48 27
 	
28
+
49 29
 	$('#ITP_BIZPOP_DLV_STTMT_PRN').one('shown.bs.modal', function(e) {
50 30
 		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid_list', '');
51 31
 		itp_fn_fire_window_resize();
@@ -53,111 +33,181 @@ function itp_fn_BIZPOP_DLV_STTMT_PRN(parentPopFn, args, schParam, returnType) {
53 33
 		$('#ITP_BIZPOP_DLV_STTMT_PRN').remove();
54 34
 	}).modal('show');
55 35
 
36
+
56 37
 	$('#ITP_BIZPOP_DLV_STTMT_PRN_BTN_SEARCH').on('click', function() {
57
-		itp_BIZPOP_DLV_STTMT_PRN_search = true;
58
-		let param = $(THIS_FORM_ID).serializeObject();
59
-		param.gridSize = 10;
60
-		param.gridPage = $.jgrid.defaults.page;
61
-		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
38
+		//인쇄부분 여기에 추가함
62 39
 	});
63
-	
64
-	$('#ITP_BIZPOP_DLV_STTMT_PRN_BTN_SELECT').on('click', function() {		
65
-		const rowKey = $(THIS_GIRD_ID).getGridParam('selrow');
66
-	    if (!rowKey) {
67
-	    	return;
68
-	    }
69
-
70
-		var list = [];
71
-	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
72
-
73
-		if(selectedIds.length > 1) { // 1개만 선택
74
-			// return;
75
-		} 
76
-		
77
-	    for (var i=selectedIds.length-1; i>=0; i--) {
78
-			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
79
-		}
80
-		parentPopFn(list);
81
-		$('#ITP_BIZPOP_DLV_STTMT_PRN').modal('hide'); // 팝업닫기
40
+/*	
41
+	$('#ITP_BIZPOP_PO_REJECT_BTN_CANCEL').on('click', function() {
42
+		let transParm = {pchReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_PO_REJECT_PCH_REQ_UNQ_NO').val(),pchReqRjctRsn: '', retVal:'N', storeId:$('#ITP_FORM_ITP_BIZPOP_PO_REJECT_STORE_ID').val()}
43
+		parentPopFn(transParm);
44
+		$('#ITP_BIZPOP_PO_REJECT').modal('hide'); // 팝업닫기
82 45
 	});
46
+*/
83 47
 
84 48
 	$('#ITP_BIZPOP_DLV_STTMT_PRN_jqGridEmpty').on('click', function() {
85 49
 		itp_fn_BIZPOP_DLV_STTMT_PRN_empty.back();
86
-		itp_BIZPOP_DLV_STTMT_PRN_param.gridSize = 10;
50
+		//itp_BIZPOP_PO_REJECT_param.gridSize = 10;
87 51
 		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_DLV_STTMT_PRN_param)}).trigger('reloadGrid');
88 52
 	});
89 53
 
90 54
 	var itp_fn_BIZPOP_DLV_STTMT_PRN_empty = {
91 55
 		push: function() {
92
-			let param = $(THIS_FORM_ID).serializeObject();
56
+			let param = {brandId: $('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID').val(), dlvSttmtUnqNo: $('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_DLV_STTMT_UNQ_NO').val() };
93 57
 			itp_BIZPOP_DLV_STTMT_PRN_param = param;
94 58
 		},
95 59
 		back: function() {
96
-			$(THIS_FORM_ID + '_CMPY_CD').val(itp_BIZPOP_DLV_STTMT_PRN_param.scmpyCd);
97
-			$(THIS_FORM_ID + '_CMPY_NM').val(itp_BIZPOP_DLV_STTMT_PRN_param.scmpyNm);
98
-			$(THIS_FORM_ID + '_CMPY_TYPE_CD').val(itp_BIZPOP_DLV_STTMT_PRN_param.scmpyTypeCd);
99 60
 		}
100 61
 	};
101 62
 
102 63
 	itp_fn_BIZPOP_DLV_STTMT_PRN_empty.push();
103
-	let param = $('#ITP_FORM_BIZPOP_DLV_STTMT_PRN').serializeObject();
104
-	param.gridSize = 10;
105
-
106
-	$(THIS_GIRD_ID).jqGrid({
107
-		colModel: [
108
-			{
109
-				index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
110
-				label: '발주번호', //
111
-				width: '5', fixed: false, align: 'center',
112
-				sortable: false, hidden: false
113
-			},
114
-			{
115
-				index: 'AFFL_SHOP_NM', name: 'itemId',
116
-				label: '품목번호', //
117
-				width: '10', fixed: false, align: 'center',
118
-				sortable: false, hidden: false
119
-			},
120
-			{
121
-				index: 'ITEM_NM', name: 'itemNm',
122
-				label: '품목명', //
123
-				width: '10', fixed: false, align: 'center',
124
-				sortable: false, hidden: false
125
-			},
126
-			{
127
-				index: 'PODR_QTY', name: 'podrQty',
128
-				label: '발주수량', //
129
-				width: '10', fixed: false, align: 'center',
130
-				sortable: false, hidden: false
131
-			},
132
-			{
133
-				index: 'DLV_QTY', name: 'dlvQty',
134
-				label: '납품서수량', //
135
-				width: '10', fixed: false, align: 'center',
136
-				sortable: false, hidden: false
137
-			},
64
+	let param = {brandId: $('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID').val(), dlvSttmtUnqNo: $('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_DLV_STTMT_UNQ_NO').val() };
65
+	console.log(JSON.stringify(param));
66
+	
67
+	const gridColModel = {
68
+		detail: [
138 69
 			{
139
-				index: 'EXPRY_DATE', name: 'expryDate',
140
-				label: '유통기한', //
141
-				width: '10', fixed: false, align: 'center',
142
-				sortable: false, hidden: false
143
-			}
144
-		],
145
-		loadBeforeSend: function(jqXHR) {
146
-		    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
70
+					index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
71
+					label: '발주번호', //
72
+					width: '10', fixed: false, align: 'center',
73
+					sortable: false, hidden: false
74
+				},
75
+				{
76
+					index: 'ITEM_ID', name: 'itemId',
77
+					label: '품목번호', //
78
+					width: '10', fixed: false, align: 'center',
79
+					sortable: false, hidden: false
80
+				},
81
+				{
82
+					index: 'ITEM_NM', name: 'itemNm',
83
+					label: '품목명', //
84
+					width: '10', fixed: false, align: 'center',
85
+					sortable: false, hidden: false
86
+				},
87
+				{
88
+					index: 'PODR_QTY', name: 'podrQty',
89
+					label: '발주수량', //
90
+					width: '5', fixed: false, align: 'center',
91
+					sortable: false, hidden: false
92
+				},
93
+				{
94
+					index: 'DLV_QTY', name: 'dlvQty',
95
+					label: '납품서수량', //
96
+					width: '5', fixed: false, align: 'center',
97
+					sortable: false, hidden: false
98
+				},
99
+				{
100
+					index: 'EXPRY_DATE', name: 'expryDate',
101
+					label: '유통기한', //
102
+					width: '10', fixed: false, align: 'center',
103
+					sortable: false, hidden: false
104
+				}
105
+		]
106
+	};
107
+	
108
+	pageObj.call(param);
109
+	
110
+};
111
+
112
+
113
+let pageObj = {
114
+	call: function( param) {
115
+		
116
+		fn_ajax_call(API_POP_INV_INFO, JSON.stringify(param), this.callback, 'POST');
117
+	},
118
+	callback: function (result) {
119
+		console.log(result);
120
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvSttmtUnqNo').text(result.dlvSttmtUnqNo);
121
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvRegDt').text(result.dlvRegDt);
122
+		
123
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvMgrNm').text(result.dlvMgrNm);
124
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvAddr').text(result.dlvAddr);
125
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnWhsMgrTelNo').text(result.whsMgrTelNo);
126
+		
127
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvBsnsRegno').text(result.dlvBsnsRegno);
128
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvNm').text(result.dlvNm);
129
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvOwnerNm').text(result.dlvOwnerNm);
130
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvAddr').text(result.dlvAddr);
131
+		
132
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnPoBsnsRegno').text(result.poBsnsRegno);
133
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnPoNm').text(result.poNm);
134
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnPoOwnerNm').text(result.poOwnerNm);
135
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnPoAddr').text(result.poAddr);
136
+		
137
+		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvQty').text(result.dlvQty);
138
+		
139
+		// 품목  리스트 조회
140
+		pageObj.grid.init(result.invDtlInfoList);
141
+	},
142
+	grid: {
143
+		init: function( gridRows) {
144
+			this.gridRows = gridRows;
145
+			this.unload();
146
+			this.load(gridRows);
147
+		
147 148
 		},
148
-		postData: JSON.stringify(param),
149
-		url: DOMAIN + FRCOMP_POP_GRID_LIST,
150
-		pager: THIS_GIRD_PAGER,
151
-		multiselect: true,
152
-		loadComplete: function(data) {
153
-			console.log(data);
154
-			itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_DLV_STTMT_PRN', itp_BIZPOP_DLV_STTMT_PRN_search, itp_fn_BIZPOP_DLV_STTMT_PRN_empty, true, data.gridRecords, false);
155
-	    },
156
-	    loadError: function(jqXHR, textStatus, errorThrown) {
157
-	    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
158
-	    },
159
-	    onPaging: function(action) {
160
-	    	itp_fn_grid_paging(THIS_GIRD_ID, action, param);
161
-	    }
162
-	}).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
149
+		gridId: '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid',
150
+		gridList: '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid',
151
+		gridEmpty: '#ITP_BIZPOP_DLV_STTMT_PRN_jqGridEmpty',
152
+		gridRows: '',
153
+		load : function(gridRows) {
154
+			var _this = this;
155
+			var option = {
156
+				gridId: _this.gridId,
157
+				colModel: [
158
+						{
159
+								index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
160
+								label: '발주번호', //
161
+								width: '10', fixed: false, align: 'center',
162
+								sortable: false, hidden: false
163
+							},
164
+							{
165
+								index: 'ITEM_ID', name: 'itemId',
166
+								label: '품목번호', //
167
+								width: '10', fixed: false, align: 'center',
168
+								sortable: false, hidden: false
169
+							},
170
+							{
171
+								index: 'ITEM_NM', name: 'itemNm',
172
+								label: '품목명', //
173
+								width: '10', fixed: false, align: 'center',
174
+								sortable: false, hidden: false
175
+							},
176
+							{
177
+								index: 'PODR_QTY', name: 'podrQty',
178
+								label: '발주수량', //
179
+								width: '5', fixed: false, align: 'center',
180
+								sortable: false, hidden: false
181
+							},
182
+							{
183
+								index: 'DLV_QTY', name: 'dlvQty',
184
+								label: '납품서수량', //
185
+								width: '5', fixed: false, align: 'center',
186
+								sortable: false, hidden: false
187
+							},
188
+							{
189
+								index: 'EXPRY_DATE', name: 'expryDate',
190
+								label: '유통기한', //
191
+								width: '10', fixed: false, align: 'center',
192
+								sortable: false, hidden: false
193
+							}
194
+					],
195
+				data: gridRows,
196
+				multiselect: false,
197
+				loadComplete: function(data) {
198
+					$('#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid').find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
199
+					data.records === 0 ? _this.clearData() : $('#ITP_BIZPOP_DLV_STTMT_PRN_jqGridEmpty').hide();
200
+				},
201
+				onCellSelect: function(rowid, cellIdx, cellValue) {
202
+				}
203
+			};
204
+			itp_fn_grid_make_local(option);
205
+		},
206
+		unload : function() {
207
+			$.jgrid.gridUnload(this.gridId);
208
+		}
209
+	}
163 210
 };
211
+
212
+
213
+

+ 25 - 8
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_PO_PAYMENT.js

@@ -11,8 +11,10 @@ let EASYPAY_PAYMENT_REQUEST = '/api/easypay/payment/request';
11 11
 
12 12
 let KICC_JAVASCRIPT_URL;
13 13
 let KICC_ACTION_WEB_URL;
14
+let KICC_ACTION_MOBILE_URL; 
14 15
 let MALL_ID;
15
-let RETURN_URL;
16
+let WEB_RETURN_URL;
17
+let MOBILE_RETURN_URL;
16 18
 
17 19
 var popPageObj = {
18 20
 	init: function () {
@@ -44,7 +46,8 @@ var popPageObj = {
44 46
 			$('#ITP_BIZPOP_PO_PAYMENT_PAY_TP_NM').text('선불(충전)');
45 47
 		} else if(popPageObj.args.payTpCd == '20') {  
46 48
 			$('#ITP_BIZPOP_PO_PAYMENT_PAY_TP_NM').text('후불(결제)');
47
-			$('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO').val(popPageObj.args.sttlMgntUnqNo); // 정산관리고유번호
49
+			// $('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO').val(popPageObj.args.sttlMgntUnqNo); // 정산관리고유번호
50
+			$('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO_LIST').val(popPageObj.args.sttlMgntUnqNoList); // 정산관리고유번호 리스트
48 51
 			$('#ITP_FORM_PO_PAYMENT_POPUP_GOODS_AMT').val(popPageObj.args.goodsAmt); // 결제금액
49 52
 			$('#ITP_FORM_PO_PAYMENT_POPUP_GOODS_AMT').attr('readonly','readonly');			
50 53
 		} else if(popPageObj.args.payTpCd == '30') {  
@@ -61,6 +64,7 @@ var popPageObj = {
61 64
 			$('#ITP_FORM_PO_PAYMENT_POPUP_GOODS_NM').val(result.goodsNm); // 상품명
62 65
 			$('#ITP_FORM_PO_PAYMENT_POPUP_KICC_JAVASCRIPT_URL').val(result.kicc_javascript_url); // 
63 66
 			$('#ITP_FORM_PO_PAYMENT_POPUP_KICC_ACTION_WEB_URL').val(result.kicc_action_web_url); // 
67
+			$('#ITP_FORM_PO_PAYMENT_POPUP_KICC_ACTION_MOBILE_URL').val(result.kicc_action_mobile_url); // 
64 68
 			$('#ITP_FORM_PO_PAYMENT_POPUP_MALL_ID').val(result.mallId); // 
65 69
 			
66 70
 			$('#ITP_FORM_PO_PAYMENT_POPUP .fnPoOrdNo').text(result.poOrdNo); // 주문번호
@@ -71,8 +75,10 @@ var popPageObj = {
71 75
 			
72 76
 			KICC_JAVASCRIPT_URL = result.kicc_javascript_url;
73 77
             KICC_ACTION_WEB_URL = result.kicc_action_web_url;
78
+            KICC_ACTION_MOBILE_URL = result.kicc_action_mobile_url;
74 79
 			MALL_ID = result.mallId;
75
-			RETURN_URL = window.location.href.replace('main.html', 'easypay/oqpo/oqpo_order_res.jsp');
80
+			WEB_RETURN_URL = window.location.href.replace('main.html', 'easypay/oqpo/oqpo_order_res.jsp');
81
+			MOBILE_RETURN_URL = window.location.href.replace('main.html', 'easypay/oqpo/mobile_order_res_submit.jsp');
76 82
 			
77 83
 			const js = '<script src="'+KICC_JAVASCRIPT_URL+'"></script>';
78 84
 	        $('#ITP_ASIDE #ITP_BIZPOP_PO_PAYMENT #ITP_POPUP_KICC_JS').empty();
@@ -81,13 +87,14 @@ var popPageObj = {
81 87
 			// console.log('KICC_JAVASCRIPT_URL : ' + KICC_JAVASCRIPT_URL);
82 88
             // console.log('KICC_ACTION_WEB_URL : ' + KICC_ACTION_WEB_URL);
83 89
 			// console.log('MALL_ID : ' + MALL_ID);
84
-			// console.log('RETURN_URL : ' + RETURN_URL);
90
+			// console.log('WEB_RETURN_URL : ' + WEB_RETURN_URL);
85 91
 			
86 92
 			var frm_pay = document.frm_pay;
87 93
 
88 94
 			/*--웹 결제--*/
89 95
 		    /*--공통--*/        
90
-		    frm_pay.kiccActionWebUrl.value  = KICC_ACTION_WEB_URL;       						  
96
+		    frm_pay.kiccActionWebUrl.value  	= KICC_ACTION_WEB_URL;       						  
97
+		    frm_pay.kiccActionMobileUrl.value  	= KICC_ACTION_MOBILE_URL;       						  
91 98
 		    frm_pay.EP_mall_id.value        = MALL_ID;       						   //가맹점 ID
92 99
 		    frm_pay.EP_mall_nm.value        = fn_make_user_info.get('brandNm');		   //가맹점명
93 100
 		    frm_pay.EP_order_no.value       = result.poOrdNo;   					   //가맹점 주문번호    
@@ -107,7 +114,7 @@ var popPageObj = {
107 114
 		    frm_pay.EP_user_addr.value      = "";      								   //가맹점 고객 주소
108 115
 		    frm_pay.EP_product_type.value   = "0";                                     //상품정보구분 : 0-실물, 1-서비스
109 116
 		    frm_pay.EP_product_expr.value   = "";             				           //서비스기간 : YYYYMMDD
110
-		    frm_pay.EP_return_url.value     = RETURN_URL;  							   // Return 받을 URL (HTTP부터 입력)
117
+		    frm_pay.EP_return_url.value     = WEB_RETURN_URL;  							   // Return 받을 URL (HTTP부터 입력)
111 118
 		                                    
112 119
 		    /*--신용카드--*/                    
113 120
 		    frm_pay.EP_usedcard_code.value  = "";                                      //사용가능한 카드 LIST
@@ -185,6 +192,8 @@ var popPageObj = {
185 192
 			frm_pay.EP_product_amt.value    = $('#ITP_FORM_PO_PAYMENT_POPUP_GOODS_AMT').val();  	// 결제금액			
186 193
 			frm_pay.EP_user_phone1.value    = $('#ITP_FORM_PO_PAYMENT_POPUP_ORD_TEL').val();  		// 휴대폰
187 194
 			frm_pay.EP_user_mail.value      = $('#ITP_FORM_PO_PAYMENT_POPUP_ORD_EMAIL').val();  	// 이메일
195
+			
196
+			frm_pay.sp_pay_type.value       = $('#ITP_FORM_PO_PAYMENT_POPUP_PAY_METHOD').val();  	// 결제방법
188 197
 			frm_pay.sp_product_amt.value    = $('#ITP_FORM_PO_PAYMENT_POPUP_GOODS_AMT').val();  	// 결제금액			
189 198
 			frm_pay.sp_user_phone1.value    = $('#ITP_FORM_PO_PAYMENT_POPUP_ORD_TEL').val();  		// 휴대폰
190 199
 			frm_pay.sp_user_mail.value      = $('#ITP_FORM_PO_PAYMENT_POPUP_ORD_EMAIL').val();  	// 이메일
@@ -193,6 +202,7 @@ var popPageObj = {
193 202
 				f_mobile_cert();
194 203
 			} else {
195 204
 			    f_cert();
205
+				// f_mobile_cert();
196 206
 			}
197 207
 		}
198 208
 	} 
@@ -275,7 +285,7 @@ function f_mobile_cert() {
275 285
         frm_pay.sp_user_addr.value    = encodeURIComponent( frm_pay.sp_user_addr.value );
276 286
     }
277 287
 
278
-   	frm_pay.sp_return_url.value = "/oqpo-view/easypay/oqpo/mobile_order_res_submit.jsp"; //    	
288
+   	frm_pay.sp_return_url.value = MOBILE_RETURN_URL; //    	
279 289
     easypay_card_webpay(frm_pay,"/oqpo-view/easypay/oqpo/mobile_order_req.jsp","_self","0","0","submit",30);    
280 290
 }
281 291
 
@@ -284,11 +294,18 @@ function f_submit() {
284 294
 	
285 295
 	$('#frm_pay #poOrdNo').val($('#ITP_FORM_PO_PAYMENT_POPUP_PO_ORD_NO').val()); 
286 296
 	$('#frm_pay #payTpCd').val($('#ITP_FORM_PO_PAYMENT_POPUP_PAY_TP_CD').val()); 
287
-	$('#frm_pay #sttlMgntUnqNo').val($('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO').val()); 
297
+	// $('#frm_pay #sttlMgntUnqNo').val($('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO').val()); 
288 298
 	$('#frm_pay #brandId').val($('#ITP_FORM_PO_PAYMENT_POPUP_BRAND_ID').val()); 
289 299
 	$('#frm_pay #storeId').val($('#ITP_FORM_PO_PAYMENT_POPUP_STORE_ID').val()); 
300
+	
301
+	var reqDataList = [];	
302
+	var ca = $('#ITP_FORM_PO_PAYMENT_POPUP_STTL_MGNT_UNQ_NO_LIST').val().split(';');
303
+    for(var i = 0 ; i < ca.length ; i++) {
304
+		reqDataList.push( { sttlMgntUnqNo : ca[i] } );
305
+	}	
290 306
 		
291 307
 	let param = $('#frm_pay').serializeObject();
308
+	param.reqDataList = reqDataList;
292 309
 	
293 310
 	// console.log("REQ : " + JSON.stringify(param));
294 311
 		

+ 1 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_WHS_LOCATION.js

@@ -19,6 +19,7 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
19 19
 
20 20
 	$('#ITP_FORM_BIZPOP_WHS_LOCATION_BRAND_ID').val(fn_make_user_info.get('brandId'));
21 21
 	$('#ITP_FORM_BIZPOP_WHS_LOCATION_STORE_ID').val(fn_make_user_info.get('storeId'));
22
+	$('#ITP_FORM_BIZPOP_WHS_LOCATION_WHS_DVSN').val(args.whsDvsn);
22 23
 
23 24
 	
24 25
 	$('#ITP_BIZPOP_WHS_LOCATION').one('shown.bs.modal', function(e) {

+ 39 - 9
src/main/webapp/js/app/settmng/ITP_SETTMNG03010.js

@@ -53,6 +53,12 @@ const gridColModel = {
53 53
 			width: '10', fixed: false, align: 'center',
54 54
 			sortable: false, hidden: false
55 55
 		},
56
+		{
57
+			index: 'LOAN_DVSN_NM', name: 'loanDvsnNm',
58
+			label: "정산타입", 
59
+			width: '8', fixed: false, align: 'center',
60
+			sortable: false, hidden: false
61
+		},
56 62
 		{
57 63
 			index: 'SPPLY_NM', name: 'spplyNm',
58 64
 			label: "공급사명",
@@ -92,20 +98,20 @@ const gridColModel = {
92 98
 		}, 
93 99
 		{
94 100
 			index: 'STTL_DT', name: 'sttlDt',
95
-			label: "정산일",
101
+			label: "정산확정일",
96 102
 			width: '10', fixed: false, align: 'center',
97 103
 			sortable: false, editable: false, edittype: 'text'
98 104
 		},
99 105
 		{
100 106
 			index: 'STTL_REQ_AMT', name: 'sttlAmt',
101
-			label: "정산금액",
107
+			label: "정산확정금액",
102 108
 			width: '10', fixed: false, align: 'center',
103 109
 			sortable: false, editable: false, edittype: 'text', 
104 110
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
105 111
 		},
106 112
 		{
107
-			index: 'ACCT_BAL', name: 'acctBal',
108
-			label: "잔금",
113
+			index: 'UNPAID_AMT', name: 'unpaidAmt',
114
+			label: "미납금액",
109 115
 			width: '10', fixed: false, align: 'center',
110 116
 			sortable: false, editable: false, edittype: 'text', 
111 117
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
@@ -290,7 +296,7 @@ let pageObj = {
290 296
 					switch (id) {
291 297
 						case 'ITP_BTN_SETTMNG03010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
292 298
 						case 'ITP_BTN_SETTMNG03010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
293
-						case 'ITP_BTN_SETTMNG03010_STTL_END'		: modifyObj.button.endSttl(); 	break;	// 정산완료 버튼
299
+						case 'ITP_BTN_SETTMNG03010_STTL_END'		: modifyObj.button.endSttl(); 	break;	// 정산확정 버튼
294 300
 						case 'ITP_BTN_SETTMNG03010_SEARCH_STORE_POP'	: listObj.button.storePop();	break;	// 매장검색 팝업
295 301
 						case 'ITP_BTN_SETTMNG03010_SEARCH_ERASE'		: listObj.button.storeErase();	break;	// 매장 지움
296 302
 					}
@@ -484,7 +490,7 @@ let modifyObj = {
484 490
 			listObj.grid.search();
485 491
 		}, 
486 492
 		endSttl: function() {
487
-			// 정산완료
493
+			// 정산확정
488 494
 			const formId = '#ITP_FORM_SETTMNG03010_DETAIL';
489 495
 			let param = $(formId).serializeObject();
490 496
 			var confirmFn= {
@@ -495,7 +501,18 @@ let modifyObj = {
495 501
 					fn_ajax_call(STTL_STATE_STTL_END, JSON.stringify(param), searhFn, 'POST'); 	
496 502
 				}
497 503
 			};
498
-			itp_fn_modal_confirm('정산 완료하시겠습니까?', confirmFn, null);
504
+			var sttlReqAmt =  parseInt($('#ITP_FORM_SETTMNG03010_DETAIL_STTL_REQ_AMT').val());
505
+			var acctBal =  parseInt($('#ITP_FORM_SETTMNG03010_DETAIL_ACCT_BAL').val());
506
+			
507
+			if(acctBal > 0) {
508
+				if(acctBal >= sttlReqAmt) {
509
+					itp_fn_modal_confirm('계좌잔액에서 지급처리가 진행됩니다.\n정산 확정하시겠습니까?', confirmFn, null);						
510
+				} else {
511
+					itp_fn_modal_confirm('일부금액이 계좌잔액에서 지급처리가 진행됩니다.\n정산 확정하시겠습니까?', confirmFn, null);	
512
+				}					
513
+			} else {
514
+				itp_fn_modal_confirm('정산 확정하시겠습니까?', confirmFn, null);
515
+			}
499 516
 		}
500 517
 	}, 
501 518
 	load: function(param) {
@@ -507,9 +524,13 @@ let modifyObj = {
507 524
 		$('#ITP_FORM_SETTMNG03010_DETAIL_BRAND_ID').val(result.brandId);
508 525
 		$('#ITP_FORM_SETTMNG03010_DETAIL_STORE_ID').val(result.storeId);
509 526
 		$('#ITP_FORM_SETTMNG03010_DETAIL_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
527
+		$('#ITP_FORM_SETTMNG03010_DETAIL_ACCT_BAL').val(result.acctBal); // 계좌잔액
528
+		$('#ITP_FORM_SETTMNG03010_DETAIL_STTL_REQ_AMT').val(result.sttlReqAmt); // 정산요청금액
510 529
 		
511 530
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnBrandNm').text(result.brandNm);
512 531
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnStoreNm').text(result.storeNm);
532
+		$('#ITP_FORM_SETTMNG03010_DETAIL .fnLoanDvsnNm').text(result.loanDvsnNm);
533
+		$('#ITP_FORM_SETTMNG03010_DETAIL .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
513 534
 		
514 535
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSttlRjctRsn').text(result.sttlRjctRsn == null ? '' : result.sttlRjctRsn);
515 536
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSttlStNm').text(result.sttlStNm);
@@ -519,8 +540,17 @@ let modifyObj = {
519 540
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSttlDt').text(result.sttlDt == null ? '' : result.sttlDt);  // 정산요청일자
520 541
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSttlAmt').text(itp_fn_number_comma(result.sttlAmt));
521 542
 		
522
-		$('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptYn').text(result.rcptYn == null ? '' : result.rcptYn);
523
-		$('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptDt').text(result.rcptDt == null ? '' : result.rcptDt);
543
+		// $('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptYn').text(result.rcptYn == null ? '' : result.rcptYn);
544
+		// $('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptDt').text(result.rcptDt == null ? '' : result.rcptDt);
545
+		
546
+		if(result.rcptYn == null) {
547
+			$('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptYnDate').text('');	
548
+		} else if(result.rcptYn == 'N') {
549
+			$('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptYnDate').text('N');
550
+		} else if(result.rcptYn == 'Y') {
551
+			$('#ITP_FORM_SETTMNG03010_DETAIL .fnRcptYnDate').text('Y (' + result.rcptDt + ')');
552
+		}
553
+		$('#ITP_FORM_SETTMNG03010_DETAIL .fnUnpaidAmt').text(itp_fn_number_comma(result.unpaidAmt));
524 554
 		
525 555
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSysRegDttm').text(result.sysRegDttm);
526 556
 		$('#ITP_FORM_SETTMNG03010_DETAIL .fnSysRegNm').text(result.sysRegNm);

+ 4 - 2
src/main/webapp/js/app/stockmng/ITP_STOCKMNG04010.js

@@ -32,8 +32,8 @@ let ITP_FORM_STOCKMNG04010_DETAIL_IS_WRITING = false;
32 32
 let STOCKMNG04010_DETAIL_GRID_LAST_ROW_ID;
33 33
 
34 34
 /* 공통코드 리스트 */
35
-let ITP_COMMON_CD_STCK_DVSN = fn_make_common_cd_list(CODE_LIST, 'STCK_DVSN', true);
36
-let ITP_COMMON_CD_LOC_ST_CD = fn_make_common_cd_list(CODE_LIST, 'LOC_ST_CD', true);
35
+let ITP_COMMON_CD_STCK_DVSN = fn_make_common_cd_list(CODE_LIST, 'STCK_DVSN', false);
36
+let ITP_COMMON_CD_LOC_ST_CD = fn_make_common_cd_list(CODE_LIST, 'LOC_ST_CD', false);
37 37
 
38 38
 /*API URL*/
39 39
 let WHS_MNG_DETAIL_GRID_LIST = '/api/whs/mng/detail-grid-list';
@@ -642,6 +642,8 @@ let createObj = {
642 642
 			listObj.grid.search();
643 643
 		},
644 644
 		save: function() {
645
+			$('body').trigger('click');
646
+			
645 647
 			var detailViewCd = $('#ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD').val();
646 648
 			const formId = '#ITP_FORM_STOCKMNG04010_DETAIL';
647 649
 			itp_fn_form_clear_validate(null, formId);