258 lines
9.8 KiB
Plaintext
258 lines
9.8 KiB
Plaintext
|
||
@using CRM.Core.Model.Entity
|
||
@using Core.Web.WebHelper
|
||
@using CRM.Core.BLL.Util
|
||
@{
|
||
/**/
|
||
|
||
ViewBag.Title = "CheckNoticeManage";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
}
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
|
||
.showMsg {
|
||
margin-left: 20px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.hidden {
|
||
display: none;
|
||
}
|
||
|
||
.layui-table-cell {
|
||
height: auto !important;
|
||
font-size: 14px;
|
||
padding: 0 5px;
|
||
overflow: visible;
|
||
text-overflow: inherit;
|
||
white-space: normal;
|
||
word-break: break-all;
|
||
}
|
||
</style>
|
||
<div class="x-body">
|
||
<div class="layui-btn-group" style="padding-bottom:10px;">
|
||
@Html.Action("ToolBar", "Home",
|
||
new
|
||
{
|
||
area = "",
|
||
rightcode = (ViewBag.rightCode as string),
|
||
otherToolBars = new Core.Web.WebHelper.ToolBar[] {
|
||
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other1, "查看通知单", "" ,"",true),
|
||
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other2, "查看处罚单", "" ,"",true),
|
||
}
|
||
}
|
||
)
|
||
</div>
|
||
<form id="mytoolbar">
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="slt_toDept" style="height:35px;">
|
||
<option value="">全部</option>
|
||
@{
|
||
List<DeptmentDto> list = ViewBag.companyList;
|
||
foreach (var item in list)
|
||
{
|
||
<option value="@item.Id">@item.Title</option>
|
||
}
|
||
}
|
||
</select>
|
||
</div>
|
||
违规编号:
|
||
<div class="layui-inline">
|
||
<input type="text" class="layui-input" name="txt_noticeNo" />
|
||
</div>
|
||
时间:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="txt_stime" id="start" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="截止日" name="txt_etime" id="end" style="width:120px;">
|
||
</div>
|
||
<button class="layui-btn" type="button" id="search" data-type="reload">搜索</button>
|
||
<button class="layui-btn layui-btn-reset" id="reset" type="reset">清空</button>
|
||
</form>
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
</div>
|
||
<script src="~/Scripts/layui_ext/xm-select/xm-select.js"></script>
|
||
<script>
|
||
var selectRow = {};
|
||
var layer;
|
||
var flow;
|
||
var accessories = [];
|
||
var token;
|
||
var table;
|
||
var winindex;
|
||
var statuss = @Html.Raw(Json.Encode(ViewBag.Status));
|
||
layui.use(['table', 'form', 'layer', 'upload', 'laydate', 'flow', 'element'], function () {
|
||
flow = layui.flow;
|
||
|
||
table = layui.table;
|
||
var form = layui.form;
|
||
form.render('select');
|
||
layer = layui.layer;
|
||
var upload = layui.upload;
|
||
var laydate = layui.laydate;
|
||
var element = layui.element;
|
||
|
||
laydate.render({ elem: '#start' });
|
||
laydate.render({ elem: '#end' });
|
||
|
||
table.render({
|
||
id: 'liveAuditList',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: '/ComplianceOrder/CheckNoticeManageList',
|
||
method: 'POST',
|
||
cols: [[
|
||
{ field: 'numbers', type: 'numbers', width: 80 }
|
||
,{ field: 'NoticeNo', title: '违规通知单', width: 120 }
|
||
, { field: 'NoticeCtime', title: '违规通知时间', width: 160 }
|
||
, { field: 'FromDeptName', title: '发出部门', width: 160 }
|
||
, { field: 'ToDeptName', title: '业务部', width: 160 }
|
||
, {
|
||
field: 'Content', title: '内容', width: 300, templet: function (d) {
|
||
return d.Content;
|
||
}
|
||
}
|
||
, { field: 'NoticeCreatorName', title: '创建人', width: 160 }
|
||
, {
|
||
field: 'Hg_CheckQuality_NoticeSigns', width: 200 , title: '确认人', templet: function (d) {
|
||
var html = "<div>合规负责人:{hg}</div><div>责任人:{sale}</div><div>责任人主管:{manage}</div>";
|
||
//var html = "<div>合规负责人:{hg}</div><div>责任人:{sale}</div><div>责任人主管:{manage}</div><div>中心负责人:{zx}</div>";
|
||
if (d.Hg_CheckQuality_NoticeSigns) {
|
||
$(d.Hg_CheckQuality_NoticeSigns).each(function (index, value) {
|
||
if (value.Sign)
|
||
html = html.replace("{" + value.NoticeLevel + "}", value.Name + " <font color='green'>已确认</font>");
|
||
else
|
||
html = html.replace("{" + value.NoticeLevel + "}", value.Name + " <font color='#999'>未确认</font>");
|
||
});
|
||
}
|
||
html=html.replace("{sale}", "未确认");
|
||
html=html.replace("{manage}", "未确认");
|
||
html=html.replace("{hg}", "未确认");
|
||
//html=html.replace("{zx}", "未确认");
|
||
return html;
|
||
}
|
||
}
|
||
, { field: 'operation', title: '操作', templet: '#toolbar', width: 170 }
|
||
, { field: 'PunishNo', title: '处罚单号', width: 160 }
|
||
, { field: 'PunishContent', title: '处罚内容', width: 160 }
|
||
, { field: 'PunishCreatorName', title: '处罚单创建人', width: 160 }
|
||
, { field: 'PunishCtime', title: '处罚单时间', width: 160 }
|
||
|
||
]]
|
||
, page: {
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
|
||
//,curr: 5 //设定初始在第 5 页
|
||
, groups: 5 //只显示 1 个连续页码
|
||
}
|
||
, where: GetParams("mytoolbar")
|
||
});
|
||
|
||
$('#mytoolbar #search').on('click', function (data) {
|
||
table.reload('liveAuditList', {
|
||
page: { curr: 1 },
|
||
where: GetParams("mytoolbar")
|
||
});
|
||
});
|
||
//监听行按钮事件
|
||
table.on('tool(tabl1)', function (obj) {
|
||
var id = obj.data.id;
|
||
var layEvent = obj.event;
|
||
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
if (layEvent === 'other1') {
|
||
LookNoticeShow(obj);
|
||
}else if (layEvent === 'other2') {
|
||
LookCFShow(obj);
|
||
}
|
||
selectRow = obj.data;
|
||
});
|
||
var active = {
|
||
add: function () {
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/ComplianceOrder/AddCheckNotice?mytoken=' + parent._mytoken,
|
||
area: ['850px', '600px'],
|
||
title: "添加违规通知单"
|
||
});
|
||
},
|
||
edit: function () {
|
||
if (selectRow.id === "undefined" || selectRow.id == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/ComplianceOrder/EditCheckNotice?id=' + selectRow.id +'&mytoken=' + parent._mytoken,
|
||
area: ['850px', '600px'],
|
||
title: "编辑违规通知单"
|
||
});
|
||
},
|
||
delete: function () {
|
||
if (selectRow.id === "undefined" || selectRow.id == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.confirm('确定要删除吗?', { icon: 3 }, function () {
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "DelCheckNotice",
|
||
data: { id: selectRow.id },
|
||
dataType: "json",
|
||
success: function (da) {
|
||
if (da.result == true) {
|
||
layer.msg('删除成功!', { icon: 1 });
|
||
TableReload();
|
||
} else {
|
||
layer.msg(da.retmsg, { icon: 2 });
|
||
}
|
||
},
|
||
error: function () {
|
||
layer.msg('操作失败!', { icon: 2 });
|
||
}
|
||
});
|
||
}, function () {
|
||
});
|
||
}
|
||
};
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
selectRow = data;
|
||
});
|
||
//监听行单击事件(单击事件为:rowDouble)
|
||
$('.layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
//console.log(method);
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
});
|
||
|
||
});
|
||
function LookCFShow(obj) {
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/ComplianceOrder/ShowCFD?id=' + obj.data.id + '&mytoken=' + parent._mytoken,
|
||
area: ['950px', '650px'],
|
||
title: "查看处罚单"
|
||
});
|
||
}
|
||
function LookNoticeShow(obj) {
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/ComplianceOrder/LookNoticeShow?id=' + obj.data.id + '&mytoken=' + parent._mytoken,
|
||
area: ['950px', '650px'],
|
||
title: "查看违规通知单"
|
||
});
|
||
}
|
||
function Closed() {
|
||
layer.close(winindex);
|
||
}
|
||
function TableReload() {
|
||
table.reload('liveAuditList', {
|
||
});
|
||
}
|
||
</script> |