303 lines
18 KiB
Plaintext
303 lines
18 KiB
Plaintext
|
|
@model NP.Model.VMMM
|
||
|
|
@{
|
||
|
|
var _orno = 0;
|
||
|
|
}
|
||
|
|
<form id="mform" method="post">
|
||
|
|
<br />
|
||
|
|
<div class="rowvm" style="border: 1px solid #ddd; padding: 10px;">
|
||
|
|
<a href="#" onclick="admingo(-1)" class="btn btn-md btn-default">< 이전</a>
|
||
|
|
@Html.Partial("./Partial/Select", Model.Admins, new ViewDataDictionary { { "special", "reg" }, { "name", "AdminNo" }, { "selected", Model.AdminNo }, { "df", ":-전체컨설턴트" }, { "onchange", "submitnew(null, 1, true);" } })
|
||
|
|
<a href="#" onclick="admingo(1)" class="btn btn-md btn-default">다음 ></a>
|
||
|
|
</div>
|
||
|
|
<div class="rowvm" style="border: 1px solid #ddd; padding: 10px; margin-top: 1px;">
|
||
|
|
<a href="#" onclick="days(0)" class="btn btn-md btn-info">오늘</a>
|
||
|
|
<a href="#" onclick="days(-1)" class="btn btn-md btn-default botbd">< 이전</a>
|
||
|
|
<span style="color: #0094ff; font-weight: bold; font-size: 18px; vertical-align: middle;">@Model.WStartDay.Value.ToShortDateString() ~ @Model.WStartDay.Value.AddDays(6).ToShortDateString()</span>
|
||
|
|
<a href="#" onclick="days(1)" class="btn btn-md btn-default botbd">다음 ></a>
|
||
|
|
</div>
|
||
|
|
<br />
|
||
|
|
<div class="buttonbox" style="height: 30px; line-height: 30px;">
|
||
|
|
<strong><i class="fa fa-bars"></i> 유앤파트너즈</strong>
|
||
|
|
</div>
|
||
|
|
<section class="panel panel-default">
|
||
|
|
<div class="table-responsive" id="excel1">
|
||
|
|
<table class="table table-striped b-t b-light">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>@(Model.TabIdx == 1 ? "Claim Date" : Model.TabIdx == 2 ? "Deposit Date" : "Goal Date")</th>
|
||
|
|
<th>[Client]Project</th>
|
||
|
|
<th>Company Sales</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>Consultant</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Individual Sales</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th>Deposit Sales</th>
|
||
|
|
<th>Incentive Sales</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
<th>Consultant</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody class="data" id="tbody1">
|
||
|
|
@foreach (var item in Model.OrderReports.Where(w => w.ConsultantCompany == 0))
|
||
|
|
{
|
||
|
|
<tr>
|
||
|
|
@if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()">@(Model.TabIdx == 1 ? item.ReqDate2 : Model.TabIdx == 2 ? item.RecDate2 : item.GoalDate2)</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-left">@item.ClientOrderName</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.ReqMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
<td>@Convert.ToInt32(item.ConsultantPremium) %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.RecMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td>@item.ConsultantPremium %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
_orno = item.ORNo;
|
||
|
|
}
|
||
|
|
<tr>
|
||
|
|
<th colspan="2">합계(부가세별도)</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { ReqMoney = s.First().ReqMoney }).Sum(s => s.ReqMoney).ToString("#,0")</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>-</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { RecMoney = s.First().RecMoney }).Sum(s => s.RecMoney).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 0).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
<br />
|
||
|
|
<div class="buttonbox">
|
||
|
|
<strong><i class="fa fa-bars"></i> Hire Best</strong>
|
||
|
|
</div>
|
||
|
|
<section class="panel panel-default">
|
||
|
|
<div class="table-responsive" id="excel2">
|
||
|
|
<table class="table table-striped b-t b-light">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>@(Model.TabIdx == 1 ? "Claim Date" : Model.TabIdx == 2 ? "Deposit Date" : "Goal Date")</th>
|
||
|
|
<th>[Client]Project</th>
|
||
|
|
<th>Company Sales</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>Consultant</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Individual Sales</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th>Deposit Sales</th>
|
||
|
|
<th>Incentive Sales</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
<th>Consultant</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody class="data" id="tbody2">
|
||
|
|
@foreach (var item in Model.OrderReports.Where(w => w.ConsultantCompany == 1))
|
||
|
|
{
|
||
|
|
<tr>
|
||
|
|
@if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()">@(Model.TabIdx == 1 ? item.ReqDate2 : Model.TabIdx == 2 ? item.RecDate2 : item.GoalDate2)</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-left">@item.ClientOrderName</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.ReqMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
<td>@Convert.ToInt32(item.ConsultantPremium) %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.RecMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td>@item.ConsultantPremium %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
_orno = item.ORNo;
|
||
|
|
}
|
||
|
|
<tr>
|
||
|
|
<th colspan="2">합계(부가세별도)</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { ReqMoney = s.First().ReqMoney }).Sum(s => s.ReqMoney).ToString("#,0")</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>-</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { RecMoney = s.First().RecMoney }).Sum(s => s.RecMoney).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 1).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
<br />
|
||
|
|
<div class="buttonbox">
|
||
|
|
<strong><i class="fa fa-bars"></i> 시니어파트너즈</strong>
|
||
|
|
</div>
|
||
|
|
<section class="panel panel-default">
|
||
|
|
<div class="table-responsive" id="excel3">
|
||
|
|
<table class="table table-striped b-t b-light">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>@(Model.TabIdx == 1 ? "Claim Date" : Model.TabIdx == 2 ? "Deposit Date" : "Goal Date")</th>
|
||
|
|
<th>[Client]Project</th>
|
||
|
|
<th>Company Sales</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>Consultant</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Individual Sales</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th>Deposit Sales</th>
|
||
|
|
<th>Incentive Sales</th>
|
||
|
|
<th>Contribution Rate</th>
|
||
|
|
<th>Incentive</th>
|
||
|
|
<th>Consultant</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody class="data" id="tbody3">
|
||
|
|
@foreach (var item in Model.OrderReports.Where(w => w.ConsultantCompany == 2))
|
||
|
|
{
|
||
|
|
<tr>
|
||
|
|
@if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()">@(Model.TabIdx == 1 ? item.ReqDate2 : Model.TabIdx == 2 ? item.RecDate2 : item.GoalDate2)</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-left">@item.ClientOrderName</td>
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.ReqMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
<td>@Convert.ToInt32(item.ConsultantPremium) %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if (_orno != item.ORNo)
|
||
|
|
{
|
||
|
|
<td rowspan="@Model.OrderReports.Where(w => w.ORNo == item.ORNo).Count()" class="text-right">\ @item.RecMoney.ToString("#,0")</td>
|
||
|
|
}
|
||
|
|
<td class="text-right">\ @item.ConsultantSales.ToString("#,0")</td>
|
||
|
|
<td>@item.ConsultantPremium %</td>
|
||
|
|
<td class="text-right">\ @item.ConsultantMoney.ToString("#,0")</td>
|
||
|
|
<td>@item.AdminName (@item.GubunName2)</td>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
_orno = item.ORNo;
|
||
|
|
}
|
||
|
|
<tr>
|
||
|
|
<th colspan="2">합계(부가세별도)</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { ReqMoney = s.First().ReqMoney }).Sum(s => s.ReqMoney).ToString("#,0")</th>
|
||
|
|
@if (Model.TabIdx == 1)
|
||
|
|
{
|
||
|
|
<th>-</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).GroupBy(g => g.ORNo).Select(s => new NP.Model.OrderReport { RecMoney = s.First().RecMoney }).Sum(s => s.RecMoney).ToString("#,0")</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).Sum(s => s.ConsultantSales).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
<th class="text-right">\ @Model.OrderReports.Where(w => w.ConsultantCompany == 2).Sum(s => s.ConsultantMoney).ToString("#,0")</th>
|
||
|
|
<th>-</th>
|
||
|
|
}
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
@Html.HiddenFor(m => m.WStartDay)
|
||
|
|
@Html.HiddenFor(m => m.TabIdx)
|
||
|
|
</form>
|
||
|
|
<style type="text/css">
|
||
|
|
.bluebold{color: #0094ff; font-weight: bold;}
|
||
|
|
.newicon{background-color: #0094ff; color: #fff; padding: 1px 3px; border-radius: 3px;}
|
||
|
|
.fa.fa-smile-o{color: #0094ff; font-size: 20px; margin: 0 4px; vertical-align: middle;}
|
||
|
|
</style>
|
||
|
|
<script>
|
||
|
|
function admingo(idx) {
|
||
|
|
if (idx < 0 && $('#AdminNo').prop("selectedIndex") != '') {
|
||
|
|
$('#AdminNo').val($('#AdminNo option').eq($('#AdminNo').prop("selectedIndex") - 1).val());
|
||
|
|
submitnew(null, 1, true);
|
||
|
|
}
|
||
|
|
else if (idx > 0 && ($('#AdminNo').prop("selectedIndex") + 1) < $('#AdminNo option').length) {
|
||
|
|
$('#AdminNo').val($('#AdminNo option').eq($('#AdminNo').prop("selectedIndex") + 1).val());
|
||
|
|
submitnew(null, 1, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function days(idx) {
|
||
|
|
if (idx < 0) {
|
||
|
|
$("#WStartDay").val('@(Model.WStartDay.Value.AddDays(-7).ToShortDateString())');
|
||
|
|
submitnew(null, 1, true);
|
||
|
|
}
|
||
|
|
else if (idx > 0) {
|
||
|
|
$("#WStartDay").val('@(Model.WStartDay.Value.AddDays(7).ToShortDateString())');
|
||
|
|
submitnew(null, 1, true);
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
$("#WStartDay").val('@(DateTime.Now.AddDays(-1 * ((int)DateTime.Now.DayOfWeek - 1)).ToShortDateString())');
|
||
|
|
submitnew(null, 1, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|