@model DTO.SystemsettingDTO
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
|
|
}
|
@{
|
Layout = null;
|
}
|
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="description" content="">
|
<meta name="author" content="ThemeBucket">
|
<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">
|
<form id="formtest">
|
<div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="ibox float-e-margins">
|
<div class="ibox-title">
|
<h5> <i class="fa fa-list"></i> 基本信息</h5>
|
</div>
|
<div id="div_content" class="ibox-content" style="background-color:white;">
|
<div class="row">
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
|
|
<label class="text-right col-sm-1 col-md-1 control-label">logo设置</label>
|
<div class="col-sm-2 col-md-2">
|
<input type="file" name="file" accept="image/*" id="fileUp" >
|
|
</div>
|
|
|
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
|
|
|
<div class="col-sm-2 col-md-2">
|
|
<img src="@Model.Logo" id="Logo1" name="Logo1" alt="" style="width:200px;">
|
|
<input type="hidden" id="Logo" name="Logo" value="@Model.Logo" />
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">标题设置<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="标题设置" name="Title" id="Title" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Title">
|
<input type="hidden" id="Id" name="Id" value="@Model.Id" />
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">单位设置<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="单位设置" name="Dw" id="Dw" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Dw">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">链接设置<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="单位设置" name="Url" id="Url" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Url">
|
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">销假天数(天/月)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="销假天数(天/月)" name="Backday" id="Backday" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Backday" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">事假天数(天/月)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="事假天数(天/月)" name="PersonalLeave" id="PersonalLeave" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.PersonalLeave" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">病假天数(天/月)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="病假天数(天/月)" name="SickLeave" id="SickLeave" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.SickLeave" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">丧假天数(天/月)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="丧假天数(天/月)" name="BereavementLeave" id="BereavementLeave" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.BereavementLeave" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">婚假天数(天/月)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="婚假天数(天/月)" name="WeddingLeave" id="WeddingLeave" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.WeddingLeave" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">产假(女)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="产假(女)" name="MaternityLeave" id="MaternityLeave" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.MaternityLeave" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">产假(男)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="产假(男)" name="MaternityLeaveMan" id="MaternityLeaveMan" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.MaternityLeaveMan" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">纳税线<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="纳税线" name="SocialSecurity" id="SocialSecurity" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.SocialSecurity" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">基本社保<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="基本社保" name="BasicSocialSecurity" id="BasicSocialSecurity" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.BasicSocialSecurity" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
|
|
</div>
|
</div>
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">工资结算(号)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="工资结算(号)" name="SettlementTime" id="SettlementTime" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.SettlementTime" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">最多迟到(次)<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="最多迟到(次)" name="NumberOfLate" id="NumberOfLate" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.NumberOfLate" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="wrapper wrapper-content" style="margin-top:0px"></div>
|
<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="savePosition();" style="margin-left:4px; border-radius:4px;">
|
<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"
|
};
|
|
|
|
|
|
|
|
|
|
|
// 保存岗位信息
|
var savePosition = function () {
|
|
|
|
|
if ($("#Logo").val() == '') {
|
toastr.warning("Logo不能为空");
|
return;
|
}
|
|
if ($.trim($("#Title").val()) == '') {
|
toastr.warning("标题设置不能为空");
|
return;
|
}
|
if ($.trim($("#Dw").val()) == '') {
|
toastr.warning("单位设置不能为空");
|
return;
|
}
|
if ($.trim($("#Url").val()) == '') {
|
toastr.warning("链接设置不能为空");
|
return;
|
}
|
if ($("#Backday").val() == '') {
|
toastr.warning("销假天数不能为空");
|
return;
|
}
|
if ($("#PersonalLeave").val() == '') {
|
toastr.warning("事假天数不能为空");
|
return;
|
}
|
if ($("#SickLeave").val() == '') {
|
toastr.warning("病假天数不能为空");
|
return;
|
}
|
if ($("#BereavementLeave").val() == '') {
|
toastr.warning("丧假天数不能为空");
|
return;
|
}
|
if ($("#WeddingLeave").val() == '') {
|
toastr.warning("婚假天数不能为空");
|
return;
|
}
|
if ($("#MaternityLeave").val() == '') {
|
toastr.warning("产假(女)不能为空");
|
return;
|
}
|
if ($("#MaternityLeaveMan").val() == '') {
|
toastr.warning("产假(男)不能为空");
|
return;
|
}
|
if ($("#SocialSecurity").val() == '') {
|
toastr.warning("纳税线不能为空");
|
return;
|
}
|
if ($("#BasicSocialSecurity").val() == '') {
|
toastr.warning("基本社保不能为空");
|
return;
|
}
|
if ($("#SettlementTime").val() == '') {
|
toastr.warning("工资结算不能为空");
|
return;
|
}
|
if ($("#NumberOfLate").val() == '') {
|
toastr.warning("最多迟到不能为空");
|
return;
|
}
|
|
|
//var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
|
$.ajax({
|
type: "POST",
|
url: "/Systemsetting/Save",
|
dataType: "json",
|
global: false,
|
data: $('form').serializeArray(),
|
success: function (data) {
|
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('成功保存', { icon: 6 });
|
//window.location = "/Project/add?id=" + data.ReturnID;
|
|
window.location = "/Systemsetting/Edit/";
|
//try {
|
// _pageAutoClose();//自动关闭页面方法
|
//}
|
//catch (err) {
|
// parent._CloseTab1("/Systemsetting/Edit/");
|
//}
|
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
|
|
|
$("#fileUp").on("change", function () {
|
var fileM = document.querySelector("#fileUp");
|
//获取文件对象,files是文件选取控件的属性,存储的是文件选取控件选取的文件对象,类型是一个数组
|
var fileObj = fileM.files[0];
|
if (fileObj) {
|
const fileSize = fileObj.size
|
const isLt10M = fileSize / 1024 / 1024 < 10
|
if (!isLt10M) {
|
toastr.warning("上传文件大小不能超过10M");
|
fileObj = ''
|
return
|
}
|
}
|
|
//创建formdata对象,formData用来存储表单的数据,表单数据时以键值对形式存储的。
|
var formData = new FormData();
|
var filePath = fileM.value; //js中无法获取文件的真是路径
|
|
var fileName = filePath.substring(filePath.lastIndexOf('\\') + 1); //文件名
|
var extName = fileName.substring(fileName.lastIndexOf('.') + 1); //后缀名
|
var arr = ["jpeg", "jpg", "png", "JPEG", "JPG", "PNG"];
|
if (arr.indexOf(extName) == -1) {
|
toastr.warning("只能上传jpeg,jpg,png图片");
|
return;
|
}
|
var tid = guid().replaceAll("-","");
|
formData.append('file', fileObj, tid + "." + extName);
|
$.ajax({
|
url: "/Systemsetting/fileUp/",
|
type: "post",
|
dataType: "json",
|
data: formData,
|
async: false,
|
cache: false,
|
contentType: false,
|
processData: false,
|
success: function (data) {
|
if (data.Result) {
|
parent.layer.msg('上传成功', { icon: 6 });
|
$("#Logo1").attr("src", data.Message);
|
$("#Logo").val(data.Message);
|
}
|
else {
|
toastr.error("上传失败");
|
|
}
|
},
|
});
|
});
|
|
|
|
/**
|
*获取id
|
*/
|
function guid() {
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
return v.toString(16);
|
});
|
}
|
|
function _pageAutoClose() {
|
parent.window._reloadPageData();
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
parent.layer.close(index);
|
return false;
|
}
|
</script>
|
</body>
|
</html>
|