dbmsv2_init...1
This commit is contained in:
parent
a68c539ec0
commit
d84c355c59
32
app/Cells/Customer/PaymentCell.php
Normal file
32
app/Cells/Customer/PaymentCell.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cells\Customer;
|
||||
|
||||
use App\Services\PaymentService;
|
||||
|
||||
class PaymentCell extends CustomerCell
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new PaymentService());
|
||||
}
|
||||
|
||||
public function detail(array $params): string
|
||||
{
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
$this->getService()->setFormOptions();
|
||||
$entities = $this->getService()->getEntities(['clientinfo_uid' => $params['clientinfo_uid'], 'billing' => PAYMENT['BILLING']['ONETIME'], 'status' => STATUS['UNPAID']]);
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/payment/' . $template, [
|
||||
'serviceCellDatas' => [
|
||||
'control' => $this->getService()->getControlDatas(),
|
||||
'service' => $this->getService(),
|
||||
'entities' => $entities,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -217,6 +217,7 @@ define('ICONS', [
|
||||
'POINT' => '<i class="bi bi-coin"></i>',
|
||||
'ALRAM' => '<i class="bi bi-bell"></i>',
|
||||
'PAYMENT' => '<i class="bi bi-credit-card-2-back"></i>',
|
||||
'LINK' => '<i class="bi bi-link-45deg"></i>',
|
||||
'SALE_UP' => '<i class="bi bi-graph-up-arrow"></i>',
|
||||
'SALE_DOWN' => '<i class="bi bi-graph-down-arrow"></i>',
|
||||
'SERVICE' => '<i class="bi bi-gear-wide-connected"></i>',
|
||||
|
||||
@ -141,7 +141,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob', 'PaymentController::batchjob');
|
||||
$routes->post('batchjob_delete', 'PaymentController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'PaymentController::download/$1');
|
||||
$routes->post('invoice', 'PaymentController::invoice', []);
|
||||
$routes->post('invoice', 'PaymentController::invoice');
|
||||
});
|
||||
});
|
||||
//Customer 관련
|
||||
|
||||
@ -117,4 +117,13 @@ class PaymentController extends CustomerController
|
||||
return $this->getResultFail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
protected function create_form_process(): void
|
||||
{
|
||||
$formDatas = $this->getService()->getFormDatas();
|
||||
$formDatas['billing'] = PAYMENT['BILLING']['ONETIME'];
|
||||
$formDatas['billing_at'] = date("Y-m-d");
|
||||
$this->getService()->setFormDatas($formDatas);
|
||||
parent::create_form_process();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
729
app/Database/dbmsv2_test2.sql
Normal file
729
app/Database/dbmsv2_test2.sql
Normal file
File diff suppressed because one or more lines are too long
@ -17,18 +17,18 @@ class ServiceEntity extends CustomerEntity
|
||||
$this->attributes['serverEntity'] = $entity;
|
||||
return $this;
|
||||
}
|
||||
final public function getServerEntity(): ServerEntity
|
||||
final public function getServerEntity(): ServerEntity|null
|
||||
{
|
||||
return $this->attributes['serverEntity'];
|
||||
return $this->attributes['serverEntity'] ?? null;
|
||||
}
|
||||
final public function setPaymentEntity(PaymentEntity $entity): self
|
||||
{
|
||||
$this->attributes['paymentEntity'] = $entity;
|
||||
return $this;
|
||||
}
|
||||
final public function getPaymentEntity(): PaymentEntity
|
||||
final public function getPaymentEntity(): PaymentEntity|null
|
||||
{
|
||||
return $this->attributes['paymentEntity'];
|
||||
return $this->attributes['paymentEntity'] ?? null;
|
||||
}
|
||||
final public function getUserUID(): string
|
||||
{
|
||||
|
||||
@ -24,9 +24,9 @@ class ServerPartEntity extends EquipmentEntity
|
||||
$this->attributes['paymentEntity'] = $entity;
|
||||
return $this;
|
||||
}
|
||||
final public function getPaymentEntity(): PaymentEntity
|
||||
final public function getPaymentEntity(): PaymentEntity|null
|
||||
{
|
||||
return $this->attributes['paymentEntity'];
|
||||
return $this->attributes['paymentEntity'] ?? null;
|
||||
}
|
||||
public function getPartUID(): int
|
||||
{
|
||||
|
||||
@ -9,4 +9,9 @@ class DISKEntity extends PartEntity
|
||||
const PK = DISKModel::PK;
|
||||
const TITLE = DISKModel::TITLE;
|
||||
const DEFAULT_STATUS = STATUS['AVAILABLE'];
|
||||
|
||||
public function getFormat(): int
|
||||
{
|
||||
return intval($this->attributes['format'] ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,10 @@ class PaymentEntity extends CommonEntity
|
||||
{
|
||||
return $this->attributes['pay'] ?? "";
|
||||
}
|
||||
public function getContent(): string
|
||||
{
|
||||
return $this->attributes['content'] ?? "";
|
||||
}
|
||||
public function getCountDueAt(): string
|
||||
{
|
||||
$result = "";
|
||||
|
||||
@ -322,6 +322,11 @@ class CommonHelper
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
if (array_key_exists($value, $viewDatas['control']['field_optons'][$field])) {
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
||||
}
|
||||
break;
|
||||
case 'role':
|
||||
$roles = [];
|
||||
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
|
||||
|
||||
@ -14,6 +14,9 @@ class ClientHelper extends CustomerHelper
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'name':
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$viewDatas['entity']->getPK()}\">" . $value . "</a>";
|
||||
break;
|
||||
case "email":
|
||||
case "phone":
|
||||
$value = $this->getMyAuth()->isAccessRole(['security']) ? parent::getFieldView($field, $value, $viewDatas, $extras) : "***********";
|
||||
|
||||
@ -74,11 +74,6 @@ class ServiceHelper extends CustomerHelper
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
if (array_key_exists($value, $viewDatas['control']['field_optons'][$field])) {
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
||||
}
|
||||
break;
|
||||
case 'amount':
|
||||
$value = number_format($value) . "원";
|
||||
break;
|
||||
@ -113,7 +108,7 @@ class ServiceHelper extends CustomerHelper
|
||||
case 'alternative':
|
||||
$extras = ["class" => "btn btn-outline btn-info btn-circle", "target" => "_self", ...$extras];
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['SETUP'],
|
||||
$label ? $label : ICONS['REBOOT'],
|
||||
$action,
|
||||
[
|
||||
"data-src" => "/admin/customer/service/alternative/{$viewDatas['entity']->getPK()}",
|
||||
@ -123,6 +118,19 @@ class ServiceHelper extends CustomerHelper
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'onetime':
|
||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['ONETIME'],
|
||||
$action,
|
||||
[
|
||||
"data-src" => "/admin/customer/payment/create?serviceinfo_uid={$viewDatas['entity']->getPK()}",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#index_action_form",
|
||||
...$extras
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'history':
|
||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||
$action = form_label(
|
||||
|
||||
@ -40,11 +40,6 @@ class ServerHelper extends EquipmentHelper
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
if (array_key_exists($value, $viewDatas['control']['field_optons'][$field])) {
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
||||
}
|
||||
break;
|
||||
case 'title':
|
||||
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
|
||||
@ -5,6 +5,7 @@ return [
|
||||
'title' => "모델명",
|
||||
'price' => "기본가",
|
||||
'stock' => "재고",
|
||||
'format' => "포맷",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
|
||||
@ -6,6 +6,7 @@ return [
|
||||
'clientinfo_uid' => "고객",
|
||||
'serviceinfo_uid' => "서비스",
|
||||
'title' => "청구항목",
|
||||
'content' => "내용",
|
||||
'amount' => "청구금액",
|
||||
'billing' => "청구방법",
|
||||
'billing_at' => "지급기한일",
|
||||
|
||||
@ -17,6 +17,7 @@ class DISKModel extends PartModel
|
||||
"title",
|
||||
"price",
|
||||
"stock",
|
||||
"format",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
|
||||
@ -18,6 +18,7 @@ class PaymentModel extends CommonModel
|
||||
"serviceinfo_uid",
|
||||
"serverpartinfo_uid",
|
||||
"title",
|
||||
"content",
|
||||
"amount",
|
||||
"billing",
|
||||
"billing_at",
|
||||
@ -53,6 +54,7 @@ class PaymentModel extends CommonModel
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
case "pay":
|
||||
case "content":
|
||||
$rule = "permit_empty|trim|string";
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -333,22 +333,9 @@ class ServerPartService extends EquipmentService implements ServerInterface
|
||||
$entity = parent::delete($entity);
|
||||
//Type에 따른 부품서비스 정의
|
||||
$this->getPartService($entity->getType())->unSetServerPart($entity, []);
|
||||
//서비스 및 결제정보 처리
|
||||
switch ($entity->getBilling()) {
|
||||
case PAYMENT['BILLING']['MONTH']: //월별과금일때만 처리
|
||||
//삭제시는 월비용 서비스만 처리
|
||||
if ($entity->getBilling() === PAYMENT['BILLING']['MONTH']) {
|
||||
$entity = $this->getServiceService()->unSetServerPart($entity, []);
|
||||
break;
|
||||
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
|
||||
$entity = $this->getPaymentService()->unSetServerPart($entity, []);
|
||||
//결제정보PK정의
|
||||
$entity = parent::modify($entity, ['payment_uid' => $entity->getPaymentEntity()->getPK()]);
|
||||
break;
|
||||
case PAYMENT['BILLING']['BASE']: //기본처리
|
||||
//아무처리 않함
|
||||
break;
|
||||
default:
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생:{$entity->getBilling()}은 지정되지 않은 결제방식입니다.");
|
||||
// break;
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
@ -372,7 +359,6 @@ class ServerPartService extends EquipmentService implements ServerInterface
|
||||
switch ($serverPartEntity->getType()) {
|
||||
case 'CPU':
|
||||
case 'RAM':
|
||||
case 'DISK':
|
||||
//기본이 아닌 결제방식의 경우 모두 회수처리
|
||||
if ($serverPartEntity->getBilling() !== PAYMENT['BILLING']['BASE']) {
|
||||
//Type에 따른 부품서비스 정의
|
||||
@ -381,7 +367,7 @@ class ServerPartService extends EquipmentService implements ServerInterface
|
||||
parent::delete($serverPartEntity);
|
||||
}
|
||||
break;
|
||||
default: //IP,SWITCH,CS,SOFTWARE,OS등은 모두 회수처리
|
||||
default: //DISK,IP,SWITCH,CS,SOFTWARE,OS등은 모두 회수처리
|
||||
$this->getPartService($serverPartEntity->getType())->unSetServerPart($serverPartEntity, []);
|
||||
//서버연결정보 식제
|
||||
parent::delete($serverPartEntity);
|
||||
|
||||
@ -154,14 +154,6 @@ class ServerService extends EquipmentService implements ServiceInterface
|
||||
}
|
||||
return $formDatas;
|
||||
}
|
||||
//Action 기능
|
||||
private function action_process(ServerEntity $entity, string $action): ServerEntity
|
||||
{
|
||||
//서비스정보수정(청구액수정)
|
||||
$entity = $this->getServiceService()->$action($entity);
|
||||
$entity = $this->getServerPartService()->$action($entity);
|
||||
return $entity;
|
||||
}
|
||||
public function create(array $formDatas): ServerEntity
|
||||
{
|
||||
$entity = parent::create($formDatas);
|
||||
@ -182,6 +174,10 @@ class ServerService extends EquipmentService implements ServiceInterface
|
||||
//삭제
|
||||
public function delete(mixed $entity): ServerEntity
|
||||
{
|
||||
//서비스중인지 확인
|
||||
if ($entity->getServiceInfoUID() !== null || $entity->getStatus() === STATUS['OCCUPIED']) {
|
||||
throw new \Exception("서비스중이 서버는 삭제하실수 없습니다.");
|
||||
}
|
||||
//선처리작업
|
||||
$entity = $this->getServerPartService()->unsetServer($entity, []);;
|
||||
return parent::delete($entity);
|
||||
@ -235,7 +231,7 @@ class ServerService extends EquipmentService implements ServiceInterface
|
||||
throw new \Exception("서비스를 해지할 서버정보가 없습니다.");
|
||||
}
|
||||
if ($serviceEntity->getServerEntity()->getPK() === $serviceDatas['serverinfo_uid']) {
|
||||
throw new \Exception("Main으로 설정된 서버는 해지하실 수 업습니다.");
|
||||
throw new \Exception("Main으로 설정된 서버는 해지하실 수 없습니다.");
|
||||
}
|
||||
$entity = $this->getEntity($serviceDatas['serverinfo_uid']);
|
||||
if (!$entity instanceof ServerEntity) {
|
||||
|
||||
@ -22,6 +22,7 @@ class DISKService extends PartService implements ServerPartInterface
|
||||
"title",
|
||||
"price",
|
||||
"stock",
|
||||
"format",
|
||||
"status",
|
||||
];
|
||||
}
|
||||
@ -37,6 +38,7 @@ class DISKService extends PartService implements ServerPartInterface
|
||||
"title",
|
||||
"price",
|
||||
"stock",
|
||||
"format",
|
||||
"status",
|
||||
];
|
||||
}
|
||||
@ -70,7 +72,6 @@ class DISKService extends PartService implements ServerPartInterface
|
||||
}
|
||||
public function changeServerPart(ServerPartEntity $oldServerPartEntity, ServerPartEntity $serverPartEntity, array $serverPartDatas): ServerPartEntity
|
||||
{
|
||||
|
||||
//수정 전 부품연결정보관련 정보처리 갯수,파트가 달라졌을경우 (회수 -> 사용 처리)
|
||||
//기존것 회수 처리
|
||||
if ($oldServerPartEntity->getCnt() != $serverPartEntity->getCnt() || $oldServerPartEntity->getPartUID() !== $serverPartEntity->getPartUID()) {
|
||||
@ -86,7 +87,7 @@ class DISKService extends PartService implements ServerPartInterface
|
||||
if (!$entity instanceof DISKEntity) {
|
||||
throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다.");
|
||||
}
|
||||
$entity = parent::modify($entity, ['stock' => $entity->getStock() + $serverPartEntity->getCnt()]);
|
||||
$entity = parent::modify($entity, ['format' => $entity->getFormat() + $serverPartEntity->getCnt()]);
|
||||
return $serverPartEntity->setPartEntity($entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,14 +29,12 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
final public function getFormFields(): array
|
||||
{
|
||||
return [
|
||||
"clientinfo_uid",
|
||||
"serviceinfo_uid",
|
||||
"title",
|
||||
"amount",
|
||||
"billing",
|
||||
"billing_at",
|
||||
"pay",
|
||||
"status",
|
||||
"content"
|
||||
];
|
||||
}
|
||||
final public function getFormFilters(): array
|
||||
@ -135,6 +133,19 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
return $options;
|
||||
}
|
||||
//Action 기능
|
||||
public function create(array $formDatas): PaymentEntity
|
||||
{
|
||||
if (!array_key_exists('serviceinfo_uid', $formDatas)) {
|
||||
throw new \Exception("서비스정보가 없습니다.");
|
||||
}
|
||||
//결제정보 가져오기
|
||||
$serviceEntity = $this->getServiceService()->getEntity($formDatas['serviceinfo_uid']);
|
||||
if (!$serviceEntity instanceof ServiceEntity) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$formDatas['serviceinfo_uid']}]를 찾을수 없습니다.");
|
||||
}
|
||||
$formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID();
|
||||
return parent::create($formDatas);
|
||||
}
|
||||
//List 검색용
|
||||
//OrderBy 처리
|
||||
final public function setOrderBy(mixed $field = null, mixed $value = null): void
|
||||
@ -194,10 +205,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
if ($serverPartEntity->getServiceInfoUID() === null) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보가 정의된 후에만 가능합니다.");
|
||||
}
|
||||
//일회인이 아닌경우
|
||||
if ($serverPartEntity->getBilling() !== PAYMENT['BILLING']['ONETIME']) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: :" . lang("{$this->getClassName()}.BILLING." . PAYMENT['BILLING'][$serverPartEntity->getBilling()]) . "지급 상품은 처리가 불가, 일회성만 가능합니다.");
|
||||
}
|
||||
$formDatas = [];
|
||||
$formDatas['clientinfo_uid'] = $serverPartEntity->getClientInfoUID();
|
||||
$formDatas['serviceinfo_uid'] = $serverPartEntity->getServiceInfoUID();
|
||||
@ -218,10 +225,11 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
if ($serverPartEntity->getBilling() !== PAYMENT['BILLING']['ONETIME']) {
|
||||
throw new \Exception("[{$serverPartEntity->getBilling()}],청구방식이 일회성이 아닙니다.");
|
||||
}
|
||||
//결제정보 가져오기
|
||||
//기존 결제정보 가져오기
|
||||
$entity = $serverPartEntity->getPaymentEntity();
|
||||
//기존 결제정보가 없다면 신규입력으로 처리
|
||||
if (!$entity instanceof PaymentEntity) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서버파트연결정보{$serverPartEntity->getPK()}]에 해당하는 결제정보를 찾을수 없습니다.");
|
||||
return $this->setServerPart($serverPartEntity, $serverPartDatas);
|
||||
}
|
||||
//미납상태확인
|
||||
if ($entity->getStatus() !== STATUS['UNPAID']) {
|
||||
@ -230,10 +238,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
if ($serverPartEntity->getServiceInfoUID() === null) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보가 정의된 후에만 가능합니다.");
|
||||
}
|
||||
//일회인이 아닌경우
|
||||
if ($serverPartEntity->getBilling() !== PAYMENT['BILLING']['ONETIME']) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: :" . lang("{$this->getClassName()}.BILLING." . PAYMENT['BILLING'][$serverPartEntity->getBilling()]) . "지급 상품은 처리가 불가, 일회성만 가능합니다.");
|
||||
}
|
||||
$formDatas = [];
|
||||
$formDatas['clientinfo_uid'] = $serverPartEntity->getClientInfoUID();
|
||||
$formDatas['serviceinfo_uid'] = $serverPartEntity->getServiceInfoUID();
|
||||
@ -247,7 +251,8 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
//결제정보수정
|
||||
$entity = $this->getModel()->modify($entity, $formDatas);
|
||||
//서버연결정보 Entity에 결제정보 설정
|
||||
return $serverPartEntity->setPaymentEntity($entity);
|
||||
$serverPartEntity->setPaymentEntity($entity);
|
||||
return $serverPartEntity;
|
||||
}
|
||||
public function unsetServerPart(ServerPartEntity $serverPartEntity, array $serverPartDatas): ServerPartEntity
|
||||
{
|
||||
|
||||
@ -81,6 +81,7 @@
|
||||
</div>
|
||||
<?= form_close() ?>
|
||||
<?= view_cell("\App\Cells\Customer\ServiceCell::detail", ['clientinfo_uid' => $viewDatas['entity']->getPK()]) ?>
|
||||
<?= view_cell("\App\Cells\Customer\PaymentCell::detail", ['clientinfo_uid' => $viewDatas['entity']->getPK()]) ?>
|
||||
</div>
|
||||
<!-- index_body -->
|
||||
</div>
|
||||
|
||||
@ -104,8 +104,7 @@
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?>
|
||||
</div>
|
||||
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
|
||||
<!-- Layout Right End -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -85,6 +85,7 @@
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getFieldView('start_at', $entity->start_at, $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('alternative', '', $viewDatas) ?>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('onetime', '', $viewDatas) ?>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('view', '', $viewDatas) ?>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('delete', '', $viewDatas) ?>
|
||||
</td>
|
||||
@ -97,8 +98,7 @@
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?>
|
||||
</div>
|
||||
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
|
||||
<!-- Layout Right End -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -32,5 +32,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Layout Middle End -->
|
||||
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
|
||||
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -8,9 +8,19 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||
<?= view_cell("\App\Cells\Part\RAMCell::stock") ?>
|
||||
<?= view_cell("\App\Cells\Part\DISKCell::stock") ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th width="20%">메모리</th>
|
||||
<th width="20%">저장장치</th>
|
||||
<th width="30%">서버</th>
|
||||
<th width="30%">데스크탑</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= view_cell("\App\Cells\Part\RAMCell::stock") ?></td>
|
||||
<td><?= view_cell("\App\Cells\Part\DISKCell::stock") ?></td>
|
||||
<td>준비중...</td>
|
||||
<td>준비중...</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,7 +1,15 @@
|
||||
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>갯수</th>
|
||||
<th>포맷</th>
|
||||
</tr>
|
||||
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||
<?php $partCellDatas['entity'] = $entity; ?>
|
||||
<?php foreach (['title', 'stock'] as $field): ?>
|
||||
<td><?= $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?></td>
|
||||
<tr>
|
||||
<?php foreach (['title', 'stock', 'format'] as $field): ?>
|
||||
<td nowrap><?= $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
@ -1,7 +1,14 @@
|
||||
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>갯수</th>
|
||||
</tr>
|
||||
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||
<?php $partCellDatas['entity'] = $entity; ?>
|
||||
<tr>
|
||||
<?php foreach (['title', 'stock'] as $field): ?>
|
||||
<td><?= $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?></td>
|
||||
<td nowrap><?= $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
24
app/Views/cells/payment/detail.php
Normal file
24
app/Views/cells/payment/detail.php
Normal file
@ -0,0 +1,24 @@
|
||||
<div class="rounded border border-gray p-2 mt-3">
|
||||
<div style="font-size:15px">미지급 1회성정보</div>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr class="text-center">
|
||||
<th style="width: 250px">서비스</th>
|
||||
<th style="width: 120px">날자</th>
|
||||
<th style="width: 120px">결제금액</th>
|
||||
<th style="width: 250px">항목</th>
|
||||
<th style="width: 250px">내용</th>
|
||||
<th style="width: 250px">처리자</th>
|
||||
</tr>
|
||||
<?php foreach ($serviceCellDatas['entities'] as $entity): ?>
|
||||
<?php $serviceCellDatas['entity'] = $entity ?>
|
||||
<tr class="text-left">
|
||||
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $serviceCellDatas) ?></td>
|
||||
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('create_at', $entity->getCreatedAt(), $serviceCellDatas) ?></td>
|
||||
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('amount', $entity->getAmount(), $serviceCellDatas) ?></td>
|
||||
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('title', $entity->getTitle(), $serviceCellDatas) ?></td>
|
||||
<td class="text-start"><?= $serviceCellDatas['service']->getHelper()->getFieldView('content', nl2br($entity->getContent()), $serviceCellDatas) ?></td>
|
||||
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('user_uid', $entity->getUserUID(), $serviceCellDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
@ -10,14 +10,14 @@
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php $view_htmls = [] ?>
|
||||
<?php foreach ($htmls as $type => $datas): ?>
|
||||
<?php $view_htmls[] = $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) . implode(",", $datas) ?>
|
||||
<?php endforeach ?>
|
||||
<?= implode(" / ", $view_htmls) ?>
|
||||
<?php $view_texts = [] ?>
|
||||
<?php foreach ($htmls as $type => $datas): ?>
|
||||
<?php $view_texts[] = implode(',', $texts[$type]) ?>
|
||||
<?php endforeach ?>
|
||||
<?php $text = implode(" / ", $view_texts) ?>
|
||||
<span class="serverparts float-start rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||
<span class="rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||
<?php $view_htmls = [] ?>
|
||||
<?php foreach ($htmls as $type => $datas): ?>
|
||||
<?php $view_htmls[] = $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) . implode(",", $datas) ?>
|
||||
<?php endforeach ?>
|
||||
<?= implode(" / ", $view_htmls) ?>
|
||||
@ -18,10 +18,10 @@
|
||||
<?php foreach ($texts as $type => $datas): ?>
|
||||
<?php $view_texts[] = implode(',', $datas) ?>
|
||||
<?php endforeach ?>
|
||||
<?php $text = implode(" / ", $view_texts) ?>
|
||||
<div class="text-nowrap">
|
||||
<?php $text = implode(" / ", $view_texts) ?>
|
||||
<span class="rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||
<?= implode(" / ", $view_htmls) ?>
|
||||
<span class="serverparts float-start" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||
<?php if ($serverPartCellDatas['serverEntity']): ?>
|
||||
<a href="/admin/customer/service/terminate/<?= $serverPartCellDatas['serverEntity']->getServiceInfoUID() ?>?serverinfo_uid=<?= $serverPartCellDatas['serverEntity']->getPK() ?>">❌</a>
|
||||
<?php endif ?>
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
<?php foreach ($serviceCellDatas['entities'] as $entity): ?>
|
||||
<?php $serviceCellDatas['entity'] = $entity ?>
|
||||
<div class="rounded border border-gray p-2 mt-3">
|
||||
<div style="font-size:15px">서비스 목록</div>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr class="text-center">
|
||||
<th style="width: 120px"><a href="#">[상세정보]</a></th>
|
||||
|
||||
@ -8,12 +8,21 @@
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/client">고객정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/service">서비스현황</a></span>
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/account">예치금정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/payment?status=<?= STATUS['UNPAID'] ?>">결제현황</a></span>
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/coupon">쿠폰정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/equipment/server">서버현황</a></span>
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/point">포인트정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/service">서비스정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/customer/payment?status=<?= STATUS['UNPAID'] ?>">결제정보</a></span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/equipment/server">서버정보</a></span>
|
||||
</li>
|
||||
</ul>
|
||||
Loading…
Reference in New Issue
Block a user