add.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. {if condition="isset($info) and $info['type'] eq 2"}
  10. <div class="form-group" style="display: none;">
  11. <label class="col-sm-2 control-label">账号<span class="text-danger">*</span></label>
  12. <div class="col-sm-6">
  13. <input type="text" class="form-control" name="account" value="{$info.account|default=''}">
  14. </div>
  15. </div>
  16. {else /}
  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. <input type="text" class="form-control" name="account" value="{$info.account|default=''}">
  21. </div>
  22. </div>
  23. {/if}
  24. <div class="form-group">
  25. <label class="col-sm-2 control-label">姓名<span class="text-danger">*</span></label>
  26. <div class="col-sm-6">
  27. <input type="text" class="form-control" name="real_name" value="{$info.real_name|default=''}">
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-sm-2 control-label">密码</label>
  32. <div class="col-sm-6">
  33. <input type="password" autocomplete="off" class="form-control" name="password" placeholder="新增时必填,不修改不用填" value="">
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label class="col-sm-2 control-label">手机号</label>
  38. <div class="col-sm-6">
  39. <input type="text" class="form-control" name="mobile" value="{$info.mobile|default=''}">
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-sm-2 control-label">所在科室/部门<span class="text-danger">*</span></label>
  44. <div class="col-sm-6">
  45. <select name="depId" class="form-control">
  46. <option value="0">选择科室/部门</option>
  47. {volist name="deps" id="v"}
  48. <option value="{$v.id}">{$v.title}</option>
  49. {/volist}
  50. </select>
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label class="col-sm-2 control-label">角色<span class="text-danger">*</span></label>
  55. <div class="col-sm-6">
  56. <select name="rolesId" class="form-control">
  57. <option value="0">选择角色</option>
  58. {volist name="roles" id="v"}
  59. <option value="{$v.id}">{$v.title}</option>
  60. {/volist}
  61. </select>
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label class="col-sm-2 control-label">护士站始发空间</label>
  66. <div class="col-sm-6">
  67. {:widget('common/select',['name'=>'addr_id','lists'=>$address,'value'=>isset($info.addr_id)?$info.addr_id:""])}
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label class="col-sm-2 control-label">排序</label>
  72. <div class="col-sm-6">
  73. <input type="number" class="form-control" name="sort" value="{$info.sort|default='0'}">
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label class="col-sm-2 control-label">状态</label>
  78. <div class="col-sm-6">
  79. <label class="cr-inline">
  80. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  81. </label>
  82. <label class="cr-inline">
  83. <input type="radio" value="0" name="enable">禁用
  84. </label>
  85. </div>
  86. </div>
  87. <div class="hr-line-dashed"></div>
  88. <div class="form-group">
  89. <div class="col-sm-6 col-sm-offset-2">
  90. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  91. </div>
  92. </div>
  93. </form>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. {/block}
  99. {block name="script"}
  100. <script>
  101. $(document).ready(function(){
  102. formSetValue("enable", {$info.enable|default=1});
  103. formSetValue("depId", {$info.dep_id|default=0});
  104. formSetValue("rolesId", {$info.roles_id|default=0});
  105. });
  106. </script>
  107. {/block}