wngur6076 před 1 měsícem
rodič
revize
28f3d17b64

+ 314 - 0
dabory/para/erp/ko_KR/list/list-type1/shop-order/sorder-bd-pro-total-popfil.json

@@ -0,0 +1,314 @@
+{
+    "//list-type-1": "simple and plain list by query of table join",
+
+    "General": {
+        "Title": "일부품목 교환/반품 리스트(팝업필터)",
+        "PageApi": "list-type1-page",
+        "ActApi": "sorder-act"
+    },
+
+    "QueryVars": {
+        "QueryName": "shop-order/sorder-bd-pro-total-popfil",
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "sorder_date"
+    },
+
+    "HeadSelectOptions": [
+        {
+            "Value": "dummy",
+            "Caption": "조회 조건 설정",
+            "Component": "popup-form1.form-filter.shop-order.sorder-pro-total-popfil",
+            "Parameter": "/popup/popup-form1/form-filter/shop-order/sorder-bd-pro-total-popfil"
+        },
+        {
+            "Value": "clear-all-filter",
+            "Caption": "입력값 리셋"
+        },
+        {
+            "Value": "pdf-report",
+            "Caption": "PDF 화일 다운로드"
+        },
+        {
+            "Value": "modified-report",
+            "Caption": "변형 서식"
+        }
+    ],
+
+    "//FormVars": "FormVars[0]-caption, FormVars[1]-searchPopup",
+    "FormVars": [
+        {
+            "ListButton": "",
+            "DateRange": "",
+            "DateNavi": "",
+            "Date": "",
+            "From": "",
+            "To": "",
+            "FirstRange": "",
+            "SecondRange": "",
+            "ThirdRange": "",
+            "FourthRange": "",
+            "AddTotalLine": "",
+            "SelectPopup": "",
+            "MultiPopup": "",
+            "ChartPopup": "",
+            "DownloadList": "",
+            "ShowOnlyClosed": "",
+            "Balance": "",
+            "OrderBy": "",
+            "FilterOption": "",
+            "SimpleOption": ""
+        }
+    ],
+
+    "FilterSelectOptions": [
+        {
+            "Value": "",
+            "Caption": "==조회 선택=="
+        },
+        {
+            "Value": "item_name",
+            "Caption": "품명"
+        }
+    ],
+
+    "SimpleSelectOptions": [
+        {
+            "Value": "",
+            "Caption": "status('sorder','')"
+        },
+        {
+            "Value": "mx.status='0'",
+            "Caption": "status('sorder','0')"
+        },
+        {
+            "Value": "mx.status='1'",
+            "Caption": "status('sorder','1')"
+        },
+        {
+            "Value": "mx.status='2'",
+            "Caption": "status('sorder','2')"
+        },
+        {
+            "Value": "mx.status='3'",
+            "Caption": "status('sorder','3')"
+        },
+        {
+            "Value": "mx.status='4'",
+            "Caption": "status('sorder','4')"
+        },
+        {
+            "Value": "mx.status='5'",
+            "Caption": "status('sorder','5')"
+        },
+        {
+            "Value": "mx.status='F' or mx.status='C' or mx.status='R' or mx.status='E' or mx.status='M'",
+            "Caption": "=클레임전체="
+        },
+        {
+            "Value": "mx.status='F'",
+            "Caption": "status('sorder','F')"
+        },
+        {
+            "Value": "mx.status='C'",
+            "Caption": "status('sorder','C')"
+        },
+        {
+            "Value": "mx.status='R'",
+            "Caption": "status('sorder','R')"
+        },
+        {
+            "Value": "mx.status='E'",
+            "Caption": "status('sorder','E')"
+        },
+        {
+            "Value": "mx.status='M'",
+            "Caption": "status('sorder','M')"
+        }
+    ],
+
+    "//ListType1RangeVars": "[0]-filter, [1]-component, [2]-parameter",
+    "ListType1RangeVars": [
+        {
+            "FirstRange": "",
+            "SecondRange": "",
+            "ThirdRange": "",
+            "FourthRange": ""
+        },
+        {
+            "FirstRange": "",
+            "SecondRange": "",
+            "ThirdRange": "",
+            "FourthRange": ""
+        },
+        {
+            "FirstRange": "",
+            "SecondRange": "",
+            "ThirdRange": "",
+            "FourthRange": ""
+        }
+    ],
+
+    "// DateRangeOptions": "월:현재월의 1~30, 분기: 현재분기의 첫째월 1일 ~ 마지막월의 말일, 반기/년 동일한 컨셉,전체:1990~3000",
+    "DateRangeOptions": [
+        {
+            "Value": "day",
+            "Caption": "일"
+        },
+        {
+            "Value": "week",
+            "Caption": "주"
+        },
+        {
+            "Value": "month",
+            "Caption": "월"
+        },
+        {
+            "Value": "quarterly",
+            "Caption": "분기"
+        },
+        {
+            "Value": "semiannual",
+            "Caption": "반기"
+        },
+        {
+            "Value": "year",
+            "Caption": "년"
+        },
+        {
+            "Value": "all",
+            "Caption": "전체"
+        }
+    ],
+
+    "DateNaviOptions": [
+        {
+            "Value": "day",
+            "Caption": "일"
+        },
+        {
+            "Value": "week",
+            "Caption": "주"
+        },
+        {
+            "Value": "month",
+            "Caption": "월"
+        },
+        {
+            "Value": "quarterly",
+            "Caption": "분기"
+        },
+        {
+            "Value": "semiannual",
+            "Caption": "반기"
+        },
+        {
+            "Value": "year",
+            "Caption": "년"
+        },
+        {
+            "Value": "all",
+            "Caption": "전체"
+        }
+    ],
+
+    "SelectPopupOptions": [
+        {
+            "Caption": "일부품목 교환/반품 상세 보기",
+            "Component": "list-type.list1-form",
+            "Parameter": "/popup/popup-list1/sorder-bd-pro-no-total"
+        }
+    ],
+
+    "MultiPopupOptions": [
+
+    ],
+
+    "// OrderByOptions": "OrderBy Options//첫번째 Value가 Default",
+    "OrderByOptions": [
+        {
+            "Value": "mb.id desc",
+            "Caption": "아이디 번호 역순"
+        },
+        {
+            "Value": "mb.id asc",
+            "Caption": "아이디 번호 정렬순"
+        }
+    ],
+
+    "//BalanceOptions": "Show OnlyBalaceRemained or All",
+    "BalanceOptions": [
+        {
+            "Value": "",
+            "Caption": "전체 보기"
+        },
+        {
+            "Value": "c10 > 0",
+            "Caption": "잔량있는 것만"
+        }
+    ],
+
+    "ThumbContainerVars": {
+        "ListWidth": 50,
+        "ListHeight": 50
+    },
+
+    "DisplayVars": {
+        "IsntPagination": true,
+        "IsAddTotalLine": false,
+        "IsExcelColumn": false,
+        "IsSplitColumn" : true,
+        "IsDownloadList": false,
+        "IsShowOnlyClosed": false,
+        "IsListFirst": false,
+        "IsSelectPopupHidden": false,
+        "IsC1Popup": "2",
+        "InitLines": 10,
+        "HeadHeight": "1",
+        "BodyHeight": "580"
+    },
+
+    "// ListVars": "ListVars[0]-caption, ListVars[1]-size(px), ListVars[2]-align->right(number) left(left)",
+    "ListVars": [
+        {
+            "$Radio": "",
+            "$Check": "$Check",
+            "No": "번호",
+            "C1": "주문 번호 | 일자 | 입점사 ",
+            "C2": "대표품목",
+            "C3": "사진",
+            "C4": "주문ID | 주문자 | 수취인",
+            "C5": "주문연락 | 수취연락",
+            "C6": "수량 | 금액",
+            "C7": "배송 | 기한 | 택배",
+            "C8": "상태 | 변경일시 | 클레임"
+
+        },
+        {
+            "$Radio": "10",
+            "$Check": "3",
+            "No": "0",
+            "C1": "10",
+            "C2": "23",
+            "C3": "3",
+            "C4": "8",
+            "C5": "7",
+            "C6": "5",
+            "C7": "8",
+            "C8": "8"
+        },
+        {
+            "$Radio": "center",
+            "$Check": "center",
+            "No": "center",
+            "C1": "center|^unixtime|^center",
+            "C2": "center",
+            "C3": "$_ThumbNail",
+            "C4": "center|^center|^center",
+            "C5": "center|^center",
+            "C6": "decimal('sales_prc')|^decimal('sales_amt')",
+            "C7": "center",
+            "C8": "situation('sorder')|^unixtime|^body_situation('sorder-bd')"
+        }
+    ]
+}

