<?php
$row = db()->get_table(MOD, $_GET['id']);
$row['addtime'] = date("Y-d-d H:i:s", $row['addtime']);
?>
<div class="layuimini-main">
  <div class="layui-form layuimini-form">
    <div class="layui-form-item">
      <label class="layui-form-label">姓名</label>
      <div class="layui-input-block">
        <input type="text" name="name" lay-verify="required" placeholder="" value="<?= $row['name'] ?>" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">联系电话</label>
      <div class="layui-input-block">
        <input type="text" name="tel" placeholder="" value="<?= $row['tel'] ?>" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">提交时间</label>
      <div class="layui-input-block">
        <input type="text" disabled placeholder="" value="<?= $row['addtime'] ?>" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">需求金额</label>
      <div class="layui-input-block">
        <input type="text" name="money" placeholder="" value="<?= $row['money'] ?>" class="layui-input">
      </div>
    </div>
		<div class="layui-form-item">
      <label class="layui-form-label">抵押物品描述</label>
      <div class="layui-input-block">
        <textarea type="text" name="goods" placeholder="" class="layui-textarea"><?= $row['goods'] ?></textarea>
      </div>
    </div>
		<div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-block">
        <textarea type="text" name="remarks" placeholder="" class="layui-textarea"><?= $row['remarks'] ?></textarea>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">排序</label>
      <div class="layui-input-block">
        <input type="text" name="sort" lay-verify="required|number" lay-reqtext="" placeholder="" value="<?= $row['sort'] ? $row['sort'] : 0 ?>" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <input type="hidden" value="<?= $row['id'] ?>" name="id">
        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
      </div>
    </div>

  </div>
</div>
<script>
  layui.use(['form', 'table'], function() {
    var form = layui.form,
      layer = layui.layer,
      table = layui.table,
      $ = layui.jquery;

    /**
     * 初始化表单，要加上，不然刷新部分组件可能会不加载
     */
    form.render();

    // 当前弹出层，防止ID被覆盖
    var parentIndex = layer.index;



  });
</script>