98 lines
4.2 KiB
Plaintext
98 lines
4.2 KiB
Plaintext
@model calendar
|
|
@{
|
|
ViewBag.Title = "日历 | 编辑";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
<link href="~/Statics/libs/datetime/clndr/clndr.css" rel="stylesheet" />
|
|
<style>
|
|
.my-calendar-body > .row { min-height: 230px; }
|
|
.mini-clndr { font-family: Asap, Helvetica, Arial; margin: 0 auto; width: 196px; }
|
|
.mini-clndr .clndr { overflow: hidden; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; }
|
|
.mini-clndr .clndr > .controls > .month { margin-bottom: 5px; text-align: center; }
|
|
.mini-clndr .clndr .days-container { border: 1px solid #FF4545; }
|
|
.mini-clndr .clndr .days-container .headers { background-color: #FF4545; padding-top: 5px; padding-bottom: 5px; }
|
|
.col-clndr { width: 28px; height: 28px; line-height: 28px; text-align: center; }
|
|
.day-clndr.adjacent-month { color: rgba(0, 0, 0, 0.3); background: #ddd; }
|
|
.day-clndr.isholiday { background-color: #B4E09F; }
|
|
.day-clndr.withWeight { background-color: gold !important; }
|
|
.font_div{font-weight:bold;text-align:center;font-size:17px}
|
|
</style>
|
|
}
|
|
@section JS{
|
|
<script src="~/Statics/libs/datetime/moment/moment.min.js"></script>
|
|
<script src="~/Statics/libs/datetime/moment/zh-cn.js"></script>
|
|
<script src="~/Statics/libs/datetime/clndr/clndr.js"></script>
|
|
<script type="text/javascript">
|
|
var Calendar = @Html.JsonSerialize(Model);
|
|
</script>
|
|
<script src="~/Scripts/app/basic/calendarYearEdit.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
}
|
|
|
|
<div class="row p-3">
|
|
<div class="col">
|
|
@if (CurUser.基础参数管理.交易日历)
|
|
{
|
|
if (Model != null)
|
|
{
|
|
<button class="btn btn-primary" type="button" onclick="deletecalendar('@(Model.EncryptId)');">删除</button>
|
|
}
|
|
<button class="btn btn-primary" type="button" onclick="save_yearcalendar()">保存</button>
|
|
|
|
|
|
}
|
|
</div>
|
|
<div class="font_div" style="padding-top: 8px;">@(Model.Year)年</div>
|
|
<div class="col text-right" style="padding-top: 8px;">
|
|
|
|
<span>颜色标识:</span>
|
|
<div class="day-clndr isholiday d-inline-block mr-2 text-center" style="width:80px;">假日</div>
|
|
<div class="day-clndr withWeight d-inline-block mr-2 text-center" style="width:120px;" title="双击日期设置权重">带权重假日</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yc-panel my-calendar-body m-0">
|
|
@for (var i = 0; i < 3; i++)
|
|
{
|
|
<div class="row mb-3">
|
|
@for (var j = 1; j <= 4; j++)
|
|
{
|
|
<div class="col">
|
|
<div id="month@(i*4+j)" class="mini-clndr"></div>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<!--权重设置-->
|
|
<div id="setWeight" style="background:#fff;min-height:100px;padding:20px;display:none;">
|
|
<div>
|
|
<label>权重:</label>
|
|
<input id="holidayDate" type="hidden" value="" />
|
|
<input type="text" style="width:80px" id="setWeightInput" />
|
|
<button class="btn btn-primary" onclick="saveSetWeight()" style="width:70px;height:29px;border: none;border-radius: 3px;" type="button">确认</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/template" id="clndr-template">
|
|
<div class="controls">
|
|
<div class="month"><%= month %></div>
|
|
</div>
|
|
<div class="days-container">
|
|
<div class="headers row no-gutters">
|
|
<% _.each(daysOfTheWeek, function(day) { %><div class="col col-clndr"><%= day %></div><% }); %>
|
|
</div>
|
|
<div class="days">
|
|
<% _.each(new Array(parseInt(days.length/7)+1), function(k,index1) { %>
|
|
<div class="row no-gutters">
|
|
<% _.each(days.slice(7*index1,7*(index1+1)), function(day) { var dayinfo = getDayInfo(day,eventsThisMonth); %>
|
|
<div class="col col-clndr">
|
|
<div ondblclick='showDateWeight({curMonth:"<%= month %>",curDay:"<%= dayinfo.curDay%>", wWeight:"<%= dayinfo.weightValue%>"});' title='<%= dayinfo.weightTitle%>' class="<%= dayinfo.classes %>"><%= day.day %></div>
|
|
</div>
|
|
<% }); %>
|
|
</div>
|
|
<% }); %>
|
|
</div>
|
|
</div>
|
|
</script> |