+ 54 - 0
dabory/para/erp/ko_KR/popup/popup-form1/form-filter/shop-order/sorder-bd-pro-total-popfil.json

@@ -0,0 +1,54 @@
+{
+    "DisplayVars": {
+        "SorderStatus": [
+            "C"
+        ],
+        "SorderSituation": [
+            "RJ", "EJ"
+        ]
+    },
+
+    "//FormVars": "ListVars[0]-Caption",
+    "FormVars": [
+        {
+            "SaveButton": "저장",
+            "Company": "공급/입점사",
+            "OrderSearch": "주문항목",
+            "SorderStatus": "배송유형",
+            "SorderSituation": "배송 클레임 유형",
+            "CargoType": "화물유형",
+            "ShipType": "배송타입",
+            "DelayType": "처리지연"
+        },
+        {
+            "SaveButton": "",
+            "Company": "left",
+            "OrderSearch": "left",
+            "SorderStatus": "left",
+            "SorderSituation": "left",
+            "CargoType": "left",
+            "ShipType": "left",
+            "DelayType": "left"
+        },
+        {
+            "SaveButton": "0",
+            "Company": "6",
+            "OrderSearch": "20",
+            "SorderStatus": "20",
+            "SorderSituation": "20",
+            "CargoType": "20",
+            "ShipType": "20",
+            "DelayType": "20"
+        },
+        {
+            "SaveButton": "",
+            "Company": "",
+            "OrderSearch": "",
+            "SorderStatus": "",
+            "SorderSituation": "",
+            "CargoType": "",
+            "ShipType": "",
+            "DelayType": ""
+        }
+    ]
+}

