tsit05 4 سال پیش
والد
کامیت
1ea414a3ef

+ 1 - 1
src/main/java/com/style24/admin/biz/dao/TsaRendererDao.java

@@ -159,7 +159,7 @@ public interface TsaRendererDao {
 	 * @author moon
 	 * @since 2020. 11. 05
 	 */
-	Collection<CommonCode> getShipCompanyList();
+	Collection<CommonCode> getShipCompanyList(CommonCode data);
 //
 //	/**
 //	 * MD별 브랜드 목록 조회

+ 3 - 1
src/main/java/com/style24/admin/biz/service/TsaRendererService.java

@@ -463,7 +463,9 @@ public class TsaRendererService {
 	 * @since 2020. 11. 05
 	 */
 	public Collection<CommonCode> getShipCompanyList() {
-		return rendererDao.getShipCompanyList();
+		CommonCode data = new CommonCode();
+		data.setUseYn("Y");
+		return rendererDao.getShipCompanyList(data);
 	}
 //
 //	/**

+ 20 - 0
src/main/webapp/WEB-INF/views/delivery/SaveInvoiceForm.html

@@ -85,7 +85,27 @@
 			return;
 		}
 
+		// CJ택배만 체크  (다른택배 송장체크로직 없음.)
+		if(shipCompCd == "D1029"){
 
+			//송장번호 자리수 체크 12자리
+			if(invoiceNo.length != 12){
+				mcxDialog.alert('['+invoiceNo+']은 잘못된 송장번호 형식입니다1.');
+				chk = "N";
+				return false;
+			}
+			// 송장번호 유효성 체크 [ 앞2자리 제외하고 3번째자리부터 9개숫자를 7로나눈 나머지가 12번째 숫자임.]
+			var invoNolast = invoiceNo.substring(11,12);
+			var chkInvono = invoiceNo.substring(2,11); 
+			var invonoMod = chkInvono % 7 ;
+	
+			if(invoNolast != invonoMod ){
+				mcxDialog.alert('['+invoiceNo+']은 잘못된 송장번호 형식입니다2.');
+				chk = "N";
+				return false;
+			}
+		}  
+ 		
 		mcxDialog.confirm('송장등록/수정된 내용은 물류시스템에 전송되지 않습니다. <br> 저장 하시겠습니까?', {
 			cancelBtnText: "취소",
 			sureBtnText: "확인",