356 lines
14 KiB
Plaintext
356 lines
14 KiB
Plaintext
@using WX.CRM.WebHelper
|
||
@using WX.CRM.WEB.Controllers.Cms
|
||
@{
|
||
/**/
|
||
|
||
/**/
|
||
|
||
ViewBag.Title = "bas_salesDepartment";
|
||
Layout = "~/Views/Shared/_content.cshtml";
|
||
}
|
||
<script src="/Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
||
<link href="/Content/themes/blue/easyui.css" rel="stylesheet" />
|
||
<link href="/Content/Site.css" rel="stylesheet" />
|
||
<script src="/Scripts/common.js"></script>
|
||
<link href="/Content/data_grid_list.css" rel="stylesheet" />
|
||
<script src="/Scripts/op/jquery.rewrite.js"></script>
|
||
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
|
||
|
||
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
</style>
|
||
<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 style="float:right;position:relative;">
|
||
@Html.Action("ToolBarNew", "Control", new
|
||
{
|
||
tool = ViewBag.ToolBar as ToolBar,
|
||
otherToolBars = new ToolBarNew[] {
|
||
new ToolBarNew(){ btnColor="", btnName="上传审核" },
|
||
}
|
||
|
||
})
|
||
|
||
|
||
@*<input class="layui-btn layui-btn-sm layui-btn-normal" data-method="other4" type="button" value="选择客户" />*@
|
||
@*<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="add" type="button" value="+新增" />
|
||
<input class="layui-btn layui-btn-sm layui-btn-normal" data-method="update" type="reset" value="修改" />
|
||
<input class="layui-btn layui-btn-sm layui-btn-reset" data-method="delete" type="reset" value="删除" />*@
|
||
</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" name="title" style="width:120px" />
|
||
</div>
|
||
@{ List<CmsUpController.DeptmentDto> list = ViewBag.deptList; }
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="departmentId">
|
||
<option value="">全部</option>
|
||
@foreach (var item in list)
|
||
{
|
||
<option value="@item.DepartmentId">@item.Title</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
类型:
|
||
<div class="layui-inline">
|
||
<select name="newsType" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="activity">活动</option>
|
||
<option value="plan">策划</option>
|
||
<option value="ad">推广</option>
|
||
<option value="service">客户服务内容</option>
|
||
</select>
|
||
</div>
|
||
审核状态:
|
||
<div class="layui-inline">
|
||
<select name="status" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="0">未审核</option>
|
||
<option value="1">通过</option>
|
||
<option value="-1">未通过</option>
|
||
</select>
|
||
</div>
|
||
修改时间:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="updateTimeFrom" id="updateTimeFrom" style="width:120px;">
|
||
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="结束日" name="updateTimeTo" id="updateTimeTo" style="width:120px;">
|
||
</div>
|
||
审核时间:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="auditTimeFrom" id="auditTimeFrom" style="width:120px;">
|
||
|
||
</div>
|
||
<div class="layui-inline"> <input class="layui-input" placeholder="结束日" name="auditTimeTo" id="auditTimeTo" style="width:120px;"></div>
|
||
<div class="layui-inline">
|
||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search" type="button" value="查询" /><input class="layui-btn layui-btn-sm layui-btn-reset" type="reset" value="清空" />
|
||
</div>
|
||
|
||
</div>
|
||
</form>
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<script>
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#updateTimeFrom' //指定元素
|
||
});
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#updateTimeTo' //指定元素
|
||
});
|
||
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#auditTimeFrom' //指定元素
|
||
});
|
||
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#auditTimeTo' //指定元素
|
||
});
|
||
});
|
||
var selectRow = {};
|
||
var winindex;
|
||
var layer;
|
||
var rowid;
|
||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||
layui.use(['laypage', 'layer', 'table', 'laydate', 'form'], function () {
|
||
var form = layui.form;
|
||
var laydate = layui.laydate;
|
||
layer = layui.layer;
|
||
table = layui.table;
|
||
table.render({
|
||
id: 'listReload'//列表别名ID
|
||
, elem: '#tabl1'
|
||
, url: 'GetHtmlList'
|
||
, method: 'POST'
|
||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
, page: true
|
||
, limit: 30
|
||
, height: "full-160"
|
||
, size: "sm"
|
||
, cols: [[
|
||
{ field: 'ID', title: 'ID', width: 110 }
|
||
, { field: 'NEWSTYPE', title: '类型', templet: '#typeTpl' }
|
||
, { field: 'TITLE', title: '标题' }
|
||
, { field: 'DeptName', title: '部门' }
|
||
, {
|
||
field: 'CONTENT', title: '链接', templet: function (d) {
|
||
if (d.CONTENT) {
|
||
if (d.CONTENT.indexOf("http") == 0) {
|
||
return '<div><a href="' + d.CONTENT + '" target="_blank" class="layui-table-link">' + d.CONTENT + '</a></div>'
|
||
} else {
|
||
return d.CONTENT;
|
||
}
|
||
|
||
} else {
|
||
return "";
|
||
}
|
||
|
||
}
|
||
}
|
||
, { field: 'ATT', title: '附件', width: 80, templet: '#attTpl' }
|
||
, { field: 'CREATEUSERNAME', title: '编辑人' }
|
||
, { field: 'UpdateTime', title: '更新时间' }
|
||
, { field: 'REMARK', title: '内容' }
|
||
, { field: 'CHANNELS', title: '渠道' }
|
||
, { field: 'AUTHOR', title: '作者' }
|
||
, {
|
||
field: 'IsUpload', title: '上传状态', align: "center", width: 80, templet: function (d) {
|
||
if (d.IsUpload) {
|
||
return "<font color='#5FB878'>已上传</font>";
|
||
} else
|
||
return "<font color='#c2c2c2'>未上传</font>";
|
||
}
|
||
}
|
||
, { field: 'STATUS', title: '审核状态', templet: "#statusTpl", align: "center", width: 80 }
|
||
, { field: 'AUDITERNAME', title: '审核人', width: 80 }
|
||
, { field: 'STATUSTIME', title: '审核时间' }
|
||
, { field: 'AUDITREMARK', title: '备注' }
|
||
|
||
, {
|
||
field: 'Log', title: '日志', width: 60, templet: function (d) {
|
||
return "<a href='javascript:ShowLog(" + d.ID + ");' style='color:#01AAED'>日志</a>";
|
||
}
|
||
}
|
||
|
||
]], where: $("#myform").serializeFormJSON()
|
||
});
|
||
//监听行单击事件
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//标注选中样式
|
||
console.log(data);
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
selectRow = data;
|
||
});
|
||
|
||
var active = {
|
||
add: function () {
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/Cms/CmsUP/Edit',
|
||
title: "新增",
|
||
area: ['850px', '500px']
|
||
});
|
||
},
|
||
update: function () {
|
||
if (selectRow.userid == "undefined" || selectRow.ID == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
if (selectRow.STATUS == 1) {
|
||
layer.msg("已审核数据,不能编辑!", { icon: 7 });
|
||
return;
|
||
}
|
||
if (selectRow.UPSTATUS == 1) {
|
||
layer.msg("已上传数据不能编辑,请等待审核!", { icon: 7 });
|
||
return;
|
||
}
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/Cms/CmsUP/Edit?ID=' + selectRow.ID,
|
||
title: "编辑",
|
||
area: ['850px', '500px']
|
||
});
|
||
},
|
||
detail: function () {
|
||
if (selectRow.userid == "undefined" || selectRow.ID == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: '/Cms/CmsUP/Detail?ID=' + selectRow.ID,
|
||
title: "明细",
|
||
area: ['850px', '500px']
|
||
});
|
||
}, other1: function () {
|
||
if (selectRow.userid == "undefined" || selectRow.ID == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
if (selectRow.UPSTATUS == 1) {
|
||
layer.msg("此数据已经上传,勿重复上传!", { icon: 7 });
|
||
return;
|
||
}
|
||
layer.confirm('您确定提交至合规系统检查吗?', {
|
||
offset: '200px'
|
||
}, function (index) {
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "UploadCore",
|
||
data: { ID: selectRow.ID },
|
||
dataType: "json",
|
||
success: function (da) {
|
||
if (da.result == true) {
|
||
parent.layer.msg('操作成功!', { icon: 1 });
|
||
TableReload();
|
||
} else {
|
||
layer.msg(da.retmsg, { icon: 2 });
|
||
}
|
||
},
|
||
error: function () {
|
||
layer.msg('操作失败!', { icon: 2 });
|
||
}
|
||
});
|
||
layer.close(index);
|
||
}
|
||
);
|
||
}, search: function () {
|
||
var param = $("#myform").serializeFormJSON();
|
||
table.reload('listReload', {
|
||
where: param,
|
||
page: {
|
||
curr: 1
|
||
}
|
||
});
|
||
}
|
||
};
|
||
$('.layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
console.log(method);
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
|
||
});
|
||
});
|
||
function ShowLog(id) {
|
||
var width = $(window).width() * 0.8;
|
||
var height = $(window).height() * 0.8;
|
||
layer.open({
|
||
type: 2,
|
||
content: '/Cms/CmsUp/Log?Id=' + id,
|
||
title: "明细",
|
||
area: [width + 'px', height + 'px']
|
||
});
|
||
}
|
||
function Closed() {
|
||
layer.close(winindex);
|
||
}
|
||
function TableReload() {
|
||
table.reload('listReload', {
|
||
|
||
});
|
||
}
|
||
</script>
|
||
<script type="text/html" id="agentTpl">
|
||
{{# if(d.ISOUTERAGENT == '1'){ }}
|
||
是
|
||
{{# } else if(d.ISOUTERAGENT == '0') { }}
|
||
否
|
||
|
||
{{# } }}
|
||
</script>
|
||
|
||
<script type="text/html" id="typeTpl">
|
||
{{# if(d.NEWSTYPE == "activity"){ }}
|
||
活动
|
||
{{# } else if(d.NEWSTYPE == "plan"){ }}
|
||
策划
|
||
{{# } else if(d.NEWSTYPE == "ad"){ }}
|
||
推广
|
||
{{# } else if(d.NEWSTYPE == "service"){ }}
|
||
客户服务内容
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="statusTpl">
|
||
{{# if(d.STATUS == 1){ }}
|
||
<span>通过</span>
|
||
@*<img src="/Content/Images/checked.png" style="height:20px;width:20px;" />*@
|
||
@*<i class="layui-icon layui-icon-ok layui-bg-green"></i>*@
|
||
{{# } else if(d.STATUS == -1) { }}
|
||
<span>未通过</span>
|
||
@*<i class="layui-icon layui-icon-close layui-bg-red"></i>*@
|
||
@*<img src="/Content/Images/unchecked.png" style="height:18px;width:18px;" />*@
|
||
{{# } else { }}
|
||
<span>未审核</span>
|
||
@*<i class="layui-icon layui-icon-more layui-bg-blue"></i>*@
|
||
@*<img src="/Content/Images/checking.png" style="height:16px;width:16px;" />*@
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="attTpl">
|
||
{{# if(d.ATT != null){ }}
|
||
<a href="{{d.ATT}}" target="_blank" class="layui-table-link">下载</a>
|
||
{{# } }}
|
||
</script> |