Jelajahi Sumber

241011-0950-Kim

hokky 1 bulan lalu
induk
melakukan
5adfeb3741

+ 9 - 2
resources/views/front/dabory/erp/basic-settings/monthly-settle.blade.php

@@ -119,12 +119,19 @@
             $('#modal-setting_monthly_settle').modal('hide');
         }
 
-        MonthlySettleForm.btn_re_cal = async function () {
+        MonthlySettleForm.check_input = async function (parameters) {
             if ($('#yyyy-txt').val() == '') {
                 return iziToast.error({ title: 'Error', message: '정산년도를 입력해주세요. ex)2024' });
             }
+            if(parameters.length == 0){
+                return iziToast.error({ title: 'Error', message: '재정산 메뉴를 1개 이상 체크해주세요.' });
+            }
 
+        }
+
+        MonthlySettleForm.btn_re_cal = async function () {
             const parameters = MonthlySettleForm.parameter();
+            MonthlySettleForm.check_input(parameters);
 
             for (const parameter of parameters) {
                 const response = await get_api_data('monthly-settle', parameter);
@@ -135,7 +142,7 @@
                 }
 
                 iziToast.success({ title: 'Success', message: '재정산 완료' });
-                console.log(response);
+                // console.log(response);
             }
         };