YNICTE/FO/Views/My/PayInfo.cshtml

651 lines
37 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMPay
@{
}
<h4 class="bskTitle">주문상품 정보</h4>
<p class="odrNum">결제번호 : @(Model.Pay.payno < 1000000 ? Model.Pay.payno.ToString("000000") : Model.Pay.payno.ToString())</p>
<table class="bskList">
<tbody>
@foreach (var d in Model.PayItems.Where(w => w.ptype == 0 || w.ptype == 1 || w.ptype == 4))
{
<tr>
<td>
<h5>
<span class="blu">강좌</span>
<span class="ppl">@d.cshapename</span>
@Html.Raw(d.isrebate == 1 ? "<span class=\"grn\">환급</span>" : "")
<b style="color:@(d.pstatus==22?"red":"")">@d.itemname</b>
@if (d.rsno > 0 && d.userno == ViewBag.SSUserNo && Model.Pay.pstatus == 1 && d.rstatus == 0 && Model.Pay.rstatus < 2)
{
<a href="/CRoom/Research?croomlectno=@d.lectno">사전설문참여</a>
}
</h5>
<dl>
<dd>가격 : <span class="bk">@(d.days)일</span></dd>
@if (Model.Pay.isgroup == 1)
{
<dd><span class="org">@(Model.PayItems.Where(w => w.ptype == 0).Count())명</span></dd>
}
<dd><span class="red">@d.payamt.ToString("#,0")</span>원</dd>
</dl>
</td>
</tr>
if (Model.Pay.isgroup == 1)
{
break;
}
}
@foreach (var d in Model.PayItems.Where(w => w.ptype == 3))
{
<tr>
<td>
<h5>
<span class="org">시험</span>
<b>@d.itemname</b>
</h5>
<dl>
<dd>가격</dd>
<dd><span class="red">@d.payamt.ToString("#,0")</span>원</dd>
</dl>
</td>
</tr>
}
@foreach (var d in Model.PayItems.Where(w => w.ptype == 2))
{
<tr>
<td>
<h5>
<span class="org">교재</span>
<b>@d.itemname</b>
</h5>
<dl>
<dd>가격</dd>
<dd><span class="org">@(d.pcnt)개</span></dd>
<dd><span class="red">@d.payamt.ToString("#,0")</span>원</dd>
</dl>
</td>
</tr>
}
</tbody>
</table>
<h4 class="bskTitle">결제 정보</h4>
<table class="odrTable">
<tr><th>구매금액</th><td>@Model.Pay.payamt.ToString("#,0")원</td></tr>
<tr><th>지불방법</th><td>@Model.Pay.ptypename</td></tr>
@if (Model.Pay.ptype == 3)
{
<tr><th>입금계좌</th><td><span>@Model.Pay.vactbankname | @Model.Pay.vactnum | @Model.Pay.vactname</span></td></tr>
}
<tr>
<th>주문접수일</th>
<td>@Model.Pay.cdt.ToString("yyyy-MM-dd HH:mm") @(Model.Pay.ptype == 3 ? string.Format("(만료일 : {0})", (Model.Pay.ispg == 0 ? "-" : Model.Pay.paylimit.Value.ToString("yyyy-MM-dd HH:mm"))) : "")</td>
</tr>
<tr>
<th>주문상태</th>
2020-11-16 18:02:46 +09:00
<td><b>@Model.Pay.pstatusname</b> @Html.Raw(Model.Pay.ispg == 1 && Model.Pay.rstatus == 0 && Model.Pay.pstatus == 1 && Model.Pay.ptype == 1 ? "<a href=\"#\" onclick=\"viewtax()\" class=\"odrRcpt\" style=\"color:white\">영수증 출력</a>" : "")</td>
2020-10-12 14:39:23 +09:00
</tr>
2020-11-16 18:02:46 +09:00
2020-10-12 14:39:23 +09:00
</table>
2020-11-16 18:02:46 +09:00
@if (Model.intval3 > 0)
{
<h4 class="bskTitle">환불 정보</h4>
<table class="odrTable">
<tr>
<th>환불 신청일</th>
<td>@(Convert.ToDateTime(Model.PayRfd.cdt).ToString("yyyy-MM-dd HH:mm"))</td>
</tr>
<tr>
<th>환불상태</th>
<td>
@if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null))
{
<label>서류접수대기</label> <a href="#" style="color:blue">[서류등록/취소]</a> <a href="#" style="color:blue">[신청서출력]</a>
}
else if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
{
<label>접수완료</label><label id="rfdDate">(@Model.PayRfd.udt) 서류심사중</label> <a href="#" style="color:blue">[상세내용조회/취소]</a> <a href="#" style="color:blue">[신청서출력]</a>
}
else if (Model.PayRfd.rstatus == 1 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
{
<label>환불불가</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a>
}
else if (Model.PayRfd.rstatus == 2 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
{
<label>환불완료</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a>
}
</td>
</tr>
</table>
}
2020-10-12 14:39:23 +09:00
<ul class="bskBtn col1">
<li><a href="/My/Paies" class="bk">결제현황 이동</a></li>
2020-11-16 18:02:46 +09:00
@if (Model.Pay.ispg != 1 && Model.Pay.rstatus == 0 && Model.Pay.pstatus == 1 && Model.Pay.ptype == 1)
2020-10-12 14:39:23 +09:00
{
2020-11-16 18:02:46 +09:00
if (Convert.ToDateTime(Convert.ToDateTime(Model.Pay.payoktime).ToString("yyyy-MM-dd")) <= Convert.ToDateTime(DateTime.Now.AddMonths(1).ToString("yyyy-MM-10")))
{
<li><a href="#" onclick="calltax()" class="bk">계산서요청</a></li>
}
else
{
<li><a href="#" onclick="alert('계산서 요청 기한이 지나 신청이 불가능합니다.'); return;" class="bk">계산서요청</a></li>
}
2020-10-12 14:39:23 +09:00
}
2020-11-16 18:02:46 +09:00
@if (Model.Pay.pstatus == 1 && Model.Pay.rstatus != 2 && Model.PayItems.Where(w => w.rstatus == 0).Count() > 0)
2020-10-12 14:39:23 +09:00
{
<li><a href="#" onclick="refund()" class="bk">환불요청</a></li>
}
@if (Model.Pay.rstatus < 2 && Model.Pay.pstatus == 22)
{
<li><a href="#" onclick="cancelpay()" class="bk">결제취소</a></li>
}
</ul>
<div class="mpgPop mpgPopFull" style="display:none;" id="pop1">
<div>
<div>
<div class="mpgPopWrap wdth650">
<div class="mpgPopTitle"><h5>계산서발행요청</h5><a href="#" onclick="javascript:mpgPopClose();"></a></div>
<div class="mpgPopScroll">
<div class="odrPop pop1box">
<h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150">
<tr><th>총결제액/입금일</th><td>@(Model.Pay.payamt.ToString("#,0"))원 (@(Model.Pay.payoktime == null ? "" : Model.Pay.payoktime.Value.ToString("yy-MM-dd HH:mm")))</td></tr>
<tr id="trcall"><th>기존요청금액</th><td id="precalltaxamt">0원</td></tr>
<tr><th>기존발행금액</th><td id="pretaxamt">0원</td></tr>
<tr><th>결제방법</th><td>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
<tr>
<th>상품선택</th>
<td>
<ul class="odrChk" id="pibox"></ul>
</td>
</tr>
<tr>
<th>발행요청금액</th>
<td id="taxamt">0원</td>
</tr>
</table>
<form id="mform" method="post" enctype="multipart/form-data">
<input type="hidden" name="pinos" id="pinos" />
<input type="hidden" name="payno" value="@Model.Pay.payno" />
<h4 class="bskTitle">발행업체 정보</h4>
<table class="odrTable th150">
<tr class="pd5"><th>회사명</th><td><input type="text" name="asname" id="asname" value="" /></td></tr>
<tr class="pd5">
<th>대표자</th>
<td><input type="text" name="ceoname" id="ceoname" value="" /></td>
</tr>
<tr class="pd5">
<th>사업자등록번호</th>
<td><input type="text" name="brno" id="brno" value="" maxlength="12" /></td>
</tr>
<tr class="pd5">
<th>법인등록번호</th>
<td><input type="text" name="grno" id="grno" value="" maxlength="14" /></td>
</tr>
<tr class="pd5">
<th>업태</th>
<td><input type="text" name="btype" id="btype" value="" /></td>
</tr>
<tr class="pd5">
<th>종목</th>
<td><input type="text" name="bkind" id="bkind" value="" /></td>
</tr>
<tr class="pd5">
<th>담당자</th>
<td><input type="text" name="manname" id="manname" value="" /></td>
</tr>
<tr class="pd5">
<th>연락처</th>
<td><input type="text" name="telno" id="telno" value="" /></td>
</tr>
<tr class="pd5">
<th>이메일주소</th>
<td><input type="text" name="email" id="email" value="" /></td>
</tr>
<tr class="pd5">
<th>사업장주소</th>
<td><input type="text" name="asaddr" id="" value="" /></td>
</tr>
<tr class="pd5">
<th>사업자등록증첨부</th>
<td><input type="file" name="file1" id="file1" value="" /></td>
</tr>
<tr>
<th>영수구분</th>
<td>
<input type="hidden" name="isreceipt" id="isreceipt" />
<ul class="rcptRadio">
<li><input type="radio" name="isreceipts" id="isreceipt1" checked="checked" /><label for="isreceipt1">영수</label></li>
<li><input type="radio" name="isreceipts" id="isreceipt0" /><label for="isreceipts0">청구</label></li>
</ul>
</td>
</tr>
<tr class="pd5">
<th>기재사항</th>
<td><input type="text" name="taxinfo" id="taxinfo" value="" /></td>
</tr>
</table>
</form>
<ul class="odrPopBtn col1">
<li><a href="#" onclick="save()" class="bk">계산서 발행요청</a></li>
</ul>
</div><!-- clsPopCont -->
</div>
</div><!-- clsPopWrap -->
</div>
</div>
</div>
<div class="mpgPop mpgPopFull" style="display:none;" id="pop2">
<div>
<div>
<div class="mpgPopWrap wdth750">
<div class="mpgPopTitle">
<h5>취소/환불요청</h5>
<a href="javascript:mpgPopClose();"></a>
</div>
<div class="mpgPopScroll">
<div class="odrPop pop1box">
<h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150">
<tr><th>총결제액/입금일</th><td>@(Model.Pay.payamt.ToString("#,0"))원 (@(Model.Pay.payoktime == null ? "" : Model.Pay.payoktime.Value.ToString("yy-MM-dd HH:mm")))</td></tr>
<tr><th>기존환불금액</th><td id="prerefundamt">0원</td></tr>
<tr><th>결제방법</th><td>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
2020-11-16 18:02:46 +09:00
<tr><th>요청강좌</th><td><ul class="odrChk" id="pibox2"></ul></td></tr>
2020-10-12 14:39:23 +09:00
<tr><th>환불요청금액</th><td id="refundamt">0원</td></tr>
</table>
<form id="mform2" method="post">
<input type="hidden" name="pinos" id="pinos2" />
2020-11-16 18:02:46 +09:00
<input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" />
2020-10-12 14:39:23 +09:00
<input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" />
<h4 class="bskTitle">환불정보</h4>
<table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불은행</th>
<td><input type="text" name="bankname" id="bankname" maxlength="30" value="" /></td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>예금주</th>
<td><input type="text" name="bankowner" id="bankowner" maxlength="30" /></td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불계좌</th>
<td><input type="text" name="bankno" id="bankno" maxlength="30" value="" /></td>
</tr>
<tr style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>개인계좌여부</th>
<td>
<input type="hidden" name="isowner" id="isowner" />
<ul class="bakRadio">
2020-11-16 18:02:46 +09:00
<li><input type="radio" name="isowners" id="isowner1" checked /><label for="isowner1">예</label></li>
2020-10-12 14:39:23 +09:00
<li><input type="radio" name="isowners" id="isowner0" /><label for="isowner0">아니오</label></li>
</ul>
</td>
</tr>
<tr class="pd5">
2020-11-16 18:02:46 +09:00
<th>담당자</th>
<td><input type="text" name="ruser" id="ruser" value="" /></td>
</tr>
<tr class="pd5">
<th>담당자연락처</th>
<td><input type="text" name="rphone" id="rphone" value="" /></td>
2020-10-12 14:39:23 +09:00
</tr>
<tr>
2020-11-16 18:02:46 +09:00
<th>환불요청사유</th>
<td>
<ul class="bakRadio">
<li><input type="radio" name="rreason" id="rreason1" checked="checked" value="0" /><label for="rreason1">교육취소</label></li>
<li><input type="radio" name="rreason" id="rreason2" value="1" /><label for="rreason2">과정변경</label></li>
<li><input type="radio" name="rreason" id="rreason3" value="2" /><label for="rreason3">과입금</label></li>
<li><input type="radio" name="rreason" id="rreason4" value="9" /><label for="rreason4">기타</label></li>
</ul>
</td>
</tr>
<tr class="pd5">
<th>메모</th>
2020-10-12 14:39:23 +09:00
<td>
2020-11-16 18:02:46 +09:00
<textarea name="rtext" id="rtext" rows="4" style="border:1px solid #cbcbcb; width:100%"></textarea>
2020-10-12 14:39:23 +09:00
</td>
</tr>
2020-11-16 18:02:46 +09:00
2020-10-12 14:39:23 +09:00
</table>
2020-11-16 18:02:46 +09:00
<p class="odrpDesc" style="color:red">
※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다.
</p>
<h4 class="bskTitle">환불규정</h4>
<div>평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.</div>
<br />
2020-10-12 14:39:23 +09:00
</form>
2020-10-12 15:32:10 +09:00
<ul class="odrChk"><li><input type="checkbox" id="chkrefund" /><label for="chkrefund">영남건설기술교육원 환불규정에 동의하고 수강취소 및 환불을 요청합니다.</label></li></ul>
2020-10-12 14:39:23 +09:00
<ul class="odrPopBtn col2">
<li><a href="#" class="bk" onclick="save2()">환불요청</a></li>
<li><a href="#" onclick="mpgPopClose()">취소</a></li>
</ul>
</div><!-- clsPopCont -->
</div>
</div><!-- clsPopWrap -->
</div>
</div>
</div>
2020-11-16 18:02:46 +09:00
<div class="mpgPop mpgPopFull" style="display:none;" id="pop3">
<div>
<div>
<div class="mpgPopWrap wdth750">
<div class="mpgPopTitle">
<h5>취소/환불요청</h5>
<a href="javascript:mpgPopClose();"></a>
</div>
<div class="mpgPopScroll">
<div class="odrPop pop1box">
<h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150">
<tr><th>총결제액/입금일</th><td>@(Model.Pay.payamt.ToString("#,0"))원 (@(Model.Pay.payoktime == null ? "" : Model.Pay.payoktime.Value.ToString("yy-MM-dd HH:mm")))</td></tr>
<tr><th>기존환불금액</th><td id="prerefundamt">0원</td></tr>
<tr><th>결제방법</th><td>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
<tr><th>요청강좌</th><td><ul class="odrChk" id="pibox2"></ul></td></tr>
<tr><th>환불요청금액</th><td id="refundamt">0원</td></tr>
</table>
<form id="mform3" method="post">
<input type="hidden" name="pinos" id="pinos2" />
<input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" />
<input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" />
<h4 class="bskTitle">환불정보</h4>
<table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불은행</th>
<td>@Model.PayRfd.bankname</td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>예금주</th>
<td>@Model.PayRfd.bankowner</td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불계좌</th>
<td>@Model.PayRfd.bankno</td>
</tr>
<tr style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>개인계좌여부</th>
<td>
@if (Model.PayRfd.isowner == 1)
{
<label>예</label>
}
else
{
<label>아니오</label>
}
</td>
</tr>
<tr class="pd5">
<th>담당자</th>
<td>@Model.PayRfd.ruser</td>
</tr>
<tr class="pd5">
<th>담당자연락처</th>
<td>@Model.PayRfd.rphone</td>
</tr>
<tr>
<th>환불요청사유</th>
<td>
@Model.PayRfd.rreasonname
</td>
</tr>
<tr class="pd5">
<th>메모</th>
<td>
@Model.PayRfd.rtext
</td>
</tr>
<tr>
<td>
<p class="odrpDesc" style="color:red">
※ 내용 변경을 원하실 경우 신청을 취소하고 다시 환불요청해주셔야 합니다.
</p>
</td>
</tr>
</table>
<h4 class="bskTitle">첨부서류</h4>
<table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불은행</th>
<td>@Model.PayRfd.bankname</td>
</tr>
</table>
</form>
<p class="odrpDesc" style="color:red">
※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다.
</p>
<h4 class="bskTitle">환불규정</h4>
<div>평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.</div>
<br />
<ul class="odrChk"><li><input type="checkbox" id="chkrefund" /><label for="chkrefund">영남건설기술교육원 환불규정에 동의하고 수강취소 및 환불을 요청합니다.</label></li></ul>
<ul class="odrPopBtn col2">
<li><a href="#" class="bk" onclick="">환불 최종요청</a></li>
<li><a href="#" class="bk" onclick="">환불신청 취소</a></li>
<li><a href="#" onclick="mpgPopClose()">닫기</a></li>
</ul>
</div><!-- clsPopCont -->
</div>
</div><!-- clsPopWrap -->
</div>
</div>
</div>
2020-10-12 14:39:23 +09:00
@section scriptsHeader{
}
@section scripts{
<script>
$(document).ready(function () {
$("#pibox").on("change", "input.pi", function () {
var tamt = 0;
$.each($("#pibox input.pi:checked"), function (i, c) {
tamt += getint($(c).val());
});
sett("taxamt", commaset(tamt) + "원");
});
$("#pibox2").on("change", "input.pi", function () {
var tamt = 0;
$.each($("#pibox2 input.pi:checked"), function (i, c) {
tamt += getint($(c).val());
});
sett("refundamt", commaset(tamt) + "원");
});
$('.odrRfnd > span').click(function () {
if ($(this).is('.on')) {
$(this).removeClass('on');
$(this).text('펼치기');
$(this).next().slideUp();
} else {
$(this).addClass('on');
$(this).text('접기');
$(this).next().slideDown();
}
});
});
function viewdvr(isdvr, dvrcode) {
if (isdvr == 1 && dvrcode != '') {
window.open("https://www.ilogen.com/web/personal/trace/" + dvrcode);
}
else if (isdvr == 0 && dvrcode == '') {
2020-10-12 15:32:10 +09:00
msg("수령위치: 경북 영천시 고경면 호국로 791 영남건설기술교육원");
2020-10-12 14:39:23 +09:00
}
}
function viewtax() {
window.open("https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid=@(Model.Pay.pgkey)&noMethod=1", "pgreceipt", "width=500, height=600, scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
}
function calltax() {
if ('@(Model.Pay.rstatus < 2 && Model.Pay.pstatus == 1 || Model.Pay.pstatus == 22?1:0)' == '1') {
$("#pibox").html("");
sett("taxamt", "0원");
capp("/fcommon/paytaxget", { payno: @Model.Pay.payno}, "cbpaytaxget");
} else {
msg("결제완료내역만 계산서요청하실 수 있습니다.");
}
}
function cbpaytaxget() {
var h = capResult.obj.h;
var d = capResult.obj.d;
if (h != null && d.length > 0) {
setv("asname", h.asname);
setv("ceoname", h.ceoname);
setv("brno", h.brno);
setv("grno", h.grno);
setv("btype", h.btype);
setv("bkind", h.bkind);
setv("manname", h.manname);
setv("telno", h.telno);
setv("email", h.email);
$("#trcall").hide();
if (h.taxamt != h.taxamtsum) {
$("#trcall").show();
}
sett("precalltaxamt", commaset(h.taxamt) + "원");
sett("pretaxamt", commaset(h.taxamtsum) + "원");
if (h.isgroup == 1) {
var itemname = "";
var isget = false;
var pcnt = 0;
var pamt = 0;
var pinos = "";
$.each(d, function (i, pi) {
if (pi.taxno < 1 && pi.ptype == 0 && pi.rstatus == 0) {
//단체결제는 결제완료강좌 하나로 묶어서 하나로 출력
pcnt++;
pamt += getint(pi.payamt);
pinos += "," + pi.pino;
if (!isget) {
itemname = pi.itemname
}
}
});
if (pcnt > 0) {
$("#pibox").append("<li><input type=\"checkbox\" class=\"pi\" id=\"pi0\" value=\"" + pamt + "\" data-pino=\"" + pinos.substr(1)+"\" /><label for=\"pi0\">[강좌]" + itemname + "(" + pcnt + "명, " + commaset(pamt) + "원)</label></li>");
}
//교재 또는 기발행요청 건
$.each(d, function (i, pi) {
if (pi.ptype != 0) {
$("#pibox").append("<li><input type=\"checkbox\" " + (pi.taxno < 1 && pi.rstatus == 0 ? "" : "disabled") + " class=\"pi\" id=\"pi" + pi.pino + "\" value=\"" + pi.payamt + "\" data-pino=\"" + pi.pino +"\" /><label for=\"pi" + pi.pino + "\">" + (pi.ptype == 2 ? "[교재]" : pi.ptype == 3 ? "[시험]" : "[강좌]") +pi.itemname + "(" + pi.pcnt + (pi.ptype == 2 ? "개" : "명") + ", " + commaset(pi.payamt) + "원)</label></li>");
}
});
} else {
$.each(d, function (i, pi) {
$("#pibox").append("<li><input type=\"checkbox\" " + (pi.taxno < 1 && pi.rstatus == 0 ? "" : "disabled") + " class=\"pi\" id=\"pi" + pi.pino + "\" value=\"" + pi.payamt + "\" data-pino=\"" + pi.pino +"\" /><label for=\"pi" + pi.pino + "\">" + (pi.ptype == 2 ? "[교재]" : pi.ptype == 3 ? "[시험]" : "[강좌]") + pi.itemname + "(" + pi.pcnt + (pi.ptype == 2 ? "개" : "명") + ", " + commaset(pi.payamt) + "원)</label></li>");
});
}
$('html, body').addClass('lock');
$("#pop1").fadeIn("fast", function () {
$(".pop1box").scrollTop(0);
});
} else {
msg("이미 계산서를 접수중이거나 환불된 결제건입니다.");
}
}
function save() {
if ($("#pibox input.pi:checked").length < 1) { msg("요청할 결제상품을 선택해주세요."); }
else if (check("asname", null, "회사명을 입력해주세요.")) { }
else if (check("ceoname", null, "대표자명을 입력해주세요.")) { }
else if (check("brno", null, "사업자등록번호를 입력해주세요.")) { }
else if (check("grno", null, "법인등록번호를 입력해주세요.")) { }
else if (check("btype", null, "업태를 입력해주세요.")) { }
else if (check("bkind", null, "종목을 입력해주세요.")) { }
else if (check("manname", null, "담당자를 입력해주세요.")) { }
else if (check("telno", null, "연락처를 입력해주세요.")) { }
else if (check("email", null, "이메일주소를 입력해주세요.")) { }
else if (!isemail(val("email"))) { msg("이메일 형식이 올바르지 않습니다. 다시 입력해주세요."); }
else {
setv("isreceipt", $("#isreceipt1").prop("checked") ? 1 : 0);
confirmtoggle(true, "계산서발행요청 이후, 수정 및 철회는 고객문의 게시판을 이용해주십시오. 계산서 발행 요청을 완료하시겠습니까?", "gogo()");
}
}
function gogo() {
var pinos = "";
$.each($("#pibox input.pi:checked"), function (i, c) {
pinos += "," + $(c).attr("data-pino");
});
setv("pinos", pinos.substr(1));
capfileform('/fcommon/paytaxsave','mform', 'cbgogo');
}
//function cbgogo() {
// if (capResult.code == 1000) {
// msg("접수되었습니다.", null, null, null, "mpgPopClose()");
// } else {
// msgadmin();
// }
//}
function cbgogo() {
if (capResult.code == 1000) {
msg("접수되었습니다.");
setTimeout(function () {
$("#mform").attr("action", "/My/Paies").submit()
}, 1000);
} else if(capResult.code == -1) {
msg("이미 신청된 계산서가 존재합니다.");
}
}
function refund() {
2020-11-16 18:02:46 +09:00
if ('@(Model.Pay.rstatus < 2 && Model.Pay.pstatus == 1?1:0)' == '1') {
2020-10-12 14:39:23 +09:00
$("#pibox2").html("");
sett("prerefundamt", "0원");
capp("/fcommon/payrefundget", { payno: @Model.Pay.payno}, "cbpayrefundget");
} else {
msg("결제완료내역만 계산서요청하실 수 있습니다.");
}
}
function cbpayrefundget() {
var h = capResult.obj.h;
var d = capResult.obj.d;
if (h != null && h.pstatus == 1 && d.length > 0) {
sett("prerefundamt", commaset(h.refundamt) + "원");
$.each(d, function (i, pi) {
$("#pibox2").append("<li><input type=\"checkbox\" " + ((pi.rfdno < 1 || pi.rfdrstatus < 0) && pi.ispast < 1 && pi.rstatus < 1 && pi.pstatus == 1 ? "" : "disabled") +
" class=\"pi\" id=\"pi" + pi.pino + "\" value=\"" + pi.payamt + "\" data-pino=\"" + pi.pino + "\" /><label for=\"pi" + pi.pino + "\">" +
(pi.rstatus > 0 ? "[완료]" : pi.rfdrstatus == 0 ? "[요청]" : pi.rfdrstatus == -1 ? "[반려]" : pi.rfdrstatus == 2 ? "[환불]" : pi.ispast > 0 ? "[종료]" :"[정상]")+(pi.ptype == 2 ? "[교재]" : pi.ptype == 3 ? "[시험]" : "[강좌]") + pi.itemname + "(" + (pi.ptype == 2 || h.isgroup == 0 ? (pi.pcnt + "개") : pi.username) + ", " +
commaset(pi.payamt) + "원)</label></li>");
});
$('html, body').addClass('lock');
$("#pop2").fadeIn("fast", function () {
$(".pop1box").scrollTop(0);
});
} else {
msg("이미 전액환불된 결제내역입니다. 운영자에게 문의해주세요.");
}
}
function save2() {
if ($("#pibox2 input.pi:checked").length < 1) { msg("환불요청할 결제상품을 선택해주세요."); }
else if ('@(Model.Pay.ptype)' != '1' && check("bankname", null, "환불은행명을 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && check("bankowner", null, "예금주를 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && check("bankno", null, "환불계좌번호를 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && $("input[name='isowners']:checked").length < 1) { msg("개인계좌여부를 선택해주세요."); }
2020-11-16 18:02:46 +09:00
else if (check("ruser", null, "담당자를 입력해주세요.")) { }
else if (check("rphone", null, "담당자연락처를 입력해주세요.")) { }
else if (check("rtext", null, "메모를 입력해주세요.")) { }
2020-10-12 14:39:23 +09:00
else if ($("#chkrefund:checked").length < 1) { msg("환불규정에 동의 후 요청해주세요."); }
else {
setv("isowner", $("#isowner1").prop("checked") ? 1 : 0);
confirmtoggle(true, "환불요청하시겠습니까?", "gogo2()");
}
}
function gogo2() {
var pinos = "";
$.each($("#pibox2 input.pi:checked"), function (i, c) {
pinos += "," + $(c).attr("data-pino");
});
setv("pinos2", pinos.substr(1));
capfileform('/fcommon/payrfdsave', 'mform2', 'cbgogo2');
}
function cbgogo2() {
if (capResult.code == 1000) {
msg("환불요청이 성공적으로 접수되었습니다.<br />내부 담당자가 검토 후 연락드릴 예정입니다.", null, null, null, "mpgPopClose();refresh();");
} else {
msg("환불신청이 불가한 결제상품입니다. 운영자에게 문의해주세요.");
}
}
function cancelpay() {
confirmtoggle(true, "결제취소는 동일결제 건 모두 취소됩니다.<br />수강신청을 취소하시겠습니까?", "gocancel()");
}
function gocancel() {
capp("/fcommon/paycancel", { payno: @Model.Pay.payno}, "cbgogo");
}
</script>
}