This commit is contained in:
hyunho 2020-11-17 01:58:00 +00:00
parent ec7b61ae7f
commit fcb10107a7
5 changed files with 56 additions and 175 deletions

View File

@ -630,7 +630,7 @@
where a.payno=#payno# and a.userno=#userno# and a.pstatus in (1,22,41,42,43) where a.payno=#payno# and a.userno=#userno# and a.pstatus in (1,22,41,42,43)
</select> </select>
<select id="pay.mypayitem" parameterClass="hashtable" resultClass="payitem"> <select id="pay.mypayitem" parameterClass="hashtable" resultClass="payitem">
select a.ptype,c0.cshape,a.isrebate,a.payamt,a.pcnt,a.rstatus,a.userno,a.pstatus select a.ptype,c0.cshape,a.isrebate,a.payamt,a.pcnt,a.rstatus,a.userno,a.pstatus,a.pino,c0.infee,c0.outfee
,case a.ptype when 0 then c0.cname when 2 then c2.bkname when 4 then c0.cname when 3 then c3.exname else '-' end itemname ,case a.ptype when 0 then c0.cname when 2 then c2.bkname when 4 then c0.cname when 3 then c3.exname else '-' end itemname
,c0.sstime,c0.setime,datediff(c0.setime, c0.sstime)+1 days ,c0.sstime,c0.setime,datediff(c0.setime, c0.sstime)+1 days
,u.username,uc.cname ccpositionname,u.isassignuser ,u.username,uc.cname ccpositionname,u.isassignuser

View File

