@rolatech/angular-order 18.0.5 → 18.0.7
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/esm2022/lib/components/index.mjs +2 -3
- package/esm2022/lib/components/order-detail-item/order-detail-item.component.mjs +25 -0
- package/esm2022/lib/components/order-item/order-item.component.mjs +15 -7
- package/esm2022/lib/components/order-return-request/order-return-request.component.mjs +13 -9
- package/esm2022/lib/components/order-variant-item/order-variant-item.component.mjs +3 -3
- package/esm2022/lib/interfaces/order.mjs +30 -12
- package/esm2022/lib/pages/order-detail/order-detail.component.mjs +12 -39
- package/esm2022/lib/pages/order-qrcodepay/order-qrcodepay.component.mjs +7 -6
- package/esm2022/lib/pages/orders-index/order-index.component.mjs +74 -12
- package/esm2022/lib/pipe/order-item-options.pipe.mjs +10 -6
- package/fesm2022/rolatech-angular-order.mjs +155 -104
- package/fesm2022/rolatech-angular-order.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/order-detail-item/order-detail-item.component.d.ts +12 -0
- package/lib/components/order-return-request/order-return-request.component.d.ts +3 -1
- package/lib/interfaces/order.d.ts +44 -11
- package/lib/pages/order-detail/order-detail.component.d.ts +1 -6
- package/lib/pages/orders-index/order-index.component.d.ts +9 -3
- package/lib/pipe/order-item-options.pipe.d.ts +4 -1
- package/package.json +1 -1
- package/themes/_default.scss +1 -1
- package/esm2022/lib/components/order-course-item/order-course-item.component.mjs +0 -19
- package/esm2022/lib/components/order-product-item/order-product-item.component.mjs +0 -23
- package/lib/components/order-course-item/order-course-item.component.d.ts +0 -8
- package/lib/components/order-product-item/order-product-item.component.d.ts +0 -11
|
@@ -3,39 +3,49 @@ import { Pipe, input, computed, Component, inject, output, model, Renderer2, vie
|
|
|
3
3
|
import { Title } from '@angular/platform-browser';
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
5
|
import { ActivatedRoute, RouterModule, RouterLink } from '@angular/router';
|
|
6
|
-
import { ImagePlaceholderComponent, ThumbnailComponent, ContainerComponent, TabsComponent, TabComponent, ToolbarComponent, ListComponent, EmptyComponent, BaseComponent, SpinnerComponent, TitleComponent } from '@rolatech/angular-components';
|
|
6
|
+
import { ImagePlaceholderComponent, ThumbnailComponent, ContainerComponent, TabsComponent, TabComponent, ToolbarComponent, ListComponent, EmptyComponent, FilterComponent, AngularComponentsModule, BaseComponent, SpinnerComponent, TitleComponent } from '@rolatech/angular-components';
|
|
7
7
|
import { OrderService, ProductService, NavigationService } from '@rolatech/angular-services';
|
|
8
8
|
import * as i3 from '@angular/material/icon';
|
|
9
9
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
10
|
-
import { NgClass, JsonPipe, CommonModule, AsyncPipe } from '@angular/common';
|
|
10
|
+
import { NgClass, JsonPipe, KeyValuePipe, CommonModule, AsyncPipe } from '@angular/common';
|
|
11
11
|
import { sumBy } from 'lodash';
|
|
12
|
+
import { CourseType, CourseService } from '@rolatech/angular-course';
|
|
13
|
+
import { FixedPipe, DecimalDirective, AngularCommonModule } from '@rolatech/angular-common';
|
|
12
14
|
import * as i1$1 from '@angular/material/button';
|
|
13
15
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
-
import
|
|
15
|
-
import { map } from 'rxjs';
|
|
16
|
-
import { CourseType, CourseService } from '@rolatech/angular-course';
|
|
17
|
-
import * as i1$2 from '@angular/material/form-field';
|
|
16
|
+
import * as i2 from '@angular/material/form-field';
|
|
18
17
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
19
|
-
import * as
|
|
18
|
+
import * as i7 from '@angular/material/select';
|
|
19
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
20
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
21
|
+
import * as i6 from '@angular/material/core';
|
|
22
|
+
import { MatOptionModule } from '@angular/material/core';
|
|
23
|
+
import * as i3$1 from '@angular/material/input';
|
|
20
24
|
import { MatInputModule } from '@angular/material/input';
|
|
25
|
+
import * as i1$2 from '@angular/forms';
|
|
26
|
+
import { FormsModule } from '@angular/forms';
|
|
27
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
28
|
+
import moment from 'moment';
|
|
21
29
|
import * as QRCode from 'qrcode';
|
|
22
30
|
|
|
23
31
|
var OrderStatus;
|
|
24
32
|
(function (OrderStatus) {
|
|
25
|
-
OrderStatus[
|
|
26
|
-
OrderStatus[
|
|
27
|
-
OrderStatus[
|
|
28
|
-
OrderStatus[
|
|
29
|
-
OrderStatus[
|
|
30
|
-
OrderStatus[
|
|
33
|
+
OrderStatus["CREATED"] = "\u5F85\u4ED8\u6B3E";
|
|
34
|
+
OrderStatus["PAID"] = "\u5DF2\u652F\u4ED8";
|
|
35
|
+
OrderStatus["PARTIAL_PAID"] = "\u5B9A\u91D1\u5DF2\u652F\u4ED8";
|
|
36
|
+
OrderStatus["COMPLETED"] = "\u5DF2\u5B8C\u6210";
|
|
37
|
+
OrderStatus["CLOSED"] = "\u4EA4\u6613\u5173\u95ED";
|
|
38
|
+
OrderStatus["CANCELED"] = "\u4EA4\u6613\u53D6\u6D88";
|
|
39
|
+
OrderStatus["REFUNDED"] = "\u5DF2\u9000\u6B3E";
|
|
40
|
+
OrderStatus["RETURN_REQUESTED"] = "\u9000\u6B3E\u5904\u7406\u4E2D";
|
|
31
41
|
})(OrderStatus || (OrderStatus = {}));
|
|
32
42
|
var OrderType;
|
|
33
43
|
(function (OrderType) {
|
|
34
|
-
OrderType[
|
|
35
|
-
OrderType[
|
|
36
|
-
OrderType[
|
|
37
|
-
OrderType[
|
|
38
|
-
OrderType[
|
|
44
|
+
OrderType["COURSE"] = "\u8BFE\u7A0B";
|
|
45
|
+
OrderType["PRODUCT"] = "\u5546\u54C1";
|
|
46
|
+
OrderType["SERVICE"] = "\u670D\u52A1";
|
|
47
|
+
OrderType["BOOKING"] = "\u9884\u5B9A";
|
|
48
|
+
OrderType["OTTHER"] = "\u5176\u4ED6";
|
|
39
49
|
})(OrderType || (OrderType = {}));
|
|
40
50
|
var OrderReturnStatus;
|
|
41
51
|
(function (OrderReturnStatus) {
|
|
@@ -63,6 +73,7 @@ var OrderTimelineStatus;
|
|
|
63
73
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_CLOSED"] = '交易关闭'] = "ORDER_CLOSED";
|
|
64
74
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_CANCELED"] = '交易取消'] = "ORDER_CANCELED";
|
|
65
75
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_PAID"] = '订单已支付'] = "ORDER_PAID";
|
|
76
|
+
OrderTimelineStatus["ORDER_PARTIAL_PAID"] = "\u5B9A\u91D1\u5DF2\u652F\u4ED8";
|
|
66
77
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_REFUNDED"] = '订单已退款'] = "ORDER_REFUNDED";
|
|
67
78
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_COMPLETED"] = '订单已完成'] = "ORDER_COMPLETED";
|
|
68
79
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_RETURN_REQUESTED"] = '退款申请'] = "ORDER_RETURN_REQUESTED";
|
|
@@ -85,9 +96,27 @@ var OrderPayoutType;
|
|
|
85
96
|
OrderPayoutType[OrderPayoutType["CARD"] = '银行卡'] = "CARD";
|
|
86
97
|
OrderPayoutType[OrderPayoutType["WECHAT"] = '微信零钱'] = "WECHAT";
|
|
87
98
|
})(OrderPayoutType || (OrderPayoutType = {}));
|
|
99
|
+
var PaymentStatus;
|
|
100
|
+
(function (PaymentStatus) {
|
|
101
|
+
PaymentStatus["PENDING"] = "\u5F85\u652F\u4ED8";
|
|
102
|
+
PaymentStatus["CANCELED"] = "\u5B9A\u91D1";
|
|
103
|
+
PaymentStatus["COMPLETED"] = "\u5B8C\u6210";
|
|
104
|
+
PaymentStatus["FAILED"] = "\u5931\u8D25";
|
|
105
|
+
PaymentStatus["REFUNDED"] = "\u5DF2\u9000\u6B3E";
|
|
106
|
+
PaymentStatus["EXPIRED"] = "\u5C3E\u6B3E";
|
|
107
|
+
})(PaymentStatus || (PaymentStatus = {}));
|
|
108
|
+
var PaymentType;
|
|
109
|
+
(function (PaymentType) {
|
|
110
|
+
PaymentType["FIXED"] = "\u56FA\u5B9A";
|
|
111
|
+
PaymentType["DEPOSIT"] = "\u5B9A\u91D1";
|
|
112
|
+
PaymentType["FINAL"] = "\u5C3E\u6B3E";
|
|
113
|
+
})(PaymentType || (PaymentType = {}));
|
|
88
114
|
|
|
89
115
|
class OrderItemOptionsFormatPipe {
|
|
90
|
-
|
|
116
|
+
constructor() {
|
|
117
|
+
this.courseType = CourseType;
|
|
118
|
+
}
|
|
119
|
+
transform(items, type) {
|
|
91
120
|
if (!items) {
|
|
92
121
|
return;
|
|
93
122
|
}
|
|
@@ -96,12 +125,12 @@ class OrderItemOptionsFormatPipe {
|
|
|
96
125
|
const tmp = index === items.length - 1 ? '' : ', ';
|
|
97
126
|
result += item.name ? item.value + tmp : item.name + tmp;
|
|
98
127
|
});
|
|
99
|
-
return result;
|
|
128
|
+
return type?.toString() === 'PRODUCT' ? result : this.courseType[result];
|
|
100
129
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
102
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
131
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, isStandalone: true, name: "orderItemoptions" }); }
|
|
103
132
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, decorators: [{
|
|
105
134
|
type: Pipe,
|
|
106
135
|
args: [{
|
|
107
136
|
standalone: true,
|
|
@@ -115,17 +144,24 @@ class OrderItemComponent {
|
|
|
115
144
|
this.status = OrderStatus;
|
|
116
145
|
this.total = computed(() => {
|
|
117
146
|
return (this.order().total / 100).toFixed(2);
|
|
118
|
-
// const price = sumBy(this.order().items, (item: any) => item.total);
|
|
119
|
-
// return (price / 100).toFixed(2);
|
|
120
147
|
});
|
|
121
148
|
this.quantity = computed(() => sumBy(this.order().items, (item) => item.quantity));
|
|
122
149
|
}
|
|
123
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
124
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: OrderItemComponent, isStandalone: true, selector: "rolatech-order-item", inputs: { order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex flex-col hover:bg-[--rt-raised-background] cursor-pointer p-3\">\n <div class=\"flex justify-between w-full mb-2\">\n <span>\u8BA2\u5355\u53F7: {{ order().orderNo }}</span>\n <span class=\"font-medium text-sm\">{{ status[order().status] }}</span>\n </div>\n <div>\n @if (order().items; as items) {\n @if (items.length > 1) {\n } @else {}\n <div class=\"flex flex-col overflow-x-scroll scrollbar-hide\">\n @for (item of items; track $index) {\n <div class=\"flex flex-row py-2\">\n @if (item.media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"item.media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div class=\"flex w-full justify-between\">\n <div class=\"flex justify-between w-full\">\n <div>\n <div>{{ item.name }}</div>\n @if (item.options) {\n <div class=\"text-sm text-[--rt-text-secondary] mt-2\">\n {{ item.options | orderItemoptions: order().type }}\n </div>\n }\n </div>\n <div class=\"text-right\">\n <div class=\"text-sm\">\u00A5{{ item.total | fixed }}</div>\n <div class=\"text-sm mt-2\">x{{ item.quantity }}</div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n<hr />\n", styles: [".scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: ImagePlaceholderComponent, selector: "rolatech-image-placeholder" }, { kind: "pipe", type: OrderItemOptionsFormatPipe, name: "orderItemoptions" }, { kind: "pipe", type: FixedPipe, name: "fixed" }], deferBlockDependencies: [() => [ThumbnailComponent]] }); }
|
|
125
152
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemComponent, decorators: [{
|
|
127
154
|
type: Component,
|
|
128
|
-
args: [{ selector: 'rolatech-order-item', standalone: true, imports: [
|
|
155
|
+
args: [{ selector: 'rolatech-order-item', standalone: true, imports: [
|
|
156
|
+
MatIconModule,
|
|
157
|
+
ThumbnailComponent,
|
|
158
|
+
ImagePlaceholderComponent,
|
|
159
|
+
NgClass,
|
|
160
|
+
JsonPipe,
|
|
161
|
+
OrderItemOptionsFormatPipe,
|
|
162
|
+
DecimalDirective,
|
|
163
|
+
FixedPipe,
|
|
164
|
+
], template: "<div class=\"flex flex-col hover:bg-[--rt-raised-background] cursor-pointer p-3\">\n <div class=\"flex justify-between w-full mb-2\">\n <span>\u8BA2\u5355\u53F7: {{ order().orderNo }}</span>\n <span class=\"font-medium text-sm\">{{ status[order().status] }}</span>\n </div>\n <div>\n @if (order().items; as items) {\n @if (items.length > 1) {\n } @else {}\n <div class=\"flex flex-col overflow-x-scroll scrollbar-hide\">\n @for (item of items; track $index) {\n <div class=\"flex flex-row py-2\">\n @if (item.media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"item.media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div class=\"flex w-full justify-between\">\n <div class=\"flex justify-between w-full\">\n <div>\n <div>{{ item.name }}</div>\n @if (item.options) {\n <div class=\"text-sm text-[--rt-text-secondary] mt-2\">\n {{ item.options | orderItemoptions: order().type }}\n </div>\n }\n </div>\n <div class=\"text-right\">\n <div class=\"text-sm\">\u00A5{{ item.total | fixed }}</div>\n <div class=\"text-sm mt-2\">x{{ item.quantity }}</div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n<hr />\n", styles: [".scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"] }]
|
|
129
165
|
}] });
|
|
130
166
|
|
|
131
167
|
class OrderIndexComponent {
|
|
@@ -133,6 +169,12 @@ class OrderIndexComponent {
|
|
|
133
169
|
this.orderService = inject(OrderService);
|
|
134
170
|
this.title = inject(Title);
|
|
135
171
|
this.route = inject(ActivatedRoute);
|
|
172
|
+
this.orderType = OrderType;
|
|
173
|
+
this.orderStatus = OrderStatus;
|
|
174
|
+
this.filterOptions = {
|
|
175
|
+
type: '',
|
|
176
|
+
status: '',
|
|
177
|
+
};
|
|
136
178
|
this.links = [
|
|
137
179
|
{
|
|
138
180
|
name: '全部',
|
|
@@ -160,22 +202,26 @@ class OrderIndexComponent {
|
|
|
160
202
|
},
|
|
161
203
|
];
|
|
162
204
|
this.orders = [];
|
|
163
|
-
this.status = OrderStatus;
|
|
164
205
|
this.select = 0;
|
|
206
|
+
this.filter = false;
|
|
165
207
|
}
|
|
166
208
|
ngOnInit() {
|
|
167
209
|
this.title.setTitle('我的订单 - 拼小课');
|
|
168
210
|
this.route.queryParams.subscribe(({ status }) => {
|
|
169
211
|
this.select = this.links.findIndex((item) => item.status === status);
|
|
170
|
-
|
|
212
|
+
if (status) {
|
|
213
|
+
this.filterOptions.status = status.toUpperCase();
|
|
214
|
+
}
|
|
215
|
+
this.findOrders();
|
|
171
216
|
});
|
|
172
217
|
}
|
|
173
|
-
findOrders(
|
|
218
|
+
findOrders() {
|
|
174
219
|
const options = {
|
|
175
220
|
sort: 'updatedAt desc',
|
|
176
221
|
};
|
|
177
|
-
|
|
178
|
-
|
|
222
|
+
const filterString = this.convertFilterOptions(this.filterOptions);
|
|
223
|
+
if (filterString) {
|
|
224
|
+
options['filter'] = filterString;
|
|
179
225
|
}
|
|
180
226
|
this.orderService.me(options).subscribe({
|
|
181
227
|
next: (res) => {
|
|
@@ -183,10 +229,34 @@ class OrderIndexComponent {
|
|
|
183
229
|
},
|
|
184
230
|
});
|
|
185
231
|
}
|
|
186
|
-
|
|
187
|
-
|
|
232
|
+
resetFilter() {
|
|
233
|
+
this.filterOptions = {
|
|
234
|
+
type: '',
|
|
235
|
+
};
|
|
236
|
+
this.filter = false;
|
|
237
|
+
this.findOrders();
|
|
238
|
+
}
|
|
239
|
+
convertFilterOptions(jsonObj) {
|
|
240
|
+
return Object.entries(jsonObj)
|
|
241
|
+
.filter(([key, value]) => value !== '' && value !== undefined)
|
|
242
|
+
.map(([key, value]) => {
|
|
243
|
+
return `${key}:${value}`;
|
|
244
|
+
})
|
|
245
|
+
.join(',');
|
|
246
|
+
}
|
|
247
|
+
statusCompareFn(t1, t2) {
|
|
248
|
+
return t1 === t2;
|
|
249
|
+
}
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
251
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: OrderIndexComponent, isStandalone: true, selector: "rolatech-order-index", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u6211\u7684\u8BA2\u5355\" large>\n <button mat-button (click)=\"filter = !filter\">\n <span>\u8FC7\u6EE4</span>\n <mat-icon>tune</mat-icon>\n </button>\n </rolatech-toolbar>\n <rolatech-filter>\n <div [@filter]=\"filter === true ? 'expanded' : 'collapsed'\">\n <div\n class=\"min-w-[256px] md:min-w-[320px] px-3 h-full flex flex-row md:flex-col md:h-full items-center md:items-start shadow-inner shadow-light-400 md:shadow-none overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex items-center gap-3 mt-2\">\n <mat-form-field appearance=\"fill\" subscriptSizing=\"dynamic\">\n <mat-select name=\"type\" placeholder=\"\u7C7B\u578B\" [(ngModel)]=\"filterOptions.type\">\n @for (type of orderType | keyvalue; track type) {\n <mat-option [value]=\"type.key\">\n {{ type.value }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\">\n <mat-select [compareWith]=\"statusCompareFn\" placeholder=\"\u72B6\u6001\" [(ngModel)]=\"filterOptions.status\">\n @for (status of orderStatus | keyvalue; track status) {\n <mat-option [value]=\"status.key\">\n {{ status.value }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div>\n <button mat-flat-button (click)=\"findOrders()\">\u641C\u7D22</button>\n <button mat-stroked-button (click)=\"resetFilter()\" class=\"ml-3\">\u91CD\u7F6E</button>\n </div>\n </div>\n </div>\n </div>\n </rolatech-filter>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.status) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ status: item.status }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (orders) {\n @for (item of orders; track item) {\n <rolatech-order-item [routerLink]=\"['./', item.id]\" [order]=\"item\"></rolatech-order-item>\n }\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n", styles: [".active{color:#ff4500;font-weight:700}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: TabsComponent, selector: "rolatech-tabs", inputs: ["select", "loading"], outputs: ["selectChange"] }, { kind: "component", type: TabComponent, selector: "rolatech-tab", inputs: ["label"] }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: ListComponent, selector: "rolatech-list" }, { kind: "component", type: OrderItemComponent, selector: "rolatech-order-item", inputs: ["order"] }, { kind: "component", type: EmptyComponent, selector: "rolatech-empty" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: FilterComponent, selector: "rolatech-filter" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], animations: [
|
|
252
|
+
trigger('filter', [
|
|
253
|
+
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
254
|
+
state('expanded', style({ height: '*' })),
|
|
255
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
256
|
+
]),
|
|
257
|
+
] }); }
|
|
188
258
|
}
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderIndexComponent, decorators: [{
|
|
190
260
|
type: Component,
|
|
191
261
|
args: [{ selector: 'rolatech-order-index', standalone: true, imports: [
|
|
192
262
|
ContainerComponent,
|
|
@@ -199,7 +269,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
199
269
|
EmptyComponent,
|
|
200
270
|
MatButtonModule,
|
|
201
271
|
MatIconModule,
|
|
202
|
-
|
|
272
|
+
NgClass,
|
|
273
|
+
FormsModule,
|
|
274
|
+
MatFormFieldModule,
|
|
275
|
+
MatDatepickerModule,
|
|
276
|
+
MatOptionModule,
|
|
277
|
+
MatInputModule,
|
|
278
|
+
MatSelectModule,
|
|
279
|
+
MatButtonModule,
|
|
280
|
+
FilterComponent,
|
|
281
|
+
KeyValuePipe,
|
|
282
|
+
], animations: [
|
|
283
|
+
trigger('filter', [
|
|
284
|
+
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
285
|
+
state('expanded', style({ height: '*' })),
|
|
286
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
287
|
+
]),
|
|
288
|
+
], template: "<rolatech-container>\n <rolatech-toolbar title=\"\u6211\u7684\u8BA2\u5355\" large>\n <button mat-button (click)=\"filter = !filter\">\n <span>\u8FC7\u6EE4</span>\n <mat-icon>tune</mat-icon>\n </button>\n </rolatech-toolbar>\n <rolatech-filter>\n <div [@filter]=\"filter === true ? 'expanded' : 'collapsed'\">\n <div\n class=\"min-w-[256px] md:min-w-[320px] px-3 h-full flex flex-row md:flex-col md:h-full items-center md:items-start shadow-inner shadow-light-400 md:shadow-none overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex items-center gap-3 mt-2\">\n <mat-form-field appearance=\"fill\" subscriptSizing=\"dynamic\">\n <mat-select name=\"type\" placeholder=\"\u7C7B\u578B\" [(ngModel)]=\"filterOptions.type\">\n @for (type of orderType | keyvalue; track type) {\n <mat-option [value]=\"type.key\">\n {{ type.value }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\">\n <mat-select [compareWith]=\"statusCompareFn\" placeholder=\"\u72B6\u6001\" [(ngModel)]=\"filterOptions.status\">\n @for (status of orderStatus | keyvalue; track status) {\n <mat-option [value]=\"status.key\">\n {{ status.value }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div>\n <button mat-flat-button (click)=\"findOrders()\">\u641C\u7D22</button>\n <button mat-stroked-button (click)=\"resetFilter()\" class=\"ml-3\">\u91CD\u7F6E</button>\n </div>\n </div>\n </div>\n </div>\n </rolatech-filter>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.status) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ status: item.status }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (orders) {\n @for (item of orders; track item) {\n <rolatech-order-item [routerLink]=\"['./', item.id]\" [order]=\"item\"></rolatech-order-item>\n }\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n", styles: [".active{color:#ff4500;font-weight:700}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}mat-form-field{width:100%}\n"] }]
|
|
203
289
|
}] });
|
|
204
290
|
|
|
205
291
|
class OrderReturnRequestComponent {
|
|
@@ -207,53 +293,44 @@ class OrderReturnRequestComponent {
|
|
|
207
293
|
this.output = output();
|
|
208
294
|
this.reason = model();
|
|
209
295
|
}
|
|
210
|
-
|
|
211
|
-
|
|
296
|
+
ngDoCheck() {
|
|
297
|
+
this.output.emit(this.reason());
|
|
298
|
+
}
|
|
299
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderReturnRequestComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.3", type: OrderReturnRequestComponent, isStandalone: true, selector: "rolatech-order-return-request", inputs: { reason: { classPropertyName: "reason", publicName: "reason", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { output: "output", reason: "reasonChange" }, ngImport: i0, template: "<div class=\"py-2\">\n <h2 class=\"mb-2\">\u5728\u4E0B\u9762\u8F93\u5165\u9000\u6B3E\u7406\u7531</h2>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u9000\u6B3E\u7406\u7531 </mat-label>\n <textarea matInput required [(ngModel)]=\"reason\"></textarea>\n </mat-form-field>\n</div>\n", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] }); }
|
|
212
301
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderReturnRequestComponent, decorators: [{
|
|
214
303
|
type: Component,
|
|
215
|
-
args: [{ selector: 'rolatech-order-return-request', standalone: true, imports: [
|
|
304
|
+
args: [{ selector: 'rolatech-order-return-request', standalone: true, imports: [AngularCommonModule, AngularComponentsModule], template: "<div class=\"py-2\">\n <h2 class=\"mb-2\">\u5728\u4E0B\u9762\u8F93\u5165\u9000\u6B3E\u7406\u7531</h2>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u9000\u6B3E\u7406\u7531 </mat-label>\n <textarea matInput required [(ngModel)]=\"reason\"></textarea>\n </mat-form-field>\n</div>\n", styles: ["mat-form-field{width:100%}\n"] }]
|
|
216
305
|
}] });
|
|
217
306
|
|
|
218
|
-
class OrderCourseItemComponent {
|
|
219
|
-
constructor() {
|
|
220
|
-
this.course = input.required();
|
|
221
|
-
this.type = CourseType;
|
|
222
|
-
}
|
|
223
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrderCourseItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
224
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: OrderCourseItemComponent, isStandalone: true, selector: "rolatech-order-course-item", inputs: { course: { classPropertyName: "course", publicName: "course", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex flex-col\">\n <div class=\"hover:!bg-[--rt-base-background] cursor-pointer py-2\">\n <div class=\"flex justify-between items-center\">\n <div class=\"flex flex-row w-full\">\n <div class=\"w-2/5 sm:w-1/4 aspect-video bg-[--rt-raised-background] h-fit\">\n @if (course().media) {\n <div class=\"object-cover aspect-video\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"course().media[0].url + '!w400'\" size=\"medium\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n }\n </div>\n <div class=\"w-3/5 sm:w-3/4 ml-3 flex flex-col justify-between\">\n <span class=\"font-bold break-words line-clamp-2\">{{ course().name }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">\u7C7B\u578B: {{ type[course().type] }}</span>\n </div>\n </div>\n <div class=\"pl-2\">\n <mat-icon>navigate_next</mat-icon>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
|
|
225
|
-
}
|
|
226
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.0", ngImport: i0, type: OrderCourseItemComponent, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
|
|
227
|
-
type: Component,
|
|
228
|
-
args: [{ selector: 'rolatech-order-course-item', standalone: true, imports: [CommonModule, ThumbnailComponent, MatIconModule], template: "<div class=\"flex flex-col\">\n <div class=\"hover:!bg-[--rt-base-background] cursor-pointer py-2\">\n <div class=\"flex justify-between items-center\">\n <div class=\"flex flex-row w-full\">\n <div class=\"w-2/5 sm:w-1/4 aspect-video bg-[--rt-raised-background] h-fit\">\n @if (course().media) {\n <div class=\"object-cover aspect-video\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"course().media[0].url + '!w400'\" size=\"medium\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n }\n </div>\n <div class=\"w-3/5 sm:w-3/4 ml-3 flex flex-col justify-between\">\n <span class=\"font-bold break-words line-clamp-2\">{{ course().name }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">\u7C7B\u578B: {{ type[course().type] }}</span>\n </div>\n </div>\n <div class=\"pl-2\">\n <mat-icon>navigate_next</mat-icon>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
229
|
-
}], ctorParameters: null, propDecorators: null }) });
|
|
230
|
-
|
|
231
307
|
class OrderVariantItemComponent {
|
|
232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderVariantItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
309
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: OrderVariantItemComponent, isStandalone: true, selector: "rolatech-order-variant-item", ngImport: i0, template: "<p>order-variant-item works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
234
310
|
}
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderVariantItemComponent, decorators: [{
|
|
236
312
|
type: Component,
|
|
237
313
|
args: [{ selector: 'rolatech-order-variant-item', standalone: true, imports: [CommonModule], template: "<p>order-variant-item works!</p>\n" }]
|
|
238
314
|
}] });
|
|
239
315
|
|
|
240
|
-
class
|
|
316
|
+
class OrderDetailItemComponent {
|
|
241
317
|
constructor() {
|
|
242
318
|
this.thumbnail = input();
|
|
243
319
|
this.title = input.required();
|
|
244
320
|
this.description = input();
|
|
245
321
|
this.quantity = input(0);
|
|
246
322
|
this.total = input.required();
|
|
323
|
+
this.link = input.required();
|
|
247
324
|
this.priceDisplay = computed(() => {
|
|
248
325
|
return (this.total() / 100)?.toFixed(2);
|
|
249
326
|
});
|
|
250
327
|
}
|
|
251
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
252
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderDetailItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: OrderDetailItemComponent, isStandalone: true, selector: "rolatech-order-detail-item", inputs: { thumbnail: { classPropertyName: "thumbnail", publicName: "thumbnail", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, quantity: { classPropertyName: "quantity", publicName: "quantity", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\">{{\n title()\n }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">{{ description() }}</span>\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A5{{ priceDisplay() }}</div>\n <div class=\"text-sm mt-2\">x{{ quantity() }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
|
|
253
330
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.
|
|
331
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.3", ngImport: i0, type: OrderDetailItemComponent, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
|
|
255
332
|
type: Component,
|
|
256
|
-
args: [{ selector: 'rolatech-order-
|
|
333
|
+
args: [{ selector: 'rolatech-order-detail-item', standalone: true, imports: [CommonModule, ThumbnailComponent, MatIcon, RouterLink], template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\">{{\n title()\n }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">{{ description() }}</span>\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A5{{ priceDisplay() }}</div>\n <div class=\"text-sm mt-2\">x{{ quantity() }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
257
334
|
}], ctorParameters: null, propDecorators: null }) });
|
|
258
335
|
|
|
259
336
|
class OrderDetailComponent extends BaseComponent {
|
|
@@ -278,15 +355,6 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
278
355
|
this.orderService.get(this.id).subscribe({
|
|
279
356
|
next: (res) => {
|
|
280
357
|
this.order = res.data;
|
|
281
|
-
if (this.order.type?.toString() === 'PRODUCT') {
|
|
282
|
-
this.getVariant();
|
|
283
|
-
}
|
|
284
|
-
else if (this.order.type?.toString() === 'COURSE') {
|
|
285
|
-
this.getCourse();
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
this.getCourse();
|
|
289
|
-
}
|
|
290
358
|
if (this.order.status === 'CREATED') {
|
|
291
359
|
setInterval(() => {
|
|
292
360
|
const start = moment();
|
|
@@ -299,24 +367,6 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
299
367
|
},
|
|
300
368
|
});
|
|
301
369
|
}
|
|
302
|
-
back() {
|
|
303
|
-
this.navigationService.back();
|
|
304
|
-
}
|
|
305
|
-
getCourse() {
|
|
306
|
-
const { productId } = this.order.items[0];
|
|
307
|
-
this.course$ = this.courseService.get(productId).pipe(map((res) => res.data));
|
|
308
|
-
}
|
|
309
|
-
getVariant() {
|
|
310
|
-
const { variantId } = this.order.items[0];
|
|
311
|
-
if (variantId) {
|
|
312
|
-
this.productService
|
|
313
|
-
.getVariant(variantId)
|
|
314
|
-
.pipe(map((res) => res.data))
|
|
315
|
-
.subscribe({
|
|
316
|
-
next: (res) => { },
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
370
|
refund() {
|
|
321
371
|
const options = {
|
|
322
372
|
width: '500px',
|
|
@@ -332,7 +382,7 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
332
382
|
this.dialogService.open(options);
|
|
333
383
|
this.dialogService.confirmed().subscribe((res) => {
|
|
334
384
|
if (res) {
|
|
335
|
-
this.orderService.refund(this.id, res).subscribe({
|
|
385
|
+
this.orderService.refund(this.id, { reason: res }).subscribe({
|
|
336
386
|
next: (res) => {
|
|
337
387
|
this.snackBarService.open('退款申请成功, 等待审核');
|
|
338
388
|
},
|
|
@@ -346,7 +396,7 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
346
396
|
cancel() {
|
|
347
397
|
this.orderService.cancel(this.id).subscribe({
|
|
348
398
|
next: (res) => {
|
|
349
|
-
this.order.status =
|
|
399
|
+
this.order.status = 'CANCELED';
|
|
350
400
|
this.snackBarService.open('取消成功');
|
|
351
401
|
},
|
|
352
402
|
error: (error) => {
|
|
@@ -370,10 +420,10 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
370
420
|
},
|
|
371
421
|
});
|
|
372
422
|
}
|
|
373
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
374
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
424
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: OrderDetailComponent, isStandalone: true, selector: "rolatech-order-detail", usesInheritance: true, ngImport: i0, template: "@if (order) {\n <rolatech-container>\n <rolatech-toolbar [title]=\"status[order.status]\" large link=\"../\">\n <button mat-button (click)=\"timeline()\">\n <mat-icon>history</mat-icon>\n <span>\u8BA2\u5355\u72B6\u6001</span>\n </button>\n </rolatech-toolbar>\n <div>\n @if (order.status === 'CREATED') {\n <div class=\"text-[--rt-brand-color] font-bold\">\u652F\u4ED8\u5012\u8BA1\u65F6: {{ countDown }}</div>\n }\n <div>\n <div>\n @for (item of order.items; track $index) {\n <rolatech-order-detail-item\n [thumbnail]=\"item.media[0].url + '!w200 '\"\n [link]=\"order.type.toString() === 'PRODUCT' ? '/products/' + item.productId : '/courses/' + item.productId\"\n [title]=\"item.name\"\n [total]=\"item.total\"\n [description]=\"item.options | orderItemoptions: order.type\"\n [quantity]=\"item.quantity\"\n ></rolatech-order-detail-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"text-lg py-3 font-medium\">\u8BA2\u5355\u4FE1\u606F</div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u8BA2\u5355\u53F7</label>\n <span class=\"text-sm\"> {{ order.orderNo }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u4E0B\u5355\u65F6\u95F4</label>\n <span class=\"text-sm\"> {{ order.createdAt }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <label class=\"font-medium min-w-20\">\u5907\u6CE8\u4FE1\u606F</label>\n <span class=\"text-sm\">{{ order.note || '\u65E0' }}</span>\n </div>\n @if (order.deposit) {\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5B9A\u91D1\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.deposit | fixed }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5C3E\u6B3E\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.total - order.deposit | fixed }}</span>\n </div>\n }\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5E94\u4ED8\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.total | fixed }}</span>\n </div>\n </div>\n @if (order.status.toString() === 'CREATED' || order.status.toString() === 'PAID') {\n <div class=\"mt-6\">\n <div class=\"text-lg pb-3 font-medium\">\u652F\u4ED8\u65B9\u5F0F</div>\n <div class=\"flex\">\n <img class=\"w-6 h-6\" src=\"/images/pay_wechat.png\" />\n <span class=\"ml-1\">\u5FAE\u4FE1\u652F\u4ED8</span>\n </div>\n </div>\n }\n </div>\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n <div class=\"\">\n @if (order.status.toString() === 'PAID') {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"refund()\">\u7533\u8BF7\u9000\u6B3E</button>\n }\n <div class=\"flex items-center justify-end\">\n @if (order.status.toString() === 'CREATED') {\n <span\n class=\"underline text-sm underline-offset-4 mr-6 cursor-pointer hover:text-[--rt-brand-color]\"\n (click)=\"cancel()\"\n >\u53D6\u6D88\u8BA2\u5355</span\n >\n }\n @if (order.status.toString() === 'CREATED') {\n @if (order.deposit) {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u5B9A\u91D1</button>\n } @else {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u8BA2\u5355</button>\n }\n }\n @if (order.status.toString() === 'PARTIAL_PAID') {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u5C3E\u6B3E</button>\n }\n </div>\n </div>\n </div>\n </rolatech-container>\n}\n<div\n [ngClass]=\"info ? 'translate-none' : 'translate-x-full'\"\n class=\"fixed top-0 right-0 z-[1001] h-screen p-4 overflow-y-auto transition-transform bg-[--rt-raised-background] w-80 sm:w-[300px] shadow-xl\"\n>\n <div class=\"flex justify-between items-center sm:p-4\">\n <div class=\"text-xl font-bold\">\u8BA2\u5355\u72B6\u6001</div>\n <button mat-icon-button (click)=\"info = !info\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @if (!loadingTimeline) {\n <div class=\"mt-3 p-1 sm:p-4\">\n <ol class=\"relative border-l border-[--rt-border-color]\">\n @for (item of timelineData; track item) {\n <li class=\"mb-8 ml-4\">\n <div\n class=\"absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border border-[--rt-raised-background] bg-[--rt-text-primary]\"\n ></div>\n <div class=\"text-md font-bold mb-1\">{{ timelineStatus[item.status] }}</div>\n @if (item.status === 'BOOKING_RETURN_REJECTED') {\n <div class=\"text-sm mb-1\">{{ item.return.note }}</div>\n }\n @if (item.status === 'BOOKING_RETURN_REQUESTED') {\n <div class=\"text-sm mb-1\">{{ item.return.reason }}</div>\n }\n <div class=\"text-sm text-[--rt-text-secondary]\">{{ item.date }}</div>\n </li>\n }\n </ol>\n </div>\n }\n @if (loadingTimeline) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n</div>\n<div\n (click)=\"info = !info\"\n [ngClass]=\"info ? 'visible' : 'invisible'\"\n class=\"bg-[--rt-10-percent-layer] fixed inset-0 z-[1000]\"\n></div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: OrderDetailItemComponent, selector: "rolatech-order-detail-item", inputs: ["thumbnail", "title", "description", "quantity", "total", "link"] }, { kind: "pipe", type: OrderItemOptionsFormatPipe, name: "orderItemoptions" }, { kind: "pipe", type: FixedPipe, name: "fixed" }] }); }
|
|
375
425
|
}
|
|
376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderDetailComponent, decorators: [{
|
|
377
427
|
type: Component,
|
|
378
428
|
args: [{ selector: 'rolatech-order-detail', standalone: true, imports: [
|
|
379
429
|
MatButtonModule,
|
|
@@ -386,11 +436,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
386
436
|
ThumbnailComponent,
|
|
387
437
|
ToolbarComponent,
|
|
388
438
|
TitleComponent,
|
|
389
|
-
|
|
390
|
-
OrderProductItemComponent,
|
|
439
|
+
OrderDetailItemComponent,
|
|
391
440
|
OrderVariantItemComponent,
|
|
392
441
|
OrderItemOptionsFormatPipe,
|
|
393
|
-
|
|
442
|
+
DecimalDirective,
|
|
443
|
+
FixedPipe,
|
|
444
|
+
], template: "@if (order) {\n <rolatech-container>\n <rolatech-toolbar [title]=\"status[order.status]\" large link=\"../\">\n <button mat-button (click)=\"timeline()\">\n <mat-icon>history</mat-icon>\n <span>\u8BA2\u5355\u72B6\u6001</span>\n </button>\n </rolatech-toolbar>\n <div>\n @if (order.status === 'CREATED') {\n <div class=\"text-[--rt-brand-color] font-bold\">\u652F\u4ED8\u5012\u8BA1\u65F6: {{ countDown }}</div>\n }\n <div>\n <div>\n @for (item of order.items; track $index) {\n <rolatech-order-detail-item\n [thumbnail]=\"item.media[0].url + '!w200 '\"\n [link]=\"order.type.toString() === 'PRODUCT' ? '/products/' + item.productId : '/courses/' + item.productId\"\n [title]=\"item.name\"\n [total]=\"item.total\"\n [description]=\"item.options | orderItemoptions: order.type\"\n [quantity]=\"item.quantity\"\n ></rolatech-order-detail-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"text-lg py-3 font-medium\">\u8BA2\u5355\u4FE1\u606F</div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u8BA2\u5355\u53F7</label>\n <span class=\"text-sm\"> {{ order.orderNo }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u4E0B\u5355\u65F6\u95F4</label>\n <span class=\"text-sm\"> {{ order.createdAt }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <label class=\"font-medium min-w-20\">\u5907\u6CE8\u4FE1\u606F</label>\n <span class=\"text-sm\">{{ order.note || '\u65E0' }}</span>\n </div>\n @if (order.deposit) {\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5B9A\u91D1\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.deposit | fixed }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5C3E\u6B3E\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.total - order.deposit | fixed }}</span>\n </div>\n }\n <div class=\"flex items-center justify-between py-1\">\n <label class=\"font-medium\">\u5E94\u4ED8\u91D1\u989D</label>\n <span class=\"text-sm\">\u00A5{{ order.total | fixed }}</span>\n </div>\n </div>\n @if (order.status.toString() === 'CREATED' || order.status.toString() === 'PAID') {\n <div class=\"mt-6\">\n <div class=\"text-lg pb-3 font-medium\">\u652F\u4ED8\u65B9\u5F0F</div>\n <div class=\"flex\">\n <img class=\"w-6 h-6\" src=\"/images/pay_wechat.png\" />\n <span class=\"ml-1\">\u5FAE\u4FE1\u652F\u4ED8</span>\n </div>\n </div>\n }\n </div>\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n <div class=\"\">\n @if (order.status.toString() === 'PAID') {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"refund()\">\u7533\u8BF7\u9000\u6B3E</button>\n }\n <div class=\"flex items-center justify-end\">\n @if (order.status.toString() === 'CREATED') {\n <span\n class=\"underline text-sm underline-offset-4 mr-6 cursor-pointer hover:text-[--rt-brand-color]\"\n (click)=\"cancel()\"\n >\u53D6\u6D88\u8BA2\u5355</span\n >\n }\n @if (order.status.toString() === 'CREATED') {\n @if (order.deposit) {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u5B9A\u91D1</button>\n } @else {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u8BA2\u5355</button>\n }\n }\n @if (order.status.toString() === 'PARTIAL_PAID') {\n <button mat-flat-button class=\"w-32 min-h-11\" (click)=\"pay()\">\u652F\u4ED8\u5C3E\u6B3E</button>\n }\n </div>\n </div>\n </div>\n </rolatech-container>\n}\n<div\n [ngClass]=\"info ? 'translate-none' : 'translate-x-full'\"\n class=\"fixed top-0 right-0 z-[1001] h-screen p-4 overflow-y-auto transition-transform bg-[--rt-raised-background] w-80 sm:w-[300px] shadow-xl\"\n>\n <div class=\"flex justify-between items-center sm:p-4\">\n <div class=\"text-xl font-bold\">\u8BA2\u5355\u72B6\u6001</div>\n <button mat-icon-button (click)=\"info = !info\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @if (!loadingTimeline) {\n <div class=\"mt-3 p-1 sm:p-4\">\n <ol class=\"relative border-l border-[--rt-border-color]\">\n @for (item of timelineData; track item) {\n <li class=\"mb-8 ml-4\">\n <div\n class=\"absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border border-[--rt-raised-background] bg-[--rt-text-primary]\"\n ></div>\n <div class=\"text-md font-bold mb-1\">{{ timelineStatus[item.status] }}</div>\n @if (item.status === 'BOOKING_RETURN_REJECTED') {\n <div class=\"text-sm mb-1\">{{ item.return.note }}</div>\n }\n @if (item.status === 'BOOKING_RETURN_REQUESTED') {\n <div class=\"text-sm mb-1\">{{ item.return.reason }}</div>\n }\n <div class=\"text-sm text-[--rt-text-secondary]\">{{ item.date }}</div>\n </li>\n }\n </ol>\n </div>\n }\n @if (loadingTimeline) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n</div>\n<div\n (click)=\"info = !info\"\n [ngClass]=\"info ? 'visible' : 'invisible'\"\n class=\"bg-[--rt-10-percent-layer] fixed inset-0 z-[1000]\"\n></div>\n" }]
|
|
394
445
|
}] });
|
|
395
446
|
|
|
396
447
|
class OrderQrcodepayComponent extends BaseComponent {
|
|
@@ -409,7 +460,7 @@ class OrderQrcodepayComponent extends BaseComponent {
|
|
|
409
460
|
this.orderService.get(this.id).subscribe({
|
|
410
461
|
next: (res) => {
|
|
411
462
|
this.order = res.data;
|
|
412
|
-
this.needPay = this.order.status.toString() === 'CREATED';
|
|
463
|
+
this.needPay = this.order.status.toString() === 'CREATED' || this.order.status.toString() === 'PARTIAL_PAID';
|
|
413
464
|
if (this.needPay) {
|
|
414
465
|
this.getQRCodeUrl();
|
|
415
466
|
}
|
|
@@ -448,12 +499,12 @@ class OrderQrcodepayComponent extends BaseComponent {
|
|
|
448
499
|
this.renderer.removeChild(this.qrcElement().nativeElement, node);
|
|
449
500
|
}
|
|
450
501
|
}
|
|
451
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
452
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderQrcodepayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: OrderQrcodepayComponent, isStandalone: true, selector: "rolatech-order-qrcodepay", viewQueries: [{ propertyName: "qrcElement", first: true, predicate: ["qrcode"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (order) {\n <rolatech-container>\n <rolatech-toolbar [title]=\"status[order.status]\" link=\"../\" large></rolatech-toolbar>\n <div>\n <div>\n <a class=\"text-[--rt-brand-color]\" routerLink=\"..\"\n ><span>\u8BA2\u5355: </span><span class=\"underline\">#{{ this.id }}</span></a\n >\n @if (order.status.toString() === 'CREATED') {\n @if (order.deposit) {\n <div>\u652F\u4ED8\u5B9A\u91D1: \u00A5{{ order.deposit | fixed }}</div>\n } @else {\n <div>\u652F\u4ED8\u91D1\u989D: \u00A5{{ order.total | fixed }}</div>\n }\n }\n @if (order.status.toString() === 'PARTIAL_PAID') {\n <div>\u652F\u4ED8\u5C3E\u6B3E \u00A5{{ order.total - order.deposit | fixed }}</div>\n }\n </div>\n <div class=\"mt-6\">\n @if (needPay) {\n <div>\n <div>\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801\u652F\u4ED8, \u6211\u4EEC\u4F1A\u5728\u6536\u5230\u4ED8\u6B3E\u540E\u5904\u7406\u60A8\u7684\u8BA2\u5355</div>\n <div class=\"w-52 h-56 flex flex-col justify-end items-center\">\n <div #qrcode></div>\n <span class=\"text-md\">\u5FAE\u4FE1\u652F\u4ED8\u4E8C\u7EF4\u7801</span>\n </div>\n </div>\n } @else {\n <div>\u8BF7\u786E\u8BA4\u5F53\u524D\u8BA2\u5355\u72B6\u6001, \u5982\u5DF2\u7ECF\u4ED8\u6B3E, \u8BF7\u8FD4\u56DE\u67E5\u770B</div>\n }\n </div>\n </div>\n </rolatech-container>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "pipe", type: FixedPipe, name: "fixed" }] }); }
|
|
453
504
|
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderQrcodepayComponent, decorators: [{
|
|
455
506
|
type: Component,
|
|
456
|
-
args: [{ selector: 'rolatech-order-qrcodepay', standalone: true, imports: [RouterLink, ContainerComponent, ToolbarComponent], template: "@if (order) {\n <rolatech-container>\n <rolatech-toolbar [title]=\"status[order.status]\" link=\"../\" large></rolatech-toolbar>\n <div>\n <div>\n <a class=\"text-[--rt-brand-color]\" routerLink=\"..\"\n ><span>\u8BA2\u5355: </span><span class=\"underline\">#{{ this.id }}</span></a\n >\n </div>\n <div class=\"mt-6\">\n @if (needPay) {\n <div>\n <div>\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801\u652F\u4ED8, \u6211\u4EEC\u4F1A\u5728\u6536\u5230\u4ED8\u6B3E\u540E\u5904\u7406\u60A8\u7684\u8BA2\u5355</div>\n <div class=\"w-52 h-56 flex flex-col justify-end items-center\">\n <div #qrcode></div>\n <span class=\"text-md\">\u5FAE\u4FE1\u652F\u4ED8\u4E8C\u7EF4\u7801</span>\n </div>\n </div>\n } @else {\n <div>\u8BF7\u786E\u8BA4\u5F53\u524D\u8BA2\u5355\u72B6\u6001, \u5982\u5DF2\u7ECF\u4ED8\u6B3E, \u8BF7\u8FD4\u56DE\u67E5\u770B</div>\n }\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
507
|
+
args: [{ selector: 'rolatech-order-qrcodepay', standalone: true, imports: [RouterLink, ContainerComponent, ToolbarComponent, FixedPipe], template: "@if (order) {\n <rolatech-container>\n <rolatech-toolbar [title]=\"status[order.status]\" link=\"../\" large></rolatech-toolbar>\n <div>\n <div>\n <a class=\"text-[--rt-brand-color]\" routerLink=\"..\"\n ><span>\u8BA2\u5355: </span><span class=\"underline\">#{{ this.id }}</span></a\n >\n @if (order.status.toString() === 'CREATED') {\n @if (order.deposit) {\n <div>\u652F\u4ED8\u5B9A\u91D1: \u00A5{{ order.deposit | fixed }}</div>\n } @else {\n <div>\u652F\u4ED8\u91D1\u989D: \u00A5{{ order.total | fixed }}</div>\n }\n }\n @if (order.status.toString() === 'PARTIAL_PAID') {\n <div>\u652F\u4ED8\u5C3E\u6B3E \u00A5{{ order.total - order.deposit | fixed }}</div>\n }\n </div>\n <div class=\"mt-6\">\n @if (needPay) {\n <div>\n <div>\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801\u652F\u4ED8, \u6211\u4EEC\u4F1A\u5728\u6536\u5230\u4ED8\u6B3E\u540E\u5904\u7406\u60A8\u7684\u8BA2\u5355</div>\n <div class=\"w-52 h-56 flex flex-col justify-end items-center\">\n <div #qrcode></div>\n <span class=\"text-md\">\u5FAE\u4FE1\u652F\u4ED8\u4E8C\u7EF4\u7801</span>\n </div>\n </div>\n } @else {\n <div>\u8BF7\u786E\u8BA4\u5F53\u524D\u8BA2\u5355\u72B6\u6001, \u5982\u5DF2\u7ECF\u4ED8\u6B3E, \u8BF7\u8FD4\u56DE\u67E5\u770B</div>\n }\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
457
508
|
}] });
|
|
458
509
|
|
|
459
510
|
const orderRoutes = [
|
|
@@ -475,5 +526,5 @@ const orderRoutes = [
|
|
|
475
526
|
* Generated bundle index. Do not edit.
|
|
476
527
|
*/
|
|
477
528
|
|
|
478
|
-
export {
|
|
529
|
+
export { OrderDetailItemComponent, OrderItemComponent, OrderItemOptionsFormatPipe, OrderItemStatus, OrderPayoutStatus, OrderPayoutType, OrderReturnRequestComponent, OrderReturnStatus, OrderStatus, OrderTimelineStatus, OrderType, OrderVariantItemComponent, PaymentStatus, PaymentType, orderRoutes };
|
|
479
530
|
//# sourceMappingURL=rolatech-angular-order.mjs.map
|