diff --git a/app/Controllers/Admin/Customer/ServicePaymentController.php b/app/Controllers/Admin/Customer/ServicePaymentController.php index a1c9712..abb4553 100644 --- a/app/Controllers/Admin/Customer/ServicePaymentController.php +++ b/app/Controllers/Admin/Customer/ServicePaymentController.php @@ -71,9 +71,6 @@ class ServicePaymentController extends CustomerController } $result = view($view_file, ['viewDatas' => $this->getViewDatas()]); break; - case 'index': - $result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'payment'); - break; default: $result = parent::getResultSuccess($message, $actionTemplate); break; diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 76d3263..e221b0e 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -144,6 +144,14 @@ abstract class CommonController extends BaseController { return $this->_control['batchjob_fields'] ?? []; } + final protected function setBatchjobButtions(array $fields): void + { + $this->_control['batchjob_buttions'] = $fields; + } + final protected function getBatchjobButtions(): array + { + return $this->_control['batchjob_buttions'] ?? []; + } final protected function setFilterFieldOption(string $field, array $options): void { if (!array_key_exists('filter_optons', $this->_control)) { @@ -193,6 +201,7 @@ abstract class CommonController extends BaseController $this->setFilterFieldOption($field, $this->getFormFieldOption($field)); } $this->setBatchJobFields(array_key_exists('batchjobFields', $fields) ? $fields['batchjobFields'] : $this->getService()->getBatchJobFields()); + $this->setBatchJobButtions(array_key_exists('batchjobButtions', $fields) ? $fields['batchjobFields'] : $this->getService()->getBatchJobButtons()); } protected function getFormFieldRule(string $action, string $field): string { diff --git a/app/Helpers/Customer/ServicePaymentHelper.php b/app/Helpers/Customer/ServicePaymentHelper.php index 2cc38d6..4b79d74 100644 --- a/app/Helpers/Customer/ServicePaymentHelper.php +++ b/app/Helpers/Customer/ServicePaymentHelper.php @@ -19,6 +19,9 @@ class ServicePaymentHelper extends CustomerHelper $value = $viewDatas['entity']->getView_CounDueAt(); break; case 'item_uid': + //ItemType에 따라 필터옵션에서 Title을 가져옴 + $value = $viewDatas['control']['filter_optons'][$viewDatas['entity']->getItemType()][$value]->getTitle(); + break; case 'serviceinfo_uid': case 'ownerinfo_uid': case 'item_type': diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index 19d30a4..477c74f 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -24,6 +24,14 @@ abstract class CommonService { return $this->getFormFields(); } + public function getBatchJobButtons(): array + { + return [ + 'batchjob' => '일괄 처리', + 'batchjob_delete' => '일괄 삭제', + ]; + } + //기본 기능부분 final public function __get($name) { if (!array_key_exists($name, $this->_serviceDatas)) { diff --git a/app/Services/Customer/ServicePaymentService.php b/app/Services/Customer/ServicePaymentService.php index 1624fcf..cb7070a 100644 --- a/app/Services/Customer/ServicePaymentService.php +++ b/app/Services/Customer/ServicePaymentService.php @@ -38,7 +38,7 @@ class ServicePaymentService extends CustomerService } public function getFilterFields(): array { - return ["serviceinfo_uid", "ownerinfo_uid", 'user_uid', 'item_type', 'item_uid', 'billing_cycle', 'status']; + return ["serviceinfo_uid", "ownerinfo_uid", 'user_uid', 'item_type', 'billing_cycle', 'status']; } public function getBatchJobFields(): array { @@ -48,6 +48,12 @@ class ServicePaymentService extends CustomerService { return ["ownerinfo_uid", 'serviceinfo_uid', 'item_type', 'item_uid', 'billing_cycle', 'amount', 'billing_at', 'issue_at', 'countdown', 'status', 'user_uid']; } + public function getBatchJobButtons(): array + { + return [ + 'invoice' => '청구서 발행', + ]; + } //기본 기능부분 //FieldForm관련용 public function getFormFieldOption(string $field, array $options = []): array diff --git a/app/Views/admin/payment/index.php b/app/Views/admin/payment/index.php deleted file mode 100644 index 2399a5a..0000000 --- a/app/Views/admin/payment/index.php +++ /dev/null @@ -1,62 +0,0 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> -section('content') ?> -alert($error) ?> -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
- - - - - - -
- - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> - - - -
include("templates/{$viewDatas['layout']}/index_header"); ?>
-
- -
- include("templates/{$viewDatas['layout']}/index_content_top"); ?> - 'batchjob_form', 'method' => "post"]) ?> - - - - - - - - - - - - - - - getListRowColor($entity) ?>> - - - - - - - - - - -
번호getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>작업
getListButton('modify', '', $viewDatas) ?>getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', '', $viewDatas) ?>  - getListButton('history', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> -
- include("templates/{$viewDatas['layout']}/index_content_bottom"); ?> - -
-
- - -
- -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
-endSection() ?> \ No newline at end of file diff --git a/app/Views/templates/admin/index_content_bottom.php b/app/Views/templates/admin/index_content_bottom.php index 6ce283a..8336b1d 100644 --- a/app/Views/templates/admin/index_content_bottom.php +++ b/app/Views/templates/admin/index_content_bottom.php @@ -5,8 +5,9 @@ getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>  - - + $label): ?> + +