hokky 4 сар өмнө
parent
commit
e414bdcba0

BIN
.DS_Store


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

@@ -24,11 +24,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']);
@@ -45,6 +43,6 @@ class SalesController extends Controller
                     'companyModal', 'itemModal'),
                 compact('pickCacheData', 'slipCacheData', 'slipFormInitCacheData'),
             )
-        )->with('codeTitle', [ "deal_type('deal-type')", "status('sales')" ]);
+            )->with('codeTitle', [ "deal_type('deal-type')", "status('sales')" ]);
     }
 }

+ 14 - 6
dabory/para/erp/ko_KR/form/form-a/company.json

@@ -24,7 +24,8 @@
     "FormVars": [
         {
             "SaveButton": "저장",
-            "TaxNo": "등록번호*",
+            "CompanyNo": "업체 등록번호*(판매회원코드)",
+            "TaxNo": "사업자 등록번호",
             "CompanyName": "업체명*",
             "CompanyClass": "거래분류(개인/매출/매입)*",
             "CgroupId": "업체구분*",
@@ -43,10 +44,12 @@
             "DealItem": "종목",
             "Sort": "구분",
             "Remarks": "메모",
-            "IsDealEnd": "거래종료"
+            "IsDealEnd": "거래종료",
+            "SellerId": "판매회원"
         },
         {
             "SaveButton": "",
+            "CompanyNo": "left",
             "TaxNo": "left",
             "CompanyName": "left",
             "CompanyClass": "left",
@@ -66,10 +69,12 @@
             "DealItem": "left",
             "Sort": "left",
             "Remarks": "left",
-            "IsDealEnd": "left"
+            "IsDealEnd": "left",
+            "SellerId": "left"
         },
         {
             "SaveButton": "0",
+            "CompanyNo": "20",
             "TaxNo": "20",
             "CompanyName": "64",
             "CompanyClass": "2",
@@ -89,11 +94,13 @@
             "DealItem": "128",
             "Sort": "2",
             "Remarks": "1000",
-            "IsDealEnd": "0"
+            "IsDealEnd": "0",
+            "SellerId": "0"
         },
         {
             "SaveButton": "",
-            "TaxNo": "required",
+            "CompanyNo": "required",
+            "TaxNo": "",
             "CompanyName": "required",
             "CompanyClass": "required",
             "CgroupId": "required",
@@ -112,7 +119,8 @@
             "DealItem": "",
             "Sort": "",
             "Remarks": "",
-            "IsDealEnd": ""
+            "IsDealEnd": "",
+            "SellerId": "disabled"
         }
     ],
     "CompanyClassOptions": [

+ 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"
         }
     ]
 }

+ 1 - 1
dabory/para/erp/ko_KR/list/list-type1/shop-order/sorder-pro-total-list.json

@@ -300,7 +300,7 @@
             "C2": "$_ThumbNail",
             "C3": "center",
             "C4": "center|^center|^center",
-            "C5": "decimal('sales_prc')|^decimal('sales_amt')",
+            "C5": "x2|^decimal('sales_amt')",
             "C6": "decimal('sales_amt')",
             "C7": "center",
             "C8": "status('sorder')|^situation('sorder')"

+ 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));

+ 76 - 4
resources/views/front/dabory/erp/master-data/company.blade.php

@@ -29,6 +29,13 @@
                                 <div class="card card card-primary mb-3 mb-md-0 border-light">
                                 {{-- <div class="card-header p-1 mb-2"> 핵심정보 </div> --}}
                                     <div class="card-body">
+                                    <div class="form-group mb-3" {{ $formA['FormVars']['Hidden']['CompanyNo'] }}>
+                                        <label class = "m-0">{{ $formA['FormVars']['Title']['CompanyNo'] }}</label>
+                                        <br>
+                                        <input type="text" id="company-no-txt" data-copy="true" class="rounded w-100"
+                                               maxlength="{{ $formA['FormVars']['MaxLength']['CompanyNo'] }}"
+                                            {{ $formA['FormVars']['Required']['CompanyNo'] }}>
+                                    </div>
                                     <div class="form-group mb-3" {{ $formA['FormVars']['Hidden']['TaxNo'] }}>
                                         <label class = "m-0">{{ $formA['FormVars']['Title']['TaxNo'] }}</label>
                                         <br>
@@ -77,6 +84,24 @@
                                             {{ $formA['FormVars']['Required']['CgroupId'] }}>
                                         </select>
                                     </div>
+                                    <div class="form-group flex-column mb-3" id="seller-id-div" style="display: block;">
+                                        <label class="m-0" {{ $formA['FormVars']['Required']['SellerId'] }}>
+                                            {{ $formA['FormVars']['Title']['SellerId'] }}
+                                        </label>
+                                        <div class="d-flex">
+                                            <input type="text" id="seller-txt" data-id="1" class="rounded w-100 radius-r0" autocomplete="off"
+                                                   onkeydown="company_model_show_cell_enter_key(event, '', 'CompanyForm')"
+                                                   maxlength="{{ $formA['FormVars']['MaxLength']['SellerId'] }}"
+                                                {{ $formA['FormVars']['Required']['SellerId'] }}>
+                                            <button type="button" {{ $formA['FormVars']['Required']['SellerId'] === 'hidden' ? 'hidden' : '' }}
+                                            class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 CompanyForm company-modal-btn"
+                                                    data-target="company"
+                                                    data-clicked="CompanyForm.fetch_seller"
+                                                    data-variable="companyModal">
+                                                <i class="icon-folder-open"></i>
+                                            </button>
+                                        </div>
+                                    </div>
                                     <div class="form-group mb-3" {{ $formA['FormVars']['Hidden']['MainContact'] }}>
                                         <label class = "m-0">{{ $formA['FormVars']['Title']['MainContact'] }}</label>
                                         <br>