@ -243,6 +243,7 @@ namespace NP.FO.Controllers
return Redirect("/My/Paies"); return Redirect("/My/Paies");
} }
vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }); vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } });
vm.PayItem = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault();
vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno },{ "rstatus", 0} }).Count(); vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno },{ "rstatus", 0} }).Count();
if (vm.intval3 > 0) if (vm.intval3 > 0)
{ {

View File

@ -2,70 +2,31 @@
@{ @{
} }
<style>
.confirmokbutton {
color:white;
}
</style>
<h4 class="bskTitle">주문상품 정보</h4> <h4 class="bskTitle">주문상품 정보</h4>
<p class="odrNum">결제번호 : @(Model.Pay.payno < 1000000 ? Model.Pay.payno.ToString("000000") : Model.Pay.payno.ToString())</p> <p class="odrNum">결제번호 : @(Model.Pay.payno < 1000000 ? Model.Pay.payno.ToString("000000") : Model.Pay.payno.ToString())</p>
<table class="bskList"> <table class="bskList">
<tbody> <tbody>
@foreach (var d in Model.PayItems.Where(w => w.ptype == 0 || w.ptype == 1 || w.ptype == 4))
{
<tr> <tr>
<td> <td>
<h5> <h5>
<span class="blu">강좌</span> <span class="blu">강좌</span>
<span class="ppl">@d.cshapename</span> <span class="ppl">@Model.PayItem.cshapename</span>
@Html.Raw(d.isrebate == 1 ? "<span class=\"grn\">환급</span>" : "") @Html.Raw(Model.PayItem.isrebate == 1 ? "<span class=\"grn\">환급</span>" : "")
<b style="color:@(d.pstatus==22?"red":"")">@d.itemname</b> <b style="color:@(Model.PayItem.pstatus==22?"red":"")">@Model.PayItem.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> </h5>
<dl> <dl>
<dd>가격 : <span class="bk">@(d.days)일</span></dd> <dd>학습기간 : <span class="red">@(Convert.ToDateTime(Model.PayItem.sstime).ToShortDateString()) ~ @(Convert.ToDateTime(Model.PayItem.setime).ToShortDateString())</span></dd>
@if (Model.Pay.isgroup == 1) </dl>
{ <dl>
<dd><span class="org">@(Model.PayItems.Where(w => w.ptype == 0).Count())명</span></dd> <dd>가격 : <span class="red">@Model.PayItem.payamt.ToString("#,0")</span>원</dd>
}
<dd><span class="red">@d.payamt.ToString("#,0")</span>원</dd>
</dl> </dl>
</td> </td>
</tr> </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> </tbody>
</table> </table>
<h4 class="bskTitle">결제 정보</h4> <h4 class="bskTitle">결제 정보</h4>
@ -120,7 +81,7 @@
<ul class="bskBtn col1"> <ul class="bskBtn col1">
<li><a href="/My/Paies" class="bk">결제현황 이동</a></li> <li><a href="/My/Paies" class="bk">결제현황 이동</a></li>
@if (Model.Pay.ispg != 1 && Model.Pay.rstatus == 0 && Model.Pay.pstatus == 1 && Model.Pay.ptype == 1) @if (Model.Pay.ispg != 1 && Model.Pay.rstatus == 0 && Model.Pay.pstatus == 1 && Model.Pay.ptype != 1)
{ {
if (Convert.ToDateTime(Convert.ToDateTime(Model.Pay.payoktime).ToString("yyyy-MM-dd")) <= Convert.ToDateTime(DateTime.Now.AddMonths(1).ToString("yyyy-MM-10"))) if (Convert.ToDateTime(Convert.ToDateTime(Model.Pay.payoktime).ToString("yyyy-MM-dd")) <= Convert.ToDateTime(DateTime.Now.AddMonths(1).ToString("yyyy-MM-10")))
{ {
@ -151,22 +112,33 @@
<h4 class="bskTitle">상품선택</h4> <h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150"> <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>@(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>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
<tr> <tr>
<th>상품선택</th> <th>신청강좌</th>
<td> <td>
<ul class="odrChk" id="pibox"></ul> @*<ul class="odrChk" id="pibox"></ul>*@
@Model.PayItem.itemname
</td> </td>
</tr> </tr>
<tr> <tr>
<th>발행요청금액</th> <th>발행요청금액</th>
<td id="taxamt">0원</td> <td>
@Model.PayItem.payamt.ToString("#,0")원
</td>
</tr>
<tr>
<th>청구구분</th>
<td>
<input type="hidden" name="isreceipt" id="isreceipt" />
<ul class="bakRadio">
<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>
</table> </table>
<form id="mform" method="post" enctype="multipart/form-data"> <form id="mform" method="post" enctype="multipart/form-data">
<input type="hidden" name="pinos" id="pinos" /> <input type="hidden" id="pinos" name="pinos" value="@Model.PayItem.pino" />
<input type="hidden" name="payno" value="@Model.Pay.payno" /> <input type="hidden" name="payno" value="@Model.Pay.payno" />
<h4 class="bskTitle">발행업체 정보</h4> <h4 class="bskTitle">발행업체 정보</h4>
<table class="odrTable th150"> <table class="odrTable th150">
@ -203,24 +175,10 @@
<th>이메일주소</th> <th>이메일주소</th>
<td><input type="text" name="email" id="email" value="" /></td> <td><input type="text" name="email" id="email" value="" /></td>
</tr> </tr>
<tr class="pd5">
<th>사업장주소</th>
<td><input type="text" name="asaddr" id="" value="" /></td>
</tr>
<tr class="pd5"> <tr class="pd5">
<th>사업자등록증첨부</th> <th>사업자등록증첨부</th>
<td><input type="file" name="file1" id="file1" value="" /></td> <td><input type="file" name="file1" id="file1" value="" /></td>
</tr> </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"> <tr class="pd5">
<th>기재사항</th> <th>기재사항</th>
<td><input type="text" name="taxinfo" id="taxinfo" value="" /></td> <td><input type="text" name="taxinfo" id="taxinfo" value="" /></td>
@ -249,15 +207,18 @@
<h4 class="bskTitle">상품선택</h4> <h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150"> <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>@(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>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
<tr><th>요청강좌</th><td><ul class="odrChk" id="pibox2"></ul></td></tr> <tr>
<tr><th>환불요청금액</th><td id="refundamt">0원</td></tr> <th>요청강좌</th>
<td>
@Model.PayItem.itemname
</td>
</tr>
</table> </table>
<form id="mform2" method="post"> <form id="mform2" method="post">
<input type="hidden" name="pinos" id="pinos2" /> <input type="hidden" id="pinos2" name="pinos" value="@Model.PayItem.pino" />
<input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" /> <input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" />
<input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" /> <input type="hidden" name="ptype" id="ptype" value="0" /> @*ptype은 0만 쓰기로*@
<h4 class="bskTitle">환불정보</h4> <h4 class="bskTitle">환불정보</h4>
<table class="odrTable th150"> <table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> <tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
@ -340,13 +301,10 @@
<h4 class="bskTitle">상품선택</h4> <h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150"> <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>@(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>@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><ul class="odrChk" id="pibox2"></ul></td></tr>
<tr><th>환불요청금액</th><td id="refundamt">0원</td></tr>
</table> </table>
<form id="mform3" method="post"> <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="payno" id="payno" value="@Model.Pay.payno" />
<input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" /> <input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" />
<h4 class="bskTitle">환불정보</h4> <h4 class="bskTitle">환불정보</h4>
@ -437,31 +395,7 @@
@section scripts{ @section scripts{
<script> <script>
$(document).ready(function () { $(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) { function viewdvr(isdvr, dvrcode) {
if (isdvr == 1 && dvrcode != '') { if (isdvr == 1 && dvrcode != '') {
@ -476,8 +410,6 @@
} }
function calltax() { function calltax() {
if ('@(Model.Pay.rstatus < 2 && Model.Pay.pstatus == 1 || Model.Pay.pstatus == 22?1:0)' == '1') { 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"); capp("/fcommon/paytaxget", { payno: @Model.Pay.payno}, "cbpaytaxget");
} else { } else {
msg("결제완료내역만 계산서요청하실 수 있습니다."); msg("결제완료내역만 계산서요청하실 수 있습니다.");
@ -496,43 +428,6 @@
setv("manname", h.manname); setv("manname", h.manname);
setv("telno", h.telno); setv("telno", h.telno);
setv("email", h.email); 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'); $('html, body').addClass('lock');
$("#pop1").fadeIn("fast", function () { $("#pop1").fadeIn("fast", function () {
$(".pop1box").scrollTop(0); $(".pop1box").scrollTop(0);
@ -542,8 +437,7 @@
} }
} }
function save() { function save() {
if ($("#pibox input.pi:checked").length < 1) { msg("요청할 결제상품을 선택해주세요."); } if (check("asname", null, "회사명을 입력해주세요.")) { }
else if (check("asname", null, "회사명을 입력해주세요.")) { }
else if (check("ceoname", null, "대표자명을 입력해주세요.")) { } else if (check("ceoname", null, "대표자명을 입력해주세요.")) { }
else if (check("brno", null, "사업자등록번호를 입력해주세요.")) { } else if (check("brno", null, "사업자등록번호를 입력해주세요.")) { }
else if (check("grno", null, "법인등록번호를 입력해주세요.")) { } else if (check("grno", null, "법인등록번호를 입력해주세요.")) { }
@ -559,20 +453,9 @@
} }
} }
function 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'); capfileform('/fcommon/paytaxsave','mform', 'cbgogo');
} }
//function cbgogo() {
// if (capResult.code == 1000) {
// msg("접수되었습니다.", null, null, null, "mpgPopClose()");
// } else {
// msgadmin();
// }
//}
function cbgogo() { function cbgogo() {
if (capResult.code == 1000) { if (capResult.code == 1000) {
msg("접수되었습니다."); msg("접수되었습니다.");
@ -612,8 +495,7 @@
} }
} }
function save2() { function save2() {
if ($("#pibox2 input.pi:checked").length < 1) { msg("환불요청할 결제상품을 선택해주세요."); } if ('@(Model.Pay.ptype)' != '1' && check("bankname", null, "환불은행명을 입력해주세요.")) { }
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("bankowner", null, "예금주를 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && check("bankno", null, "환불계좌번호를 입력해주세요.")) { } else if ('@(Model.Pay.ptype)' != '1' && check("bankno", null, "환불계좌번호를 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && $("input[name='isowners']:checked").length < 1) { msg("개인계좌여부를 선택해주세요."); } else if ('@(Model.Pay.ptype)' != '1' && $("input[name='isowners']:checked").length < 1) { msg("개인계좌여부를 선택해주세요."); }
@ -627,11 +509,6 @@
} }
} }
function 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'); capfileform('/fcommon/payrfdsave', 'mform2', 'cbgogo2');
} }
function cbgogo2() { function cbgogo2() {

View File

@ -463,6 +463,8 @@ namespace NP.Model
public String rbank { get; set; } public String rbank { get; set; }
public String rbankaccnum{ get; set; } public String rbankaccnum{ get; set; }
public String tbankuser{ get; set; } public String tbankuser{ get; set; }
public int? infee { get; set; }
public int? outfee { get; set; }
} }
/// <summary> /// <summary>

View File

@ -23,6 +23,7 @@ namespace NP.Model
public String items { get; set; } public String items { get; set; }
public Pay Pay { get; set; } public Pay Pay { get; set; }
public PayRfd PayRfd { get; set; } public PayRfd PayRfd { get; set; }
public PayItem PayItem { get; set; }
public IList<Pay> Paies { get; set; } public IList<Pay> Paies { get; set; }
public IList<PayItem> PayItems { get; set; } public IList<PayItem> PayItems { get; set; }
public IList<PayRfd> PayRfds { get; set; } public IList<PayRfd> PayRfds { get; set; }