<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header">招聘信息</div>
				<div class="layui-card-body" pad15>

					<div class="layui-form layui-form-pane" lay-filter="LAY-demand-demandform-edit">

						<input type="hidden" name="id" value="{$data['id']}">
						<div class="layui-form-item">
							<label class="layui-form-label"><span style="color:#f90c05;">*</span>订单标题</label>
							<div class="layui-input-block">
								<input type="text" name="title" value="{$data['title']}" lay-verify="required" readonly
								 autocomplete="off" class="layui-input">
							</div>
						</div>

						<div class="layui-form-item" pane>
							<label class="layui-form-label">状态</label>
							<div class="layui-input-block">
								<input type="radio" name="status" value="2" title="待审核" <?php if($data['status'] == 2):?>checked<?php endif;?>>
								<?php if($data['status'] == 3):?>
								  <input type="radio" name="status" value="3" title="已上架" checked>
								<?php endif;?>

								<input type="radio" name="status" value="4" title="已停招" <?php if($data['status'] == 4):?>checked<?php endif;?>>
								<input type="radio" name="status" value="5" title="已下架" <?php if($data['status'] == 5):?>checked<?php endif;?>>
							</div>
						</div>

						<div class="layui-form-item">
							<div class="layui-input-block">
								<input type="button" lay-submit lay-filter="LAY-demand-demandform-edit-submit" value="确认提交" class="layui-btn">
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
</div>


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

		form.on('submit(LAY-demand-demandform-edit-submit)', function(obj) {
			var index = parent.layer.getFrameIndex(window.name);
			admin.req({
				url: setter.baseWorkerUrl + 'demand/editDemandStatus',
				data: obj.field,
				type: 'post',
				done: function(res) {
					layer.msg("提交成功", {
						icon: 1
					});
					parent.layui.table.reload('LAY-demand-demandlist-table'); //重载表格
					parent.layer.close(index);
				}
			});
		});
	});
</script>
