ComplianceServer/oldcode/Core.Web/Views/Lecturer/Index.cshtml

221 lines
7.4 KiB
Plaintext

@using Core.Web.WebHelper
@using Core.Web.Controllers
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<style>
.layui-table-cell {
height: 60px;
}
</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 ToolBar[]
{
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other1, "审批", "layui-btn-danger" ,"",true),
}
})
</div>
<form class="layui-form">
<div id="mytoolbar">
业务部:
<div class="layui-inline">
<div id="selectDeptId" style="width: 300px"></div>
</div>
发布状态
<div class="layui-inline">
<select name="txt_Status" style="height:35px;">
<option value="">全部</option>
<option value="1">启用</option>
<option value="0">未启用</option>
</select>
</div>
审批状态:
<div class="layui-inline">
<select name="txt_Checkstatus" style="height:35px;">
<option value="">全部</option>
<option value="10">新增</option>
<option value="20">变更</option>
<option value="40">驳回</option>
<option value="60" selected="selected">提审</option>
<option value="100">通过</option>
<option value="-100">终止</option>
</select>
</div>
姓名:
<div class="layui-inline">
<input type="text" name="txt_Name" class="layui-input">
</div>
驳回理由:
<div class="layui-inline">
<div id="selectChannel" style="width: 300px"></div>
</div>
审核人:
<div class="layui-inline">
<div id="selectOperator" style="width: 300px"></div>
</div>
<div style="float: right;">
<button class="layui-btn layui-btn-normal" style="width:100px;" type="button" id="search" data-type="reload">搜索</button>
<button class="layui-btn layui-btn-normal" style="width: 100px; margin-left: 10px !important;" type="reset">重置</button>
</div>
</div>
</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 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: '#TimeFrom'});
laydate.render({ elem: '#TimeTo' });
table.render({
id: 'liveAuditList',//列表别名ID
elem: '#tabl1',//表ID
url: '/Lecturer/GetListHtml',
method: 'POST',
cols: [[
{ field: 'id', title: 'ID', width: 80 }
, { field: 'title', title: '艺名', width: 100 }
, { field: 'name', title: '姓名', width: 100 }
, { field: 'DeptName', title: '业务部', width: 180 }
,{
field: 'img', title: '操作', templet: function (d) {
return '<img style="height:40px" src="'+d.img+'" />';
}
}
, { field: 'statusName', title: '启用状态', width: 150 }
, { field: 'issacName', title: '在职状态', width: 100 }
, { field: 'checkstatusName', title: '合规状态', width: 100 }
, { field: 'operation', title: '操作', templet: '#toolbar', width: 100 }
]]
, 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;
console.log(obj);
if (layEvent === 'other1') {
ComplianceStatus(id);
}
});
});
var optionsOpertor= {
el: '#selectOperator',
name: 'txt_Eid',//表单的name属性
layVerify: '',
tips: '请选择',
toolbar: {//工具条,全选,清空,反选,自定义
show: true,
list: [
'CLEAR'
]
},
data: []
};
var selectOpertor = xmSelect.render(optionsOpertor);
var allOperator = @Html.Raw(ViewBag.allOperator);
selectOpertor.update({ data: allOperator });
var optionsCompany = {
el: '#selectDeptId',
name: 'txt_DeptId',//表单的name属性
layVerify: '',
tips: '请选择',
toolbar: {//工具条,全选,清空,反选,自定义
show: true,
list: [
'CLEAR'
]
},
data: []
};
var selectCompany = xmSelect.render(optionsCompany);
var allCompany = @Html.Raw(ViewBag.companyList);
selectCompany.update({ data: allCompany });
var optionsChannel = {
el: '#selectChannel',
name: 'txt_reason',//表单的name属性
layVerify: '',
tips: '请选择',
toolbar: {//工具条,全选,清空,反选,自定义
show: true,
list: [
'CLEAR'
]
},
data: []
};
var selectChannel = xmSelect.render(optionsChannel);
var allChannel = @Html.Raw(ViewBag.AllChannel);
selectChannel.update({ data: allChannel });
function ComplianceStatus(id) {
var content = '审批';
winindex = layer.open({
title: content,
type: 2,
content: '/Lecturer/ComplianceStatus?id=' + id,
area: ['95%', '80%']
});
}
function selectReset(value) {
selectChannel.setValue(value);
}
function ShowPlayBack(scheduleId) {
var width = $(window).width() * 0.8;
var height = $(window).height() * 0.8;
layer.open({
type: 2,
content: '/LiveAudit/PlayBack?Id=' + scheduleId,
title: "审核管理",
area: [width+'px', height+'px']
});
}
$("#reset").on('click', function (data) {
});
function TableReload() {
table.reload('liveAuditList', {
});
}
</script>