dbms_init...1

This commit is contained in:
choi.jh 2025-08-07 15:35:57 +09:00
parent 733bc37763
commit 39c725441a
7 changed files with 30 additions and 68 deletions

View File

@ -71,9 +71,6 @@ class ServicePaymentController extends CustomerController
} }
$result = view($view_file, ['viewDatas' => $this->getViewDatas()]); $result = view($view_file, ['viewDatas' => $this->getViewDatas()]);
break; break;
case 'index':
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'payment');
break;
default: default:
$result = parent::getResultSuccess($message, $actionTemplate); $result = parent::getResultSuccess($message, $actionTemplate);
break; break;

View File

@ -144,6 +144,14 @@ abstract class CommonController extends BaseController
{ {
return $this->_control['batchjob_fields'] ?? []; 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 final protected function setFilterFieldOption(string $field, array $options): void
{ {
if (!array_key_exists('filter_optons', $this->_control)) { if (!array_key_exists('filter_optons', $this->_control)) {
@ -193,6 +201,7 @@ abstract class CommonController extends BaseController
$this->setFilterFieldOption($field, $this->getFormFieldOption($field)); $this->setFilterFieldOption($field, $this->getFormFieldOption($field));
} }
$this->setBatchJobFields(array_key_exists('batchjobFields', $fields) ? $fields['batchjobFields'] : $this->getService()->getBatchJobFields()); $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 protected function getFormFieldRule(string $action, string $field): string
{ {

View File

@ -19,6 +19,9 @@ class ServicePaymentHelper extends CustomerHelper
$value = $viewDatas['entity']->getView_CounDueAt(); $value = $viewDatas['entity']->getView_CounDueAt();
break; break;
case 'item_uid': case 'item_uid':
//ItemType에 따라 필터옵션에서 Title을 가져옴
$value = $viewDatas['control']['filter_optons'][$viewDatas['entity']->getItemType()][$value]->getTitle();
break;
case 'serviceinfo_uid': case 'serviceinfo_uid':
case 'ownerinfo_uid': case 'ownerinfo_uid':
case 'item_type': case 'item_type':

View File

@ -24,6 +24,14 @@ abstract class CommonService
{ {
return $this->getFormFields(); return $this->getFormFields();
} }
public function getBatchJobButtons(): array
{
return [
'batchjob' => '일괄 처리',
'batchjob_delete' => '일괄 삭제',
];
}
//기본 기능부분
final public function __get($name) final public function __get($name)
{ {
if (!array_key_exists($name, $this->_serviceDatas)) { if (!array_key_exists($name, $this->_serviceDatas)) {

View File

@ -38,7 +38,7 @@ class ServicePaymentService extends CustomerService
} }
public function getFilterFields(): array 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 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']; 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관련용 //FieldForm관련용
public function getFormFieldOption(string $field, array $options = []): array public function getFormFieldOption(string $field, array $options = []): array

View File

@ -1,62 +0,0 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?= $this->section('content') ?>
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div>
<!-- Layout Middle Start -->
<table class="layout_middle">
<tr>
<td class="layout_left">
<!-- Layout Left Start -->
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
<!-- Layout Left End -->
</td>
<td class="layout_right">
<!-- Layout Right Start -->
<div class="layout_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div>
<div id="container" class="layout_content">
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body">
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
<thead>
<tr>
<th class="index_head_short_column">번호</th>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
<?php endforeach ?>
<th class="index_head_short_column">작업</th>
</tr>
</thead>
<tbody>
<?php $cnt = 0 ?>
<?php foreach ($viewDatas['entities'] as $entity): ?>
<?php $viewDatas['entity'] = $entity; ?>
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
<?php endforeach ?>
<td nowrap>
<?= $viewDatas['helper']->getListButton('view', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('history', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('delete', '', $viewDatas) ?>
</td>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</tbody>
</table>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
<?= form_close() ?>
</div>
</div>
<div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
<!-- Layout Right End -->
</td>
</tr>
</table>
<!-- Layout Middle End -->
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
<?= $this->endSection() ?>

View File

@ -5,8 +5,9 @@
<?php foreach ($viewDatas['control']['batchjob_fields'] as $field): ?> <?php foreach ($viewDatas['control']['batchjob_fields'] as $field): ?>
<?= $viewDatas['helper']->getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>&nbsp; <?= $viewDatas['helper']->getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>&nbsp;
<?php endforeach ?> <?php endforeach ?>
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob', '', $viewDatas) ?></li> <?php foreach ($viewDatas['control']['batchjob_buttions'] as $action => $label): ?>
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob_delete', '', $viewDatas) ?></li> <li class="nav-item"><?= $viewDatas['helper']->getListButton($action, $label, $viewDatas) ?></li>
<?php endforeach ?>
</ul> </ul>
<div class=" index_pagination"><?= $viewDatas['pagination'] ?></div> <div class=" index_pagination"><?= $viewDatas['pagination'] ?></div>
</div> </div>