@model DTO.SysCodeDtlEntity
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
|
List<SysCodeDtl> falv = ViewData["falv"] as List<SysCodeDtl>; //法律
|
|
|
List<SysCodeDtl> question = ViewData["question"] as List<SysCodeDtl>; //法律
|
|
List<SysCodeDtlEntity> sysCodeDtlEntities = ViewData["sysCodeDtlEntities"] as List<SysCodeDtlEntity>; //法律
|
|
|
|
|
}
|
@{
|
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;">
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">质疑事项</label>
|
<div class="col-sm-10 col-md-10">
|
@*<input class="form-control" label="法律名称" id="Comments" name="Comments" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="100" ismust="true" type="text" value="@Model.Comments">*@
|
|
<select id="Classify1" class="form-control" name="Classify1" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in question)
|
{
|
@if (!item.CodeSn.Equals(Model.Classify1))
|
{
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeSn" hassubinfo="true" selected="selected">
|
@item.Comments
|
</option>
|
}
|
|
}
|
}
|
</select>
|
|
|
<input type="hidden" name="CodeId" value="@Model.CodeId" />
|
</div>
|
</div>
|
|
|
<div id="addlist_2">
|
@for (int i = 0; i < sysCodeDtlEntities.Count; i++)
|
{
|
<div class="fatiaomeirong">
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">编码</label>
|
<div class="col-sm-2 col-md-2" style="width:5%;">
|
<input class="form-control" label="编码" name="CodeSns" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@sysCodeDtlEntities[i].CodeSn">
|
|
<input type="hidden" name="Id" value="@Model.Id" />
|
|
|
</div>
|
|
|
|
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">法律名称</label>
|
<div class="col-sm-10 col-md-10">
|
@*<input class="form-control" label="法律名称" id="Comments" name="Comments" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="100" ismust="true" type="text" value="@Model.Comments">*@
|
|
<select class="form-control" name="Commentss" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in falv)
|
{
|
@if (!item.CodeSn.Equals(sysCodeDtlEntities[i].Comments))
|
{
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeSn" hassubinfo="true" selected="selected">
|
@item.Comments
|
</option>
|
}
|
|
}
|
}
|
</select>
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">法条</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="法条" name="Classify2s" labtype="txt" addvisible="true" editvisible="true" maxlength="50" reg="" ismust="flase" type="text" value="@sysCodeDtlEntities[i].Classify2">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">内容</label>
|
<div class="col-sm-10 col-md-10">
|
@*<input class="form-control" label="内容" id="Contents" name="Contents" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="300" ismust="true" type="text" value="@Model.Contents">*@
|
|
<textarea class="form-control bt" name="Contentss" title="内容" isempty="" maxlength="300" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@sysCodeDtlEntities[i].Contents</textarea>
|
</div>
|
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;display:none;">
|
<label class="text-right col-sm-1 col-md-1 control-label">排序</label>
|
<div class="col-sm-2 col-md-2" style="width:5%;">
|
<input class="form-control" label="排序" name="Sorts" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="flase" type="text" value="@sysCodeDtlEntities[i].Sort" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
|
|
</div>
|
|
</div>
|
</div>
|
}
|
|
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-1 col-md-1">
|
<button type="button" class="addBtn" onclick="addBtn(this)" data-type="2" style="width:32px">+</button>
|
<button type="button" class="delBtn" onclick="delBtn(this)" data-type="2" style="width:32px">-</button>
|
</div>
|
</div>
|
|
|
|
|
|
</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="delPosition();" style="margin-left:4px; border-radius:4px;">
|
<i class="glyphicon glyphicon-remove"></i> <span class="bold">删除</span>
|
</a>*@
|
|
<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>
|
|
<a class="btn btn-success" href="javascript:void(0)" onclick="closepage();" style="margin-left:4px; border-radius:4px;">
|
<i class="glyphicon glyphicon-remove"></i> <span class="bold">关闭</span>
|
</a>
|
</div>
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
|
var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2;
|
$("#div_content").height(hh);
|
|
|
|
var Contentss = document.getElementsByName("Contentss");
|
for (var a = 0; a < Contentss.length; a++) {
|
|
Contentss[a].style.height = Contentss[a].scrollHeight + 'px';
|
}
|
|
|
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 id = '@Model.Id';
|
|
var delPosition = function () {
|
if (id == null || id == '') {
|
toastr.warning("请先保存");
|
return;
|
}
|
$.ajax({
|
type: "GET",
|
url: "/SysCode/NullifySysCodeDtl?id=" + id,
|
dataType: "json",
|
global: false,
|
data: '',
|
success: function (data) {
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('删除成功', { icon: 6 });
|
_pageAutoClose();//自动关闭页面方法
|
}
|
else {
|
// toastr.error("");
|
parent.layer.msg('删除失败', { icon: 5 });
|
}
|
|
},
|
error: function () {
|
if ($.isNumber(imgLoad)) {
|
parent.layer.close(imgLoad);
|
}
|
//toastr.error("保存失败");
|
|
parent.layer.msg('保存失败', { icon: 5 });
|
}
|
});
|
|
}
|
|
|
|
var closepage = function () {
|
_pageAutoClose();//自动关闭页面方法
|
}
|
|
|
|
// 保存岗位信息
|
var savePosition = function () {
|
|
|
|
|
//if ($.trim($("#CodeSn").val()) == '') {
|
// toastr.warning("编码不能为空");
|
// return;
|
//}
|
|
|
//if ($.trim($("#Comments").val()) == '') {
|
// toastr.warning("法律名称不能为空");
|
// return;
|
//}
|
|
if ($.trim($("#Classify1").val()) == '') {
|
toastr.warning("质疑事项不能为空");
|
return;
|
}
|
|
|
|
// var data = { id: $("#Id").val(), DocType: $("#DocType").val(), DocDept: $("#DocDept").val(), PublishTime: $("#PublishTime").val(), DocNo: $("#DocNo").val(), DocTitle: $("#DocTitle").val(), DocContent: ueue, DocZtc: $("#DocZtc").val(), Printtimes: $("#Printtimes").val(), DocCsdw: $("#DocCsdw").val(), PrintStatus: $("#PrintStatus").val()}
|
$.ajax({
|
type: "POST",
|
url: "/SysCode/addquestiontypes",
|
dataType: "json",
|
global: false,
|
data: $('form').serializeArray(),
|
success: function (data) {
|
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('成功保存', { icon: 6 });
|
parent.window._reloadPageData1(data.ReturnID);
|
|
_pageAutoClose();//自动关闭页面方法
|
|
//try {
|
// _pageAutoClose();//自动关闭页面方法
|
//}
|
//catch (err) {
|
// parent._CloseTab1("/HrJibengongzi/Edit/");
|
//}
|
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
|
|
|
|
function _pageAutoClose() {
|
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
parent.layer.close(index);
|
return false;
|
}
|
|
|
function addBtn(obj) {
|
var oTr = document.createElement('div');
|
var num = $(obj).data().type;
|
console.log(num)
|
if (num == 2) {
|
$('#addlist_2').append(oTr);
|
$(oTr).html(` <div class="fatiaomeirong" >
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">编码</label>
|
<div class="col-sm-2 col-md-2" style="width:5%;">
|
<input class="form-control" label="编码" name="CodeSns" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="">
|
|
<input type="hidden" name="Id" value="" />
|
|
|
</div>
|
|
|
|
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">法律名称</label>
|
<div class="col-sm-10 col-md-10">
|
|
<select class="form-control" name="Commentss" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in falv)
|
{
|
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
|
|
}
|
|
</select>
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">法条</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="法条" name="Classify2s" labtype="txt" addvisible="true" editvisible="true" maxlength="50" reg="" ismust="flase" type="text" value="">
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">内容</label>
|
<div class="col-sm-10 col-md-10">
|
|
<textarea class="form-control bt" name="Contentss" title="内容" isempty="" maxlength="300" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
|
</div>
|
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;display:none;">
|
<label class="text-right col-sm-1 col-md-1 control-label">排序</label>
|
<div class="col-sm-2 col-md-2" style="width:5%;">
|
<input class="form-control" label="排序" name="Sorts" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="flase" type="text" value="1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
|
|
</div>
|
|
</div>
|
</div>
|
|
`);
|
}
|
}
|
|
function delBtn(obj) {
|
var num = $(obj).data().type;
|
console.log(num)
|
|
if (num == 2) {
|
if ($('#addlist_2').find('.fatiaomeirong').length > 1) {
|
$('#addlist_2').find('.fatiaomeirong:last').remove();
|
}
|
|
}
|
}
|
|
</script>
|
</body>
|
</html>
|