_process_logs.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <div>
  2. @if( \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') ||
  3. \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-商家编辑') ||
  4. \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-承运商编辑'))
  5. <div class="add-btn"
  6. style="position: absolute;display: none;margin-top: -35px;z-index: 51"
  7. :id="'AddProcessLogBtn'+item.pending_detail.id">
  8. <button type="button" class="btn btn-primary"
  9. @click="showAddDiv('addWorkOrderProcessLogForm'+item.pending_detail.id)">新
  10. </button>
  11. </div>
  12. <div class="addLogDiv row m-0 p-0 form-group" style="display: none;"
  13. :id="'addWorkOrderProcessLogForm'+item.pending_detail.id">
  14. <input type="hidden" name="id" :value="item.pending_detail.id">
  15. <div style="width: 45px"></div>
  16. <div class="form-inline m-2">
  17. <input type="text" name="content" :id="'addWorkOrderProcessLogFormInput_'+item.pending_detail.id"
  18. class="form-control m-0 p-0"
  19. style="width: 275px"
  20. required>
  21. @can('订单管理-工单处理-宝时编辑')
  22. <input type="checkbox" class="form-control"
  23. value="true"
  24. :name="item.pending_detail.id + '_log_check'"
  25. :id="item.pending_detail.id + '_log_check'">
  26. <label :for="item.pending_detail.id + '_log_check'">标</label>
  27. @endcan
  28. <button type="button"
  29. class="btn btn-primary ml-2 m-0 p-0"
  30. style="width: 50px"
  31. @click="formStoreProcessLog(item.pending_detail.id,item.id)">添加
  32. </button>
  33. </div>
  34. </div>
  35. @endif
  36. <template class="p-0 m-0" v-if="item.process_logs.length > 0">
  37. <table class="table table-sm p-0 m-0 " :id="'logs'+item.pending_detail.id">
  38. <tr class="align-center position-static"
  39. v-for="(log,logIndex) in item.process_logs"
  40. v-on:mouseover="showDelBtn($event)"
  41. v-on:mouseleave="hideDelBtn($event)"
  42. @click="removeFocusing($event)"
  43. v-show="showWorkOrderProcessLog === item.id || logIndex<2">
  44. <td style="max-width: 175px;min-width: 175px;">
  45. <span v-text="log.content"></span>
  46. </td>
  47. <td class="text-muted" style="max-width: 55px;min-width: 55px;">
  48. <span v-if="log.user" v-text="log.user.name"></span>
  49. </td>
  50. <td class="text-muted" style="max-width: 150px;min-width: 150px;">
  51. <span v-text="log.created_at"></span>
  52. </td>
  53. @if( \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') || \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-商家编辑') )
  54. <td style="max-width: 70px;min-width: 70px;" class="m-0 p-0 border-0">
  55. <button type="button"
  56. class="btn btn-sm btn-outline-danger m-0 del-btn invisible"
  57. @click="destroyProcessLog(item,log,logIndex)">
  58. </button>
  59. <button type="button"
  60. v-if="log.tag !== '1' "
  61. class="btn btn-sm btn-primary m-0 del-btn invisible"
  62. @click="workOrderProcessLogTagApi(log)">
  63. </button>
  64. </td>
  65. @endif
  66. </tr>
  67. </table>
  68. <div class="d-flex justify-content-center">
  69. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1 center-block"
  70. v-if="item.process_logs.length > 2 && showWorkOrderProcessLog !== item.id"
  71. @click="showWorkOrderProcessLog = item.id"
  72. v-text="'记录共'+item.process_logs.length +'条,点击展开'"></button>
  73. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1 center-block"
  74. v-show="showWorkOrderProcessLog === item.id"
  75. @click="showWorkOrderProcessLog = null">点击收起
  76. </button>
  77. </div>
  78. </template>
  79. <div v-else class="" style="height:50px">
  80. </div>
  81. </div>