TG.WXCRM.V4/WEB/Views/Hg/MyCheckNoticeIndex.cshtml

200 lines
7.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@{
/**/
ViewBag.Title = "违规通知单";
Layout = "~/Views/Shared/_content.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="layui-fluid" style="padding-left:0px;padding-top:10px;">
<div class="layui-card" id="topcard" style="width:100%;padding-top:10px;">
<div class="layui-card-header layui-self-header">
<div style="float:left;position:relative;">
违规通知单
</div>
<div class="hrclass" style="position:relative;float: left;"></div>
</div>
<div class="layui-card-body " id="contentBody">
<form class="layui-form selftopwhere" id="myform">
<div class="layui-form-item">
违规编号:
<div class="layui-inline">
<input type="text" class="layui-input" name="noticeNo" />
</div>
时间:
<div class="layui-inline">
<input class="layui-input" placeholder="开始日" name="stime" id="start" style="width:120px;">
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止日" name="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>
</div>
</form>
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
</div>
</div>
</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;
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: '/Hg/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>");
});
}
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("myform")
});
$('#topcard #search').on('click', function (data) {
table.reload('liveAuditList', {
page: { curr: 1 },
where: GetParams("myform")
});
});
function GetParams(formId) {
return $("#" + formId).serializeFormJSON();
}
//监听行按钮事件
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 = data;
});
var active = {
add: function () {
winindex = layer.open({
type: 2,
content: 'AddCheckNotice?mytoken=' + parent._mytoken,
area: ['850px', '600px'],
title: "添加违规通知单"
});
}
};
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
//监听行单击事件单击事件为rowDouble
});
function LookCFShow(obj) {
winindex = layer.open({
type: 2,
content: 'ShowCFD?id=' + obj.data.id + '&mytoken=' + parent._mytoken,
area: ['950px', '650px'],
title: "查看处罚单"
});
}
function LookNoticeShow(obj) {
winindex = layer.open({
type: 2,
content: 'LookNoticeShow?id=' + obj.data.id + '&mytoken=' + parent._mytoken,
area: ['950px', '650px'],
title: "查看违规通知单"
});
}
function Closed() {
layer.close(winindex);
}
function TableReload() {
table.reload('liveAuditList', {});
}
</script>
<script type="text/html" id="toolbar">
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="other1">查看通知单</a>
{{# if(d.PunishNo){ }}
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="other2">查看处罚单</a>
{{# } }}
</script>