YNICTE/FO/Views/Course/BookBuy.cshtml

105 lines
5.3 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMCourse
@{
var b = Model.Book;
}
<div class="fairCover">
<h4>교재정보</h4>
<div>
<table id="bookbox">
<tr>
<th><em style="background:url('@(string.IsNullOrEmpty(b.fileurl)?"/img/online/fair_book_sample01.jpg" : (Model.Files + b.fileurl))')no-repeat center center;"></em></th>
<td>
<h5><span>교재</span>@b.bkname</h5>
<dl>
<dd><span>저자 : </span>@b.author</dd>
<dd><span>출판연도 : </span>@(b.pubdate == null ? "" : b.pubdate.Value.ToShortDateString())</dd>
</dl>
<div class="bookCost" style="padding-top: 20px;">
<ul>
<li><a href="#" class="calc minus">-</a></li>
<li><input type="text" id="pcnt" data-price="@b.price" data-bkno="@b.bkno" class="int nocomma bookcount" value="@Model.pcnt" /></li>
<li><a href="#" class="calc plus">+</a></li>
</ul>
<p style="padding-top: 0;"><b class="price" style="font-size: 14pt">@((b.price * Model.pcnt).ToString("#,0"))</b><em>원</em></p>
</div>
</td>
</tr>
</table>
</div>
</div>
<h4 class="clsTitle">개인정보 수집 및 이용안내</h4>
<div class="clsPrivacy">
- 수집항목 : 이름, 회사명, 이메일, 전화번호... 그외 신청자가 등록한 교육생 정보<br />
- 수집목적 : 교육신청 사실 확인, 교재발송 및 학습독려<br />
- 이용기간 : 개인정보 수집 및 이용목적이 달성된 후에도 교육생의 개인정보는 추후 수강생이력관리 및 원활한 서비스 지원을 위해 지속적으로 보존합니다.<br />
단, 이용자가 메일 또는 전화등을 통해 개인정보 삭제를 요청한 경우 수집된 개인정보는 복구할 수 없는 방법으로 지체없이 파기합니다.<br />
* ISO 인증심사원과정의 경우 본인의 이력 관리 및 자격인증과 관련한 원활한 서비스 지원을 위해 수집한 항목에 대하여 제3자(로이드인증원)에게 제공하는 것을 동의합니다.
</div>
<div class="clsAgree">
<input type="checkbox" id="chkagree" />
<label for="chkagree">위 개인정보 수집 및 이용 안내를 숙지하였으며 이에 동의합니다. </label>
</div>
<ul class="clsBtn">
<li><a href="#" onclick="history.back(-1)">신청취소</a></li>
<li><a class="buysinglearea" href="#" onclick="save(0)">동의하고 <span>장바구니 담기</span></a></li>
<li><a href="#" onclick="save(1)">결제하기</a></li>
</ul>
<form id="thisform" method="get">
<input type="hidden" name="items" id="thisformpayitems" />
<input type="hidden" name="isgroup" id="thisformisgroup" value="0" />
</form>
@section scriptsHeader{
}
@section scripts{
<script>
var _as = 0;
$(document).ready(function () {
$("a.calc").on("click", function () {
var cnt = getint($(this).closest("ul").find("input.bookcount").val());
if ($(this).hasClass("minus")) {
if (cnt > 0) {
cnt--;
}
} else if ($(this).hasClass("plus")) {
cnt++;
}
$(this).closest("ul").find("input.bookcount").val(cnt);
$(this).closest(".bookCost").find("b.price").text(bindComma(cnt * getint($(this).closest("ul").find("input.bookcount").attr("data-price"))));
});
});
var _idx = 0;
function cbcart() {
if (capResult.code == -81) {
msg("이미 장바구니에 등록된 교재입니다.");
} else if (capResult.code == 1000) {
confirmtoggle(true, "장바구니 저장이 완료되었습니다. 장바구니로 이동하시겠습니까?", "$('#thisform').attr('action', '/My/Cart').submit();");
} else if (capResult.code == 9999) {
gologin(null, "/Course/BookBuy?bkno=@Model.Book.bkno&pcnt=" + getint(val("pcnt")));
}
}
function save(idx) {
_idx = idx;
if (idx == 0) {
$("#chkagree").prop("checked", true);
}
if (getint(val("pcnt")) < 1) {
msg("구매수량을 확인해주세요.");
} else if (!$("#chkagree").prop("checked")) {
msg("정보수집동의를 해주세요.");
} else if (idx == 0){
capp("/fcommon/buybook", { bkno: @Model.Book.bkno, pcnt: getint(val("pcnt")), iscart: true }, "cbcart");
} else {
var pis = "";
$.each($("#bookbox tr ul li input.bookcount"), function (i, b) {
if (getint($(b).val()) > 0) {
pis += ";2:" + $(b).attr("data-bkno") + ":" + getint($(b).val())+":0:0:0:0";
}
});
setv("thisformpayitems", pis.substr(1));
$("#thisform").attr("action", "/Course/PayBook").submit();
}
}
</script>
}