tsit05 5 lat temu
rodzic
commit
6b80383459

+ 2 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaDelivery.xml

@@ -502,6 +502,7 @@
 			, S.OPT_CD2 
 			, G.GOODS_STAT
 			, (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD_GB = 'G008' AND CD =G.GOODS_STAT) AS GOODS_STAT_NM
+			, G.SUPPLY_COMP_CD
 		FROM  TB_GOODS G
 		INNER JOIN TB_BRAND B  ON G.BRAND_CD = B.BRAND_CD
 		INNER JOIN TB_OPTION S ON G.GOODS_CD = S.GOODS_CD			
@@ -514,7 +515,7 @@
 		</if>
 		<if test='searchTxt != null and searchTxt != ""'>
 			<if test='goodsGb == "goodsCd"'>
-				AND G.GOODS_CD LIKE UPPER(#{searchTxt} || '%')
+				AND G.GOODS_CD LIKE CONCAT(UPPER(#{searchTxt}),'%')
 			</if>
 			<if test='goodsGb == "goodsNm"'>
 				AND G.GOODS_NM LIKE #{searchTxt} || '%'

+ 19 - 5
src/main/webapp/WEB-INF/views/delivery/BanGoodsRegistForm.html

@@ -139,23 +139,35 @@
 
 	$(document).ready(function() {
 		gagaAgGrid.createGrid('gridBanGoodsList', popGridOptions);
+		
+		$('#goodsStat').val('G008_90');
 	});
 
+	
 	// 조회
 	var fnPopSearch = function() {
 
 		var supplyCompcd = $('#bangoodsRegistForm select[name=supplyCompCd]').val();
-		if (gagajf.isNull(supplyCompcd)) {
-			mcxDialog.alert("업체를 선택해주세요!");
+		var searchTxt    = $('#bangoodsRegistForm input[name=searchTxt]').val();
+		
+		
+		if (gagajf.isNull(supplyCompcd) && gagajf.isNull(searchTxt)) {
+			mcxDialog.alert("업체를 선택 또는 상풐코드(상품명)을 입력해주세요!");
 			 $("#bangoodsRegistForm select[name=supplyCompCd]").focus();
 			return;
 		}
 		
 		var formId = '#bangoodsRegistForm';
-		gagaAgGrid.fetch($(formId).prop('action'), popGridOptions, formId);
+		var dd = gagaAgGrid.fetch($(formId).prop('action'), popGridOptions, formId,fnPopCallback);
+	}
+	// 조회 콜백 
+	var fnPopCallback = function(data){
+		var supplyCompcd = $('#bangoodsRegistForm select[name=supplyCompCd]').val();
+ 		if(gagajf.isNull(supplyCompcd)){
+ 			$('#bangoodsRegistForm select[name=supplyCompCd]').val(data[0].supplyCompCd);
+ 			$('#bangoodsRegistForm select[name=supplyCompCd]').trigger('change');
+		} 
 	}
-
-
 	// 저장
  	$('#btnBangoodsSave').on('click', function() {
 
@@ -223,6 +235,8 @@
 
 		cfnCreateCombo(actionUrl2, $('#bangoodsRegistForm select[name=popDelvLocCd]'), "[전체]");
 		
+
+		
 	});
 
 /*]]>*/

+ 9 - 1
src/main/webapp/WEB-INF/views/delivery/DeliveryListForm.html

@@ -334,7 +334,15 @@
 		{headerName: "출고택배사", 	field: "shipCompCd", 	width: 170, cellClass: 'text-center'
 			, valueGetter: function (params) { return gagaAgGrid.lookupValue(shipCompanyList, params.data.shipCompCd); }
 		},
-		{headerName: "배송추적", 		field: "invcTracking", 	width: 80, cellClass: 'text-center'},
+		{headerName: "배송추적", 		field: "invcTracking", 	width: 80, cellClass: 'text-center',
+			cellRenderer: function (params) {
+				if (params.value == "Y") {
+					return "요청";
+				} else {
+					return "미요청";
+				}
+			}
+		},
 		{headerName: "출고송장", 		field: "invoiceNo", 	width: 150, cellClass: 'text-left'},
 		{headerName: "송장등록수정", 	field: "invoiceNo", 	width: 120, cellClass: 'text-center'
 			, cellRenderer : function (params) {