@model DTO.AdmMemoBookDTO;
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
List<PltUserDTO> users = ViewData["users"] as List<PltUserDTO>;
|
List<HrDeptDTO> Dept = ViewData["Dept"] as List<HrDeptDTO>;
|
PltUser curentuser = ViewData["curentuser"] as PltUser;
|
}
|
@{
|
Layout = null;
|
}
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<title>@(SiteConfig.SiteName)</title>
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/animate.min.css" rel="stylesheet">
|
|
@*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
|
@*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
|
@*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
<link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
|
|
<style type="text/css">
|
.webuploader-pick {
|
position: relative;
|
display: inline-block;
|
cursor: pointer;
|
background: #00b7ee;
|
padding: 8px 14px 7px 14px;
|
color: #fff;
|
text-align: center;
|
border-radius: 3px;
|
overflow: hidden;
|
}
|
|
div.clearfix > label {
|
padding-top: 8px;
|
}
|
|
.chosen-container {
|
border-radius: 1px;
|
border: 1px solid #e5e6e7;
|
}
|
|
.col-md-1.control-label {
|
padding-right: 0px;
|
font-weight: 400;
|
}
|
</style>
|
|
<!-- jqgrid-->
|
@*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
|
<script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js"></script>
|
@*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
|
|
<!--容器-->
|
@*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
|
<script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
|
@*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
|
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
|
@*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
|
<script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
|
<script src="~/js/plugins/webuploader/webuploader.min.js"></script>
|
|
<script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
|
@*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
|
<script src="~/js/TUJS.js"></script>
|
</head>
|
<body class="gray-bg" style="overflow:auto">
|
<style>
|
.title {
|
width: 80px !important;
|
text-align: right !important;
|
vertical-align: middle;
|
padding-right: 10px;
|
}
|
|
.table td {
|
display: table-cell;
|
vertical-align: middle !important;
|
border: none !important;
|
padding-top: 8px !important;
|
}
|
|
.table tr {
|
padding-left: 10px !important;
|
border: none !important;
|
}
|
|
.data {
|
width: 100% !important;
|
}
|
</style>
|
<form method="post" style="background-color:white;">
|
<input type="text" value="3" id="Rtype" name="Rtype" hidden="hidden">
|
<input type="text" value="@Model.Id" id="Id" name="Id" hidden="hidden">
|
<input type="text" value="@Model.KaoHe" id="KaoHe" name="KaoHe" hidden="hidden">
|
<table class="table">
|
|
<tr>
|
<td class="title">
|
<label>工作部门</label>
|
</td>
|
<td>
|
<select id="WorkDept" class="data form-control" name="WorkDept" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in Dept)
|
{
|
@if (!item.Id.Equals(Model.WorkDept))
|
{
|
<option value="@item.Id" hassubinfo="true">
|
@item.DeptName
|
</option>
|
}
|
else
|
{
|
<option value="@item.Id" hassubinfo="true" selected="selected">
|
@item.DeptName
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</td>
|
</tr>
|
<tr>
|
<td class="title">
|
<label>职工<i class="red">*</i></label>
|
</td>
|
<td>
|
<select id="ToUserId" class="data form-control" name="ToUserId" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in users)
|
{
|
@if (!item.Id.Equals(Model.ToUserId))
|
{
|
<option value="@item.Id" hassubinfo="true">
|
@item.UserName
|
</option>
|
}
|
else
|
{
|
<option value="@item.Id" hassubinfo="true" selected="selected">
|
@item.UserName
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</td>
|
</tr>
|
<tr>
|
<td class="title"><label id="shixian">工作内容<i class="red">*</i></label></td>
|
<td>
|
<textarea class="data" id="Context" name="Context" style="overflow-y:hidden" cols="60" rows="10">@Model.Context </textarea>
|
</td>
|
</tr>
|
<tr>
|
<td class="title"><label>完成时间 </label> </td>
|
<td>
|
<input type="text" class="layui-input layer-date ldate data" label="来电时间" value="@Model.TimeName" name="Time" id="Time" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly">
|
</td>
|
</tr>
|
<tr>
|
<td class="title"><label>追责处罚</label> </td>
|
<td>
|
<input type="text" label="追责处罚" value="@Model.ZhuiZe" name="ZhuiZe" id="ZhuiZe" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">元
|
</td>
|
</tr>
|
|
|
</table>
|
|
|
<div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
|
<div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
|
|
<a class="btn btn-success" href="javascript:void(0)" onclick="Save();" style="margin-left:4px; border-radius:4px;left:350px;">
|
<i class="glyphicon glyphicon-ok"></i> <span class="bold">提交</span>
|
</a>
|
</div>
|
</div>
|
</form>
|
|
<script type="text/javascript">
|
var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
|
$("#div_content").height(hh);
|
|
toastr.options = {
|
"closeButton": true,
|
"debug": false,
|
"progressBar": true,
|
"positionClass": "toast-bottom-right",
|
"onclick": null,
|
"showDuration": "300",
|
"hideDuration": "600",
|
"timeOut": "4500",
|
"extendedTimeOut": "600",
|
"showEasing": "swing",
|
"hideEasing": "linear",
|
"showMethod": "fadeIn",
|
"hideMethod": "fadeOut"
|
};
|
|
|
|
|
$(function () {
|
|
$("#ToUserId").chosen();
|
$(".ldate").each(function (el) {
|
laydate({
|
elem: "#" + $(this).attr('id'), //对应id
|
format: 'YYYY-MM-DD hh:mm', //日期格式 // 分隔符可以任意定义,该例子表示只显示年月
|
min: '2021-01-01', //设定最小日期为当前日期
|
max: '2099-06-16', //最大日期
|
type: 'datetime',
|
festival: false, //显示节日
|
istime: true, //是否显示时分秒
|
istoday: true, //是否是今天
|
choose: function (datas) { //选择日期完毕的回调
|
|
}
|
});
|
|
});
|
|
|
|
})
|
|
|
function Save() {
|
|
if ($("#ToUserId").val() == '') {
|
toastr.warning("职工不能为空");
|
return;
|
}
|
if ($.trim($("#Context").val()) == '') {
|
toastr.warning("工作内容不能为空");
|
return;
|
}
|
|
|
|
$.ajax({
|
type: "POST",
|
url: "/DailyManagement/SaveWorkAnPai",
|
dataType: "json",
|
global: false,
|
async: false,
|
data: $('form').serializeArray(),
|
success: function (data) {
|
|
if (data.Result) {
|
parent.layer.msg('成功保存', { icon: 6 });
|
|
try {
|
|
_pageAutoClose();//自动关闭页面方法
|
}
|
catch (err) {
|
|
}
|
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
|
function _pageAutoClose() {
|
|
parent.window._reloadPageData();
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
//layer.closeAll();
|
parent.layer.close(index);
|
$(".layui-layer-close").click();
|
return false;
|
}
|
|
var curentuser = '@curentuser.Id';
|
|
$("#WorkDept").change(function () {
|
|
var checkDeptId = $("#WorkDept").val();
|
$.ajax({
|
type: "GET",
|
url: "/User/GetList?DeptId=" + checkDeptId,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var quxian = $("#ToUserId");
|
var userid = '@Model.ToUserId';
|
quxian.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true">请选择</option>';
|
quxian.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
if (curentuser != data[i].Id) {
|
var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].UserName + '</option>';
|
|
if (data[i].Id == userid) {
|
o = '<option value="' + data[i].Id + '" hassubinfo="true" selected="selected">' + data[i].UserName + '</option>';
|
}
|
quxian.append(o);
|
}
|
|
}
|
}
|
quxian.trigger('chosen:updated');//更新选项
|
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
|
|
</script>
|
</body>
|
</html>
|