addcompany.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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('addcompany')}" 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="account" value="{$info.account|default=''}">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label">姓名<span class="text-danger">*</span></label>
  17. <div class="col-sm-6">
  18. <input type="text" class="form-control" name="real_name" value="{$info.real_name|default=''}">
  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="password" class="form-control" name="password" placeholder="新增时必填,不修改不用填" value="">
  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="mobile" value="{$info.mobile|default=''}">
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-sm-2 control-label">角色<span class="text-danger">*</span></label>
  35. <div class="col-sm-6">
  36. <select name="rolesId" class="form-control">
  37. <option value="0">选择角色</option>
  38. {volist name="roles" id="v"}
  39. <option value="{$v.id}">{$v.name}</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. {:widget_view('common/cascader2',['name'=>'orgs','lists' => $orgs, 'val' => isset($info['orgs'])&&!empty($info['orgs'])?$info['orgs']:[]])}
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="col-sm-2 control-label">状态</label>
  52. <div class="col-sm-6">
  53. <label class="cr-inline">
  54. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  55. </label>
  56. <label class="cr-inline">
  57. <input type="radio" value="0" name="enable">禁用
  58. </label>
  59. </div>
  60. </div>
  61. <div class="hr-line-dashed"></div>
  62. <div class="form-group">
  63. <div class="col-sm-6 col-sm-offset-2">
  64. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  65. </div>
  66. </div>
  67. </form>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. {/block}
  73. {block name="script"}
  74. <script>
  75. $(document).ready(function(){
  76. formSetValue("enable", {$info.enable|default=1});
  77. formSetValue("rolesId", {$info.roles_id|default=0});
  78. });
  79. </script>
  80. {/block}