124 lines
4.2 KiB
Plaintext
124 lines
4.2 KiB
Plaintext
@{
|
||
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>
|
||
<style type="text/css">
|
||
.xm-option {
|
||
line-height: 30px;
|
||
}
|
||
#txtoldId{
|
||
line-height:16px;
|
||
}
|
||
.layui-table-page{
|
||
display:none;
|
||
}
|
||
.layui-table-view{
|
||
height:100% !important;
|
||
}
|
||
</style>
|
||
<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:280px;">
|
||
<textarea id="txtoldId" cols="90" rows="7" name="txtoldId" style="width:280px;height:300px;"></textarea>
|
||
</div>
|
||
<label style="color: red; margin-left: 29px; ">*一行输入一个工号</label>
|
||
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<div class=" my_form_iterm">
|
||
<input onclick="searchPeople()" type="button" class="layui-btn layui-btn-sm layui-border-blue" value="查询">
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<span id="msgCount"></span>
|
||
<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>
|
||
<div class="layui-form-item">
|
||
<div class="my_form_iterm">
|
||
<input onclick="addPeople()" type="button" class="layui-btn layui-btn-sm layui-border-blue" value="确认添加">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
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: '#tab_kefuzhuangtaiyi1'
|
||
, url: 'SearchEmployeeIndex'
|
||
, method: 'POST'
|
||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
, page: false
|
||
, limits: Number.MAX_VALUE
|
||
, height: "full-160"
|
||
//, size:"sm"
|
||
, cols: [[
|
||
{ field: 'checkobj', type: 'checkbox',fixed:'left'}
|
||
, { field: 'Eid', title: '工号' }
|
||
, { field: 'Uname', title: '姓名' }
|
||
, { field: 'DeptName', title: '组别' }
|
||
]], where: $("#myform").serializeFormJSON()
|
||
,
|
||
done: function (res, curr, count) {
|
||
$('#msgCount').html(res.msg);
|
||
}
|
||
});
|
||
var num = -1;
|
||
//监听行单击事件(单击事件为:rowDouble)
|
||
table.on('row(wochao)', function (obj) {
|
||
var data = obj.data;
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
selectRow = data;
|
||
});
|
||
form.on('select(corp_deptid)', function (data) {
|
||
console.log(data);
|
||
let mydeptid = "";
|
||
$(mydata.filter(m => m.corpid == data.value)).each(function (is, sw) {
|
||
mydeptid = sw.deptid;
|
||
});
|
||
$("#deptid").val(mydeptid);
|
||
});
|
||
});
|
||
function TableReload() {
|
||
var param = $("#myform").serializeFormJSON();
|
||
table.reload('listReload', {
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
},
|
||
where: param
|
||
});
|
||
}
|
||
function searchPeople() {
|
||
TableReload();
|
||
}
|
||
function addPeople() {
|
||
var checkdata = table.checkStatus('listReload');
|
||
var uidata = checkdata.data;
|
||
if (uidata.length == 0) {
|
||
layer.msg("请至少选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
var postdata = "";
|
||
for (var i = 0; i < uidata.length; i++) {
|
||
postdata += uidata[i].Eid +','
|
||
}
|
||
postdata = postdata.substr(0, postdata.length - 1);
|
||
parent.addEid(postdata);
|
||
|
||
layer.msg("操作成功", { icon: 1 });
|
||
}
|
||
</script>
|
||
|
||
|