dispatch_add.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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('dispatchAdd',[],'')}/mode/{$mode}?id={$id}" class="form-horizontal">
  8. <div class="form-group">
  9. <label class="col-sm-2 control-label">任务内容<span class="text-danger">*</span></label>
  10. <div class="col-sm-6">
  11. <textarea name="content" class="form-control" cols="30" rows="3" ></textarea>
  12. </div>
  13. </div>
  14. <div class="form-group">
  15. <label class="col-sm-2 control-label">所在科室/部门</label>
  16. <div class="col-sm-6">
  17. {:widget('common/select',['name'=>'dep_id','lists'=>$dep_list,'value'=>$dep_id])}
  18. </div>
  19. </div>
  20. <div class="form-group">
  21. <label class="col-sm-2 control-label">图片</label>
  22. <div class="col-sm-6">
  23. {:widget('common/upimg',['name'=>'images','multi'=>1,'val'=>''])}
  24. </div>
  25. </div>
  26. {if $dispatch_type==0 && $two_dispatch_off==1}
  27. <div class="form-group">
  28. <label class="col-sm-2 control-label">执行人类型<span class="text-danger">*</span></label>
  29. <div class="col-sm-6">
  30. <select name="userType" onchange="setType(this.value)" class="form-control">
  31. <option value="0">员工</option>
  32. <option value="1">二级调度</option>
  33. </select>
  34. </div>
  35. </div>
  36. {/if}
  37. <div id="type1" style="display:none">
  38. <div class="form-group">
  39. <label class="col-sm-2 control-label">二级调度<span class="text-danger">*</span></label>
  40. <div class="col-sm-6">
  41. {:widget('common/multiselect',['name'=>'to_roles_id','lists'=>$dispatch_roles,'val'=>[]])}
  42. </div>
  43. </div>
  44. </div>
  45. <div class="form-group" id="type2">
  46. <label class="col-sm-2 control-label">执行人<span class="text-danger">*</span></label>
  47. <div class="col-sm-6">
  48. {:widget('common/user-group-select',['name'=>'to_user_id','lists'=>$user_list,'multi'=>$send_user_num,'val'=>'','msg'=>''])}
  49. </div>
  50. </div>
  51. {if $mode==1}
  52. <div class="form-group">
  53. <label class="col-sm-2 control-label">报修事项<span class="text-danger">*</span></label>
  54. <div class="col-sm-6">
  55. {:widget('common/select',['name'=>'type_id','lists'=>$order_type_list,'value'=>''])}
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label class="col-sm-2 control-label">报修地址</label>
  60. <div class="col-sm-6">
  61. {:widget('common/select',['name'=>'address_id','lists'=>$address_list,'value'=>isset($address_id)?$address_id:''])}
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label class="col-sm-2 control-label">报修紧急程度<span class="text-danger">*</span></label>
  66. <div class="col-sm-6">
  67. <select name="repair_priority" class="form-control" >
  68. <option value="2">普通</option>
  69. <option value="1">可延缓</option>
  70. <option value="3">紧急</option>
  71. </select>
  72. </div>
  73. </div>
  74. {/if}
  75. <div class="form-group">
  76. <label class="col-sm-2 control-label">备注</label>
  77. <div class="col-sm-6">
  78. <textarea name="todo_content" class="form-control" cols="30" rows="3" ></textarea>
  79. </div>
  80. </div>
  81. <div class="hr-line-dashed"></div>
  82. <div class="form-group">
  83. <div class="col-sm-6 col-sm-offset-2">
  84. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  85. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  86. </div>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. {/block}
  94. {block name="script"}
  95. <script>
  96. function setType(val) {
  97. if(val==1){
  98. $("#type1").css('display','block')
  99. $("#type2").css('display','none')
  100. }else {
  101. $("#type2").css('display','block')
  102. $("#type1").css('display','none')
  103. }
  104. }
  105. </script>
  106. {/block}