@rolatech/angular-order 18.0.6 → 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/order-detail-item/order-detail-item.component.mjs +3 -3
- 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 +19 -1
- package/esm2022/lib/pages/order-detail/order-detail.component.mjs +10 -7
- package/esm2022/lib/pages/order-qrcodepay/order-qrcodepay.component.mjs +7 -6
- package/esm2022/lib/pages/orders-index/order-index.component.mjs +3 -3
- package/esm2022/lib/pipe/order-item-options.pipe.mjs +3 -3
- package/fesm2022/rolatech-angular-order.mjs +69 -38
- package/fesm2022/rolatech-angular-order.mjs.map +1 -1
- package/lib/components/order-return-request/order-return-request.component.d.ts +3 -1
- package/lib/interfaces/order.d.ts +34 -1
- package/package.json +1 -1
- package/themes/_default.scss +1 -1
|
@@ -106,8 +106,8 @@ export class OrderIndexComponent {
|
|
|
106
106
|
statusCompareFn(t1, t2) {
|
|
107
107
|
return t1 === t2;
|
|
108
108
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
110
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
+
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: i2.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.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: [
|
|
111
111
|
trigger('filter', [
|
|
112
112
|
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
113
113
|
state('expanded', style({ height: '*' })),
|
|
@@ -115,7 +115,7 @@ export class OrderIndexComponent {
|
|
|
115
115
|
]),
|
|
116
116
|
] }); }
|
|
117
117
|
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderIndexComponent, decorators: [{
|
|
119
119
|
type: Component,
|
|
120
120
|
args: [{ selector: 'rolatech-order-index', standalone: true, imports: [
|
|
121
121
|
ContainerComponent,
|
|
@@ -16,10 +16,10 @@ export class OrderItemOptionsFormatPipe {
|
|
|
16
16
|
});
|
|
17
17
|
return type?.toString() === 'PRODUCT' ? result : this.courseType[result];
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
20
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
20
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, isStandalone: true, name: "orderItemoptions" }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OrderItemOptionsFormatPipe, decorators: [{
|
|
23
23
|
type: Pipe,
|
|
24
24
|
args: [{
|
|
25
25
|
standalone: true,
|
|
@@ -3,25 +3,26 @@ 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, FilterComponent, 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
10
|
import { NgClass, JsonPipe, KeyValuePipe, CommonModule, AsyncPipe } from '@angular/common';
|
|
11
11
|
import { sumBy } from 'lodash';
|
|
12
12
|
import { CourseType, CourseService } from '@rolatech/angular-course';
|
|
13
|
+
import { FixedPipe, DecimalDirective, AngularCommonModule } from '@rolatech/angular-common';
|
|
13
14
|
import * as i1$1 from '@angular/material/button';
|
|
14
15
|
import { MatButtonModule } from '@angular/material/button';
|
|
15
|
-
import * as
|
|
16
|
+
import * as i2 from '@angular/material/form-field';
|
|
16
17
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
17
18
|
import * as i7 from '@angular/material/select';
|
|
18
19
|
import { MatSelectModule } from '@angular/material/select';
|
|
19
20
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
20
21
|
import * as i6 from '@angular/material/core';
|
|
21
22
|
import { MatOptionModule } from '@angular/material/core';
|
|
22
|
-
import * as
|
|
23
|
+
import * as i3$1 from '@angular/material/input';
|
|
23
24
|
import { MatInputModule } from '@angular/material/input';
|
|
24
|
-
import * as
|
|
25
|
+
import * as i1$2 from '@angular/forms';
|
|
25
26
|
import { FormsModule } from '@angular/forms';
|
|
26
27
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
27
28
|
import moment from 'moment';
|
|
@@ -31,10 +32,12 @@ var OrderStatus;
|
|
|
31
32
|
(function (OrderStatus) {
|
|
32
33
|
OrderStatus["CREATED"] = "\u5F85\u4ED8\u6B3E";
|
|
33
34
|
OrderStatus["PAID"] = "\u5DF2\u652F\u4ED8";
|
|
35
|
+
OrderStatus["PARTIAL_PAID"] = "\u5B9A\u91D1\u5DF2\u652F\u4ED8";
|
|
34
36
|
OrderStatus["COMPLETED"] = "\u5DF2\u5B8C\u6210";
|
|
35
37
|
OrderStatus["CLOSED"] = "\u4EA4\u6613\u5173\u95ED";
|
|
36
38
|
OrderStatus["CANCELED"] = "\u4EA4\u6613\u53D6\u6D88";
|
|
37
39
|
OrderStatus["REFUNDED"] = "\u5DF2\u9000\u6B3E";
|
|
40
|
+
OrderStatus["RETURN_REQUESTED"] = "\u9000\u6B3E\u5904\u7406\u4E2D";
|
|
38
41
|
})(OrderStatus || (OrderStatus = {}));
|
|
39
42
|
var OrderType;
|
|
40
43
|
(function (OrderType) {
|
|
@@ -70,6 +73,7 @@ var OrderTimelineStatus;
|
|
|
70
73
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_CLOSED"] = '交易关闭'] = "ORDER_CLOSED";
|
|
71
74
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_CANCELED"] = '交易取消'] = "ORDER_CANCELED";
|
|
72
75
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_PAID"] = '订单已支付'] = "ORDER_PAID";
|
|
76
|
+
OrderTimelineStatus["ORDER_PARTIAL_PAID"] = "\u5B9A\u91D1\u5DF2\u652F\u4ED8";
|
|
73
77
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_REFUNDED"] = '订单已退款'] = "ORDER_REFUNDED";
|
|
74
78
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_COMPLETED"] = '订单已完成'] = "ORDER_COMPLETED";
|
|
75
79
|
OrderTimelineStatus[OrderTimelineStatus["ORDER_RETURN_REQUESTED"] = '退款申请'] = "ORDER_RETURN_REQUESTED";
|
|
@@ -92,6 +96,21 @@ var OrderPayoutType;
|
|
|
92
96
|
OrderPayoutType[OrderPayoutType["CARD"] = '银行卡'] = "CARD";
|
|
93
97
|
OrderPayoutType[OrderPayoutType["WECHAT"] = '微信零钱'] = "WECHAT";
|
|
94
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 = {}));
|
|
95
114
|
|
|
96
115
|
class OrderItemOptionsFormatPipe {
|
|
97
116
|
constructor() {
|
|
@@ -108,10 +127,10 @@ class OrderItemOptionsFormatPipe {
|
|
|
108
127
|
});
|
|
109
128
|
return type?.toString() === 'PRODUCT' ? result : this.courseType[result];
|
|
110
129
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
112
|
-
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" }); }
|
|
113
132
|
}
|
|
114
|
-
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: [{
|
|
115
134
|
type: Pipe,
|
|
116
135
|
args: [{
|
|
117
136
|
standalone: true,
|
|
@@ -125,17 +144,24 @@ class OrderItemComponent {
|
|
|
125
144
|
this.status = OrderStatus;
|
|
126
145
|
this.total = computed(() => {
|
|
127
146
|
return (this.order().total / 100).toFixed(2);
|
|
128
|
-
// const price = sumBy(this.order().items, (item: any) => item.total);
|
|
129
|
-
// return (price / 100).toFixed(2);
|
|
130
147
|
});
|
|
131
148
|
this.quantity = computed(() => sumBy(this.order().items, (item) => item.quantity));
|
|
132
149
|
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
134
|
-
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]] }); }
|
|
135
152
|
}
|
|
136
|
-
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: [{
|
|
137
154
|
type: Component,
|
|
138
|
-
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"] }]
|
|
139
165
|
}] });
|
|
140
166
|
|
|
141
167
|
class OrderIndexComponent {
|
|
@@ -221,8 +247,8 @@ class OrderIndexComponent {
|
|
|
221
247
|
statusCompareFn(t1, t2) {
|
|
222
248
|
return t1 === t2;
|
|
223
249
|
}
|
|
224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
225
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
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: [
|
|
226
252
|
trigger('filter', [
|
|
227
253
|
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
228
254
|
state('expanded', style({ height: '*' })),
|
|
@@ -230,7 +256,7 @@ class OrderIndexComponent {
|
|
|
230
256
|
]),
|
|
231
257
|
] }); }
|
|
232
258
|
}
|
|
233
|
-
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: [{
|
|
234
260
|
type: Component,
|
|
235
261
|
args: [{ selector: 'rolatech-order-index', standalone: true, imports: [
|
|
236
262
|
ContainerComponent,
|
|
@@ -267,19 +293,22 @@ class OrderReturnRequestComponent {
|
|
|
267
293
|
this.output = output();
|
|
268
294
|
this.reason = model();
|
|
269
295
|
}
|
|
270
|
-
|
|
271
|
-
|
|
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"] }] }); }
|
|
272
301
|
}
|
|
273
|
-
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: [{
|
|
274
303
|
type: Component,
|
|
275
|
-
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"] }]
|
|
276
305
|
}] });
|
|
277
306
|
|
|
278
307
|
class OrderVariantItemComponent {
|
|
279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
280
|
-
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 }] }); }
|
|
281
310
|
}
|
|
282
|
-
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: [{
|
|
283
312
|
type: Component,
|
|
284
313
|
args: [{ selector: 'rolatech-order-variant-item', standalone: true, imports: [CommonModule], template: "<p>order-variant-item works!</p>\n" }]
|
|
285
314
|
}] });
|
|
@@ -296,10 +325,10 @@ class OrderDetailItemComponent {
|
|
|
296
325
|
return (this.total() / 100)?.toFixed(2);
|
|
297
326
|
});
|
|
298
327
|
}
|
|
299
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
300
|
-
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)]] }); }
|
|
301
330
|
}
|
|
302
|
-
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: [{
|
|
303
332
|
type: Component,
|
|
304
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" }]
|
|
305
334
|
}], ctorParameters: null, propDecorators: null }) });
|
|
@@ -353,7 +382,7 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
353
382
|
this.dialogService.open(options);
|
|
354
383
|
this.dialogService.confirmed().subscribe((res) => {
|
|
355
384
|
if (res) {
|
|
356
|
-
this.orderService.refund(this.id, res).subscribe({
|
|
385
|
+
this.orderService.refund(this.id, { reason: res }).subscribe({
|
|
357
386
|
next: (res) => {
|
|
358
387
|
this.snackBarService.open('退款申请成功, 等待审核');
|
|
359
388
|
},
|
|
@@ -367,7 +396,7 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
367
396
|
cancel() {
|
|
368
397
|
this.orderService.cancel(this.id).subscribe({
|
|
369
398
|
next: (res) => {
|
|
370
|
-
this.order.status =
|
|
399
|
+
this.order.status = 'CANCELED';
|
|
371
400
|
this.snackBarService.open('取消成功');
|
|
372
401
|
},
|
|
373
402
|
error: (error) => {
|
|
@@ -391,10 +420,10 @@ class OrderDetailComponent extends BaseComponent {
|
|
|
391
420
|
},
|
|
392
421
|
});
|
|
393
422
|
}
|
|
394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
395
|
-
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" }] }); }
|
|
396
425
|
}
|
|
397
|
-
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: [{
|
|
398
427
|
type: Component,
|
|
399
428
|
args: [{ selector: 'rolatech-order-detail', standalone: true, imports: [
|
|
400
429
|
MatButtonModule,
|
|
@@ -410,7 +439,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
410
439
|
OrderDetailItemComponent,
|
|
411
440
|
OrderVariantItemComponent,
|
|
412
441
|
OrderItemOptionsFormatPipe,
|
|
413
|
-
|
|
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" }]
|
|
414
445
|
}] });
|
|
415
446
|
|
|
416
447
|
class OrderQrcodepayComponent extends BaseComponent {
|
|
@@ -429,7 +460,7 @@ class OrderQrcodepayComponent extends BaseComponent {
|
|
|
429
460
|
this.orderService.get(this.id).subscribe({
|
|
430
461
|
next: (res) => {
|
|
431
462
|
this.order = res.data;
|
|
432
|
-
this.needPay = this.order.status.toString() === 'CREATED';
|
|
463
|
+
this.needPay = this.order.status.toString() === 'CREATED' || this.order.status.toString() === 'PARTIAL_PAID';
|
|
433
464
|
if (this.needPay) {
|
|
434
465
|
this.getQRCodeUrl();
|
|
435
466
|
}
|
|
@@ -468,12 +499,12 @@ class OrderQrcodepayComponent extends BaseComponent {
|
|
|
468
499
|
this.renderer.removeChild(this.qrcElement().nativeElement, node);
|
|
469
500
|
}
|
|
470
501
|
}
|
|
471
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
472
|
-
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" }] }); }
|
|
473
504
|
}
|
|
474
|
-
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: [{
|
|
475
506
|
type: Component,
|
|
476
|
-
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" }]
|
|
477
508
|
}] });
|
|
478
509
|
|
|
479
510
|
const orderRoutes = [
|
|
@@ -495,5 +526,5 @@ const orderRoutes = [
|
|
|
495
526
|
* Generated bundle index. Do not edit.
|
|
496
527
|
*/
|
|
497
528
|
|
|
498
|
-
export { OrderDetailItemComponent, OrderItemComponent, OrderItemOptionsFormatPipe, OrderItemStatus, OrderPayoutStatus, OrderPayoutType, OrderReturnRequestComponent, OrderReturnStatus, OrderStatus, OrderTimelineStatus, OrderType, OrderVariantItemComponent, orderRoutes };
|
|
529
|
+
export { OrderDetailItemComponent, OrderItemComponent, OrderItemOptionsFormatPipe, OrderItemStatus, OrderPayoutStatus, OrderPayoutType, OrderReturnRequestComponent, OrderReturnStatus, OrderStatus, OrderTimelineStatus, OrderType, OrderVariantItemComponent, PaymentStatus, PaymentType, orderRoutes };
|
|
499
530
|
//# sourceMappingURL=rolatech-angular-order.mjs.map
|