173 lines
5.9 KiB
Plaintext
173 lines
5.9 KiB
Plaintext
@using Mini.Web.WebHelper;
|
||
@{
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Areas/Admin/Views/Shared/_content.cshtml";
|
||
}
|
||
<style>
|
||
.redColor {
|
||
color: red;
|
||
}
|
||
|
||
.displayLi {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<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;">
|
||
</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="name" id="txt_name" required lay-verify="required" placeholder="ID/名称/备注" autocomplete="off" class="layui-input">
|
||
<input type="hidden" name="userid" value="@Html.Raw(ViewBag.userid)" />
|
||
<input type="hidden" name="corp" value="@Html.Raw(ViewBag.corp)" />
|
||
</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="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!--确定宽度-->
|
||
|
||
<script>
|
||
var table;
|
||
$(function () {
|
||
//var tempwidth = 1410;
|
||
//var tempheight = 1115;
|
||
//var width = $(window).width();
|
||
//var height = Math.ceil(width * (tempheight / tempwidth));
|
||
//$("body").height($(window).height() + 150);
|
||
|
||
//$(window).resize(function () {//自动适应大小
|
||
// console.log("resize");
|
||
// table.resize('tab_kefuzhuangtaiyi1');
|
||
//});
|
||
});
|
||
</script>
|
||
<script>
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#start' //指定元素
|
||
});
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#end' //指定元素
|
||
});
|
||
});
|
||
var selectRow = {};
|
||
var winindex;
|
||
var layer;
|
||
var rowid;
|
||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||
layui.use('element', function () {
|
||
var element = layui.element;
|
||
element.on('tab(tonghuajiankong)', function (n) {
|
||
$(".bodytable").addClass("hidden");
|
||
$("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
|
||
});
|
||
element.on('tab(maintab)', function (n) {
|
||
if (n.index == 0)
|
||
$("#bottomcard").removeClass("hidden");
|
||
else
|
||
$("#bottomcard").addClass("hidden");
|
||
});
|
||
});
|
||
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
|
||
var laydate = layui.laydate;
|
||
layer = layui.layer;
|
||
table = layui.table;
|
||
table.render({
|
||
id: 'listReload'//列表别名ID
|
||
, elem: '#tab_kefuzhuangtaiyi1'
|
||
, url: 'GetOuterHtmlList'
|
||
, method: 'POST'
|
||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
, page: false
|
||
//, limit: 30
|
||
, height: "full-160"
|
||
, size:"sm"
|
||
, cols: [[
|
||
{ field: 'numbers', type: 'numbers' }
|
||
, { field: 'external_userid', title: 'ID' }
|
||
, { field: 'name', title: '名称' }
|
||
, { field: 'remark', title: '备注' }
|
||
, { field: 'createtime', title: '时间', width: 130 }
|
||
, { field: 'remark_mobiles', title: '备注号码' }
|
||
]]
|
||
, where: $("#myform").serializeFormJSON()
|
||
});
|
||
//监听行单击事件(单击事件为:rowDouble)
|
||
table.on('row(wochao)', 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 () {
|
||
$(".displayLi").each(function (i, n) {
|
||
$(this).removeClass("displayLi");
|
||
});
|
||
$(".redColor").each(function (i, n) {
|
||
$(this).after($(this).attr("ntitle"));
|
||
$(this).remove();
|
||
});
|
||
var txt = $.trim($("#txt_name").val());
|
||
if (txt == "")
|
||
return;
|
||
|
||
$(".layui-table tbody tr").each(function () {
|
||
var html = $(this).html();
|
||
console.log(html);
|
||
html = html.replace(txt, "<b ntitle=\"" + txt + "\" class=\"redColor\">" + txt + "</b>");
|
||
$(this).html(html);
|
||
if (html.indexOf("redColor") == -1) {
|
||
$(this).addClass("displayLi");
|
||
}
|
||
});
|
||
}
|
||
};
|
||
$('.layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
|
||
});
|
||
});
|
||
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>
|
||
|