+ 1 - 1
dabory/para/erp/ko_KR/popup/popup-form1/form-filter/shop-order/sorder-pro-total-popfil-exchange.json

@@ -4,7 +4,7 @@
             "C"
         ],
         "SorderSituation": [
-            "EM", "EE", "EP", "ES", "EO"
+            "EA", "EJ"
         ]
     },
 

+ 1 - 1
dabory/para/erp/ko_KR/popup/popup-form1/form-filter/shop-order/sorder-pro-total-popfil-return.json

@@ -4,7 +4,7 @@
             "C"
         ],
         "SorderSituation": [
-            "RM", "RE", "RP", "RC", "RO"
+            "RA", "RJ"
         ]
     },
 

+ 274 - 0
dabory/para/erp/ko_KR/popup/popup-list1/sorder-bd-pro-no-total.json

@@ -0,0 +1,274 @@
+{
+    "//list-type-1": "simple and plain list by query of table join",
+
+    "General": {
+        "PageApi": "popup-list1-page"
+    },
+
+    "QueryVars": {
+        "QueryName": "sorder-bd-pro-no-total",
+        "FilterName": "",
+        "FilterValue": ""
+    },
+
+    "PopupList1Vars": {
+        "PopupFilterName": "mx.id",
+        "PopupWidth": "1200"
+    },
+
+    "HeadSelectOptions": [
+
+    ],
+
+    "TabOptions": [
+        {
+            "Value": "situation",
+            "Caption": "일부품목 교환/반품 처리"
+        }
+    ],
+
+
+    "//FormVars": "FormVars[0]-caption, FormVars[1]-format",
+    "FormVars": [
+        {
+            "ListButton": "저장",
+            "DateRange": "일자범위",
+            "DateNavi": "",
+            "Date": "",
+            "From": "부터",
+            "To": "까지",
+            "DownloadList": "",
+            "ShowOnlyClosed": "",
+            "Balance": "",
+            "OrderBy": "",
+
+            "HeadFirst": "주문번호",
+            "HeadSecond": "고객명",
+            "HeadThird": "상황",
+            "HeadFourth": "클레임상세",
+
+            "ColumnFirst": "이메일",
+            "ColumnSecond": "배송연락처",
+            "ColumnThird": "결제방식",
+            "ColumnFourth": "",
+
+            "TextFirst": "배송주소",
+            "TextSecond": "입금상세",
+            "TextThird": "",
+            "TextFourth": "",
+
+            "FootFirst": "품목소개",
+            "FootSecond": "배송료",
+            "FootThird": "할인 및 차감금액",
+            "FootFourth": "결제금액"
+        },
+        {
+            "ListButton": "left",
+            "DateRange": "left",
+            "Date": "left",
+            "From": "left",
+            "To": "left",
+            "DownloadList": "left",
+            "ShowOnlyClosed": "left",
+            "Balance": "right",
+            "OrderBy": "left",
+
+            "HeadFirst": "center",
+            "HeadSecond": "center",
+            "HeadThird": "status('sorder')",
+            "HeadFourth": "situation('sorder')",
+
+            "ColumnFirst": "left",
+            "ColumnSecond": "left",
+            "ColumnThird": "paymethod('sorder')",
+            "ColumnFourth": "center",
+
+            "TextFirst": "left",
+            "TextSecond": "left",
+            "TextThird": "left",
+            "TextFourth": "left",
+
+            "FootFirst": "decimal('sales_amt')",
+            "FootSecond": "decimal('sales_amt')",
+            "FootThird": "decimal('sales_amt')",
+            "FootFourth": "decimal('sales_amt')"
+        }
+
+    ],
+
+    "// DateRangeOptions": "월:현재월의 1~30, 분기: 현재분기의 첫째월 1일 ~ 마지막월의 말일, 반기/년 동일한 컨셉,전체:1990~3000",
+    "DateRangeOptions": [
+        {
+            "Value": "day",
+            "Caption": "일"
+        },
+        {
+            "Value": "week",
+            "Caption": "주"
+        },
+        {
+            "Value": "month",
+            "Caption": "월"
+        },
+        {
+            "Value": "quarterly",
+            "Caption": "분기"
+        },
+        {
+            "Value": "semiannual",
+            "Caption": "반기"
+        },
+        {
+            "Value": "year",
+            "Caption": "년"
+        },
+        {
+            "Value": "all",
+            "Caption": "전체"
+        }
+    ],
+
+    "SelectPopupOptions": [
+    ],
+
+    "DisplayVars": {
+        "IsntPagination": false,
+        "IsExcelColumn": false,
+        "IsDownloadList": false,
+        "IsShowOnlyClosed": false,
+        "IsListFirst" : true,
+        "InitLines" : 10,
+        "HeadHeight": "",
+        "BodyHeight": "200"
+    },
+
+    "// OrderByOptions": "OrderBy Options//첫번째 Value가 Default",
+    "OrderByOptions": [
+        {
+            "Value": "mx.id asc",
+            "Caption": "주문 시간 순서"
+        },
+        {
+            "Value": "mx.id desc",
+            "Caption": "주문 시간 역순"
+        }
+    ],
+
+    "//BalanceOptions": "Show OnlyBalaceRemained or All",
+    "BalanceOptions": [
+        {
+            "Value": "",
+            "Caption": "전체 보기"
+        },
+        {
+            "Value": "c10 > 0",
+            "Caption": "잔량있는 것만"
+        }
+    ],
+
+    "// ListVars": "ListVars[0]-caption, ListVars[1]-size(px), ListVars[2]-align->right(number) left(left)",
+    "ListVars": [
+        {
+            "$Radio": "$Radio",
+            "No": "번호",
+            "C1": "품목",
+            "C2": "규격",
+            "C3": "수량",
+            "C4": "단가",
+            "C5": "금액",
+            "C6": "",
+            "C7": "",
+            "C8": "",
+            "C9": "",
+            "C10": "",
+            "C11": "",
+            "C12": "",
+            "C13": "",
+            "C14": "",
+            "C15": "",
+            "C16": "",
+            "C17": "",
+            "C18": "",
+            "C19": "",
+            "C20": "",
+            "C21": "",
+            "C22": "",
+            "C23": "",
+            "C24": "",
+            "C25": "",
+            "C26": "",
+            "C27": "",
+            "C28": "",
+            "C29": "",
+            "C30": ""
+        },
+        {
+            "$Radio": "3",
+            "No": "3",
+            "C1": "25",
+            "C2": "6",
+            "C3": "6",
+            "C4": "6",
+            "C5": "6",
+            "C6": "",
+            "C7": "",
+            "C8": "",
+            "C9": "",
+            "C10": "",
+            "C11": "",
+            "C12": "",
+            "C13": "",
+            "C14": "",
+            "C15": "",
+            "C16": "",
+            "C17": "",
+            "C18": "",
+            "C19": "",
+            "C20": "",
+            "C21": "",
+            "C22": "",
+            "C23": "",
+            "C24": "",
+            "C25": "",
+            "C26": "",
+            "C27": "",
+            "C28": "",
+            "C29": "",
+            "C30": ""
+        },
+        {
+            "$Radio": "center",
+            "No": "center",
+            "C1": "left",
+            "C2": "left",
+            "C3": "decimal('sales_qty')",
+            "C4": "decimal('sales_prc')",
+            "C5": "decimal('sales_prc')",
+            "C6": "",
+            "C7": "",
+            "C8": "",
+            "C9": "",
+            "C10": "",
+            "C11": "",
+            "C12": "",
+            "C13": "",
+            "C14": "",
+            "C15": "",
+            "C16": "",
+            "C17": "",
+            "C18": "",
+            "C19": "",
+            "C20": "",
+            "C21": "",
+            "C22": "",
+            "C23": "",
+            "C24": "",
+            "C25": "",
+            "C26": "",
+            "C27": "",
+            "C28": "",
+            "C29": "",
+            "C30": ""
+        }
+    ]
+}

