body-copy.blade.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!--- body-copy-search --->
  2. @php $modalClassName = $modalClassName ?? ''; @endphp
  3. <div class="modal fade modal-red {{ $modalClassName }}" id="modal-bodycopy" aria-hidden="true" data-backdrop="static" style="display: none; z-index: 1050;">
  4. <div class="modal-dialog m-auto pt-4" style="max-width: 1250px;">
  5. <button type="button" hidden
  6. class="btn btn-success btn-open-modal modal-btn">
  7. </button>
  8. <div class="modal-content">
  9. <div class="modal-header bg-primary">
  10. <h4 class="modal-title text-white" id="myModalLabel"></h4>
  11. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fas fa-times"></i></button>
  12. </div>
  13. <div class="modal-body pb-0 px-0">
  14. <div class="row p-0 mt-2 m-auto">
  15. @foreach ($moealSetFile['BodyCopyPopupVars']['Filter'] as $key => $value)
  16. <div class="col-lg-3 col-md-6 col-12 px-3">
  17. <div class="{{ $moealSetFile['FormVars']['Display'][$key.'Button'] }} flex-column mb-2">
  18. <label class="m-0">{{ $moealSetFile['FormVars']['Title'][$key.'Button'] }}</label>
  19. <div class="d-flex">
  20. <input type="text" class="rounded w-100 bg-white filter radius-r0 {{ $value }}-txt" autocomplete="off"
  21. onkeydown="enter_pressed_auto_search(event)" data-target="bodycopy">
  22. <button type="button" class="btn-success rounded border-0 radius-l0"
  23. onclick="body_copy_show_modal('{{ $modalClassName }}', '{{ $key }}')">
  24. <i class="icon-folder-open"></i>
  25. </div>
  26. </div>
  27. </div>
  28. @endforeach
  29. @if ($moealSetFile['FormVars']['Hidden']['AutoCreateSlipChecked'] !== 'hidden')
  30. <div class="d-flex align-items-center mb-2 mb-md-0 px-0 px-md-1 pl-3">
  31. <input type="checkbox" value="1" class="text-md-center w-100 overflow-hidden text-nowrap auto-create-slip-checked" name="AutoCreateSlipChecked" id="{{ $modalClassName }}-AutoCreateSlipChecked"
  32. onclick="return false;">
  33. <label class="m-0 text-nowrap" for="{{ $modalClassName }}-AutoCreateSlipChecked">{{ $moealSetFile['FormVars']['Title']['AutoCreateSlipChecked'] }}</label>
  34. </div>
  35. @endif
  36. </div>
  37. <div class="position-absolute">
  38. <button type="button" class="btn btn-dark btn-sm icon-search4 modal-search top-0 right-0" hidden
  39. data-target="bodycopy" data-class="{{ $modalClassName }}">
  40. </button>
  41. <button type="button" class="font-weight-bold btn btn-danger btn-sm icon-copy3 body-copy-act"
  42. onclick="body_copy(this)">
  43. </button>
  44. </div>
  45. </div>
  46. <div class="modal-footer">
  47. <div class="col-12 mt-2 mb-2 table-responsive" style="height: 430px;">
  48. <table class="table-row">
  49. <thead id="table-head">
  50. </thead>
  51. <tbody id="table-body">
  52. </tbody>
  53. </table>
  54. </div>
  55. <div class="d-flex flex-md-row justify-content-end align-items-stretch align-items-md-center col-2 mb-2 py-2 pr-0">
  56. <div class="d-flex flex-column align-items-md-center mb-2 mb-md-0 px-0 px-md-1">
  57. <label class="w-100 overflow-hidden text-nowrap m-0" {{ $moealSetFile['FormVars']['Hidden']['SelectedItems'] }}
  58. rowspan="1" colspan="1">
  59. {{ $moealSetFile['FormVars']['Title']['SelectedItems'] }}
  60. </label>
  61. <input type="text" class="w-100 rounded selected-items" value="0" disabled {{ $moealSetFile['FormVars']['Hidden']['SelectedItems'] }}>
  62. </div>
  63. <div class="d-flex flex-column align-items-md-center mb-2 mb-md-0 px-0 px-md-1">
  64. <label class="w-100 overflow-hidden text-nowrap m-0" {{ $moealSetFile['FormVars']['Hidden']['SelectedQty'] }}
  65. rowspan="1" colspan="1">
  66. {{ $moealSetFile['FormVars']['Title']['SelectedQty'] }}
  67. </label>
  68. <input type="text" class="w-100 rounded selected-qty" value="0" disabled {{ $moealSetFile['FormVars']['Hidden']['SelectedQty'] }}>
  69. </div>
  70. </div>
  71. <div class="jumbotron jumbotron-fluid w-100 mb-2 py-2">
  72. <div class="col-12 d-flex flex-row flex-wrap align-items-md-center py-2">
  73. <!--날짜-->
  74. <div class="d-flex flex-column mb-2 sel-date">
  75. <label class="m-0">{{ $moealSetFile['FormVars']['Title']['DayFromTodayOption'] }}</label>
  76. <select class="rounded w-100 day-from-today-select">
  77. <option value="10">10</option>
  78. <option value="20">20</option>
  79. <option value="30" selected>30</option>
  80. <option value="40">40</option>
  81. <option value="50">50</option>
  82. <option value="60">60</option>
  83. <option value="70">70</option>
  84. <option value="80">80</option>
  85. <option value="90">90</option>
  86. <option value="150">150</option>
  87. <option value="300">300</option>
  88. <option value="10000">10000</option>
  89. </select>
  90. </div>
  91. <!--//날짜 -->
  92. <div class="d-flex align-items-stretch align-items-md-center flex-column flex-md-row mb-2 mb-md-0 px-0 px-md-1">
  93. <label class="text-md-center text-nowrap m-0" {{ $moealSetFile['FormVars']['Hidden']['BalanceOption'] }}>
  94. {{ $moealSetFile['FormVars']['Title']['BalanceOption'] }}
  95. </label>
  96. <select class="rounded w-100 balance-select ml-0 ml-md-1">
  97. @foreach ($moealSetFile['BalanceOptions'] as $option)
  98. <option value="{{ $option['Value'] }}">{{ $option['Caption'] }}</option>
  99. @endforeach
  100. </select>
  101. </div>
  102. <div class="d-flex align-items-stretch align-items-md-center flex-column flex-md-row mb-2 mb-md-0 px-0 px-md-1 pl-3">
  103. <input type="checkbox" value="1" class="text-md-center w-100 overflow-hidden text-nowrap" name="ShowOnlyClosedChecked" id="{{ $modalClassName }}-ShowOnlyClosedChecked">
  104. <label class="m-0 text-nowrap" for="{{ $modalClassName }}-ShowOnlyClosedChecked">{{ $moealSetFile['FormVars']['Title']['ShowOnlyClosedChecked'] }}</label>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="px-md-0 px-1 w-100 d-flex justify-content-around align-items-stretch align-items-md-center flex-column flex-md-row">
  109. <select class="modal-line-select mb-md-0 mb-2 rounded" data-target="bodycopy" data-class="{{ $modalClassName }}">
  110. @include('front.outline.moption')
  111. </select>
  112. <div class="d-flex mb-md-0 mb-2 flex-column flex-md-row align-items-stretch align-items-md-center">
  113. <label class="m-0 mr-1 w-20 font-weight-bold" id="oderby-label"></label>
  114. <select class="modal-order-by-select w-100 rounded" data-target="bodycopy" data-class="{{ $modalClassName }}">
  115. </select>
  116. </div>
  117. <ul class="pagination pagination-sm"></ul>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <script>
  124. $(document).ready(function() {
  125. let class_name = {!! json_encode($modalClassName) !!};
  126. bodyCopy[class_name] = {!! json_encode($moealSetFile) !!};
  127. });
  128. </script>
  129. @foreach ($moealSetFile['BodyCopyPopupVars']['Display'] as $key => $i)
  130. @if ($moealSetFile['BodyCopyPopupVars']['Display'][$key] != 'd-none')
  131. @push('modal')
  132. @include($moealSetFile['BodyCopyPopupVars']['BladeRoute'][$key], [
  133. 'moealSetFile' => $moealSetFile['BodyCopyPopupVars']['Parameter'][$key],
  134. 'modalClassName' => $modalClassName
  135. ])
  136. @endpush
  137. @endif
  138. @endforeach
  139. @once
  140. <script src="{{ csset('/js/modals-controller/b-type/body-copy.js') }}"></script>
  141. <script>
  142. function body_copy_show_modal(modal_class_name, key) {
  143. let func_name = `get_${bodyCopy[modal_class_name]['BodyCopyPopupVars']['Filter'][key]}`;
  144. // 첫 번째 show 했을 때만 호출
  145. if (! $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('first')) {
  146. first_slip_date_rang(`#${modal_class_name}slip-date-navi-div`)
  147. }
  148. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('first', true)
  149. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('filter', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Filter'][key])
  150. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('target', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Component'][key])
  151. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('variable', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Parameter'][key])
  152. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('class', modal_class_name)
  153. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('clicked', snakeCase(func_name))
  154. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').trigger('click')
  155. }
  156. var bodyCopy = {}
  157. </script>
  158. @endonce