send.html 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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('send',[],'')}/id/{$id}/mode/{$mode}" class="form-horizontal">
  8. {if $dispatch_type==0 && $two_dispatch_off==1}
  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. <select name="userType" onchange="setType(this.value)" class="form-control">
  13. <option value="0">员工</option>
  14. <option value="1">二级调度</option>
  15. </select>
  16. </div>
  17. </div>
  18. {/if}
  19. <div id="type1" style="display:none">
  20. <div class="form-group">
  21. <label class="col-sm-2 control-label">二级调度<span class="text-danger">*</span></label>
  22. <div class="col-sm-6">
  23. {:widget('common/multiselect',['name'=>'to_roles_id','lists'=>$dispatch_roles,'val'=>[]])}
  24. </div>
  25. </div>
  26. </div>
  27. <div id="type2">
  28. <div class="form-group">
  29. <label class="col-sm-2 control-label">执行人<span class="text-danger">*</span></label>
  30. <div class="col-sm-6">
  31. {:widget('common/user-group-select',['name'=>'to_user_id','lists'=>$user_list,'multi'=>$send_user_num,'val'=>'','msg'=>''])}
  32. </div>
  33. </div>
  34. </div>
  35. {if $mode==1}
  36. <div class="form-group">
  37. <label class="col-sm-2 control-label">报修事项<span class="text-danger">*</span></label>
  38. <div class="col-sm-6">
  39. {:widget('common/select',['name'=>'type_id','lists'=>$order_type_list,'value'=>isset($order_repair) && !empty($order_repair)?$order_repair['type_id']:''])}
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-sm-2 control-label">报修地址</label>
  44. <div class="col-sm-6">
  45. {:widget('common/select',['name'=>'address_id','lists'=>$address_list,'value'=>isset($order_repair) && !empty($order_repair)?$order_repair['address_id']:''])}
  46. </div>
  47. </div>
  48. {/if}
  49. <div class="form-group">
  50. <label class="col-sm-2 control-label">备注</label>
  51. <div class="col-sm-6">
  52. <textarea name="todo_content" class="form-control" cols="30" rows="3" ></textarea>
  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" data-reload="1" target-form="form-horizontal" type="submit">确 定</button>
  59. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  60. </div>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. {/block}
  68. {block name="script"}
  69. <script>
  70. function setType(val) {
  71. if(val==1){
  72. $("#type1").css('display','block')
  73. $("#type2").css('display','none')
  74. }else {
  75. $("#type2").css('display','block')
  76. $("#type1").css('display','none')
  77. }
  78. }
  79. </script>
  80. {/block}