add.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <!--<div class="ibox-title">-->
  7. <!--<h5>{$title}</h5>-->
  8. <!--<div class="ibox-tools">-->
  9. <!--<a class="toback" href="{:url('index')}">-->
  10. <!--返回上一页-->
  11. <!--</a>-->
  12. <!--</div>-->
  13. <!--</div>-->
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('add')}" class="form-horizontal">
  16. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label">用户<span class="text-danger">*</span></label>
  19. <div class="col-sm-6">
  20. <select name="user_id" class="form-control">
  21. <option value="">请选择</option>
  22. {foreach $userList as $k=>$v}
  23. <option value="{$v.id}">{$v.real_name}</option>
  24. {/foreach}
  25. </select>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label class="col-sm-2 control-label">开始时间<span class="text-danger">*</span></label>
  30. <div class="col-sm-6">
  31. {:widget_view('common/datepicker',['name'=>'start_time', 'val' => isset($info['start_time'])?$info['start_time']:''])}
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-2 control-label">上下午<span class="text-danger">*</span></label>
  36. <div class="col-sm-6">
  37. <select name="apm1" class="form-control">
  38. <option value="1">上午</option>
  39. <option value="2">下午</option>
  40. </select>
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label class="col-sm-2 control-label">结束时间<span class="text-danger">*</span></label>
  45. <div class="col-sm-6">
  46. {:widget_view('common/datepicker',['name'=>'end_time', 'val' =>isset($info['end_time'])?$info['end_time']:''])}
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="col-sm-2 control-label">上下午<span class="text-danger">*</span></label>
  51. <div class="col-sm-6">
  52. <select name="apm2" class="form-control">
  53. <option value="1">上午</option>
  54. <option value="2">下午</option>
  55. </select>
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label class="col-sm-2 control-label">请假类型<span class="text-danger">*</span></label>
  60. <div class="col-sm-6">
  61. <select name="leave_type" class="form-control">
  62. <option value="1">事假</option>
  63. <option value="2">病假</option>
  64. <option value="3">年假</option>
  65. <option value="4">婚假</option>
  66. <option value="5">产假</option>
  67. <option value="6">丧假</option>
  68. </select>
  69. </div>
  70. </div>
  71. <div class="form-group">
  72. <label class="col-sm-2 control-label">请假天数<span class="text-danger">*</span></label>
  73. <div class="col-sm-6" >
  74. <input type="number" name="days" class="form-control" value="{$info['days']|default=''}">
  75. </div>
  76. </div>
  77. <div class="hr-line-dashed"></div>
  78. <div class="form-group">
  79. <div class="col-sm-6 col-sm-offset-2">
  80. <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
  81. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  82. </div>
  83. </div>
  84. </form>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. {/block}
  90. {block name="script"}
  91. <script>
  92. $(document).ready(function(){
  93. formSetValue("leave_type", {$info.leave_type|default=1});
  94. });
  95. $(document).ready(function(){
  96. formSetValue("user_id", {$info.user_id|default=''});
  97. });
  98. $(document).ready(function(){
  99. formSetValue("apm1", {$info.apm1|default=1});
  100. });
  101. $(document).ready(function(){
  102. formSetValue("apm2", {$info.apm2|default=1});
  103. });
  104. </script>
  105. {/block}