+ 27 - 8
public/js/utils/lib.js

@@ -568,6 +568,33 @@ function format_func_condition_type_rev(value, data) {
     return _.first(condition_type)['Code'];
 }
 
+function format_func_condition_type(value, data) {
+    if (window.CodeTitle['condition-type'] && window.CodeTitle['condition-type'][value][data]) {
+        return window.CodeTitle['condition-type'][value][data]['Title'];
+    }
+
+    return 'Invalid';
+}
+
+function format_func_body_situation_update(value, data) {
+    return { Field: 'BodySituation', Value: format_func_body_situation_rev(value, data),  };
+}
+
+function format_func_body_situation_rev(value, data) {
+    const body_situation = Object.values(window.CodeTitle['body-situation'][value]).filter(body_situation => body_situation.Title == data)
+    if (isEmptyArr(body_situation)) { return data;  }
+
+    return _.first(body_situation)['Code'];
+}
+
+function format_func_body_situation(value, data) {
+    if (window.CodeTitle['body-situation'] && window.CodeTitle['body-situation'][value][data]) {
+        return window.CodeTitle['body-situation'][value][data]['Title'];
+    }
+
+    return 'Invalid';
+}
+
 function formatPhoneNumber(phoneNumber) {
     // Remove any non-numeric characters
     let cleaned = phoneNumber.replace(/\D/g, '');
@@ -581,14 +608,6 @@ function formatPhoneNumber(phoneNumber) {
     }
 }
 