@@ -183,6 +208,7 @@
                                                    maxlength="{{ $formA['FormVars']['MaxLength']['DealItem'] }}"
                                                 {{ $formA['FormVars']['Required']['DealItem'] }}>
                                         </div>
+
                                     </div>
                                 </div>
                             </div>
@@ -234,6 +260,19 @@
             }
         });
 
+        $('#cgroup-id-select').on('change', function(){
+            const val = $(this).val()
+            switch (val) {
+                case '1':
+                case '2':
+                    $('#seller-id-div').show()
+                    break;
+                default:
+                    $('#seller-id-div').hide()
+                    break;
+            }
+        })
+
         $('#full-name-txt').on('click', function(){
             var companyName = $('#company-name-txt').val();
             if(companyName){
@@ -278,20 +317,48 @@
             $('#company-form').find('#cgroup-id-select').append(cgroup_id_select);
         }
 
-        CompanyForm.fetch_company = async function  (id) {
-            let response = await get_api_data(CompanyForm.formA['General']['PickApi'], {
+        CompanyForm.pick = async function (id) {
+            return await get_api_data(CompanyForm.formA['General']['PickApi'], {
                 Page: [ { Id: id } ]
             })
+        }
+
+        CompanyForm.fetch_company = async function  (id) {
+            const response = await CompanyForm.pick(id)
 
             CompanyForm.set_company_ui(response)
         }
 
+        CompanyForm.fetch_seller = async function  (id) {
+            const response = await CompanyForm.pick(id)
+
+            if (isEmpty(response.data) || response.data.apiStatus) {
+                $('#modal-company').modal('hide')
+                return
+            }
+
+            const seller = response.data.Page[0]
+            $('#company-form').find('#seller-txt').val(seller['CompanyName'])
+            $('#company-form').find('#seller-txt').data('id', seller['Id'])
+            $('#modal-company').modal('hide')
+        }
+
         CompanyForm.parameter = function () {
+            let sellerId = $('#company-form').find('#seller-txt').data('id')
+            switch ($('#cgroup-id-select').val()) {
+                case '3':
+                case '4':
+                case '5':
+                    sellerId = $('#company-form').find('#Id').val()
+                    break;
+            }
+
             let id = Number( $('#company-form').find('#Id').val());
             let parameter = {
                 Id: id,
                 CreatedOn: get_now_time_stamp(),
                 UpdatedOn: get_now_time_stamp(),
+                CompanyNo: $('#company-form').find('#company-no-txt').val(),
                 TaxNo: $('#company-form').find('#tax-no-txt').val(),
                 CompanyName: $('#company-form').find('#company-name-txt').val(),
                 CompanyClass: $('#company-form').find('#company-class-select').val(),
@@ -310,6 +377,7 @@
                 Addr2: $('#company-form').find('#addr2-txt').val(),
                 BizType: $('#company-form').find('#biz-type-txt').val(),
                 DealItem: $('#company-form').find('#deal-item-txt').val(),
+                SellerId: Number(sellerId),
 
                 Remarks: $('#remarks-preview').html(),
                 IsDealEnd: $('#is-deal-end-check:checked').val() ?? '0',
@@ -323,12 +391,12 @@
             } else {
                 delete parameter.UpdatedOn;
             }
-            // console.log(parameter)
+            console.log(parameter)
 
             return parameter;
         }
 
-        CompanyForm.set_company_ui = function (response) {
+        CompanyForm.set_company_ui = async function (response) {
             if (isEmpty(response.data) || response.data.apiStatus) {
                 $('#modal-company').modal('hide');
                 return;
@@ -338,6 +406,7 @@
 
             $('#company-form').find('#Id').val(company.Id)
 
+            $('#company-form').find('#company-no-txt').val(company.CompanyNo)
             $('#company-form').find('#tax-no-txt').val(company.TaxNo)
             $('#company-form').find('#company-name-txt').val(company.CompanyName)
             $('#company-form').find('#cgroup-id-select').val(company.CgroupId)
@@ -361,6 +430,9 @@
             $('#company-form').find('#remarks-preview').html(company.Remarks)
             $('#company-form').find('#is-deal-end-check').prop('checked', company.IsDealEnd == '1')
 
+            await CompanyForm.fetch_seller(company.SellerId)
+
+            $('#company-form').find('#cgroup-id-select').trigger('change')
             $('#modal-company').modal('hide');
         }
 

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

@@ -96,12 +96,12 @@
                                                 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>
+                                                class="btn btn-success btn-open-modal"
+                                                data-target="slip"
+                                                data-clicked="Btype.fetch_slip_form_book"
+                                                data-variable="salesModal">
+                                                <i class="icon-folder-open"></i>
+                                            </button>
                                             </div>
                                     </div>
                                 </div>