파트너 입출금정산 수정

This commit is contained in:
이담 정 2022-07-25 07:05:48 +00:00
parent 71e4f7cff3
commit 677866f053
9 changed files with 220 additions and 328 deletions

View File

@ -33,7 +33,7 @@ export class BankPartnerCalculateMockApi {
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
const sort = request.params.get('sort') || 'name';
const sort = request.params.get('sort') || 'partnerDepositId';
const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
@ -44,7 +44,11 @@ export class BankPartnerCalculateMockApi {
);
// Sort the partnerCalculates
if (sort === 'sku' || sort === 'name' || sort === 'active') {
if (
sort === 'partnerDepositId' ||
sort === 'partnerDepositNickname' ||
sort === 'accountHolder'
) {
partnerCalculates.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();

View File

@ -2,57 +2,43 @@
export const partnerCalculates = [
{
rank: '회원',
level: 4,
id: 'aa100',
nickname: 'aa100',
paymentDue: 50000,
calculateType: '롤링',
accountHolder: '광주은행2sss',
note: '@',
registrationDate: '2022-06-18 13:14',
processDate: '000-0-0 0:0',
deposit: 41200000,
withdraw: 19000000,
total: 22200000,
gameMoney: 67131,
highRank: '[매장]kgon5',
state: '신청',
id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
partnerDepositIdx: 1,
partnerDepositId: 'kgon1',
partnerDepositNickname: '본사',
partnerDepositRank: '본사',
nameOfDepositer: '본사',
partnerDepositAmountOfPayment: 50000,
partnerDepositRegistrationDate: '2022-05-18 13:05',
partnerDepositConfirmDate: '2022-05-18 13:05',
partnerWithdrawIdx: 1,
partnerWithdrawId: 'kgon1',
partnerWithdrawNickname: '본사',
partnerWithdrawRank: '본사',
accountHolder: '국민은행 예금주본사 89898989898989898989',
partnerWithdrawAmountOfPayment: 70000,
partnerWithdrawRegistrationDate: '2022-05-18 13:05',
partnerWithdrawConfirmDate: '2022-05-18 13:05',
},
{
rank: '회원',
level: 1,
id: 'onon6',
nickname: '가가가',
paymentDue: 100000,
calculateType: '롤링',
accountHolder: '가가가',
note: '',
registrationDate: '2022-06-13 12:57',
processDate: '2022-06-13 12:58',
deposit: 200000,
withdraw: 0,
total: 200000,
gameMoney: 0,
highRank: '[매장]on04',
state: '완료',
},
{
rank: '회원',
level: 1,
id: 'onon6',
nickname: '가가가',
paymentDue: 100000,
calculateType: '롤링',
accountHolder: '가가가',
note: '',
registrationDate: '2022-06-13 12:56',
processDate: '2022-06-13 12:57',
deposit: 200000,
withdraw: 0,
total: 200000,
gameMoney: 0,
highRank: '[매장]on04',
state: '완료',
id: '00b0292f-3d50-4669-a0c4-7a9d85efc98d',
partnerDepositIdx: 2,
partnerDepositId: 'kgon4',
partnerDepositNickname: '총판',
partnerDepositRank: '총판',
nameOfDepositer: '총판',
partnerDepositAmountOfPayment: 500000,
partnerDepositRegistrationDate: '2022-05-17 21:46',
partnerDepositConfirmDate: '2022-05-17 21:46',
partnerWithdrawIdx: 2,
partnerWithdrawId: 'kgon4',
partnerWithdrawNickname: '총판',
partnerWithdrawRank: '총판',
accountHolder: '국민은행 예금주총판 0430440404040040',
partnerWithdrawAmountOfPayment: 100000,
partnerWithdrawRegistrationDate: '2022-05-17 21:46',
partnerWithdrawConfirmDate: '2022-05-17 21:46',
},
];

View File

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

View File

@ -10,7 +10,7 @@ export const webCalculates = [
nameOfDepositer: '가가가',
webDepositAmountOfPayment: 100000,
webDepositRegistrationDate: '2022-06-13 12:57',
webDepositComfirmDate: '2022-06-13 12:58',
webDepositConfirmDate: '2022-06-13 12:58',
webWithdrawIdx: 1,
webWithdrawId: 'aa100',
@ -30,7 +30,7 @@ export const webCalculates = [
nameOfDepositer: '가가가',
webDepositAmountOfPayment: 100000,
webDepositRegistrationDate: '2022-06-13 12:56',
webDepositComfirmDate: '2022-06-13 12:57',
webDepositConfirmDate: '2022-06-13 12:57',
webWithdrawIdx: 2,
webWithdrawId: 'aa100',

View File

@ -10,35 +10,33 @@
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">파트너 입/출금정산</div>
<div class="text-4xl font-extrabold tracking-tight">파트너 입출금 정산</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<mat-form-field>
<input matInput type="text" />
</mat-form-field>
<button mat-flat-button [color]="'primary'">메모저장</button>
<!-- Search -->
<button mat-icon-button (click)="__onClickSearch()">
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
</button>
</div>
</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 -->
<mat-form-field>
<mat-select placeholder="내용">
<mat-option value="">카지노콤프</mat-option>
<mat-option value="">슬롯콤프</mat-option>
<mat-option value="">배팅콤프</mat-option>
<mat-option value="">첫충콤프</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="아이디">
<mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
<mat-select placeholder="검색어">
<mat-option value="">아이디</mat-option>
<mat-option value="">닉네임</mat-option>
<mat-option value="">이름</mat-option>
<mat-option value="">사이트</mat-option>
<mat-option value="">파트너수동지급</mat-option>
</mat-select>
</mat-form-field>
<!-- Search -->
<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
class="icon-size-5"
@ -49,28 +47,26 @@
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
[placeholder]="'Search user'"
/>
</mat-form-field>
<!-- Search button -->
<!-- Add user button -->
<button
class="ml-4"
fxFlex
mat-flat-button
style="position: fixed; margin-top: 4px"
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">Search</span>
</button>
</div>
</div>
<!-- Main -->
<div>파트너입금</div>
<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 -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
@ -83,39 +79,21 @@
<!-- Header -->
<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"
matSort
matSortDisableClear
>
<div></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 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>
아이디
<hr style="margin: 7px 0px" />
닉네임
</div>
<div class="hidden lg:block" [mat-sort-header]="'stock'">
Stock
<div>등급</div>
<div class="hidden sm:block">입금자이름</div>
<div class="hidden md:block">결제금액</div>
<div class="hidden md:block">
신청일
<hr style="margin: 7px 0px" />
확인일
</div>
<div class="hidden lg:block" [mat-sort-header]="'active'">
Active
</div>
<div class="hidden sm:block">Details</div> -->
</div>
<!-- Rows -->
<ng-container
@ -130,201 +108,110 @@
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<!-- rank -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.rank }}
<div>
{{ partnerCalculate.partnerDepositIdx }}
</div>
<!-- level -->
<div class="hidden sm:block truncate">
LV.{{ partnerCalculate.level }}
<div>
{{ partnerCalculate.partnerDepositId }}
<hr style="margin: 7px 0px" />
{{ partnerCalculate.partnerDepositNickname }}
</div>
<!-- id -->
<ng-container *ngIf="users$ | async as users">
<ng-container
*ngFor="let user of users; trackBy: __trackByFn"
>
<div class="hidden sm:block truncate">
{{ partnerCalculate.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.nickname }}
<div>{{ partnerCalculate.partnerDepositRank }}</div>
<div class="hidden sm:block">
{{ partnerCalculate.nameOfDepositer }}
</div>
<!-- paymentDue -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.paymentDue }}원
<div class="hidden md:block">
{{ partnerCalculate.partnerDepositAmountOfPayment }}원
</div>
<!-- calculateType -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.calculateType }}
<div class="hidden md:block">
{{ partnerCalculate.partnerDepositRegistrationDate }}
<hr style="margin: 7px 0px" />
{{ partnerCalculate.partnerDepositConfirmDate }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.accountHolder }}
</div>
<!-- note -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.note }}
</div>
<!-- registrationDate -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.registrationDate }}
</div>
<!-- processDate -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.processDate }}
</div>
<!-- depositWithdrawal -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.deposit }}원
{{ partnerCalculate.withdraw }}원
{{ partnerCalculate.total }}원
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- highRank -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerCalculate.highRank }}
</button>
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerCalculate.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
class="min-w-10 min-h-7 h-7 px-2 leading-6"
mat-stroked-button
(click)="__toggleDetails(user.id)"
>
<mat-icon
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button>
</div> -->
</div>
</ng-container>
<div>합계&nbsp;&nbsp;&nbsp;930,000원</div>
</ng-container>
</div>
</ng-container>
</ng-container>
<ng-template #noPartnerCalculate>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no Data!
</div>
</ng-template>
</div>
</div>
<!-- Main -->
<div>파트너출금</div>
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerCalculates$ | async as partnerCalculates">
<ng-container
*ngIf="partnerCalculates.length > 0; else noPartnerCalculate"
>
<div class="grid">
<!-- Header -->
<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"
>
<div>번호</div>
<div>
아이디
<hr style="margin: 7px 0px" />
닉네임
</div>
<div>등급</div>
<div class="hidden sm:block">예금주</div>
<div class="hidden md:block">결제금액</div>
<div class="hidden md:block">
신청일
<hr style="margin: 7px 0px" />
확인일
</div>
</div>
<!-- Rows -->
<ng-container
*ngIf="partnerCalculates$ | async as partnerCalculates"
>
<ng-container
*ngFor="
let partnerCalculate of partnerCalculates;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div>
{{ partnerCalculate.partnerWithdrawIdx }}
</div>
<div>
{{ partnerCalculate.partnerWithdrawId }}
<hr style="margin: 7px 0px" />
{{ partnerCalculate.partnerWithdrawNickname }}
</div>
<div>{{ partnerCalculate.partnerWithdrawRank }}</div>
<div class="hidden sm:block">
{{ partnerCalculate.accountHolder }}
</div>
<div class="hidden md:block">
{{ partnerCalculate.partnerWithdrawAmountOfPayment }}원
</div>
<div class="hidden md:block">
{{ partnerCalculate.partnerWithdrawRegistrationDate }}
<hr style="margin: 7px 0px" />
{{ partnerCalculate.partnerWithdrawConfirmDate }}
</div>
</div>
</ng-container>
<div>합계&nbsp;&nbsp;&nbsp;190,000원</div>
</ng-container>
</div>
@ -344,13 +231,9 @@
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no Partner Calculate!
There are no Data!
</div>
</ng-template>
</div>
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">입금 처리</button>
<button mat-flat-button [color]="'primary'">대기 처리</button>
</div>
</div>
</div>

