wxzadd.html 5.6 KB

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