171 lines
7.2 KiB
Plaintext
171 lines
7.2 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "Index";
|
||
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;">
|
||
<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;">
|
||
<input class="layui-btn layui-btn-sm layui-btn-normal" type="button" data-method="distribute" id="distribute" value="资源分配">
|
||
<input class="layui-btn layui-btn-sm layui-btn-normal" style="display:none" type="button" data-method="close" id="close" 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" style="width:400px;">
|
||
@Html.Action("UserComBox", "Control")
|
||
</div>*@
|
||
企微:
|
||
<div class="layui-inline">
|
||
<select name="QwStatus">
|
||
<option value="1">未加微信</option>
|
||
<option value="0">已加微信</option>
|
||
</select>
|
||
</div>
|
||
软件:
|
||
<div class="layui-inline">
|
||
<select name="RjStatus">
|
||
<option value="1">未登录</option>
|
||
<option value="0">已登录</option>
|
||
</select>
|
||
</div>
|
||
活动:
|
||
<div class="layui-inline">
|
||
<input type="checkbox" name="TkStatus" title="听课">
|
||
</div>
|
||
日期:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="stime" id="start" value="@System.DateTime.Now.ToString("yyyy-MM-dd")" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="截止日" name="etime" id="end" value="@System.DateTime.Now.ToString("yyyy-MM-dd")" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search" id="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="tab1" lay-filter="tab1"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!--确定宽度-->
|
||
|
||
<script>
|
||
function onLoadSucced() { }
|
||
</script>
|
||
<script>
|
||
var ids = [];
|
||
|
||
layui.use(['laypage', 'layer', 'table', 'laydate', 'form'], function () {
|
||
var form = layui.form;
|
||
var laydate = layui.laydate;
|
||
var layer = layui.layer;
|
||
var table = layui.table;
|
||
|
||
laydate.render({ elem: '#start', value: new Date() });
|
||
|
||
laydate.render({ elem: '#end', value: new Date() });
|
||
|
||
table.render({
|
||
id: 'tab1'//列表别名ID
|
||
, elem: '#tab1'
|
||
, url: 'AllocateRes3'
|
||
, method: 'POST'
|
||
, page: true
|
||
, limit: 50
|
||
, cols: [[
|
||
{ type: 'checkbox' }
|
||
, { field: 'ResId', title: '客户ID', templet: '#aTpl' }
|
||
, { field: 'QwStatus', title: '企微', templet: function (res) { if (res.QwStatus == 0) return "已加微信"; else if (res.QwStatus == 1) return "未加微信"; else return "未知"; } }
|
||
, { field: 'RjStauts', title: '软件', templet: function (res) { if (res.RjStauts == 0) return "已登录"; else if (res.RjStauts == 1) return "未登录"; else return "未知"; } }
|
||
, { field: 'Eid', title: '工号' }
|
||
, { field: 'UName', title: '姓名' }
|
||
, { field: 'LastActiveTime', title: '最后工单时间' }
|
||
, { field: 'LastCallTime', title: '最后通话时间' }
|
||
, { field: 'DisTime', title: '分配时间' }
|
||
, { field: 'CTime', title: '创建时间' }
|
||
]]
|
||
, page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||
layout: ['count', 'prev', 'page', 'next', 'refresh'] //自定义分页布局
|
||
//,curr: 5 //设定初始在第 5 页
|
||
, groups: 5 //只显示 1 个连续页码
|
||
|
||
}
|
||
, where: $("#myform").serializeFormJSON()
|
||
});
|
||
//监听行单击事件(单击事件为:rowDouble)
|
||
table.on('row(tab1)', function (obj) {
|
||
var data = obj.data;
|
||
//console.log(data);
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
selectRow = data;
|
||
});
|
||
|
||
var active = {
|
||
search: function () {
|
||
//alert($("#myform").serialize());
|
||
//console.log($("#myform").serialize());
|
||
//console.log($("#myform").serializeFormJSON());
|
||
var param = $("#myform").serializeFormJSON();
|
||
table.reload('tab1', {
|
||
where: param,
|
||
page: { curr: 1 }
|
||
});
|
||
},
|
||
distribute: function () {
|
||
var para = $("#myform").serialize();
|
||
|
||
ids.length = 0;
|
||
|
||
var checkStatus = table.checkStatus("tab1");
|
||
|
||
$.each(checkStatus.data, function (i, j) {
|
||
ids.push(j.ResId);
|
||
});
|
||
|
||
//console.log(ids);
|
||
|
||
var url = 'Distbute3?' + para;
|
||
|
||
if (ids.length > 0) {
|
||
url += "&length=" + ids.length;
|
||
}
|
||
|
||
layer.open({
|
||
type: 2,
|
||
content: url,
|
||
area: ['900px', '600px']
|
||
});
|
||
},
|
||
close: function () {
|
||
layer.closeAll();
|
||
}
|
||
};
|
||
|
||
$('.layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
//console.log(method);
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
|
||
});
|
||
});
|
||
</script>
|
||
<script type="text/html" id="aTpl">
|
||
{{# if(d.ResId != ''){ }}
|
||
<a href="javascript:parent.parent.ChildAddTab('客户详细', '/Csvr/CustomerInfo/CustomerDetail?resid={{d.ResId}}' , '')" class="layui-table-link">{{d.ResId}}</a>
|
||
{{# } }}
|
||
</script> |