335 lines
12 KiB
Plaintext
335 lines
12 KiB
Plaintext
@using CRM.Core.Model.Entity
|
||
@using Core.Web.WebHelper
|
||
@{
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
}
|
||
<style>
|
||
.hgguanjianci {
|
||
background-color: #FF9800;
|
||
color: white;
|
||
}
|
||
</style>
|
||
|
||
<div class="x-body">
|
||
<div class="layui-btn-group" style="padding-bottom:10px;">
|
||
@*<button class="layui-btn layui-btn-normal" data-method="add">新增</button>
|
||
<button class="layui-btn layui-btn-normal" data-method="edit">编辑</button>
|
||
<button class="layui-btn layui-btn-danger" data-method="delete">删除</button>
|
||
<button class="layui-btn layui-btn-normal" data-method="other1"><i class="layui-icon"></i>分配角色</button>*@
|
||
@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, "已处理", "layui-btn-normal" ,"layui-icon-ok"),
|
||
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Other2, "标记违规", " layui-btn-danger" ,"layui-icon-auz"),}
|
||
}
|
||
)
|
||
</div>
|
||
<div id="mytoolbar">
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="txt_deptcodes" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
@foreach (var item in ViewBag.companyList as List<Bas_CompanyVirtual>)
|
||
{
|
||
<option value="@item.CompanyCode">@item.CompanyName</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
数据ID:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_id" placeholder="数据ID" class="layui-input" style="width:120px;">
|
||
</div>
|
||
客户微信:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_kefuusername" placeholder="微信用户名" class="layui-input">
|
||
</div>
|
||
客服微信:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_kefuusername" placeholder="微信用户名" class="layui-input">
|
||
</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>
|
||
处理状态:
|
||
<div class="layui-inline">
|
||
<select name="slt_hgstatus" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="0" selected>未处理</option>
|
||
<option value="1">已处理</option>
|
||
</select>
|
||
</div>
|
||
违规情况:
|
||
<div class="layui-inline">
|
||
<select name="slt_iswg" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="0" selected>未违规</option>
|
||
<option value="1">已违规</option>
|
||
</select>
|
||
</div>
|
||
|
||
<button class="layui-btn" data-type="reload">搜索</button>
|
||
</div>
|
||
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
</div>
|
||
<script>
|
||
var selectRow = {};
|
||
var layer;
|
||
var table;
|
||
var winindex;
|
||
|
||
|
||
layui.use(['table', 'laydate'], function () {
|
||
layer = layui.layer;
|
||
table = layui.table
|
||
, laydate = layui.laydate;
|
||
|
||
laydate.render({
|
||
elem: '#start'
|
||
});
|
||
|
||
laydate.render({
|
||
elem: '#end'
|
||
});
|
||
|
||
table.render({
|
||
id: 'testReload',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: 'ReCordList',
|
||
method: 'POST',
|
||
cols: [[
|
||
|
||
{ type: 'checkbox' }
|
||
//,{ field: 'numbers', title: '编号', type: "numbers" }
|
||
, { field: 'id', title: 'ID', width: 80, event: 'ChooseRow' }
|
||
, {
|
||
field: 'detpcode', title: '事业部', width: 150, templet: function (d) {
|
||
return $("[name='txt_deptcodes'] option[value='" + d.detpcode + "']").html();
|
||
}
|
||
}
|
||
, { field: 'resid', title: '客户ID', event: 'ChooseRow' }
|
||
, { field: 'customername', title: '客户姓名', event: 'ChooseRow' }
|
||
, {
|
||
field: 'transcontent', title: '内容', width: '35%', event: 'ChooseRow', templet: function (d) {
|
||
var ss = d.word.split('|');
|
||
var content = d.transcontent;
|
||
$(ss).each(function (index, ada) {
|
||
console.log(ada)
|
||
let reg = RegExp(ada, "g")
|
||
content = content.replace(reg, "<span class=\"hgguanjianci\">" + ada + "</span>");
|
||
});
|
||
return content;
|
||
}
|
||
}, {
|
||
field: 'voiceurl', title: '操作', width: 80, event: 'ChooseRow', templet: function (d) {
|
||
return "<a href='javascript:PalyRecord(\"" + d.voiceurl + "\")' style='color:#01AAED;' >播放</a>";
|
||
}
|
||
}
|
||
, { field: 'saleseid', title: '客服工号', event: 'ChooseRow' }
|
||
, { field: 'salename', title: '客服名称', event: 'ChooseRow' }
|
||
, { field: 'ctime', title: '时间', event: 'ChooseRow' }
|
||
, { field: 'word', title: '违规关键词', event: 'ChooseRow' }
|
||
, {
|
||
field: 'hgstatus', title: '处理情况', width: 80, event: 'ChooseRow', templet: function (d) {
|
||
if (d.hgstatus == 1) {
|
||
return "<font color='#5FB878'>已处理</font>";
|
||
} else {
|
||
return "<font color='#cccccc'>未处理</font>";
|
||
}
|
||
}
|
||
}
|
||
, {
|
||
field: 'iswg', title: '违规情况', width: 80, event: 'ChooseRow', templet: function (d) {
|
||
if (d.iswg == 1) {
|
||
return "<font color='#FF5722'>已违规</font>";
|
||
} else {
|
||
return "<font color='#5FB878'>未违规</font>";
|
||
}
|
||
}
|
||
}
|
||
|
||
]]
|
||
, page: {
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
|
||
, groups: 5 //只显示 1 个连续页码
|
||
}, where: GetParams("mytoolbar")
|
||
});
|
||
|
||
$('#mytoolbar .layui-btn').on('click', function (data) {
|
||
var param = GetParams("mytoolbar");
|
||
console.log(param);
|
||
table.reload('testReload', {
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
},
|
||
where: param
|
||
});
|
||
});
|
||
|
||
|
||
//监听行单击事件
|
||
//table.on('row(tabl1)', function (obj) {
|
||
// var data = obj.data;
|
||
// obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
// selectRow = data;
|
||
//});
|
||
|
||
|
||
//监听行单击事件(单击事件为:rowDouble)
|
||
table.on('tool(tabl1)', function (obj) {
|
||
console.log(obj);
|
||
var data = obj.data;
|
||
if (obj.event === 'ChooseRow') {
|
||
obj.tr.find(".layui-form-checkbox").click();
|
||
}
|
||
});
|
||
table.on('checkbox(tabl1)', function (obj) {
|
||
console.log(obj);
|
||
if (obj.type == "one") {
|
||
obj.tr.toggleClass('self-table-click');//.siblings().removeClass('self-table-click');
|
||
}
|
||
else if (obj.type == "all") {
|
||
$(".x-body table tbody tr").removeClass("self-table-click")
|
||
if (obj.checked) {
|
||
$(".x-body table tbody tr").addClass("self-table-click")
|
||
}
|
||
}
|
||
|
||
});
|
||
|
||
|
||
var active = {
|
||
other1: function () {
|
||
var checkStatus = table.checkStatus("testReload");
|
||
var ids = [];
|
||
var hasHG = false;
|
||
|
||
$.each(checkStatus.data, function (i, j) {
|
||
if (j.hgstatus == 1) {
|
||
hasHG = true;
|
||
}
|
||
ids.push(j.id);
|
||
});
|
||
if (checkStatus.data.length <= 0) {
|
||
layer.msg("请勾选要执行的记录!");
|
||
return;
|
||
}
|
||
console.log(ids);
|
||
layer.confirm('确定将勾选数据修改成已处理?', { icon: 3, title: '提示' }, function (index) {
|
||
layer.close(index);
|
||
//console.log(ids);
|
||
//已读
|
||
$.r_post('ReCordReadComplete', { ids }, function (rsp) {
|
||
if (rsp.result) {
|
||
var refresh = $(".layui-laypage-refresh");
|
||
if (refresh.length == 0) {
|
||
$("#search").click();
|
||
}
|
||
else {
|
||
refresh[0].click();
|
||
}
|
||
layer.msg('操作成功!', { icon: 1 });
|
||
}
|
||
else {
|
||
//layer.msg('操作失败!' + rsp.retmsg, { icon: 2 });
|
||
layer.alert(rsp.retmsg);
|
||
}
|
||
});
|
||
});
|
||
},
|
||
other2: function () {
|
||
var checkStatus = table.checkStatus("testReload");
|
||
var ids = [];
|
||
var hasWGRow = false;
|
||
$.each(checkStatus.data, function (i, j) {
|
||
if (j.iswg == 1) {
|
||
hasWGRow = true;
|
||
return false;
|
||
}
|
||
ids.push(j.id);
|
||
});
|
||
if (checkStatus.data.length <= 0) {
|
||
layer.msg("请勾选要执行的记录!");
|
||
return;
|
||
}
|
||
if (hasWGRow == true) {
|
||
layer.msg("无法重复标记违规!");
|
||
return;
|
||
}
|
||
var idstr = ids.toString();
|
||
console.log(ids);
|
||
winindex = layer.open({
|
||
type: 2,
|
||
content: 'ReCordHg?ids=' + idstr,
|
||
area: ['500px', '600px']
|
||
});
|
||
}
|
||
};
|
||
|
||
$('.layui-btn-group .layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
});
|
||
|
||
});
|
||
function PalyRecord(url) {
|
||
//$.get(url, function (result) {
|
||
// if (result.result) {
|
||
// var data = result.retmsg;
|
||
// if (data != '') {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '播放语音',
|
||
type: 1,
|
||
content: '<video src=' + url + ' controls autoplay />',
|
||
area: ['300px', '200px']
|
||
});
|
||
});
|
||
// }
|
||
// else {
|
||
// layer.alert("未能找到文件");
|
||
// }
|
||
|
||
// } else {
|
||
// layer.alert("转换失败,请稍后重试!");
|
||
// }
|
||
//});
|
||
}
|
||
layui.use('layer', function () {
|
||
|
||
});
|
||
function Closed() {
|
||
layer.close(winindex);
|
||
}
|
||
function TableReload() {
|
||
selectRow = {};
|
||
table.reload('testReload', {
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
}
|
||
});
|
||
}
|
||
</script>
|
||
<script type="text/html" id="auditTpl">
|
||
{{# if(d.ISDISMISS == '0'){ }}
|
||
<font color="#07b10c">在职</font>
|
||
{{# } else { }}
|
||
<font color="#aba5a5">离职</font>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="gender">
|
||
{{# if(d.GENDER == 'm'){ }}
|
||
男
|
||
{{# } else if(d.GENDER == 'f'){ }}
|
||
女
|
||
{{# } }}
|
||
|
||
</script> |