<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-form layui-form-pane  layui-card-header layuiadmin-card-header-auto" lay-filter="LAY-user-userlist-search">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">姓名/手机号</label>
					<div class="layui-input-block">
						<input type="text" name="keywords" placeholder="请输入..." autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">经纪人</label>
					<div class="layui-input-block">
						<select name="brokerid" lay-search>
							<option value="">全部经纪人（可搜索）</option>
							{volist name="brokerlist" id="vo"}
							<option value="{$vo.id}">{$vo.title}</option>
							{/volist}
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<select name="status">
							<option value="">全部状态</option>
							<option value="1">待审核</option>
							<option value="2">待面试</option>
							<option value="3">已入职</option>
							<option value="4">无效报务</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<button class="layui-btn" lay-submit lay-filter="LAY-user-userlist-search-btn">
						<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
					</button>
				</div>
			</div>
		</div>

		<div class="layui-card-body">
			<table id="LAY-user-userlist-table" lay-filter="LAY-user-userlist-table"></table>
			<script type="text/html" id="comjobsTpl">
				{{d.comjobsid == 0 ? '' : d.comjobs.title}}
			</script>
			<script type="text/html" id="brokerTpl">
				{{d.brokerid == 0 ? '' : d.broker.title}}
			</script>
			<script type="text/html" id="setTpl">
				<!--<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="comjobs"><i class="layui-icon layui-icon-rate-half"></i>岗位信息</a>-->
			</script>
		</div>

	</div>
</div>

<script>
	layui.config({
		base: '/static/echoui/' //静态资源所在路径
	}).extend({
		index: 'lib/index' //主入口模块
	}).use(['index', 'form', 'set', 'table'], function() {
		var $ = layui.$,
				setter = layui.setter,
				admin = layui.admin,
				form = layui.form,
				table = layui.table;
		form.render();

		table.render({
			elem: '#LAY-user-userlist-table',
			url: setter.baseAgentUrl + 'comjobs/listReport',
			cols: [
				[
					{ field: 'id', width: 80, title: '表ID', sort: true },
					{ field: 'comjobs', title: '岗位名称', templet: '#comjobsTpl' },
					{ field: 'broker', title: '顾问', templet: '#brokerTpl' },
					{ field: 'realname', title: '姓名' },
					{ field: 'mobile', title: '手机号' },
					{ field: 'idcard', title: '身份证号' },
					{ field: 'arrivetime', title: '预计到达时间' },
					{ field: 'status_text', title: '状态', minWidth: 100, align: 'center' },
					{ field: 'remark', title: '备注信息', minWidth: 100, align: 'center' },
					{ field: 'retremark', title: '反馈备注', minWidth: 100, align: 'center' },
					{ field: 'createtime', title: '报备时间', width: 170, sort: true },
					// { title: '操作', minWidth: 120, align: 'center', fixed: 'right', toolbar: '#setTpl' }
				]
			],
			page: true,
			limit: 50,
			cellMinWidth: 200,
			text: '对不起，加载出现异常！'
		});

		form.on('submit(LAY-user-userlist-search-btn)', function(data) {
			table.reload('LAY-user-userlist-table', {
				where: data.field,
				page: {
					curr: 1
				}
			});
		});

		table.on('tool(LAY-user-userlist-table)', function(obj) {
			var data = obj.data;
			if (obj.event === 'comjobs') {


			}
		});

	});
</script>

</body>
</html>