-function format_func_condition_type(value, data) {
-    if (window.CodeTitle['condition-type'] && window.CodeTitle['condition-type'][value][data]) {
-        return window.CodeTitle['condition-type'][value][data]['Title'];
-    }
-
-    return 'Invalid';
-}
-
 function check_dom_input_number(dom_array) {
     let arr = dom_array.filter(el => isNaN($(el).val()))
 

+ 1 - 1
resources/views/front/dabory/erp/list-type/list1-form.blade.php

@@ -26,7 +26,7 @@
 
 <div class="tab-content" id="list1-form">
 @isset ($list1['TabOptions'])
-    <div class="tab-pane fade active show" id="{{ $list1['TabOptions'][0]['Value'] }}">
+    <div class="tab-pane fade {{ $list1['TabOptions'][0]['Value'] === 'basic' ? 'active show' : '' }}" id="{{ $list1['TabOptions'][0]['Value'] }}">
 @endisset
         <div class="card mb-1" {{ $list1['FormVars']['Hidden']['HeadFirst'] }}>
             <div class="row text-center">

+ 96 - 0
resources/views/front/dabory/erp/popup/popup-list1/form-tab/sorder-bd-pro-no-total.blade.php

@@ -0,0 +1,96 @@
+<div class="tab-pane fade active show" id="body-situation">
+    <input type="hidden" id="Id" name="Id" value="0">
+    <div class="card-header p-0 mr-1">
+        <div class="row">
+            <div class="col-7 pr-0 card-header-item">
+                <div class="card card card-primary mb-3 mb-md-2 mb-lg-0 border-light">
+                    <div class="card-body">
+                        <div class="d-flex flex-column mb-2">
+                            <label class="m-0 font-weight-bold">클레임 처리</label>
+                            <div class="title-br"></div>
+                            @php
+                                $situationList = collect($codeTitle['body-situation']['sorder-bd'])->filter(function ($situation) {
+                                    return $situation['Code'] !== '';
+                                })->map(function ($situation) {
+                                    return array_merge($situation, ['Unique' => $situation['Code'][0]]);
+                                })->groupBy('Unique')->toArray();
+                            @endphp
+                            @foreach ($situationList as $chunk)
+                                <div class="d-flex align-items-center mb-2">
+                                    @forelse ($chunk as $key => $situation)
+                                        @if ($situation['Code'] !== '' && $situation['Code'] !== 'ETC' && $situation['Code'] !== '')
+                                            <div class="d-flex align-items-center mr-3">
+                                                <input type="radio" name="body_situation" value="{{ $situation['Code'] }}" class="text-center mr-1" id="list-situation-radio-{{ $situation['Code'] }}">
+                                                <label class="mb-0" for="list-situation-radio-{{ $situation['Code'] }}">
+                                                    {{ $situation['Title'] }}
+                                                </label>
+                                            </div>
+                                        @endif
+                                    @empty
+                                    @endforelse
+                                </div>
+                            @endforeach
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="col-5 px-1 card-header-item">
+                <div class="card card card-primary mb-3 mb-md-2 mb-lg-0 border-light">
+                    <div class="card-body">
+                        <div class="d-flex flex-column mb-2">
+                            <label class="m-0 font-weight-bold">클레임 사유</label>
+                            <div class="title-br"></div>
+                            <textarea id="body_situation_notes" style="height: 91px;"></textarea>
+{{--                            <input type="text" class="rounded w-100" id="situation_notes">--}}
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>
+<script>
+    $(document).ready(async function() {
+    });
+
+    (function( ListTypeList1FromTab, $, undefined ) {
+        ListTypeList1FromTab.save = async function () {
+            const response = await get_api_data('sorder-bd-act', {
+                Page : [
+                    ListTypeList1FromTab.getParameter()
+                ]
+            })
+
+            show_iziToast_msg(response.data, function () {
+                $('#modal-select-popup.show').trigger('list.requery');
+                // ListTypeList1FromTab.ui($('#delivery').find(`input[name="Id"]`).val())
+            })
+        }
+
+        ListTypeList1FromTab.getParameter = function () {
+            let id = parseInt($('#body-situation').find(`input[name="Id"]`).val());
+            let parameter = {
+                Id: id,
+                BodySituation: $('#body-situation').find(`input:radio[name=body_situation]:checked`).val(),
+                BodySituationNotes: $('#body-situation').find('#body_situation_notes').val(),
+            }
+
+            // console.log(parameter)
+            return parameter;
+        }
+
+        ListTypeList1FromTab.ui = async function (id) {
+            let response = await get_api_data('sorder-bd-pick', {
+                Page : [ { Id: Number(id) } ]
+            })
+            const sorder_bd = response.data.Page[0]
+            $('#body-situation').find(`input[name="Id"]`).val(sorder_bd['Id'])
+            $('#body-situation').find(`input:radio[name=body_situation]:input[value='${sorder_bd['BodySituation']}']`).prop('checked', true)
+            $('#body-situation').find('#body_situation_notes').val(sorder_bd['BodySituationNotes'])
+        }
+
+    }( window.ListTypeList1FromTab = window.ListTypeList1FromTab || {}, jQuery ));
+
+</script>