history_update.blade.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
  4. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  5. {{--<link href="{{asset('js/plugins/bootstrap-select-1.13.5/css/bootstrap-select.min.css')}}" rel="stylesheet">--}}
  6. <link rel="stylesheet"
  7. href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
  8. @endsection
  9. @section('content')
  10. <body class="gray-bg">
  11. <div class="wrapper wrapper-content animated fadeInRight">
  12. <div class="row">
  13. <div class="col-sm-12">
  14. <div class="ibox float-e-margins">
  15. <div class="ibox-content">
  16. <form method="get" class="form-horizontal" id="form">
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label" for="nickname">完成时间:</label>
  19. <div class="col-sm-6">
  20. <input type="hidden" id="id" name="id" value="{{$flowPlan->id??''}}">
  21. <input type="text" class="form-control" id="done_date" name="done_date"
  22. autocomplete="off"
  23. value="{{$flowPlan->done_date??''}}">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-sm-2 control-label" for="username_new">
  28. 事项:</label>
  29. <div class="col-sm-6">
  30. <input type="text" class="form-control" id="title" name="title"
  31. value="{{$flowPlan->title??''}}" autocomplete="off">
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-2 control-label" for="username_new">
  36. 临时人员:</label>
  37. <div class="col-sm-6">
  38. <input type="text" class="form-control" id="username" name="username"
  39. value="{{$flowPlan->username??''}}" autocomplete="off">
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-sm-2 control-label" for="type">编内人员:</label>
  44. <div class="col-sm-8">
  45. <select name="user_ids" class="my-select" multiple
  46. data-container="body" data-live-search="true">
  47. @foreach($userList as $user)
  48. <option value="{{$user['id']}}"
  49. @if(is_array($flowPlan->user_ids??'') && in_array($user['id'],$flowPlan->user_ids)) selected @endif>
  50. {{$user['nickname']}}
  51. 【{{\App\Http\Models\FlowInfoTpl::RoleScope[$user['role_id']]??''}}】
  52. </option>
  53. @endforeach
  54. </select>
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <label class="col-sm-2 control-label" for="username_new">
  59. 备注:</label>
  60. <div class="col-sm-6">
  61. <input type="text" class="form-control" id="remark" name="remark"
  62. value="{{$flowPlan->remark??''}}">
  63. </div>
  64. </div>
  65. <div class="form-group">
  66. <div class="col-sm-4 col-sm-offset-2">
  67. <button class="btn btn-primary" type="button" data-id="{{$flowPlan->id??0}}"
  68. id="save">
  69. 保存
  70. </button>
  71. <button class="btn btn-white" type="button" id="cancel">取消</button>
  72. </div>
  73. </div>
  74. </form>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </body>
  81. @endsection
  82. @section('footer')
  83. <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
  84. <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
  85. <script>
  86. $(function () {
  87. $(".my-date").trigger('click'); //触发laydate绑定
  88. $('.my-select').selectpicker();
  89. });
  90. $(document).on('click', '#cancel', function () {
  91. tips.closeParentLayer();
  92. });
  93. $(document).on('click', '#save', function () {
  94. var user_ids = $("[name=user_ids]").val();
  95. var data = tips.getFormValues('#form');
  96. data.user_ids = user_ids;
  97. var url = '/admin/flow-plan-history-update/' + 0;
  98. var type = 'get';
  99. var ajaxConfig = {
  100. url: url,
  101. type: type,
  102. data: data,
  103. success: function (result) {
  104. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  105. tips.closeParentLayer();
  106. });
  107. }
  108. };
  109. tips.ajax(ajaxConfig);
  110. });
  111. </script>
  112. @endsection