|
|
|
@ -79,12 +79,12 @@
|
|
|
|
|
{<div class="form-control" style="border-color:transparent;padding-left:0;">
|
|
|
|
|
@if (isCheck)
|
|
|
|
|
{
|
|
|
|
|
@Html.Editor(prop.PropertyName, uihit)
|
|
|
|
|
@Html.Editor(checkedProp.PropertyName)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<div class="form-control" style="border-color:transparent;padding-left:0;">
|
|
|
|
|
@Html.Hidden(prop.PropertyName)
|
|
|
|
|
@Html.Hidden(checkedProp.PropertyName)
|
|
|
|
|
@Html.Display(checkedProp.PropertyName, "Bool")
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
@ -118,20 +118,43 @@
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
<div class="col-sm-4"> </div>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
@if (Model != null)
|
|
|
|
|
@if (User.IsInRole("城中区教育局管理员"))
|
|
|
|
|
{
|
|
|
|
|
if (new string[] { "未提交", "审核失败" }.Contains(Model.CheckStatus))
|
|
|
|
|
@if (Model.CheckStatus == "审核成功")
|
|
|
|
|
{
|
|
|
|
|
<button class="btn btn-primary" type="submit">保存</button>
|
|
|
|
|
<button id="submitCheckRequest" type="button" class="btn btn-primary">提交审核</button>
|
|
|
|
|
<button id="super" type="button" class="btn btn-primary">退回</button>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (User.IsInRole("学校管理员"))
|
|
|
|
|
{
|
|
|
|
|
@if (Model.CheckStatus == "待审核")
|
|
|
|
|
{
|
|
|
|
|
<button id="admin1" type="button" class="btn btn-primary">审核通过</button>
|
|
|
|
|
<button id="admin2" type="button" class="btn btn-primary">审核失败</button>
|
|
|
|
|
}
|
|
|
|
|
@if (Model.RequestEditStatus == "已申请")
|
|
|
|
|
{
|
|
|
|
|
<button id="admin3" type="button" class="btn btn-primary">批准修改申请</button>
|
|
|
|
|
}
|
|
|
|
|
else if (Model.RequestEditStatus == "已申请")
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<button id="admin4" type="button" class="btn btn-primary">拒绝修改申请</button>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@if (User.Identity.Name == Model.LoginName)
|
|
|
|
|
{
|
|
|
|
|
if (Model.CheckStatus == "未提交" || Model.CheckStatus == "审核失败")
|
|
|
|
|
{
|
|
|
|
|
<button id="cancelModifyRequest" type="button" class="btn btn-primary">取消申请</button>
|
|
|
|
|
<button class="btn btn-primary" type="submit">保存</button>
|
|
|
|
|
<button id="submitCheckRequest" type="button" class="btn btn-primary">提交审核</button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (new string[] { "待审核", "审核成功" }.Contains(Model.CheckStatus))
|
|
|
|
|
if (Model.RequestEditStatus == "已申请")
|
|
|
|
|
{
|
|
|
|
|
<button id="cancelModifyRequest" type="button" class="btn btn-primary">取消申请</button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<button id="submitModifyRequest" type="button" class="btn btn-primary">申请修改</button>
|
|
|
|
|
}
|
|
|
|
@ -146,17 +169,97 @@
|
|
|
|
|
</div>
|
|
|
|
|
@section scripts{
|
|
|
|
|
<script>
|
|
|
|
|
function submit(msg, func) {
|
|
|
|
|
Swal.fire({
|
|
|
|
|
text: msg,
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
showCancelButton: true
|
|
|
|
|
}).then(function (value) {
|
|
|
|
|
if (value.isConfirmed) {
|
|
|
|
|
func();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
//用户操作
|
|
|
|
|
//提交审核
|
|
|
|
|
$('#submitCheckRequest').click(function () {
|
|
|
|
|
$('#CheckStatus').val('待审核');
|
|
|
|
|
$(this).parents('form').submit();
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#CheckStatus').val('待审核');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//申请修改
|
|
|
|
|
$('#submitModifyRequest').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#RequestEditStatus').val('已申请');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//取消申请
|
|
|
|
|
$('#cancelModifyRequest').click(function () {
|
|
|
|
|
$('#RequestEditStatus').val('未申请');
|
|
|
|
|
$(this).parents('form').submit();
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#RequestEditStatus').val('未申请');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
$('#submitModifyRequest').click(function () {
|
|
|
|
|
$('#RequestEditStatus').val('已申请');
|
|
|
|
|
$(this).parents('form').submit();
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
//批准申请修改
|
|
|
|
|
$('#super').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#CheckStatus').val('未提交');
|
|
|
|
|
$('#RequestEditStatus').val('未申请');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//审核成功
|
|
|
|
|
$('#admin1').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#Comment').val('');
|
|
|
|
|
$('#CheckStatus').val('审核成功');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//审核失败
|
|
|
|
|
$('#admin2').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#CheckStatus').val('审核失败');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//批准修改申请
|
|
|
|
|
$('#admin3').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#CheckStatus').val('未提交');
|
|
|
|
|
$('#RequestEditStatus').val('未申请');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
//拒绝修改申请
|
|
|
|
|
$('#admin4').click(function () {
|
|
|
|
|
var form = $(this).parents('form');
|
|
|
|
|
var msg = '确认' + $(this).text() + '?';
|
|
|
|
|
submit(msg, function () {
|
|
|
|
|
$('#RequestEditStatus').val('未申请');
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|