_process_logs.blade.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. <button type="button"
  22. class="btn btn-primary ml-2 m-0 p-0"
  23. style="width: 50px"
  24. @click="formStoreProcessLog(item.pending_detail.id,item.id)">添加
  25. </button>
  26. </div>
  27. </div>
  28. @endif
  29. <template class="p-0 m-0" v-if="item.process_logs.length > 0">
  30. <table class="table table-sm p-0 m-0 " :id="'logs'+item.pending_detail.id">
  31. <tr class="align-center position-static"
  32. v-for="(log,logIndex) in item.process_logs"
  33. v-on:mouseover="showDelBtn($event)"
  34. v-on:mouseleave="hideDelBtn($event)"
  35. @click="removeFocusing($event)"
  36. v-show="showWorkOrderProcessLog === item.id || logIndex<2">
  37. <td style="max-width: 175px;min-width: 175px;">
  38. <span v-text="log.content"></span>
  39. </td>
  40. <td class="text-muted" style="max-width: 55px;min-width: 55px;">
  41. <span v-if="log.user" v-text="log.user.name"></span>
  42. </td>
  43. <td class="text-muted" style="max-width: 150px;min-width: 150px;">
  44. <span v-text="log.created_at"></span>
  45. </td>
  46. @if( \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') || \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-商家编辑') )
  47. <td style="max-width: 35px;min-width: 35px;" class="m-0 p-0 border-0">
  48. <button type="button"
  49. class="btn btn-sm btn-outline-danger m-0 del-btn invisible"
  50. @click="destroyProcessLog(item,log,logIndex)">
  51. </button>
  52. </td>
  53. @endif
  54. </tr>
  55. </table>
  56. <div class="d-flex justify-content-center">
  57. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1 center-block"
  58. v-if="item.process_logs.length > 2 && showWorkOrderProcessLog !== item.id"
  59. @click="showWorkOrderProcessLog = item.id"
  60. v-text="'记录共'+item.process_logs.length +'条,点击展开'"></button>
  61. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1 center-block"
  62. v-show="showWorkOrderProcessLog === item.id"
  63. @click="showWorkOrderProcessLog = null">点击收起</button>
  64. </div>
  65. </template>
  66. <div v-else class="" style="height:50px">
  67. </div>
  68. </div>