@rolatech/angular-payment 19.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/fesm2022/rolatech-angular-payment.mjs +186 -0
- package/fesm2022/rolatech-angular-payment.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/payout-approve-dialog/payout-approve-dialog.component.d.ts +5 -0
- package/lib/interface/payout.d.ts +24 -0
- package/lib/pages/payout-detail/payout-detail.component.d.ts +23 -0
- package/lib/pages/payout-index/payout-index.component.d.ts +32 -0
- package/lib/pages/payout.routes.d.ts +2 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, viewChild, Component } from '@angular/core';
|
|
3
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
4
|
+
import * as i1 from '@angular/material/table';
|
|
5
|
+
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
6
|
+
import { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
|
|
7
|
+
import { OrderPayoutService, OrderService } from '@rolatech/angular-services';
|
|
8
|
+
import { RouterLink } from '@angular/router';
|
|
9
|
+
import { AuthService, AuthUserService } from '@rolatech/angular-auth';
|
|
10
|
+
import { OrderPayoutStatus } from '@rolatech/angular-order';
|
|
11
|
+
import { CommonModule } from '@angular/common';
|
|
12
|
+
|
|
13
|
+
var PayoutStatus;
|
|
14
|
+
(function (PayoutStatus) {
|
|
15
|
+
PayoutStatus[PayoutStatus["CREATED"] = '创建'] = "CREATED";
|
|
16
|
+
PayoutStatus[PayoutStatus["PENDING"] = '处理中'] = "PENDING";
|
|
17
|
+
PayoutStatus[PayoutStatus["PAID"] = '已支付'] = "PAID";
|
|
18
|
+
PayoutStatus[PayoutStatus["CANCELED"] = '已取消'] = "CANCELED";
|
|
19
|
+
PayoutStatus[PayoutStatus["FAILED"] = '失败'] = "FAILED";
|
|
20
|
+
})(PayoutStatus || (PayoutStatus = {}));
|
|
21
|
+
var PayoutType;
|
|
22
|
+
(function (PayoutType) {
|
|
23
|
+
PayoutType[PayoutType["BANK"] = '银行转账'] = "BANK";
|
|
24
|
+
PayoutType[PayoutType["CARD"] = '银行卡'] = "CARD";
|
|
25
|
+
PayoutType[PayoutType["WECHAT"] = '微信零钱'] = "WECHAT";
|
|
26
|
+
})(PayoutType || (PayoutType = {}));
|
|
27
|
+
|
|
28
|
+
class PayoutIndexComponent extends BaseComponent {
|
|
29
|
+
payoutService = inject(OrderPayoutService);
|
|
30
|
+
isLoading = false;
|
|
31
|
+
isSearch = false;
|
|
32
|
+
pageEvent;
|
|
33
|
+
length = 100;
|
|
34
|
+
pageSize = 15;
|
|
35
|
+
pageSizeOptions = [5, 10, 25, 100];
|
|
36
|
+
dataSource = new MatTableDataSource();
|
|
37
|
+
payouts = [];
|
|
38
|
+
status = PayoutStatus;
|
|
39
|
+
displayedColumns = ['status', 'total', 'createdAt'];
|
|
40
|
+
paginator = viewChild(MatPaginator);
|
|
41
|
+
orderOptions = [
|
|
42
|
+
{
|
|
43
|
+
key: 'createdAt',
|
|
44
|
+
value: '创建时间',
|
|
45
|
+
icon: 'arrow_upward',
|
|
46
|
+
sort: 'asc',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: 'createdAt',
|
|
50
|
+
value: '创建时间',
|
|
51
|
+
icon: 'arrow_downward',
|
|
52
|
+
sort: 'desc',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: 'status',
|
|
56
|
+
value: '状态',
|
|
57
|
+
icon: 'arrow_upward',
|
|
58
|
+
sort: 'asc',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'status',
|
|
62
|
+
value: '状态',
|
|
63
|
+
icon: 'arrow_downward',
|
|
64
|
+
sort: 'desc',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
orderString = 'createdAt desc';
|
|
68
|
+
ngOnInit() {
|
|
69
|
+
this.find(null);
|
|
70
|
+
}
|
|
71
|
+
find(event) {
|
|
72
|
+
this.isLoading = true;
|
|
73
|
+
const page = event ? event.pageIndex + 1 : 1;
|
|
74
|
+
const limit = event ? event.pageSize : 15;
|
|
75
|
+
const sort = this.orderString;
|
|
76
|
+
const options = {
|
|
77
|
+
page,
|
|
78
|
+
limit,
|
|
79
|
+
sort,
|
|
80
|
+
};
|
|
81
|
+
this.payoutService.find(options).subscribe({
|
|
82
|
+
next: (res) => {
|
|
83
|
+
this.payouts = res.data;
|
|
84
|
+
this.dataSource.data = this.payouts;
|
|
85
|
+
this.length = res.meta.pagination.count;
|
|
86
|
+
this.isLoading = false;
|
|
87
|
+
},
|
|
88
|
+
error: (e) => {
|
|
89
|
+
this.isLoading = false;
|
|
90
|
+
this.snackBarService.open(e.message);
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.2", type: PayoutIndexComponent, isStandalone: true, selector: "rolatech-payout-index", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"\u652F\u51FA\u8BB0\u5F55\"> </rolatech-toolbar>\n<div>\n <table mat-table [dataSource]=\"dataSource\">\n <!-- status Column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\u72B6\u6001</th>\n <td mat-cell *matCellDef=\"let item\">{{ status[item.status] }}</td>\n </ng-container>\n\n <!-- amount Column -->\n <ng-container matColumnDef=\"total\">\n <th mat-header-cell *matHeaderCellDef>\u91D1\u989D(\u5143)</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.amount / 100 }}</td>\n </ng-container>\n\n <!-- createdAt Column -->\n <ng-container matColumnDef=\"createdAt\">\n <th mat-header-cell *matHeaderCellDef>\u4EA4\u6613\u65E5\u671F</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.createdAt }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n routerLink=\"./{{ row.id }}\"\n class=\"hover:bg-[--rt-raised-background] cursor-pointer\"\n ></tr>\n </table>\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n", styles: ["mat-form-field{width:100%}table{width:100%}.mat-mdc-cell:nth-last-child(1),.mat-mdc-header-cell:nth-last-child(1),.mat-mdc-footer-cell:nth-last-child(1){text-align:right;max-width:180px;width:180px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{text-align:right;padding-right:8px!important}\n"], dependencies: [{ kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
96
|
+
}
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutIndexComponent, decorators: [{
|
|
98
|
+
type: Component,
|
|
99
|
+
args: [{ selector: 'rolatech-payout-index', imports: [ToolbarComponent, MatTableModule, MatPaginator, RouterLink], template: "<rolatech-toolbar title=\"\u652F\u51FA\u8BB0\u5F55\"> </rolatech-toolbar>\n<div>\n <table mat-table [dataSource]=\"dataSource\">\n <!-- status Column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\u72B6\u6001</th>\n <td mat-cell *matCellDef=\"let item\">{{ status[item.status] }}</td>\n </ng-container>\n\n <!-- amount Column -->\n <ng-container matColumnDef=\"total\">\n <th mat-header-cell *matHeaderCellDef>\u91D1\u989D(\u5143)</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.amount / 100 }}</td>\n </ng-container>\n\n <!-- createdAt Column -->\n <ng-container matColumnDef=\"createdAt\">\n <th mat-header-cell *matHeaderCellDef>\u4EA4\u6613\u65E5\u671F</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.createdAt }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n routerLink=\"./{{ row.id }}\"\n class=\"hover:bg-[--rt-raised-background] cursor-pointer\"\n ></tr>\n </table>\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n", styles: ["mat-form-field{width:100%}table{width:100%}.mat-mdc-cell:nth-last-child(1),.mat-mdc-header-cell:nth-last-child(1),.mat-mdc-footer-cell:nth-last-child(1){text-align:right;max-width:180px;width:180px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{text-align:right;padding-right:8px!important}\n"] }]
|
|
100
|
+
}] });
|
|
101
|
+
|
|
102
|
+
class PayoutApproveDialogComponent {
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutApproveDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: PayoutApproveDialogComponent, isStandalone: true, selector: "rolatech-payout-approve-dialog", ngImport: i0, template: "<p>payout-approve-dialog works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
105
|
+
}
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutApproveDialogComponent, decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{ selector: 'rolatech-payout-approve-dialog', imports: [CommonModule], template: "<p>payout-approve-dialog works!</p>\n" }]
|
|
109
|
+
}] });
|
|
110
|
+
|
|
111
|
+
class PayoutDetailComponent extends BaseComponent {
|
|
112
|
+
payout;
|
|
113
|
+
order;
|
|
114
|
+
instructor;
|
|
115
|
+
status = OrderPayoutStatus;
|
|
116
|
+
authService = inject(AuthService);
|
|
117
|
+
authUserService = inject(AuthUserService);
|
|
118
|
+
orderPayoutService = inject(OrderPayoutService);
|
|
119
|
+
orderService = inject(OrderService);
|
|
120
|
+
ngOnInit() {
|
|
121
|
+
this.getPayout();
|
|
122
|
+
}
|
|
123
|
+
getPayout() {
|
|
124
|
+
this.orderPayoutService.get(this.id).subscribe({
|
|
125
|
+
next: (res) => {
|
|
126
|
+
this.payout = res.data;
|
|
127
|
+
this.getOrder(this.payout.orderId);
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
getOrder(orderId) {
|
|
132
|
+
this.orderService.get(orderId).subscribe({
|
|
133
|
+
next: (res) => {
|
|
134
|
+
this.order = res.data;
|
|
135
|
+
this.findInstructorInfo(this.order.merchantId);
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
findInstructorInfo(instructorId) {
|
|
140
|
+
this.authUserService.getPublicUserInfo(instructorId).subscribe({
|
|
141
|
+
next: (res) => {
|
|
142
|
+
this.instructor = res;
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
approve() {
|
|
147
|
+
const dialogRef = this.dialog.open(PayoutApproveDialogComponent, {
|
|
148
|
+
width: '400px',
|
|
149
|
+
data: {
|
|
150
|
+
title: '支付分账',
|
|
151
|
+
message: `分账批准, 支付创作者${this.payout.amount / 100}元`,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
155
|
+
if (result) {
|
|
156
|
+
this.orderPayoutService.approve(this.id).subscribe({
|
|
157
|
+
next: (res) => {
|
|
158
|
+
this.payout.status = 'PENDING';
|
|
159
|
+
this.snackBarService.open('已通过');
|
|
160
|
+
},
|
|
161
|
+
error: (e) => {
|
|
162
|
+
this.snackBarService.open(e.message);
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
169
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: PayoutDetailComponent, isStandalone: true, selector: "rolatech-payout-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"\u5206\u8D26\u5BA1\u6838\u8BE6\u60C5\">\n @if (payout && payout.status === 'CREATED') {\n <button mat-button (click)=\"approve()\">\u901A\u8FC7</button>\n }\n</rolatech-toolbar>\n\n<div class=\"py-3 px-5\">\n @if (payout) {\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-medium mb-3\">\n {{ status[payout.status] }}\n </div>\n <div>\n <span>\u5206\u8D26\u91D1\u989D: </span> <span> \u00A5{{ payout.amount / 100 }}</span>\n </div>\n <div>\n <span>\u8BA2\u5355\u603B\u8BA1: </span> <span>\u00A5{{ payout.total / 100 }}</span>\n </div>\n @if (order) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">\u8BA2\u5355\u4FE1\u606F</div>\n <div>\n <div><span>\u8BA2\u5355\u53F7: </span>{{ order.orderNo }}</div>\n <div><span>\u4E0B\u5355\u65E5\u671F: </span>{{ order.createdAt }}</div>\n <div><span>\u5E94\u4ED8\u91D1\u989D: </span>\u00A5{{ (order.total / 100).toFixed(2) }}</div>\n </div>\n </div>\n }\n @if (instructor) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">\u521B\u4F5C\u8005\u4FE1\u606F</div>\n <div>\n <div><span>\u59D3\u540D: </span>{{ instructor?.name }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }] });
|
|
170
|
+
}
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PayoutDetailComponent, decorators: [{
|
|
172
|
+
type: Component,
|
|
173
|
+
args: [{ selector: 'rolatech-payout-detail', imports: [ToolbarComponent], template: "<rolatech-toolbar title=\"\u5206\u8D26\u5BA1\u6838\u8BE6\u60C5\">\n @if (payout && payout.status === 'CREATED') {\n <button mat-button (click)=\"approve()\">\u901A\u8FC7</button>\n }\n</rolatech-toolbar>\n\n<div class=\"py-3 px-5\">\n @if (payout) {\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-medium mb-3\">\n {{ status[payout.status] }}\n </div>\n <div>\n <span>\u5206\u8D26\u91D1\u989D: </span> <span> \u00A5{{ payout.amount / 100 }}</span>\n </div>\n <div>\n <span>\u8BA2\u5355\u603B\u8BA1: </span> <span>\u00A5{{ payout.total / 100 }}</span>\n </div>\n @if (order) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">\u8BA2\u5355\u4FE1\u606F</div>\n <div>\n <div><span>\u8BA2\u5355\u53F7: </span>{{ order.orderNo }}</div>\n <div><span>\u4E0B\u5355\u65E5\u671F: </span>{{ order.createdAt }}</div>\n <div><span>\u5E94\u4ED8\u91D1\u989D: </span>\u00A5{{ (order.total / 100).toFixed(2) }}</div>\n </div>\n </div>\n }\n @if (instructor) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">\u521B\u4F5C\u8005\u4FE1\u606F</div>\n <div>\n <div><span>\u59D3\u540D: </span>{{ instructor?.name }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n</div>\n" }]
|
|
174
|
+
}] });
|
|
175
|
+
|
|
176
|
+
const payoutsRoutes = [
|
|
177
|
+
{ path: '', component: PayoutIndexComponent },
|
|
178
|
+
{ path: ':id', component: PayoutDetailComponent },
|
|
179
|
+
];
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Generated bundle index. Do not edit.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
export { payoutsRoutes };
|
|
186
|
+
//# sourceMappingURL=rolatech-angular-payment.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-payment.mjs","sources":["../../../../packages/angular-payment/src/lib/interface/payout.ts","../../../../packages/angular-payment/src/lib/pages/payout-index/payout-index.component.ts","../../../../packages/angular-payment/src/lib/pages/payout-index/payout-index.component.html","../../../../packages/angular-payment/src/lib/components/payout-approve-dialog/payout-approve-dialog.component.ts","../../../../packages/angular-payment/src/lib/components/payout-approve-dialog/payout-approve-dialog.component.html","../../../../packages/angular-payment/src/lib/pages/payout-detail/payout-detail.component.ts","../../../../packages/angular-payment/src/lib/pages/payout-detail/payout-detail.component.html","../../../../packages/angular-payment/src/lib/pages/payout.routes.ts","../../../../packages/angular-payment/src/rolatech-angular-payment.ts"],"sourcesContent":["export interface Payout {\n id: string;\n amount: number;\n status: PayoutStatus | string;\n type: PayoutType;\n fee: number;\n total: number;\n orderId: string;\n bookingId: string;\n description: string;\n createdAt: string;\n}\n\nexport enum PayoutStatus {\n CREATED = <any>'创建',\n PENDING = <any>'处理中',\n PAID = <any>'已支付',\n CANCELED = <any>'已取消',\n FAILED = <any>'失败',\n}\nexport enum PayoutType {\n BANK = <any>'银行转账',\n CARD = <any>'银行卡',\n WECHAT = <any>'微信零钱',\n}\n","import { Component, OnInit, inject, viewChild } from '@angular/core';\nimport { PageEvent, MatPaginator } from '@angular/material/paginator';\nimport { MatTableDataSource, MatTableModule } from '@angular/material/table';\nimport { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { OrderPayoutService } from '@rolatech/angular-services';\nimport { Payout, PayoutStatus } from '../../interface/payout';\nimport { RouterLink } from '@angular/router';\n\n@Component({\n selector: 'rolatech-payout-index',\n templateUrl: './payout-index.component.html',\n styleUrls: ['./payout-index.component.scss'],\n imports: [ToolbarComponent, MatTableModule, MatPaginator, RouterLink],\n})\nexport class PayoutIndexComponent extends BaseComponent implements OnInit {\n payoutService = inject(OrderPayoutService);\n\n isLoading = false;\n isSearch = false;\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n dataSource = new MatTableDataSource<Payout>();\n payouts: Payout[] = [];\n status: any = PayoutStatus;\n displayedColumns: string[] = ['status', 'total', 'createdAt'];\n paginator = viewChild(MatPaginator);\n\n orderOptions = [\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n ];\n orderString = 'createdAt desc';\n ngOnInit(): void {\n this.find(null);\n }\n find(event?: PageEvent | null): any {\n this.isLoading = true;\n const page = event ? event.pageIndex + 1 : 1;\n const limit = event ? event.pageSize : 15;\n const sort = this.orderString;\n const options = {\n page,\n limit,\n sort,\n };\n this.payoutService.find(options).subscribe({\n next: (res: any) => {\n this.payouts = res.data;\n this.dataSource.data = this.payouts;\n this.length = res.meta.pagination.count;\n this.isLoading = false;\n },\n error: (e) => {\n this.isLoading = false;\n this.snackBarService.open(e.message);\n },\n });\n }\n}\n","<rolatech-toolbar title=\"支出记录\"> </rolatech-toolbar>\n<div>\n <table mat-table [dataSource]=\"dataSource\">\n <!-- status Column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>状态</th>\n <td mat-cell *matCellDef=\"let item\">{{ status[item.status] }}</td>\n </ng-container>\n\n <!-- amount Column -->\n <ng-container matColumnDef=\"total\">\n <th mat-header-cell *matHeaderCellDef>金额(元)</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.amount / 100 }}</td>\n </ng-container>\n\n <!-- createdAt Column -->\n <ng-container matColumnDef=\"createdAt\">\n <th mat-header-cell *matHeaderCellDef>交易日期</th>\n <td mat-cell *matCellDef=\"let item\">{{ item.createdAt }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n routerLink=\"./{{ row.id }}\"\n class=\"hover:bg-[--rt-raised-background] cursor-pointer\"\n ></tr>\n </table>\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'rolatech-payout-approve-dialog',\n imports: [CommonModule],\n templateUrl: './payout-approve-dialog.component.html',\n styleUrl: './payout-approve-dialog.component.scss',\n})\nexport class PayoutApproveDialogComponent {}\n","<p>payout-approve-dialog works!</p>\n","import { Component, OnInit, inject } from '@angular/core';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { Order, OrderPayout, OrderPayoutStatus } from '@rolatech/angular-order';\nimport { PayoutApproveDialogComponent } from '../../components';\nimport { OrderPayoutService, OrderService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-payout-detail',\n templateUrl: './payout-detail.component.html',\n styleUrls: ['./payout-detail.component.scss'],\n imports: [ToolbarComponent],\n})\nexport class PayoutDetailComponent extends BaseComponent implements OnInit {\n payout!: OrderPayout;\n order!: Order;\n instructor: any;\n status: any = OrderPayoutStatus;\n authService = inject(AuthService);\n authUserService = inject(AuthUserService);\n orderPayoutService = inject(OrderPayoutService);\n orderService = inject(OrderService);\n ngOnInit(): void {\n this.getPayout();\n }\n getPayout() {\n this.orderPayoutService.get(this.id).subscribe({\n next: (res: any) => {\n this.payout = res.data;\n this.getOrder(this.payout.orderId);\n },\n });\n }\n getOrder(orderId: string) {\n this.orderService.get(orderId).subscribe({\n next: (res: any) => {\n this.order = res.data;\n this.findInstructorInfo(this.order.merchantId);\n },\n });\n }\n findInstructorInfo(instructorId: string) {\n this.authUserService.getPublicUserInfo(instructorId).subscribe({\n next: (res) => {\n this.instructor = res;\n },\n });\n }\n approve() {\n const dialogRef = this.dialog.open(PayoutApproveDialogComponent, {\n width: '400px',\n data: {\n title: '支付分账',\n message: `分账批准, 支付创作者${this.payout.amount / 100}元`,\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n this.orderPayoutService.approve(this.id).subscribe({\n next: (res) => {\n this.payout.status = 'PENDING';\n this.snackBarService.open('已通过');\n },\n error: (e) => {\n this.snackBarService.open(e.message);\n },\n });\n }\n });\n }\n}\n","<rolatech-toolbar title=\"分账审核详情\">\n @if (payout && payout.status === 'CREATED') {\n <button mat-button (click)=\"approve()\">通过</button>\n }\n</rolatech-toolbar>\n\n<div class=\"py-3 px-5\">\n @if (payout) {\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-medium mb-3\">\n {{ status[payout.status] }}\n </div>\n <div>\n <span>分账金额: </span> <span> ¥{{ payout.amount / 100 }}</span>\n </div>\n <div>\n <span>订单总计: </span> <span>¥{{ payout.total / 100 }}</span>\n </div>\n @if (order) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">订单信息</div>\n <div>\n <div><span>订单号: </span>{{ order.orderNo }}</div>\n <div><span>下单日期: </span>{{ order.createdAt }}</div>\n <div><span>应付金额: </span>¥{{ (order.total / 100).toFixed(2) }}</div>\n </div>\n </div>\n }\n @if (instructor) {\n <div class=\"mt-3\">\n <div class=\"text-lg font-medium\">创作者信息</div>\n <div>\n <div><span>姓名: </span>{{ instructor?.name }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n</div>\n","import { Routes } from '@angular/router';\nimport { PayoutIndexComponent } from './payout-index/payout-index.component';\nimport { PayoutDetailComponent } from './payout-detail/payout-detail.component';\n\nexport const payoutsRoutes: Routes = [\n { path: '', component: PayoutIndexComponent },\n { path: ':id', component: PayoutDetailComponent },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA,IAAY,YAMX;AAND,CAAA,UAAY,YAAY,EAAA;IACtB,YAAe,CAAA,YAAA,CAAA,SAAA,CAAA,GAAA,IAAI,aAAA;IACnB,YAAe,CAAA,YAAA,CAAA,SAAA,CAAA,GAAA,KAAK,aAAA;IACpB,YAAY,CAAA,YAAA,CAAA,MAAA,CAAA,GAAA,KAAK,UAAA;IACjB,YAAgB,CAAA,YAAA,CAAA,UAAA,CAAA,GAAA,KAAK,cAAA;IACrB,YAAc,CAAA,YAAA,CAAA,QAAA,CAAA,GAAA,IAAI,YAAA;AACpB,CAAC,EANW,YAAY,KAAZ,YAAY,GAMvB,EAAA,CAAA,CAAA;AACD,IAAY,UAIX;AAJD,CAAA,UAAY,UAAU,EAAA;IACpB,UAAY,CAAA,UAAA,CAAA,MAAA,CAAA,GAAA,MAAM,UAAA;IAClB,UAAY,CAAA,UAAA,CAAA,MAAA,CAAA,GAAA,KAAK,UAAA;IACjB,UAAc,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,MAAM,YAAA;AACtB,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;;ACVK,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AACrD,IAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAE1C,SAAS,GAAG,KAAK;IACjB,QAAQ,GAAG,KAAK;AAChB,IAAA,SAAS;IACT,MAAM,GAAG,GAAG;IACZ,QAAQ,GAAG,EAAE;IACb,eAAe,GAAa,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;AAC5C,IAAA,UAAU,GAAG,IAAI,kBAAkB,EAAU;IAC7C,OAAO,GAAa,EAAE;IACtB,MAAM,GAAQ,YAAY;IAC1B,gBAAg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A,CAAA;kBANjC,SAAS;+BACE,wBAAwB,EAAA,OAAA,EAGzB,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,89CAAA,EAAA;;;AEPhB,MAAA,aAAa,GAAW;AACnC,IAAA,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE;AAC7C,IAAA,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE;;;ACNnD;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { payoutsRoutes } from './lib/pages/payout.routes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PayoutApproveDialogComponent } from './payout-approve-dialog/payout-approve-dialog.component';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class PayoutApproveDialogComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PayoutApproveDialogComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PayoutApproveDialogComponent, "rolatech-payout-approve-dialog", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Payout {
|
|
2
|
+
id: string;
|
|
3
|
+
amount: number;
|
|
4
|
+
status: PayoutStatus | string;
|
|
5
|
+
type: PayoutType;
|
|
6
|
+
fee: number;
|
|
7
|
+
total: number;
|
|
8
|
+
orderId: string;
|
|
9
|
+
bookingId: string;
|
|
10
|
+
description: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
}
|
|
13
|
+
export declare enum PayoutStatus {
|
|
14
|
+
CREATED,
|
|
15
|
+
PENDING,
|
|
16
|
+
PAID,
|
|
17
|
+
CANCELED,
|
|
18
|
+
FAILED
|
|
19
|
+
}
|
|
20
|
+
export declare enum PayoutType {
|
|
21
|
+
BANK,
|
|
22
|
+
CARD,
|
|
23
|
+
WECHAT
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AuthService, AuthUserService } from '@rolatech/angular-auth';
|
|
3
|
+
import { BaseComponent } from '@rolatech/angular-components';
|
|
4
|
+
import { Order, OrderPayout } from '@rolatech/angular-order';
|
|
5
|
+
import { OrderPayoutService, OrderService } from '@rolatech/angular-services';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PayoutDetailComponent extends BaseComponent implements OnInit {
|
|
8
|
+
payout: OrderPayout;
|
|
9
|
+
order: Order;
|
|
10
|
+
instructor: any;
|
|
11
|
+
status: any;
|
|
12
|
+
authService: AuthService;
|
|
13
|
+
authUserService: AuthUserService;
|
|
14
|
+
orderPayoutService: OrderPayoutService;
|
|
15
|
+
orderService: OrderService;
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
getPayout(): void;
|
|
18
|
+
getOrder(orderId: string): void;
|
|
19
|
+
findInstructorInfo(instructorId: string): void;
|
|
20
|
+
approve(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PayoutDetailComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PayoutDetailComponent, "rolatech-payout-detail", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { PageEvent, MatPaginator } from '@angular/material/paginator';
|
|
3
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
4
|
+
import { BaseComponent } from '@rolatech/angular-components';
|
|
5
|
+
import { OrderPayoutService } from '@rolatech/angular-services';
|
|
6
|
+
import { Payout } from '../../interface/payout';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class PayoutIndexComponent extends BaseComponent implements OnInit {
|
|
9
|
+
payoutService: OrderPayoutService;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
isSearch: boolean;
|
|
12
|
+
pageEvent: PageEvent;
|
|
13
|
+
length: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
pageSizeOptions: number[];
|
|
16
|
+
dataSource: MatTableDataSource<Payout, MatPaginator>;
|
|
17
|
+
payouts: Payout[];
|
|
18
|
+
status: any;
|
|
19
|
+
displayedColumns: string[];
|
|
20
|
+
paginator: import("@angular/core").Signal<MatPaginator | undefined>;
|
|
21
|
+
orderOptions: {
|
|
22
|
+
key: string;
|
|
23
|
+
value: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
sort: string;
|
|
26
|
+
}[];
|
|
27
|
+
orderString: string;
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
find(event?: PageEvent | null): any;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PayoutIndexComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PayoutIndexComponent, "rolatech-payout-index", never, {}, {}, never, never, true, never>;
|
|
32
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rolatech/angular-payment",
|
|
3
|
+
"version": "19.0.0-beta.11",
|
|
4
|
+
"private": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^19.2.0",
|
|
7
|
+
"@angular/core": "^19.2.0",
|
|
8
|
+
"@angular/forms": "^19.2.0",
|
|
9
|
+
"@angular/router": "^19.2.0",
|
|
10
|
+
"@angular/material": "^19.0.0",
|
|
11
|
+
"@nx/angular": "^19.0.0 || ^20.0.0"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@rolatech/angular-components": "19.0.0-beta.11",
|
|
16
|
+
"@rolatech/angular-services": "19.0.0-beta.11",
|
|
17
|
+
"@rolatech/angular-auth": "19.0.0-beta.11",
|
|
18
|
+
"@rolatech/angular-order": "19.0.0-beta.11",
|
|
19
|
+
"tslib": "^2.3.0"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/viablecell/rolatech-web.git"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"module": "fesm2022/rolatech-angular-payment.mjs",
|
|
30
|
+
"typings": "index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": {
|
|
33
|
+
"default": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./index.d.ts",
|
|
37
|
+
"default": "./fesm2022/rolatech-angular-payment.mjs"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|