فهرست منبع

Merge branch 'develop' into bin2107

bin2107 5 سال پیش
والد
کامیت
5563f6474e

+ 8 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -526,7 +526,14 @@
 		              </foreach>
 		             )
 		              </when>
-		              <when test='search != null and search == "searchGoodsNum"'>
+		              <when test='search != null and search == "searchGoodsNm"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
+		              </foreach>
+		             )
+		              </when>
+		               <when test='search != null and search == "searchGoodsNum"'>
 		        AND (
 		              <foreach collection="conditionList" item="item" index="index" separator="or">
 		               UPPER(G.GOODS_NUM) LIKE CONCAT('%',UPPER(#{item}),'%')

+ 1 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml

@@ -145,6 +145,7 @@
 		SELECT COUNT(1)
 		  FROM TB_PlAN
 		 WHERE 1=1
+		 AND DEL_YN = 'N'
 		 <include refid="getPlanListCondition_sql"/>
 	</select>
 	

+ 5 - 4
src/main/webapp/WEB-INF/views/goods/GoodsDealForm.html

@@ -14,7 +14,7 @@
  * 1.0  2020.10.29   eskim       최초 작성
  *******************************************************************************
  -->	
-	<div class="modalPopup" data-width="1100" >
+	<div class="modalPopup" data-width="1200" >
 		<div class="panelStyle">
 			<div class="panelTitle">
 				<h2>딜 상품 구성</h2>
@@ -257,9 +257,10 @@
 			if (goods.goodsType != "G056_N"){
 				isExist = true;
 			}
-			if (goods.selfGoodsYn != "Y"){
-				isExist = true;
-			}
+			// 입점상품 허용 - 20210512
+			//if (goods.selfGoodsYn != "Y"){
+			//	isExist = true;
+			//}
 
 			if(!isExist){
 				var data = { 

+ 2 - 2
src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -262,9 +262,9 @@
 		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
 		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'},
 		{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-left'},
-		{headerName: "재고", field: "stockQtySum", width: 80, cellClass: 'text-right',
+		/* {headerName: "재고", field: "stockQtySum", width: 80, cellClass: 'text-right',
 			valueFormatter: function(params) {	return params.value.addComma();}
-		},
+		}, */
 		{headerName: "상품상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },

+ 39 - 6
src/main/webapp/WEB-INF/views/goods/GoodsSetForm.html

@@ -14,7 +14,7 @@
  * 1.0  2020.11.04   eskim       최초 작성
  *******************************************************************************
  -->	
-	<div class="modalPopup" data-width="1100" >
+	<div class="modalPopup" data-width="1250" >
 		<div class="panelStyle">
 			<div class="panelTitle">
 				<h2>세트 상품 구성</h2>
@@ -28,7 +28,7 @@
 						<!-- 아이콘 툴팁 -->
 						<div class="iconTooltip">
 							<i class="fa fa-info" aria-hidden="true"></i>
-							<span class="left" style="width:400px; text-align:left;">
+							<span class="left" style="width:450px; text-align:left;">
 							<!-- class="left" 또는 class="right" -->
 								* 세트상품 정보<br/>
 								&nbsp;&nbsp;- 상품상태 : 정보부족<br/>
@@ -40,7 +40,7 @@
 								&nbsp;&nbsp;- 배송비정책 : 구성상품의 기준여부 'Y'상품의 브랜드 배송비정책<br/>
 								<br/>
 								* 구성상품 정보<br/>
-								&nbsp;&nbsp;- 구상상품판매가 : 구성상품의 수량만큼의 판매가 합 입력<br/>
+								&nbsp;&nbsp;- 세트구상상품판매가 : 구성상품의 세트구성수량만큼의 판매가 합 입력<br/>
 								&nbsp;&nbsp;- 구상상품의 기준상품 : 수정 불가<br/>
 							</span>
 						</div>
@@ -91,6 +91,12 @@
 							<input type="hidden" id="makeNm" name="makeNm" />
 						</td>
 					</tr>
+					<tr>
+						<th>세트상품판매가</th>
+						<td colspan="7">
+							<div id="setGoodsCurrPrice"></div>
+						</td>
+					</tr>
 				</table>
 			</div>	
 			<ul class="panelBar">
@@ -98,6 +104,7 @@
 					<button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsSetDeleteRow();">행삭제</button>
 				</li>
 				<li class="right">
+					<strong class="cRed">* 세트상품의 판매가는 세트구상상품판매가의 합로 설정되므로 구성상품의 세트구성수량과 세트구성상품판매가를 꼭 확인하세요.&nbsp;&nbsp;&nbsp;</strong>
 					<button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsSetPopup();">구상상품추가</button>
 				</li>
 			</ul>
@@ -127,10 +134,10 @@
 			}
 		},
 		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
-		{headerName: "구성상품명", field: "goodsNm" , width: 250, cellClass: 'text-left'},
+		{headerName: "구성상품명", field: "goodsNm" , width: 200, cellClass: 'text-left'},
 		//{headerName: "순서", field: "dispOrd" , width: 100, cellClass: 'text-center',editable: true, required: true},
-		{headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right',editable: true, required: true},
-		{headerName: "상품판매가", field: "compsCurrPrice" , width: 120, cellClass: 'text-right', editable: true, required: true,
+		{headerName: "세트구성수량", field: "qty" , width: 120, cellClass: 'text-right',editable: true, required: true},
+		{headerName: "세트구성상품판매가", field: "compsCurrPrice" , width: 150, cellClass: 'text-right', editable: true, required: true,
 			cellEditor: 'textCellEditor',
 			cellEditorParams: { maxlength: 14, validType: 'numeric'}
 		},
@@ -140,6 +147,10 @@
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
 		},
+		{headerName: "상품판매가", field: "currPrice" , width: 120, cellClass: 'text-right', editable: true, required: true,
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
 		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
@@ -168,6 +179,7 @@
 		}	
 	}
 	
+
 	// Row 
 	gridGoodsSetOptions.onCellValueChanged = function(event) {
 		var rowIdx = null;
@@ -192,6 +204,18 @@
 				}
 			}	
 		}
+		
+		if (event.colDef.field == "compsCurrPrice"){
+			var setGoodsCurrPrice = 0;
+			
+			gridGoodsSetOptions.api.forEachNode(function(rowNode, index) {
+				if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
+					setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
+				}
+			});
+			$('#goodsSetForm').find('#setGoodsCurrPrice').html(setGoodsCurrPrice.addComma());
+		}
+		
 	}
 	
 	//창종료
@@ -215,6 +239,7 @@
 		// 기존상품
 		var oldGoodsSetList = gagaAgGrid.getAllRowData(gridGoodsSetOptions);
 		var idx = oldGoodsSetList.length+1; 
+		var setGoodsCurrPrice = 0;
 		
 		var isExist = false;
 		goodsData.forEach(function(goods){
@@ -230,6 +255,11 @@
 				if (goods.supplyCompCd != rowNode.data.supplyCompCd){
 					isExist = true;
 				}
+				
+				if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
+					setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
+				}
+				 
 			});
 
 			if (goods.goodsType != "G056_N"){
@@ -246,6 +276,7 @@
 						, dispOrd: idx
 						, qty: 1
 						, compsCurrPrice: goods.currPrice
+						, currPrice: goods.currPrice
 						, baseYn: 'N'
 						, goodsStat : goods.goodsStat
 						, useYn: 'Y'
@@ -254,6 +285,7 @@
 						, supplyCompCd : goods.supplyCompCd
 						, sysImgNm : goods.sysImgNm
 						};
+				setGoodsCurrPrice += Number(goods.currPrice);
 				//그리드 마지막에 추가해야함
 				gridGoodsSetOptions.api.updateRowData({add: [data], addIndex: idx});
 				gridGoodsSetOptions.api.refreshCells();
@@ -261,6 +293,7 @@
 			
 			}
 		});
+		$('#goodsSetForm').find('#setGoodsCurrPrice').html(setGoodsCurrPrice.addComma());
 	}
 	
 	// 저장클릭시