View File

@ -41,18 +41,22 @@ import { PartnerCalculateService } from '../services/partner-calculate.service';
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
/* 번호 아이디 등급 입금자 결제 */
grid-template-columns: 40px 140px 100px auto 140px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
/* 번호 아이디 등급 입금자 결제 신청 */
grid-template-columns: 40px 140px 100px auto 140px 140px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
/* 번호 아이디 등급 입금자 결제 신청 */
grid-template-columns: 40px 140px 100px auto 140px 140px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
/* 번호 아이디 등급 입금자 결제 신청 */
grid-template-columns: 40px 100px auto 40px 140px 140px;
}
}
`,
@ -68,6 +72,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
partnerCalculates$!: Observable<PartnerCalculate[] | undefined>;
users$!: Observable<User[] | undefined>;
__isSearchOpened = false;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerCalculate?: PartnerCalculate;
@ -180,6 +185,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/
__toggleDetails(productId: string): void {}
/**
* toggle the search
* Used in 'bar'
*/
__onClickSearch(): void {
this.__isSearchOpened = !this.__isSearchOpened;
}
/**
* Track by function for ngFor loops
*

View File

@ -1,18 +1,20 @@
export interface PartnerCalculate {
id?: string;
rank?: string;
level?: string;
nickname?: string;
paymentDue?: number;
calculateType?: string;
partnerDepositIdx?: number; // 파트너입금 idx
partnerDepositId?: string; // 파트너입금 아이디
partnerDepositNickname?: string; // 파트너입금 닉네임
partnerDepositRank?: string; // 파트너입금 등급
nameOfDepositer?: string;
partnerDepositAmountOfPayment?: number; // 파트너입금 결제금액
partnerDepositRegistrationDate?: Date; // 파트너입금 신청일
partnerDepositConfirmDate?: Date; // 파트너입금 확인일
partnerWithdrawIdx?: number; // 파트너출금 idx
partnerWithdrawId?: string; // 파트너입금 아이디
partnerWithdrawNickname?: string; // 파트너입금 닉네임
partnerWithdrawRank?: string; // 파트너입금 등급
accountHolder?: string;
note?: string;
registrationDate?: string;
processDate?: string;
deposit?: number;
withdraw?: number;
total?: number;
gameMoney?: number;
highRank?: string;
state?: string;
partnerWithdrawAmountOfPayment?: number; // 파트너입금 결제금액
partnerWithdrawRegistrationDate?: Date; // 파트너입금 신청일
partnerWithdrawConfirmDate?: Date; // 파트너입금 확인일
}

View File

@ -119,7 +119,7 @@
<div class="hidden md:block">
{{ webCalculate.webDepositRegistrationDate }}
<hr style="margin: 7px 0px" />
{{ webCalculate.webDepositComfirmDate }}
{{ webCalculate.webDepositConfirmDate }}
</div>
</div>
</ng-container>

View File

@ -7,7 +7,7 @@ export interface WebCalculate {
nameOfDepositer?: string; // 입금자명
webDepositAmountOfPayment?: number; // 웹입금 결제금액
webDepositRegistrationDate?: Date; // 웹입금 신청일
webDepositComfirmDate?: Date; // 웹입금 확인일
webDepositConfirmDate?: Date; // 웹입금 확인일
webWithdrawIdx?: number; // 웹출금 idx
webWithdrawId?: string; // 웹출금 아이디