Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

wngur6076 4 months ago
parent
commit
53767b43d2

+ 5 - 3
app/Http/Controllers/Front/Dabory/Erp/Revenue/SalesController.php

@@ -23,7 +23,9 @@ class SalesController extends Controller
 
         // pick api para(cache) 얻는 함수
         $menuCode = Utils::bpaDecoding(request('bpa'))['menu_code'];
-
+        $slipFormInitCacheData = Utils::getSlipFormInitCache(
+            $formB->getData()['formB']['QueryVars']['QueryName']
+        );
         $pickCacheData = Utils::getParamCache($menuCode,
             $formB->getData()['formB']['General']['PickApi'],
             $formB->getData()['formB']['QueryVars']['QueryName']);
@@ -38,8 +40,8 @@ class SalesController extends Controller
                 $formB->getData(),
                 compact('salesModal',
                     'companyModal', 'itemModal'),
-                compact('pickCacheData', 'slipCacheData'),
+                compact('pickCacheData', 'slipCacheData', 'slipFormInitCacheData'),
             )
-        )->with('codeTitle', [ "deal_type('deal-type')" ]);
+            )->with('codeTitle', [ "deal_type('deal-type')", "status('sales')" ]);
     }
 }

+ 23 - 6
dabory/para/erp/ko_KR/form/form-post/post/banner.json

@@ -41,6 +41,17 @@
         }
     ],
 
+    "Pc8Options": [
+        {
+            "Value": "main",
+            "Caption": "메인"
+        },
+        {
+            "Value": "main-mobile",
+            "Caption": "모바일"
+        }
+    ],
+
     "DisplayVars": {
         "Width": "800",
         "Chunk": "7"
@@ -60,7 +71,8 @@
             "PostTypeId": "구분",
             "Pc6": "시작일자*",
             "Pc7": "종료일자*",
-            "MediaId": "이미지"
+            "MediaId": "이미지",
+            "Pc8": "장치구분"
         },
         {
             "SaveButton": "center",
@@ -74,7 +86,8 @@
             "PostTypeId": "SortOptions",
             "Pc6": "YYYY-MM-DD",
             "Pc7": "YYYY-MM-DD",
-            "MediaId": "center"
+            "MediaId": "center",
+            "Pc8": "Pc8Options"
         },
         {
             "SaveButton": "",
@@ -88,7 +101,8 @@
             "PostTypeId": "2",
             "Pc6": "1000",
             "Pc7": "1000",
-            "MediaId": "1000"
+            "MediaId": "1000",
+            "Pc8": "2"
         },
         {
             "SaveButton": "",
@@ -102,7 +116,8 @@
             "PostTypeId": "required",
             "Pc6": "required",
             "Pc7": "required",
-            "MediaId": ""
+            "MediaId": "",
+            "Pc8": "required"
         },
         {
             "SaveButton": "",
@@ -116,7 +131,8 @@
             "PostTypeId": "postType",
             "Pc6": "date",
             "Pc7": "date",
-            "MediaId": "media"
+            "MediaId": "media",
+            "Pc8": "select"
         },
         {
             "SaveButton": "",
@@ -130,7 +146,8 @@
             "PostTypeId": "number",
             "Pc6": "string",
             "Pc7": "string",
-            "MediaId": "number"
+            "MediaId": "number",
+            "Pc8": "string"
         }
     ]
 }

+ 2 - 2
dabory/para/erp/ko_KR/list/list-form-balance/item-fngoods.json

@@ -75,8 +75,8 @@
             "Code": "품목 코드",
             "Name": "품명",
             "Name2": "서브명",
-            "Balance": "재고",
-            "Balance2": "불량재고"
+            "Balance": "(마감)월말재고",
+            "Balance2": "불량(마감)월말재고"
         },
         {
             "No": "5",

+ 6 - 3
dabory/para/erp/ko_KR/list/list-type1/post/banner-input.json

@@ -211,7 +211,8 @@
             "C9": "p6시작일자",
             "C10": "p7종료일자",
             "C11": "media썸네일",
-            "C12": "상태"
+            "C12": "상태",
+            "C13": "장치구분"
         },
         {
             "$Radio": "2",
@@ -228,7 +229,8 @@
             "C9": "8",
             "C10": "8",
             "C11": "12",
-            "C12": "5"
+            "C12": "5",
+            "C13": "5"
         },
         {
             "$Radio": "center",
@@ -245,7 +247,8 @@
             "C9": "center",
             "C10": "center",
             "C11": "$_ThumbNail",
-            "C12": "status('post-banner')"
+            "C12": "status('post-banner')",
+            "C13": "center"
         }
     ]
 }

+ 20 - 2
public/dabory/widget/banner-popup/dabory-banner-popup.css

