body-copy.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. @if(isset($moealSetFile['FormVars']['Title']['DayFromTodayOption']) && !empty($moealSetFile['FormVars']['Title']['DayFromTodayOption']))
  75. <div class="d-flex flex-column mb-2 sel-date">
  76. <label class="m-0">{{ $moealSetFile['FormVars']['Title']['DayFromTodayOption'] }}</label>
  77. <select class="rounded w-100 day-from-today-select">
  78. <option value="10">10</option>
  79. <option value="20">20</option>
  80. <option value="30" selected>30</option>
  81. <option value="40">40</option>
  82. <option value="50">50</option>
  83. <option value="60">60</option>
  84. <option value="70">70</option>
  85. <option value="80">80</option>
  86. <option value="90">90</option>
  87. <option value="150">150</option>
  88. <option value="300">300</option>
  89. <option value="10000">10000</option>
  90. </select>
  91. </div>
  92. @endif
  93. <!--//날짜 -->
  94. <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">
  95. <label class="text-md-center text-nowrap m-0" {{ $moealSetFile['FormVars']['Hidden']['BalanceOption'] }}>
  96. {{ $moealSetFile['FormVars']['Title']['BalanceOption'] }}
  97. </label>
  98. <select class="rounded w-100 balance-select ml-0 ml-md-1">
  99. @foreach ($moealSetFile['BalanceOptions'] as $option)
  100. <option value="{{ $option['Value'] }}">{{ $option['Caption'] }}</option>
  101. @endforeach
  102. </select>
  103. </div>
  104. @if(isset($moealSetFile['FormVars']['Title']['ShowOnlyClosedChecked']) && !empty($moealSetFile['FormVars']['Title']['ShowOnlyClosedChecked']))
  105. <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">
  106. <input type="checkbox" value="1" class="text-md-center w-100 overflow-hidden text-nowrap" name="ShowOnlyClosedChecked" id="{{ $modalClassName }}-ShowOnlyClosedChecked">
  107. <label class="m-0 text-nowrap" for="{{ $modalClassName }}-ShowOnlyClosedChecked">{{ $moealSetFile['FormVars']['Title']['ShowOnlyClosedChecked'] }}</label>
  108. </div>
  109. @endif
  110. </div>
  111. </div>
  112. <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">
  113. <select class="modal-line-select mb-md-0 mb-2 rounded" data-target="bodycopy" data-class="{{ $modalClassName }}">
  114. @include('front.outline.moption')
  115. </select>
  116. <div class="d-flex mb-md-0 mb-2 flex-column flex-md-row align-items-stretch align-items-md-center">
  117. <label class="m-0 mr-1 w-20 font-weight-bold" id="oderby-label"></label>
  118. <select class="modal-order-by-select w-100 rounded" data-target="bodycopy" data-class="{{ $modalClassName }}">
  119. </select>
  120. </div>
  121. <ul class="pagination pagination-sm"></ul>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <script>
  128. $(document).ready(function() {
  129. let class_name = {!! json_encode($modalClassName) !!};
  130. bodyCopy[class_name] = {!! json_encode($moealSetFile) !!};
  131. });
  132. </script>
  133. @foreach ($moealSetFile['BodyCopyPopupVars']['Display'] as $key => $i)
  134. @if ($moealSetFile['BodyCopyPopupVars']['Display'][$key] != 'd-none')
  135. @push('modal')
  136. @include($moealSetFile['BodyCopyPopupVars']['BladeRoute'][$key], [
  137. 'moealSetFile' => $moealSetFile['BodyCopyPopupVars']['Parameter'][$key],
  138. 'modalClassName' => $modalClassName
  139. ])
  140. @endpush
  141. @endif
  142. @endforeach
  143. @once
  144. <script src="{{ csset('/js/modals-controller/b-type/body-copy.js') }}"></script>
  145. <script>
  146. function body_copy_show_modal(modal_class_name, key) {
  147. console.log('body_copy_show_modal');
  148. let func_name = `get_${bodyCopy[modal_class_name]['BodyCopyPopupVars']['Filter'][key]}`;
  149. // 첫 번째 show 했을 때만 호출
  150. if (! $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('first')) {
  151. first_slip_date_rang(`#${modal_class_name}slip-date-navi-div`)
  152. }
  153. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('first', true)
  154. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('filter', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Filter'][key])
  155. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('target', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Component'][key])
  156. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('variable', bodyCopy[modal_class_name]['BodyCopyPopupVars']['Parameter'][key])
  157. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('class', modal_class_name)
  158. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('clicked', snakeCase(func_name))
  159. $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').trigger('click')
  160. }
  161. var bodyCopy = {}
  162. </script>
  163. @endonce