회원상세 문자발송 금액 기능 수정
@d4b84e5a838af1ddb7e41caaef0b35ddd8bd98f6
--- src/main/java/itn/let/sym/grd/web/MberGrdMngController.java
+++ src/main/java/itn/let/sym/grd/web/MberGrdMngController.java
... | ... | @@ -45,6 +45,36 @@ |
| 45 | 45 |
return "/sym/grd/mberGrdSetting"; |
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 |
+ // 등급제 단가 정보 |
|
| 49 |
+ @RequestMapping(value = "/sym/grd/mberGrdSettingListAjax.do") |
|
| 50 |
+ public ModelAndView mberGrdSettingListAjax( |
|
| 51 |
+ @ModelAttribute("mberGrdVO") MberGrdVO mberGrdVO) throws Exception {
|
|
| 52 |
+ |
|
| 53 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 54 |
+ modelAndView.setViewName("jsonView");
|
|
| 55 |
+ |
|
| 56 |
+ boolean isSuccess = true; |
|
| 57 |
+ String msg = ""; |
|
| 58 |
+ List<MberGrdVO> mberGrdSettingList = null; |
|
| 59 |
+ |
|
| 60 |
+ try{
|
|
| 61 |
+ |
|
| 62 |
+ // 등급별 단가 정보 |
|
| 63 |
+ mberGrdSettingList = mberGrdService.selectMberGrdSettingList(mberGrdVO); |
|
| 64 |
+ |
|
| 65 |
+ } |
|
| 66 |
+ catch(Exception e) {
|
|
| 67 |
+ isSuccess = false; |
|
| 68 |
+ msg = e.getMessage(); |
|
| 69 |
+ } |
|
| 70 |
+ |
|
| 71 |
+ modelAndView.addObject("isSuccess", isSuccess);
|
|
| 72 |
+ modelAndView.addObject("msg", msg);
|
|
| 73 |
+ modelAndView.addObject("mberGrdSettingList", mberGrdSettingList);
|
|
| 74 |
+ |
|
| 75 |
+ return modelAndView; |
|
| 76 |
+ } |
|
| 77 |
+ |
|
| 48 | 78 |
// 등급제 설정 저장 |
| 49 | 79 |
@RequestMapping(value = "/sym/grd/mberGrdSettingUpdateAjax.do") |
| 50 | 80 |
public ModelAndView mberGrdSettingUpdateAjax( |
--- src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovGnrlUserSelectUpdt.jsp
+++ src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovGnrlUserSelectUpdt.jsp
... | ... | @@ -60,6 +60,8 @@ |
| 60 | 60 |
<script type="text/javascript" src="/js/RSA/rng.js"></script> |
| 61 | 61 |
<!-- <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script> --> |
| 62 | 62 |
<script type="text/javaScript" language="javascript" defer="defer"> |
| 63 |
+var grdSettingList = []; // 등급별 단가 정보 |
|
| 64 |
+ |
|
| 63 | 65 |
$(document).ready(function(){
|
| 64 | 66 |
console.log('${serverName}');
|
| 65 | 67 |
//메모 리스트 10초마다 갱신 |
... | ... | @@ -474,6 +476,12 @@ |
| 474 | 476 |
var target=$('.layer_'+obj);
|
| 475 | 477 |
target.addClass('active');
|
| 476 | 478 |
$('.popup_mask').addClass('active');
|
| 479 |
+ |
|
| 480 |
+ // 발송 금액 변경 |
|
| 481 |
+ if (obj == "price") {
|
|
| 482 |
+ //등급별 단가 정보 |
|
| 483 |
+ //getMberGrdSettingList(); |
|
| 484 |
+ } |
|
| 477 | 485 |
} |
| 478 | 486 |
|
| 479 | 487 |
//레이어팝업 닫기 |
... | ... | @@ -481,6 +489,70 @@ |
| 481 | 489 |
var target=$(obj).closest('.layer_popup');
|
| 482 | 490 |
target.removeClass('active');
|
| 483 | 491 |
$('.popup_mask').removeClass('active');
|
| 492 |
+} |
|
| 493 |
+ |
|
| 494 |
+//등급별 단가 정보 |
|
| 495 |
+function getMberGrdSettingList() {
|
|
| 496 |
+ grdSettingList = []; |
|
| 497 |
+ |
|
| 498 |
+ $.ajax({
|
|
| 499 |
+ type: "POST", |
|
| 500 |
+ url: "/sym/grd/mberGrdSettingListAjax.do", |
|
| 501 |
+ data: {},
|
|
| 502 |
+ dataType:'json', |
|
| 503 |
+ async: false, |
|
| 504 |
+ success: function (data) {
|
|
| 505 |
+ if (data.isSuccess) {
|
|
| 506 |
+ var sHtml = ""; |
|
| 507 |
+ var sHtml2 = ""; |
|
| 508 |
+ sHtml += "<select onchange='getMberGrdSettingInfo(this);'>"; |
|
| 509 |
+ sHtml += "<option value='0'>직접입력</option>"; |
|
| 510 |
+ $.each(data.mberGrdSettingList, function(i, item) {
|
|
| 511 |
+ // 배열 |
|
| 512 |
+ grdSettingList.push({grdSetNo: item.grdSetNo, shortPrice: item.shortPrice, longPrice: item.longPrice, picturePrice: item.picturePrice, picture2Price: item.picture2Price, picture3Price: item.picture3Price});
|
|
| 513 |
+ |
|
| 514 |
+ sHtml += "<option value='" + item.grdSetNo + "'>" + item.grdSetNm + "</option>"; |
|
| 515 |
+ sHtml2 += item.grdSetNm + " : " + item.shortPrice + ", " + item.longPrice + ", " + item.picturePrice + ", " + item.picture2Price + ", " + item.picture3Price + "\n"; |
|
| 516 |
+ }); |
|
| 517 |
+ sHtml += "</select>"; |
|
| 518 |
+ |
|
| 519 |
+ // Combo |
|
| 520 |
+ $("#mberGrdSettingCombo").html(sHtml);
|
|
| 521 |
+ |
|
| 522 |
+ // Title |
|
| 523 |
+ $("#mberGrdSettingTitle").attr("title", sHtml2);
|
|
| 524 |
+ } |
|
| 525 |
+ else {
|
|
| 526 |
+ //alert("Msg : " + data.msg);
|
|
| 527 |
+ } |
|
| 528 |
+ }, |
|
| 529 |
+ error: function (e) {
|
|
| 530 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 531 |
+ } |
|
| 532 |
+ }); |
|
| 533 |
+} |
|
| 534 |
+ |
|
| 535 |
+// 단가 적용 |
|
| 536 |
+function getMberGrdSettingInfo(obj) {
|
|
| 537 |
+ var returnValue = grdSettingList.find(function(data){ return data.grdSetNo == obj.value});
|
|
| 538 |
+ |
|
| 539 |
+ form = document.msgPriceForm; |
|
| 540 |
+ if (obj.value == 0) {
|
|
| 541 |
+ // 원래 단가 |
|
| 542 |
+ form.shortPrice.value = "${shortPrice}";
|
|
| 543 |
+ form.longPrice.value = "${longPrice}";
|
|
| 544 |
+ form.picturePrice.value = "${picturePrice}";
|
|
| 545 |
+ form.picture2Price.value = "${picture2Price}";
|
|
| 546 |
+ form.picture3Price.value = "${picture3Price}";
|
|
| 547 |
+ } |
|
| 548 |
+ else {
|
|
| 549 |
+ // 등급 단가 |
|
| 550 |
+ form.shortPrice.value = returnValue.shortPrice; |
|
| 551 |
+ form.longPrice.value = returnValue.longPrice; |
|
| 552 |
+ form.picturePrice.value = returnValue.picturePrice; |
|
| 553 |
+ form.picture2Price.value = returnValue.picture2Price; |
|
| 554 |
+ form.picture3Price.value = returnValue.picture3Price; |
|
| 555 |
+ } |
|
| 484 | 556 |
} |
| 485 | 557 |
|
| 486 | 558 |
//스팸 이용 정지 사유 확인용 레이어팝업 오픈 |
... | ... | @@ -5362,6 +5434,12 @@ |
| 5362 | 5434 |
<col style="width:auto;"> |
| 5363 | 5435 |
</colgroup> |
| 5364 | 5436 |
<tbody> |
| 5437 |
+ <!-- |
|
| 5438 |
+ <tr> |
|
| 5439 |
+ <th id="mberGrdSettingTitle">등급단가 적용</th> |
|
| 5440 |
+ <td><div id="mberGrdSettingCombo"></div></td> |
|
| 5441 |
+ </tr> |
|
| 5442 |
+ --> |
|
| 5365 | 5443 |
<tr> |
| 5366 | 5444 |
<th>단문 금액</th> |
| 5367 | 5445 |
<td><input type="text" name="shortPrice" id="shortPrice" value="<c:out value='${shortPrice}'/>"/></td>
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?