@@ -112,7 +112,7 @@
 
 .dabory-multipopup-box .dabory-slider .dabory-pagination-item-text {
     display: table-cell !important;
-    padding: 0 4px !important !important;
+    padding: 0 4px !important;
     font-size: 11px !important;
     line-height: 17px !important;
     color: #828282 !important;
@@ -286,6 +286,24 @@
 }
 
 @media (max-width: 767.98px) {
+
+    .swiper-slide {
+        background-size: cover !important;
+        background-position: center !important;
+    }
+
+    .swiper-slide div {
+        padding: 10px;
+    }
+
+    .swiper-slide strong {
+        font-size: 1.2em;
+    }
+
+    .swiper-slide p {
+        font-size: 1em;
+    }
+
     .dabory-multipopup {
         max-width: 300px !important;
         left: 20px !important;
@@ -297,7 +315,7 @@
 
     .dabory-slider img {
         max-width: 300px !important;
-        height: auto;
+        height: auto !important;
     }
 
     .dabory-multipopup-btn-item_todayclose {

+ 10 - 4
public/dabory/widget/banner-popup/dabory-banner-popup.js

@@ -2,7 +2,6 @@
     $.fn.bannerPopup = async function(options) {
         const opts = $.extend({}, $.fn.bannerPopup.defaults, options)
         const langJson = await loadLangJson.call(this, opts['basePath'], opts['langType'])
-
         callBannerApi.call(this, opts, langJson)
     };
 
@@ -18,7 +17,7 @@
 
     function callBannerApi(opts, langJson) {
         const self = this
-
+        const connectionDevice = opts['connectionDevice'];
         $.fn.dataLinker.localApi('list-type1-book', {
             "Book": [
                 {
@@ -45,10 +44,17 @@
                     }
                 }
             ]
+
         }, function (response) {
             const bannerList = response['Book'][0]['Page']
             if (bannerList) {
-                bannerList['Setup'] = JSON.parse(response['Book'][1]['Page'][0]['C1'])
+                if(connectionDevice == 'desktop'){
+
+                    bannerList['Setup'] = JSON.parse(response['Book'][1]['Page'][0]['C1'])
+                }else{
+                    bannerList['Setup'] = JSON.parse(response['Book'][1]['Page'][1]['C1'])
+                }
+                opts['width'] = bannerList['Setup']['Width']
                 opts['left'] = bannerList[0]['C7']
                 opts['top'] = bannerList[0]['C8']
 
@@ -201,7 +207,7 @@
         width: 650,
         langType: 'ko',
         basePath: '/dabory/widget/banner-popup',
-        hide: true,
+        hide: true
     };
 
 }(jQuery));

+ 37 - 12
resources/views/front/dabory/erp/revenue/sales.blade.php

@@ -89,6 +89,21 @@
                                             </button>
                                         </div>
                                     </div>
+                                    <div class="form-group d-flex flex-column mb-2">
+                                        <label class="m-0">{{ $formB['FormVars']['Title']['SorderNo'] }}</label>
+                                        <div class="d-flex">
+                                            <input type="text" class="rounded w-100 radius-r0" id="sorder-no-txt"
+                                                maxlength="{{ $formB['FormVars']['MaxLength']['SorderNo'] }}"
+                                                {{ $formB['FormVars']['Required']['SorderNo'] }}>
+                                                <button type="button"
+                                                    class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 window company-modal-btn"
+                                                    data-target="sorder"
+                                                    data-clicked="get_override_supplier_id"
+                                                    data-variable="companyModal">
+                                                    <i class="icon-folder-open"></i>
+                                                </button>
+                                            </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -256,7 +271,7 @@
                             @endif
                         </div>
 
-                        <div class="table-responsive mt-2" style="height:400px;" id="scroll-area">
+                        <div class="table-responsive mt-2" style="height:200px;" id="scroll-area">
                             <table class="table-row sales-table">
                                 <thead id="sales-table-head">
                                     @include('front.dabory.erp.partial.make-thead', [
@@ -361,6 +376,7 @@
         window.onload = async function () {
             ThumbArr = [];
             make_dynamic_table_css('.sales-table', make_dynamic_table_px(formB['ListVars']['Size']))
+
             $('#sales-date').val(date_to_sting(new Date()))
             $('#stock-date').val(date_to_sting(new Date()))
             var test = Btype.get_storage_name_and_branch_name()
@@ -486,16 +502,18 @@
         }
 
         async function btn_bd_act_add() {
-            if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
-                iziToast.error({
-                    title: 'Error',
-                    message: @json(_e('Action failed')),
-                });
-                return;
-            }
-            if (! Btype.last_item_added_check('#sales-table-body')) {
-                add_tr();
-            }
+            Btype.btn_act_save('#sales-form #frm', async function () {
+                if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
+                    iziToast.error({
+                        title: 'Error',
+                        message: @json(_e('Action failed')),
+                    });
+                    return;
+                }
+                if (! Btype.last_item_added_check('#sales-table-body')) {
+                    add_tr();
+                }
+            });
         }
 
         function btn_bd_act_body_copy(parameter_name) {
@@ -811,6 +829,7 @@
                     });
                 }
             });
+            scrollToTop();
         }
 
         function body_act_success_callback($this, tr) {
@@ -975,7 +994,7 @@
                         onfocusout="save_data_when_entering_text()">
                     </td>
                     <td
-                        class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
+                        class="text-${formB.ListVars['Align'].SalesMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
                         <textarea style="max-height: 30px;" class="rounded w-100 bg-white memo-textarea" id="memo-textarea-${bd.Id}"
                             ondblclick="Btype.dblclick_memo_textarea(this, ${bd.Id})" role="button" readonly>${bd.SorderMemo}</textarea>
                     </td>
@@ -1070,6 +1089,7 @@
                 <td
                     class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>
                 </td>
+
                 <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                     class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
                     >
@@ -1224,6 +1244,11 @@
             $('#modal-slip').modal('hide');
         }
 
+        function scrollToTop() {
+            var scrollArea = document.getElementById("scroll-area");
+            scrollArea.scrollTop = 0;
+        }
+
         const salesModal = {!! json_encode($salesModal) !!};
         const companyModal = {!! json_encode($companyModal) !!};
         const itemModal = {!! json_encode($itemModal) !!};