add.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-content">
  7. <form method="post" action="{:url('add')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  9. <div class="form-group">
  10. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  11. <div class="col-sm-6">
  12. <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label">类型</label>
  17. <div class="col-sm-6">
  18. {:widget_view('common/multiselect',['name'=>'types','lists' => $types, 'val' => isset($info)?$info['types']:[]])}
  19. </div>
  20. </div>
  21. <div class="form-group">
  22. <label class="col-sm-2 control-label">设备编号</label>
  23. <div class="col-sm-6">
  24. <input type="text" class="form-control" name="sn" value="{$info.sn|default=''}">
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-sm-2 control-label">备注</label>
  29. <div class="col-sm-6">
  30. <input type="text" class="form-control" name="remark" value="{$info.remark|default=''}">
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-sm-2 control-label">所在科室/部门</label>
  35. <div class="col-sm-6">
  36. <select name="dep_id" class="form-control">
  37. <option value="0">选择科室/部门</option>
  38. {volist name="dep" id="v"}
  39. <option {if isset($info) && $info.dep_id==$v.id} selected {/if} value="{$v.id}">{$v.title}</option>
  40. {/volist}
  41. </select>
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-sm-2 control-label">状态</label>
  46. <div class="col-sm-6">
  47. <label class="cr-inline">
  48. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  49. </label>
  50. <label class="cr-inline">
  51. <input type="radio" value="0" name="enable">禁用
  52. </label>
  53. </div>
  54. </div>
  55. <div class="hr-line-dashed"></div>
  56. <div class="form-group">
  57. <div class="col-sm-6 col-sm-offset-2">
  58. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  59. </div>
  60. </div>
  61. </form>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. {/block}
  67. {block name="script"}
  68. <script>
  69. $(document).ready(function(){
  70. formSetValue("enable", {$info.enable|default=1});
  71. });
  72. </script>
  73. {/block}