91 lines
4.0 KiB
Plaintext
91 lines
4.0 KiB
Plaintext
@{
|
|
ViewBag.Title = "AddCheckNotice";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
}
|
|
@model CRM.Core.BLL.Wx.Hg_CheckQuality_Notice
|
|
@using Core.Web.WebHelper
|
|
<script type="text/javascript" charset="gbk" src="~/ueditor/ueditor.config.js"></script>
|
|
<script type="text/javascript" charset="gbk" src="~/ueditor/ueditor.all.js"></script>
|
|
<div class="x-body">
|
|
<iframe style="width:100%;height:500px;" frameborder="0" id="iframe1" src="ShowTZD?id=@Html.Raw(Model.id)"></iframe>
|
|
|
|
<div style="border-top: 1px solid #f0f0f0;padding-top:10px">
|
|
@if (Core.Web.WebHelper.UserRight.UserRightsHelper.hasRight(RightsConfig.CONST_违规通知单合规负责人确认))
|
|
{
|
|
<button id="save" type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">合规负责人确认</button>
|
|
}
|
|
@if (Core.Web.WebHelper.UserRight.UserRightsHelper.hasRight(RightsConfig.CONST_违规处罚单添加))
|
|
{
|
|
<button id="add" type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="wxs">添加/修改处罚单</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
@{ var hg = Model.Hg_CheckQuality_NoticeSigns.FirstOrDefault(m => m.NoticeLevel == "hg" && m.Sign == 1);
|
|
string hgContent = hg == null ? "" : hg.Opinion;
|
|
string hgName = hg == null ? "" : hg.Name;
|
|
}
|
|
<div style="display:none" id="madeo">@Html.Raw(hgContent)</div>
|
|
<div style="display:none" id="madeo2">@Html.Raw(Model.PunishContent)</div>
|
|
<script>
|
|
layui.use(['form', 'laydate'], function () {
|
|
var form = layui.form
|
|
, layer = layui.layer;
|
|
form.on('submit(formDemo)', function (data) {
|
|
layer.prompt({ title: '请输入您的意见', formType: 2, value: $("#madeo").html() }, function (value, index, elem) {
|
|
if (value === '') return elem.focus();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "AddNoticeOption",
|
|
data: { id:@Html.Raw(Model.id), opinion: value},
|
|
dataType: "json",
|
|
success: function (da) {
|
|
if (da.result == true) {
|
|
layer.msg('提交成功!', { icon: 1 });
|
|
window.parent.TableReload();
|
|
window.location.href = window.location.href;//刷新当前页面
|
|
} else {
|
|
layer.msg(da.retmsg, { icon: 2 });
|
|
}
|
|
},
|
|
error: function () {
|
|
layer.msg('操作失败!', { icon: 2 });
|
|
}
|
|
});
|
|
// 关闭 prompt
|
|
layer.close(index);
|
|
});
|
|
|
|
return false;
|
|
});
|
|
|
|
form.on('submit(wxs)', function (data) {
|
|
layer.prompt({ title: '请输入处罚内容', formType: 2, value: $("#madeo2").html()}, function (value, index, elem) {
|
|
if (value === '') return elem.focus();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "AddQualityPunish",
|
|
data: { id:@Html.Raw(Model.id), content: value},
|
|
dataType: "json",
|
|
success: function (da) {
|
|
if (da.result == true) {
|
|
layer.msg('提交成功!', { icon: 1 });
|
|
window.parent.TableReload();
|
|
window.location.href = window.location.href;//刷新当前页面
|
|
//$("#iframe1").attr("src", $("#iframe1").attr("src"));//刷新赋值
|
|
} else {
|
|
layer.msg(da.retmsg, { icon: 2 });
|
|
}
|
|
},
|
|
error: function () {
|
|
layer.msg('操作失败!', { icon: 2 });
|
|
}
|
|
});
|
|
// 关闭 prompt
|
|
layer.close(index);
|
|
});
|
|
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|