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

261 lines
9.5 KiB
Plaintext

@using Core.Web.WebHelper
@using Core.Web.Controllers
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<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),
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other2, "播中检查", "layui-btn-danger" ,"",true),
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other3, "播后质检", "layui-btn-danger" ,"",true),
}
})
</div>
<form class="layui-form">
<div id="mytoolbar">
业务部:
<div class="layui-inline">
<div class="layui-inline">
<div id="selectDeptId" style="width: 300px"></div>
</div>
</div>
直播时间:
<div class="layui-inline">
<input class="layui-input" placeholder="开始日" name="txt_starttime" id="start" style="width:120px;">
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止日" name="txt_endtime" id="end" style="width:120px;">
</div>
直播用途
<div class="layui-inline">
<select name="txt_Usetype" style="height:35px;">
<option value="">全部</option>
<option value="1">投放引流</option>
<option value="2">活动营销</option>
<option value="3">售后服务</option>
</select>
</div>
播前报备:
<div class="layui-inline">
<select name="txt_BeforeStatus" style="height:35px;">
<option value="40,60,100">全部</option>
<option value="40">驳回</option>
<option value="60" selected="selected">提审</option>
<option value="100">通过</option>
</select>
</div>
播中检查
<div class="layui-inline">
<select name="txt_DuringStatus" style="height:35px;">
<option value="">全部</option>
<option value="0">未检</option>
<option value="100">正常</option>
<option value="110">瑕疵</option>
</select>
</div>
播后质检
<div class="layui-inline">
<select name="txt_AfterStatus" style="height:35px;">
<option value="">全部</option>
<option value="0">未录</option>
<option value="10">已录</option>
<option value="40">驳回</option>
<option value="60">提审</option>
<option value="100">通过</option>
<option value="110">违规</option>
<option value="120">瑕疵</option>
</select>
</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('laydate', function () {
var laydate = layui.laydate;
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
});
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: '/LivePlan/GetListHtml',
method: 'POST',
cols: [[
{ field: 'id', title: 'ID', width: 50 }
, { field: 'title', title: '直播主题', width: 150 }
, { field: 'deptments', title: '授权部门', width: 150 }
, { field: 'DeptName', title: '业务部', width: 150 }
, { field: 'usetypeStr', title: '直播用途', width: 150 }
, { field: 'scenetypeStr', title: '类型', width: 120 }
, { field: 'scene', title: '直播场景', width: 150 }
, { field: 'zbtime', title: '直播时间', width: 180 }
, { field: 'duration', title: '直播时长(单位:分)', width: 120 }
, { field: 'beforeStatusStr', title: '播前报备', width: 120 }
, { field: 'duringStatusStr', title: '播中检查', width: 120 }
, { field: 'afterStatusStr', title: '播后质检', width: 120 }
, { field: 'operation', title: '操作', fixed: 'right', templet: '#toolbar', width: 300 }
]]
, 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,1);
} else if (layEvent === 'other2') {
ComplianceStatus(id, 2);
} else if (layEvent === 'other3') {
ComplianceStatus(id, 3);
}
});
});
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, type) {
var content = '播前审批';
if (type == 1) {
content = '播前审批';
} else if (type == 2) {
content = '播中检查';
} else {
content = '播后质检';
}
winindex = layer.open({
title: content,
type: 2,
content: '/LivePlan/ComplianceStatus?id=' + id + '&type=' + type,
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>