입금관리 수정

This commit is contained in:
이담 정 2022-07-25 02:36:06 +00:00
parent 7c94200594
commit 605f0f5ef4
6 changed files with 181 additions and 238 deletions

View File

@ -33,7 +33,7 @@ export class BankDepositMockApi {
.reply(({ request }) => { .reply(({ request }) => {
// Get available queries // Get available queries
const search = request.params.get('search'); const search = request.params.get('search');
const sort = request.params.get('sort') || 'name'; const sort = request.params.get('sort') || 'signinId';
const order = request.params.get('order') || 'asc'; const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10); const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10); const size = parseInt(request.params.get('size') ?? '10', 10);
@ -42,7 +42,7 @@ export class BankDepositMockApi {
let deposits: any[] | null = cloneDeep(this._deposits); let deposits: any[] | null = cloneDeep(this._deposits);
// Sort the deposits // Sort the deposits
if (sort === 'sku' || sort === 'name' || sort === 'active') { if (sort === 'signinId' || sort === 'nickname' || sort === 'state') {
deposits.sort((a, b) => { deposits.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase(); const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase();

View File

@ -2,11 +2,12 @@
export const deposits = [ export const deposits = [
{ {
id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
rank: '회원', rank: '회원',
level: 4, level: 4,
id: 'aa100', signinId: 'aa100',
nickname: 'aa100', nickname: 'aa100',
paymentDue: 50000, depositAmount: 50000,
calculateType: '롤링', calculateType: '롤링',
accountHolder: '광주은행2sss', accountHolder: '광주은행2sss',
note: '@', note: '@',
@ -20,11 +21,12 @@ export const deposits = [
state: '신청', state: '신청',
}, },
{ {
id: '00b0292f-3d50-4669-a0c4-7a9d85efc98d',
rank: '회원', rank: '회원',
level: 1, level: 1,
id: 'onon6', signinId: 'onon6',
nickname: '가가가', nickname: '가가가',
paymentDue: 100000, depositAmount: 100000,
calculateType: '롤링', calculateType: '롤링',
accountHolder: '가가가', accountHolder: '가가가',
note: '', note: '',
@ -38,11 +40,12 @@ export const deposits = [
state: '완료', state: '완료',
}, },
{ {
id: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
rank: '회원', rank: '회원',
level: 1, level: 1,
id: 'onon6', signinId: 'onon6',
nickname: '가가가', nickname: '가가가',
paymentDue: 100000, depositAmount: 100000,
calculateType: '롤링', calculateType: '롤링',
accountHolder: '가가가', accountHolder: '가가가',
note: '', note: '',

View File

@ -10,16 +10,39 @@
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar> <mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div> </div>
<!-- Title --> <!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">Deposit</div> <div class="text-4xl font-extrabold tracking-tight">입금관리</div>
<!-- Actions --> <!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4"> <div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo --> <!-- Search -->
<mat-form-field>
<input matInput type="text" /> <button mat-icon-button (click)="__onClickSearch()">
</mat-form-field> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<button mat-flat-button [color]="'primary'">메모저장</button> </button>
</div>
</div>
<!-- Memo -->
<!-- <div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
>
<mat-form-field
class="bet-mat-form-field-wrapper-mb-0 mr-2"
style="width: 100%"
>
<textarea matInput cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
</mat-form-field>
<button mat-flat-button [color]="'primary'">메모저장</button>
</div> -->
<!-- Search -->
<div
*ngIf="__isSearchOpened"
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
>
<!-- Actions -->
<div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
<!-- SelectBox --> <!-- SelectBox -->
<mat-form-field> <mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
<mat-select placeholder="내용"> <mat-select placeholder="내용">
<mat-option value="">카지노콤프</mat-option> <mat-option value="">카지노콤프</mat-option>
<mat-option value="">슬롯콤프</mat-option> <mat-option value="">슬롯콤프</mat-option>
@ -27,7 +50,7 @@
<mat-option value="">첫충콤프</mat-option> <mat-option value="">첫충콤프</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
<mat-select placeholder="아이디"> <mat-select placeholder="아이디">
<mat-option value="">아이디</mat-option> <mat-option value="">아이디</mat-option>
<mat-option value="">닉네임</mat-option> <mat-option value="">닉네임</mat-option>
@ -38,7 +61,8 @@
</mat-form-field> </mat-form-field>
<!-- Search --> <!-- Search -->
<mat-form-field <mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64" fxFlex
class="fuse-mat-rounded min-w-64 bet-mat-form-field-wrapper-mb-0 mr-2"
> >
<mat-icon <mat-icon
class="icon-size-5" class="icon-size-5"
@ -49,28 +73,34 @@
matInput matInput
[formControl]="searchInputControl" [formControl]="searchInputControl"
[autocomplete]="'off'" [autocomplete]="'off'"
[placeholder]="'Search'" [placeholder]="'Search user'"
/> />
</mat-form-field> </mat-form-field>
<!-- Search button --> <!-- Add user button -->
<button <button
class="ml-4" fxFlex
mat-flat-button mat-flat-button
style="position: fixed; margin-top: 4px"
[color]="'primary'" [color]="'primary'"
(click)="__createProduct()" (click)="__createProduct()"
> >
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> --> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">검색하기</span> <span class="ml-2 mr-1">Search</span>
</button> </button>
</div> </div>
</div> </div>
<div class="hidden md:block">
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
입금처리
</button>
</div>
<div class="hidden md:block">
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
대기처리
</button>
</div>
<!-- Main --> <!-- Main -->
<div class="flex flex-auto overflow-hidden"> <div class="flex flex-auto overflow-hidden">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">입금 처리</button>
<button mat-flat-button [color]="'primary'">대기 처리</button>
</div>
<!-- Products list --> <!-- Products list -->
<div <div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
@ -81,39 +111,38 @@
<!-- Header --> <!-- Header -->
<div <div
class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5" class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
matSort
matSortDisableClear
> >
<div></div> <div>
<div class="hidden sm:block">등급</div> <mat-checkbox></mat-checkbox>
<div class="hidden sm:block">레벨</div>
<div class="hidden sm:block">아이디</div>
<div class="hidden sm:block">닉네임</div>
<div class="hidden sm:block">입금예정금액</div>
<div class="hidden sm:block">정산종류</div>
<div class="hidden sm:block">회원정보</div>
<div class="hidden sm:block">비고</div>
<div class="hidden sm:block">등록날짜</div>
<div class="hidden sm:block">처리날짜</div>
<div class="hidden sm:block">입금출금</div>
<div class="hidden sm:block">게임중머니</div>
<div class="hidden sm:block">카지노->캐쉬</div>
<div class="hidden sm:block">상위</div>
<div class="hidden sm:block">상태</div>
<div class="hidden sm:block">배팅정보</div>
<div class="hidden sm:block">삭제</div>
<!-- <div class="hidden md:block" [mat-sort-header]="'sku'">SKU</div>
<div [mat-sort-header]="'name'">Name</div>
<div class="hidden sm:block" [mat-sort-header]="'price'">
Price
</div> </div>
<div class="hidden lg:block" [mat-sort-header]="'stock'"> <div>상부</div>
Stock <div>
아이디
<hr style="margin: 7px 0px" />
닉네임
<hr style="margin: 7px 0px" />
상태
</div> </div>
<div class="hidden lg:block" [mat-sort-header]="'active'"> <div>
Active 등급
<hr style="margin: 7px 0px" />
레벨
</div> </div>
<div class="hidden sm:block">Details</div> --> <div class="hidden sm:block">예금주</div>
<div>정산종류</div>
<div>비고</div>
<div>입금예정금액</div>
<div class="hidden md:block">
등록날짜
<hr style="margin: 7px 0px" />
처리날짜
</div>
<div class="hidden md:block">입금출금</div>
<div class="hidden md:block">게임중머니</div>
<div class="hidden lg:block">카지노->캐쉬</div>
<div class="hidden lg:block">회원정보</div>
<div class="hidden lg:block">배팅정보</div>
<div class="hidden lg:block">삭제</div>
</div> </div>
<!-- Rows --> <!-- Rows -->
<ng-container *ngIf="deposits$ | async as deposits"> <ng-container *ngIf="deposits$ | async as deposits">
@ -123,198 +152,87 @@
<div <div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b" class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
> >
<!-- rank --> <div>
<div class="hidden sm:block truncate"> <mat-checkbox></mat-checkbox>
{{ deposit.rank }}
</div> </div>
<!-- level --> <div>{{ deposit.highRank }}</div>
<div class="hidden sm:block truncate"> <div>
LV.{{ deposit.level }} {{ deposit.signinId }}
</div> <hr style="margin: 7px 0px" />
<!-- id -->
<ng-container *ngIf="users$ | async as users">
<ng-container
*ngFor="let user of users; trackBy: __trackByFn"
>
<div class="hidden sm:block truncate">
{{ deposit.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ deposit.nickname }} {{ deposit.nickname }}
<hr style="margin: 7px 0px" />
{{ deposit.state }}
</div> </div>
<div>
<!-- paymentDue --> {{ deposit.rank }}
<div class="hidden sm:block truncate"> <hr style="margin: 7px 0px" />
{{ deposit.paymentDue }}원 LV{{ deposit.level }}
</div> </div>
<div class="hidden sm:block">
<!-- calculateType -->
<div class="hidden sm:block truncate">
{{ deposit.calculateType }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ deposit.accountHolder }} {{ deposit.accountHolder }}
</div> </div>
<div>{{ deposit.calculateType }}</div>
<!-- note --> <div>{{ deposit.note }}</div>
<div class="hidden sm:block truncate"> <div>{{ deposit.depositAmount }}</div>
{{ deposit.note }} <div class="hidden md:block">
</div>
<!-- registrationDate -->
<div class="hidden sm:block truncate">
{{ deposit.registrationDate }} {{ deposit.registrationDate }}
</div> <hr style="margin: 7px 0px" />
<!-- processDate -->
<div class="hidden sm:block truncate">
{{ deposit.processDate }} {{ deposit.processDate }}
</div> </div>
<div class="hidden md:block">
<!-- depositWithdrawal --> 입금{{ deposit.deposit }}
<div class="hidden sm:block truncate"> <hr style="margin: 7px 0px" />
{{ deposit.deposit }}원 {{ deposit.withdraw }}원 출금{{ deposit.withdraw }}
{{ deposit.total }}원 <hr style="margin: 7px 0px" />
계{{ deposit.total }}
</div> </div>
<div class="hidden md:block">
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ deposit.gameMoney }} {{ deposit.gameMoney }}
</div> </div>
<div class="hidden lg:block">
<!-- casinoCash --> <button
<div class="hidden sm:block truncate"> mat-flat-button
<button mat-flat-button [color]="'primary'"> class="bet-mat-small-8"
[color]="'primary'"
>
게임머니확인 게임머니확인
</button> </button>
<button mat-flat-button [color]="'primary'"> <hr style="margin: 7px 0px" />
<button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
>
게임머니회수 게임머니회수
</button> </button>
</div> </div>
<div class="hidden lg:block">
<!-- highRank -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ deposit.highRank }}
</button>
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ deposit.state }}
</div>
<!-- bettingInformation -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
배팅리스트
</button>
</div>
<!-- delete -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">취소</button>
</div>
<!-- Image -->
<!-- <div class="flex items-center">
<div
class="relative flex flex-0 items-center justify-center w-12 h-12 mr-6 rounded overflow-hidden border"
>
<img
class="w-8"
*ngIf="user.thumbnail"
[alt]="'Product thumbnail image'"
[src]="user.thumbnail"
/>
<div
class="flex items-center justify-center w-full h-full text-xs font-semibold leading-none text-center uppercase"
*ngIf="!user.thumbnail"
>
NO THUMB
</div>
</div>
</div> -->
<!-- SKU -->
<!-- <div class="hidden md:block truncate">
{{ user.sku }}
</div> -->
<!-- Name -->
<!-- <div class="truncate">
{{ user.name }}
</div> -->
<!-- Price -->
<!-- <div class="hidden sm:block">
{{ user.price | currency: "USD":"symbol":"1.2-2" }}
</div> -->
<!-- Stock -->
<!-- <div class="hidden lg:flex items-center">
<div class="min-w-4">{{ user.stock }}</div> -->
<!-- Low stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-red-200 rounded overflow-hidden"
*ngIf="user.stock < 20"
>
<div class="flex w-full h-1/3 bg-red-600"></div>
</div> -->
<!-- Medium stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-orange-200 rounded overflow-hidden"
*ngIf="user.stock >= 20 && user.stock < 30"
>
<div class="flex w-full h-2/4 bg-orange-400"></div>
</div> -->
<!-- High stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-green-100 rounded overflow-hidden"
*ngIf="user.stock >= 30"
>
<div class="flex w-full h-full bg-green-400"></div>
</div>
</div> -->
<!-- Active -->
<!-- <div class="hidden lg:block">
<ng-container *ngIf="user.active">
<mat-icon
class="text-green-400 icon-size-5"
[svgIcon]="'heroicons_solid:check'"
></mat-icon>
</ng-container>
<ng-container *ngIf="!user.active">
<mat-icon
class="text-gray-400 icon-size-5"
[svgIcon]="'heroicons_solid:x'"
></mat-icon>
</ng-container>
</div> -->
<!-- Details button -->
<!-- <div>
<button <button
class="min-w-10 min-h-7 h-7 px-2 leading-6" mat-flat-button
mat-stroked-button class="bet-mat-small-8"
(click)="__toggleDetails(user.id)" [color]="'primary'"
> >
<mat-icon 회원정보
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button> </button>
</div> --> </div>
<div class="hidden lg:block">
<button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
>
배팅정보
</button>
</div>
<div class="hidden lg:block">
<button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
>
취소
</button>
</div>
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
@ -340,9 +258,15 @@
</div> </div>
</ng-template> </ng-template>
</div> </div>
<div class="hidden sm:block truncate"> </div>
<button mat-flat-button [color]="'primary'">입금 처리</button> <div class="hidden md:block">
<button mat-flat-button [color]="'primary'">대기 처리</button> <button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
</div> 입금처리
</button>
</div>
<div class="hidden md:block">
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
대기처리
</button>
</div> </div>
</div> </div>

View File

@ -41,18 +41,22 @@ import { DepositService } from '../services/deposit.service';
/* language=SCSS */ /* language=SCSS */
` `
.inventory-grid { .inventory-grid {
grid-template-columns: 60px auto 40px; /* CB 상부 아이디 등급 예금주 정산종류 */
grid-template-columns: 20px 100px 100px 80px auto 40px;
@screen sm { @screen sm {
grid-template-columns: 60px auto 60px 72px; /* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록*/
grid-template-columns: 20px 100px 100px 80px auto 40px 20px 140px 140px;
} }
@screen md { @screen md {
grid-template-columns: 60px 60px auto 112px 72px; /* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록 입금출금 */
grid-template-columns: 20px 100px 100px 80px auto 40px 20px 100px 100px 100px;
} }
@screen lg { @screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px; /* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록 입금출금 게임중 카지노 회원 배팅 삭제*/
grid-template-columns: 20px 100px 100px 80px auto 40px 20px 140px 140px 140px 100px 100px 100px 100px 100px;
} }
} }
`, `,
@ -68,6 +72,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
deposits$!: Observable<Deposit[] | undefined>; deposits$!: Observable<Deposit[] | undefined>;
users$!: Observable<User[] | undefined>; users$!: Observable<User[] | undefined>;
__isSearchOpened = false;
isLoading = false; isLoading = false;
searchInputControl = new FormControl(); searchInputControl = new FormControl();
selectedDeposit?: Deposit; selectedDeposit?: Deposit;
@ -180,6 +185,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/ */
__toggleDetails(productId: string): void {} __toggleDetails(productId: string): void {}
/**
* toggle the search
* Used in 'bar'
*/
__onClickSearch(): void {
this.__isSearchOpened = !this.__isSearchOpened;
}
/** /**
* Track by function for ngFor loops * Track by function for ngFor loops
* *

View File

@ -11,6 +11,7 @@ import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort'; import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTooltipModule } from '@angular/material/tooltip';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { TranslocoModule } from '@ngneat/transloco'; import { TranslocoModule } from '@ngneat/transloco';
@ -37,6 +38,7 @@ import { depositRoutes } from './deposit.routing';
MatSortModule, MatSortModule,
MatSelectModule, MatSelectModule,
MatTooltipModule, MatTooltipModule,
MatCheckboxModule,
], ],
}) })
export class DepositModule {} export class DepositModule {}

View File

@ -1,9 +1,10 @@
export interface Deposit { export interface Deposit {
id?: string; id: string;
signinId?: string;
rank?: string; rank?: string;
level?: string; level?: string;
nickname?: string; nickname?: string;
paymentDue?: number; depositAmount?: number; // 입금예정금액
calculateType?: string; calculateType?: string;
accountHolder?: string; accountHolder?: string;
note?: string; note?: string;