Mini.Crm/Mini.Web/Areas/Admin/Views/OutHHuser/User_extuserList3.cshtml

107 lines
4.1 KiB
Plaintext

@{
ViewData["Title"] = "User_extuserList";
Layout = "~/Areas/Admin/Views/Shared/_content.cshtml";
}
<style>
.x-body {
padding: 20px;
}
</style>
<div class="x-body">
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
<br />
<table class="layui-hide" id="tabl2" lay-filter="tabl2"></table>
</div>
<script>
var lauidata = @Html.Raw(ViewBag.data);
var lauiRoomData = @Html.Raw(ViewBag.roomData);//群
layui.use('table', function () {
var table = layui.table;
table.render({
id: 'wxmessagelist',//列表别名ID
elem: '#tabl1',//表ID
data: lauidata,
page: false,
limit: 500,
cols: [
[{
field: 'nn', title: '<i class="layui-icon layui-icon-login-wechat" style="font-size: 16px; color: #319041;"></i> 单人聊天', colspan: 5
}]
,
[
{ field: 'corpname', title: '企微主体' }
, { field: 'name', title: '微信昵称' }
, { field: 'extuserid', title: '客户ID' }
, { field: 'deptname', title: '事业部' }
, { field: 'isDeal', title: '成交状态' }
, { field: 'isUnfollow', title: '取关状态' }
, { field: 'eidInfo', title: '员工' }
, { field: 'uname', title: '员工企微名称' }
, { field: 'userid', title: '员工企微ID' }
, { field: 'action', title: '查看', templet: '#actionTpl' }
]
],
});
table.render({
id: 'room',//列表别名ID
elem: '#tabl2',//表ID
data: lauiRoomData,
cols: [[{
field: 'nn', title: '<i class="layui-icon layui-icon-group" style="font-size: 16px; color: #4374a7;"></i> 群聊', colspan: 5
}]
, [
{ field: 'roomid', title: '群ID' }
, { field: 'roomname', title: '群名称' }
, { field: 'ctimestr', title: '时间' }
, { field: 'action', title: '查看', templet: '#actionTpl2' }
]],
});
});
function showMessage(corpid, name, extuserid, uname, userid) {
//alert(username);
//alert(jobwxusername);
//alert(companycode);
var ext_flag = "@Html.Raw($"&ext_flag={Mini.Common.Utility.EncryptUrlEncode(Mini.Common.Utility.ConvertDateTimeLong(DateTime.Now).ToString()).ToString()}")";
var url = "MessageDetial?isgroup=false&corp=" + corpid + "&nickname=" + name + "&customer=" + extuserid + "&uname=" + uname + "&eid=@Html.Raw(ViewBag.eid)" + "&userid=" + userid + "&IsHg=@Html.Raw(ViewBag.isHg)" + ext_flag;
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
title: '微信聊天信息',
type: 2,
content: url,
area: ['90%', '90%']
});
});
}
function showGroup(corpid, roomid) {
//alert(username);
//alert(jobwxusername);
//alert(companycode);
var url = "GroupRoom?isgroup=true&corp=" + corpid + "&roomid=" + roomid + "&IsHg=@Html.Raw(ViewBag.isHg)";
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
title: '企业微信群聊天记录',
type: 2,
content: url,
area: ['90%', '90%']
});
});
}
</script>
<script type="text/html" id="actionTpl">
{{# if(d.isOutDept!=1){ }}
<a href="javascript:void(0)" onclick="showMessage('{{d.corpid}}','{{encodeURIComponent(d.name.replace(/'/g,""))}}','{{d.extuserid}}','{{encodeURIComponent(d.uname.replace(/'/g,""))}}','{{d.userid}}')" style="color:red">查看</a>
{{# }else{ }}
<span></span>
{{# } }}
</script>
<script type="text/html" id="actionTpl2">
<a href="javascript:void(0)" onclick="showGroup('{{d.corp}}','{{d.roomid}}')" style="color:red">查看</a>
</script>