@rolatech/angular-inventory 17.0.2

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.
Files changed (46) hide show
  1. package/README.md +7 -0
  2. package/esm2022/index.mjs +2 -0
  3. package/esm2022/lib/components/inventory-content/inventory-content.component.mjs +12 -0
  4. package/esm2022/lib/components/inventory-layout/inventory-layout.component.mjs +14 -0
  5. package/esm2022/lib/components/inventory-location-add/inventory-location-add.component.mjs +70 -0
  6. package/esm2022/lib/components/inventory-location-item/inventory-location-item.component.mjs +68 -0
  7. package/esm2022/lib/components/inventory-location-map/inventory-location-map.component.mjs +113 -0
  8. package/esm2022/lib/components/inventory-product-item/inventory-product-item.component.mjs +17 -0
  9. package/esm2022/lib/interfaces/inventory-location.mjs +2 -0
  10. package/esm2022/lib/pages/inventory/inventory.component.mjs +12 -0
  11. package/esm2022/lib/pages/inventory-location/inventory-location.component.mjs +36 -0
  12. package/esm2022/lib/pages/inventory-location-detail/inventory-location-detail.component.mjs +57 -0
  13. package/esm2022/lib/pages/inventory-product/inventory-product.component.mjs +42 -0
  14. package/esm2022/lib/pages/inventory.routes.mjs +30 -0
  15. package/esm2022/rolatech-angular-inventory.mjs +5 -0
  16. package/fesm2022/rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs +15 -0
  17. package/fesm2022/rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs.map +1 -0
  18. package/fesm2022/rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs +73 -0
  19. package/fesm2022/rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs.map +1 -0
  20. package/fesm2022/rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs +124 -0
  21. package/fesm2022/rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs.map +1 -0
  22. package/fesm2022/rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs +116 -0
  23. package/fesm2022/rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs.map +1 -0
  24. package/fesm2022/rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs +39 -0
  25. package/fesm2022/rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs.map +1 -0
  26. package/fesm2022/rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs +58 -0
  27. package/fesm2022/rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs.map +1 -0
  28. package/fesm2022/rolatech-angular-inventory-inventory.component-g02tvIZb.mjs +15 -0
  29. package/fesm2022/rolatech-angular-inventory-inventory.component-g02tvIZb.mjs.map +1 -0
  30. package/fesm2022/rolatech-angular-inventory.mjs +50 -0
  31. package/fesm2022/rolatech-angular-inventory.mjs.map +1 -0
  32. package/index.d.ts +1 -0
  33. package/lib/components/inventory-content/inventory-content.component.d.ts +5 -0
  34. package/lib/components/inventory-layout/inventory-layout.component.d.ts +5 -0
  35. package/lib/components/inventory-location-add/inventory-location-add.component.d.ts +13 -0
  36. package/lib/components/inventory-location-item/inventory-location-item.component.d.ts +14 -0
  37. package/lib/components/inventory-location-map/inventory-location-map.component.d.ts +29 -0
  38. package/lib/components/inventory-product-item/inventory-product-item.component.d.ts +14 -0
  39. package/lib/interfaces/inventory-location.d.ts +27 -0
  40. package/lib/pages/inventory/inventory.component.d.ts +5 -0
  41. package/lib/pages/inventory-location/inventory-location.component.d.ts +13 -0
  42. package/lib/pages/inventory-location-detail/inventory-location-detail.component.d.ts +15 -0
  43. package/lib/pages/inventory-product/inventory-product.component.d.ts +14 -0
  44. package/lib/pages/inventory.routes.d.ts +2 -0
  45. package/package.json +25 -0
  46. package/themes/_default.scss +1 -0
@@ -0,0 +1,57 @@
1
+ import { Component, inject, ViewEncapsulation } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { InventoryLocationItemComponent } from '../../components/inventory-location-item/inventory-location-item.component';
4
+ import { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
5
+ import { InventoryService } from '@rolatech/angular-services';
6
+ import * as i0 from "@angular/core";
7
+ export class InventoryLocationDetailComponent extends BaseComponent {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.inventoryService = inject(InventoryService);
11
+ }
12
+ ngOnInit() {
13
+ this.get();
14
+ }
15
+ get() {
16
+ this.inventoryService.getLocation(this.id).subscribe({
17
+ next: (res) => {
18
+ this.location = res.data;
19
+ },
20
+ });
21
+ }
22
+ onLocationSave(e) {
23
+ this.inventoryService.updateLocation(e.id, e).subscribe({
24
+ next: (res) => {
25
+ this.snackBarService.open('保存成功');
26
+ },
27
+ });
28
+ }
29
+ onLocationDetele(location) {
30
+ const options = {
31
+ title: '确定删除吗',
32
+ message: `这会删除仓库, 确定吗?`,
33
+ cancelText: '取消',
34
+ confirmText: '确认',
35
+ };
36
+ this.dialogService.open(options);
37
+ this.dialogService.confirmed().subscribe({
38
+ next: (res) => {
39
+ if (res) {
40
+ this.inventoryService.deleteLocation(location.id).subscribe({
41
+ next: (res) => {
42
+ this.snackBarService.open('删除成功');
43
+ this.navigation.back();
44
+ },
45
+ });
46
+ }
47
+ },
48
+ });
49
+ }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
51
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryLocationDetailComponent, isStandalone: true, selector: "rolatech-inventory-location-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InventoryLocationItemComponent, selector: "rolatech-inventory-location-item", inputs: ["location"], outputs: ["save", "delete"] }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }], encapsulation: i0.ViewEncapsulation.None }); }
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationDetailComponent, decorators: [{
54
+ type: Component,
55
+ args: [{ selector: 'rolatech-inventory-location-detail', standalone: true, imports: [CommonModule, InventoryLocationItemComponent, ToolbarComponent], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n" }]
56
+ }] });
57
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52ZW50b3J5LWxvY2F0aW9uLWRldGFpbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItaW52ZW50b3J5L3NyYy9saWIvcGFnZXMvaW52ZW50b3J5LWxvY2F0aW9uLWRldGFpbC9pbnZlbnRvcnktbG9jYXRpb24tZGV0YWlsLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1pbnZlbnRvcnkvc3JjL2xpYi9wYWdlcy9pbnZlbnRvcnktbG9jYXRpb24tZGV0YWlsL2ludmVudG9yeS1sb2NhdGlvbi1kZXRhaWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQVUsaUJBQWlCLEVBQUUsTUF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aWJlKHtcbiAgICAgIG5leHQ6IChyZXMpID0+IHtcbiAgICAgICAgaWYgKHJlcykge1xuICAgICAgICAgIHRoaXMuaW52ZW50b3J5U2VydmljZS5kZWxldGVMb2NhdGlvbihsb2NhdGlvbi5pZCkuc3Vic2NyaWJlKHtcbiAgICAgICAgICAgIG5leHQ6IChyZXMpID0+IHtcbiAgICAgICAgICAgICAgdGhpcy5zbmFja0JhclNlcnZpY2Uub3Blbign5Yig6Zmk5oiQ5YqfJyk7XG4gICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvbi5iYWNrKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH0pO1xuICB9XG59XG4iLCI8cm9sYXRlY2gtdG9vbGJhciB0aXRsZT1cIuS7k+W6k+ivpuaDhVwiIGJhY2s+IDwvcm9sYXRlY2gtdG9vbGJhcj5cbkBpZiAobG9jYXRpb24pIHtcbiAgPGRpdiBjbGFzcz1cInB4LTNcIj5cbiAgICA8cm9sYXRlY2gtaW52ZW50b3J5LWxvY2F0aW9uLWl0ZW1cbiAgICAgIFtsb2NhdGlvbl09XCJsb2NhdGlvblwiXG4gICAgICAoc2F2ZSk9XCJvbkxvY2F0aW9uU2F2ZSgkZXZlbnQpXCJcbiAgICAgIChkZWxldGUpPVwib25Mb2NhdGlvbkRldGVsZSgkZXZlbnQpXCJcbiAgICA+PC9yb2xhdGVjaC1pbnZlbnRvcnktbG9jYXRpb24taXRlbT5cbiAgPC9kaXY+XG59XG4iXX0=
@@ -0,0 +1,42 @@
1
+ import { Component, inject, ViewEncapsulation } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
4
+ import { InventoryContentComponent } from '../../components/inventory-content/inventory-content.component';
5
+ import { InventoryService, ProductService } from '@rolatech/angular-services';
6
+ import _ from 'lodash';
7
+ import { InventoryProductItemComponent } from '../../components/inventory-product-item/inventory-product-item.component';
8
+ import { RouterLink } from '@angular/router';
9
+ import * as i0 from "@angular/core";
10
+ export class InventoryProductComponent extends BaseComponent {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.inventoryService = inject(InventoryService);
14
+ this.productService = inject(ProductService);
15
+ this.products = [];
16
+ }
17
+ ngOnInit() {
18
+ this.findInventoryItem();
19
+ }
20
+ findInventoryItem() {
21
+ this.inventoryService.findMyInventoryItems({}).subscribe({
22
+ next: (res) => {
23
+ const productIds = _.uniq(_.map(res.data, 'productId'));
24
+ this.findProductsByIds(productIds);
25
+ },
26
+ });
27
+ }
28
+ findProductsByIds(ids) {
29
+ this.productService.findByIds(ids).subscribe({
30
+ next: (res) => {
31
+ this.products = res.data;
32
+ },
33
+ });
34
+ }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
36
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryProductComponent, isStandalone: true, selector: "rolatech-inventory-product", usesInheritance: true, ngImport: i0, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InventoryContentComponent, selector: "rolatech-inventory-content" }, { kind: "component", type: InventoryProductItemComponent, selector: "rolatech-inventory-product-item", inputs: ["product", "amount"], outputs: ["amountChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ selector: 'rolatech-inventory-product', standalone: true, imports: [CommonModule, ToolbarComponent, InventoryContentComponent, InventoryProductItemComponent, RouterLink], encapsulation: ViewEncapsulation.None, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n" }]
41
+ }] });
42
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52ZW50b3J5LXByb2R1Y3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLWludmVudG9yeS9zcmMvbGliL3BhZ2VzL2ludmVudG9yeS1wcm9kdWN0L2ludmVudG9yeS1wcm9kdWN0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1pbnZlbnRvcnkvc3JjL2xpYi9wYWdlcy9pbnZlbnRvcnktcHJvZHVjdC9pbnZlbnRvcnktcHJvZHVjdC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0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QtaXRlbVxuICAgICAgICBjbGFzcz1cImJsb2NrIGN1cnNvci1wb2ludGVyIGhvdmVyOmJnLVstLXJ0LXJhaXNlZC1iYWNrZ3JvdW5kXVwiXG4gICAgICAgIFtwcm9kdWN0XT1cIml0ZW1cIlxuICAgICAgICBbcm91dGVyTGlua109XCJbJy9wcm9kdWN0cycsIGl0ZW0uaWQsICdtYW5hZ2UnLCAnaW52ZW50b3J5J11cIlxuICAgICAgPjwvcm9sYXRlY2gtaW52ZW50b3J5LXByb2R1Y3QtaXRlbT5cbiAgICB9XG4gIDwvZGl2PlxuPC9yb2xhdGVjaC1pbnZlbnRvcnktY29udGVudD5cbiJdfQ==
@@ -0,0 +1,30 @@
1
+ import { InventoryLayoutComponent } from '../components/inventory-layout/inventory-layout.component';
2
+ export const inventoryRoutes = [
3
+ {
4
+ path: '',
5
+ component: InventoryLayoutComponent,
6
+ children: [
7
+ {
8
+ path: '',
9
+ loadComponent: () => import('./inventory/inventory.component').then((c) => c.InventoryComponent),
10
+ },
11
+ {
12
+ path: 'locations',
13
+ loadComponent: () => import('./inventory-location/inventory-location.component').then((c) => c.InventoryLocationComponent),
14
+ },
15
+ {
16
+ path: 'locations/add',
17
+ loadComponent: () => import('../components/inventory-location-add/inventory-location-add.component').then((c) => c.InventoryLocationAddComponent),
18
+ },
19
+ {
20
+ path: 'locations/:id',
21
+ loadComponent: () => import('./inventory-location-detail/inventory-location-detail.component').then((c) => c.InventoryLocationDetailComponent),
22
+ },
23
+ {
24
+ path: 'products',
25
+ loadComponent: () => import('./inventory-product/inventory-product.component').then((c) => c.InventoryProductComponent),
26
+ },
27
+ ],
28
+ },
29
+ ];
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52ZW50b3J5LnJvdXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1pbnZlbnRvcnkvc3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b25zL2FkZCcsXG4gICAgICAgIGxvYWRDb21wb25lbnQ6ICgpID0+XG4gICAgICAgICAgaW1wb3J0KCcuLi9jb21wb25lbnRzL2ludmVudG9yeS1sb2NhdGlvbi1hZGQvaW52ZW50b3J5LWxvY2F0aW9uLWFkZC5jb21wb25lbnQnKS50aGVuKFxuICAgICAgICAgICAgKGMpID0+IGMuSW52ZW50b3J5TG9jYXRpb25BZGRDb21wb25lbnQsXG4gICAgICAgICAgKSxcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHBhdGg6ICdsb2NhdGlvbnMvOmlkJyxcbiAgICAgICAgbG9hZENvbXBvbmVudDogKCkgPT5cbiAgICAgICAgICBpbXBvcnQoJy4vaW52ZW50b3J5LWxvY2F0aW9uLWRldGFpbC9pbnZlbnRvcnktbG9jYXRpb24tZGV0YWlsLmNvbXBvbmVudCcpLnRoZW4oXG4gICAgICAgICAgICAoYykgPT4gYy5JbnZlbnRvcnlMb2NhdGlvbkRldGFpbENvbXBvbmVudCxcbiAgICAgICAgICApLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ3Byb2R1Y3RzJyxcbiAgICAgICAgbG9hZENvbXBvbmVudDogKCkgPT4gaW1wb3J0KCcuL2ludmVudG9yeS1wcm9kdWN0L2ludmVudG9yeS1wcm9kdWN0LmNvbXBvbmVudCcpLnRoZW4oKGMpID0+IGMuSW52ZW50b3J5UHJvZHVjdENvbXBvbmVudCksXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG5dO1xuIl19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sYXRlY2gtYW5ndWxhci1pbnZlbnRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItaW52ZW50b3J5L3NyYy9yb2xhdGVjaC1hbmd1bGFyLWludmVudG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
@@ -0,0 +1,15 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+
5
+ class InventoryContentComponent {
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: InventoryContentComponent, isStandalone: true, selector: "rolatech-inventory-content", ngImport: i0, template: "<ng-content select=\"rolatech-toolbar\"></ng-content>\n<div class=\"p-3\">\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryContentComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'rolatech-inventory-content', standalone: true, imports: [CommonModule], template: "<ng-content select=\"rolatech-toolbar\"></ng-content>\n<div class=\"p-3\">\n <ng-content></ng-content>\n</div>\n" }]
12
+ }] });
13
+
14
+ export { InventoryContentComponent as I };
15
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-content/inventory-content.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-content/inventory-content.component.html"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'rolatech-inventory-content',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './inventory-content.component.html',\n styleUrl: './inventory-content.component.scss',\n})\nexport class InventoryContentComponent {}\n","<ng-content select=\"rolatech-toolbar\"></ng-content>\n<div class=\"p-3\">\n <ng-content></ng-content>\n</div>\n"],"names":[],"mappings":";;;;MAUa,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVtC,mHAIA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDEY,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAC1B,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,mHAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,73 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component } from '@angular/core';
3
+ import * as i4 from '@angular/cdk/text-field';
4
+ import { TextFieldModule } from '@angular/cdk/text-field';
5
+ import * as i1 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i5 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import * as i2 from '@angular/material/form-field';
10
+ import { MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i6 from '@angular/material/input';
12
+ import { MatInputModule } from '@angular/material/input';
13
+ import { ToolbarComponent, MediaListComponent, MediaListItemComponent } from '@rolatech/angular-components';
14
+ import { InventoryService, NavigationService } from '@rolatech/angular-services';
15
+ import { MatDialog } from '@angular/material/dialog';
16
+ import { I as InventoryLocationMapComponent } from './rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs';
17
+
18
+ class InventoryLocationAddComponent {
19
+ constructor() {
20
+ this.inventoryService = inject(InventoryService);
21
+ this.dialog = inject(MatDialog);
22
+ this.navigationService = inject(NavigationService);
23
+ this.location = {};
24
+ }
25
+ selectLocation() {
26
+ const dialogRef = this.dialog.open(InventoryLocationMapComponent, {
27
+ width: '90%',
28
+ data: {
29
+ title: '选择位置',
30
+ },
31
+ });
32
+ dialogRef.afterClosed().subscribe((result) => {
33
+ if (result) {
34
+ const address = result.address;
35
+ const { lat, lng } = result.location;
36
+ this.location.detail = address;
37
+ this.location.latitude = lat;
38
+ this.location.longitude = lng;
39
+ this.location.province = result.province;
40
+ this.location.city = result.city;
41
+ this.location.district = result.district;
42
+ }
43
+ });
44
+ }
45
+ add() {
46
+ const data = {
47
+ ...this.location,
48
+ };
49
+ this.inventoryService.addLocation(data).subscribe({
50
+ next: (res) => {
51
+ this.navigationService.back();
52
+ },
53
+ });
54
+ }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationAddComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: InventoryLocationAddComponent, isStandalone: true, selector: "rolatech-inventory-location-add", ngImport: i0, template: "<rolatech-toolbar title=\"\u521B\u5EFA\u4ED3\u5E93\"> </rolatech-toolbar>\n<div class=\"px-3 h-full\">\n <div class=\"w-full\">\n <div class=\"w-2/3 flex flex-col\">\n <form #locationForm=\"ngForm\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u4ED3\u5E93\u540D\u79F0 </mat-label>\n <input matInput [(ngModel)]=\"location.name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8054\u7CFB\u4EBA </mat-label>\n <input matInput [(ngModel)]=\"location.contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"location.phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <h2>\u4F4D\u7F6E\u4FE1\u606F</h2>\n <button mat-stroked-button (click)=\"selectLocation()\">\u4F4D\u7F6E\u9009\u62E9</button>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u7701\u4EFD </mat-label>\n <input matInput [(ngModel)]=\"location.province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u57CE\u5E02 </mat-label>\n <input matInput [(ngModel)]=\"location.city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u533A/\u53BF </mat-label>\n <input matInput [(ngModel)]=\"location.district\" name=\"county\" required disabled />\n </mat-form-field>\n <!-- <mat-form-field appearance=\"fill\">\n <mat-label> \u8857\u9053 </mat-label>\n <input\n matInput\n [(ngModel)]=\"location.town\"\n name=\"town\"\n required\n readonly\n />\n </mat-form-field> -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5730\u5740 </mat-label>\n <input matInput [(ngModel)]=\"location.detail\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8BE6\u7EC6 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location.detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </form>\n </div>\n <div class=\"py-3\">\n <button mat-flat-button (click)=\"add()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { 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: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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"] }, { kind: "directive", type: i4.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: TextFieldModule }] }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationAddComponent, decorators: [{
59
+ type: Component,
60
+ args: [{ selector: 'rolatech-inventory-location-add', standalone: true, imports: [
61
+ ToolbarComponent,
62
+ FormsModule,
63
+ MatFormFieldModule,
64
+ MatInputModule,
65
+ MatButtonModule,
66
+ TextFieldModule,
67
+ MediaListComponent,
68
+ MediaListItemComponent,
69
+ ], template: "<rolatech-toolbar title=\"\u521B\u5EFA\u4ED3\u5E93\"> </rolatech-toolbar>\n<div class=\"px-3 h-full\">\n <div class=\"w-full\">\n <div class=\"w-2/3 flex flex-col\">\n <form #locationForm=\"ngForm\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u4ED3\u5E93\u540D\u79F0 </mat-label>\n <input matInput [(ngModel)]=\"location.name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8054\u7CFB\u4EBA </mat-label>\n <input matInput [(ngModel)]=\"location.contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"location.phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <h2>\u4F4D\u7F6E\u4FE1\u606F</h2>\n <button mat-stroked-button (click)=\"selectLocation()\">\u4F4D\u7F6E\u9009\u62E9</button>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u7701\u4EFD </mat-label>\n <input matInput [(ngModel)]=\"location.province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u57CE\u5E02 </mat-label>\n <input matInput [(ngModel)]=\"location.city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u533A/\u53BF </mat-label>\n <input matInput [(ngModel)]=\"location.district\" name=\"county\" required disabled />\n </mat-form-field>\n <!-- <mat-form-field appearance=\"fill\">\n <mat-label> \u8857\u9053 </mat-label>\n <input\n matInput\n [(ngModel)]=\"location.town\"\n name=\"town\"\n required\n readonly\n />\n </mat-form-field> -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5730\u5740 </mat-label>\n <input matInput [(ngModel)]=\"location.detail\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8BE6\u7EC6 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location.detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </form>\n </div>\n <div class=\"py-3\">\n <button mat-flat-button (click)=\"add()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</div>\n" }]
70
+ }] });
71
+
72
+ export { InventoryLocationAddComponent };
73
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-location-add/inventory-location-add.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-location-add/inventory-location-add.component.html"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { ToolbarComponent, MediaListComponent, MediaListItemComponent } from '@rolatech/angular-components';\nimport { Location } from '../../interfaces/inventory-location';\nimport { InventoryService, NavigationService } from '@rolatech/angular-services';\nimport { MatDialog } from '@angular/material/dialog';\nimport { InventoryLocationMapComponent } from '../inventory-location-map/inventory-location-map.component';\n\n@Component({\n selector: 'rolatech-inventory-location-add',\n standalone: true,\n imports: [\n ToolbarComponent,\n FormsModule,\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n TextFieldModule,\n MediaListComponent,\n MediaListItemComponent,\n ],\n templateUrl: './inventory-location-add.component.html',\n styleUrl: './inventory-location-add.component.scss',\n})\nexport class InventoryLocationAddComponent {\n inventoryService = inject(InventoryService);\n dialog = inject(MatDialog);\n navigationService = inject(NavigationService);\n\n location: any = {};\n\n selectLocation() {\n const dialogRef = this.dialog.open(InventoryLocationMapComponent, {\n width: '90%',\n data: {\n title: '选择位置',\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n const address = result.address;\n const { lat, lng } = result.location;\n this.location.detail = address;\n this.location.latitude = lat;\n this.location.longitude = lng;\n this.location.province = result.province;\n this.location.city = result.city;\n this.location.district = result.district;\n }\n });\n }\n\n add() {\n const data = {\n ...this.location,\n };\n\n this.inventoryService.addLocation(data).subscribe({\n next: (res) => {\n this.navigationService.back();\n },\n });\n }\n}\n","<rolatech-toolbar title=\"创建仓库\"> </rolatech-toolbar>\n<div class=\"px-3 h-full\">\n <div class=\"w-full\">\n <div class=\"w-2/3 flex flex-col\">\n <form #locationForm=\"ngForm\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 仓库名称 </mat-label>\n <input matInput [(ngModel)]=\"location.name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 联系人 </mat-label>\n <input matInput [(ngModel)]=\"location.contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 手机号 </mat-label>\n <input matInput [(ngModel)]=\"location.phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <h2>位置信息</h2>\n <button mat-stroked-button (click)=\"selectLocation()\">位置选择</button>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> 省份 </mat-label>\n <input matInput [(ngModel)]=\"location.province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 城市 </mat-label>\n <input matInput [(ngModel)]=\"location.city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 区/县 </mat-label>\n <input matInput [(ngModel)]=\"location.district\" name=\"county\" required disabled />\n </mat-form-field>\n <!-- <mat-form-field appearance=\"fill\">\n <mat-label> 街道 </mat-label>\n <input\n matInput\n [(ngModel)]=\"location.town\"\n name=\"town\"\n required\n readonly\n />\n </mat-form-field> -->\n <mat-form-field appearance=\"fill\">\n <mat-label> 地址 </mat-label>\n <input matInput [(ngModel)]=\"location.detail\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 详细 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location.detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </form>\n </div>\n <div class=\"py-3\">\n <button mat-flat-button (click)=\"add()\">保存</button>\n </div>\n </div>\n</div>\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;;;;;MA4Ba,6BAA6B,CAAA;AAhB1C,IAAA,WAAA,GAAA;AAiBE,QAAA,IAAA,CAA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AA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,2NACf,eAAe,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAON,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAhBzC,SAAS;+BACE,iCAAiC,EAAA,UAAA,EAC/B,IAAI,EACP,OAAA,EAAA;wBACP,gBAAgB;wBAChB,WAAW;wBACX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,sBAAsB;AACvB,qBAAA,EAAA,QAAA,EAAA,0lGAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,124 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, output, Component, ViewEncapsulation } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i4 from '@angular/cdk/text-field';
5
+ import { TextFieldModule } from '@angular/cdk/text-field';
6
+ import * as i1 from '@angular/forms';
7
+ import { FormsModule } from '@angular/forms';
8
+ import * as i5 from '@angular/material/button';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import { MatDividerModule } from '@angular/material/divider';
11
+ import * as i2 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import * as i6 from '@angular/material/input';
14
+ import { MatInputModule } from '@angular/material/input';
15
+ import { TitleComponent, MediaListComponent, MediaListItemComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
16
+ import { I as InventoryLocationMapComponent } from './rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs';
17
+ import { MatDialog } from '@angular/material/dialog';
18
+ import { InventoryService } from '@rolatech/angular-services';
19
+
20
+ class InventoryLocationItemComponent {
21
+ constructor() {
22
+ this.location = input.required();
23
+ this.dialog = inject(MatDialog);
24
+ this.save = output();
25
+ this.delete = output();
26
+ }
27
+ selectLocation() {
28
+ const dialogRef = this.dialog.open(InventoryLocationMapComponent, {
29
+ width: '90%',
30
+ data: {
31
+ title: '选择位置',
32
+ },
33
+ });
34
+ dialogRef.afterClosed().subscribe((result) => {
35
+ if (result) {
36
+ const address = result.address;
37
+ const { lat, lng } = result.location;
38
+ this.location().detail = address;
39
+ this.location().latitude = lat;
40
+ this.location().longitude = lng;
41
+ this.location().province = result.province;
42
+ this.location().city = result.city;
43
+ this.location().district = result.district;
44
+ this.location().detail = result.title;
45
+ }
46
+ });
47
+ }
48
+ onSave() {
49
+ this.save.emit(this.location());
50
+ }
51
+ onDelete() {
52
+ this.delete.emit(this.location());
53
+ }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
55
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: InventoryLocationItemComponent, isStandalone: true, selector: "rolatech-inventory-location-item", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { save: "save", delete: "delete" }, ngImport: i0, template: "<div class=\"mb-8\">\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u4ED3\u5E93\u540D\u79F0 </mat-label>\n <input matInput [(ngModel)]=\"location().name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8054\u7CFB\u4EBA </mat-label>\n <input matInput [(ngModel)]=\"location().contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"location().phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <rolatech-title title=\"\u4F4D\u7F6E\u4FE1\u606F\"></rolatech-title>\n\n <button mat-stroked-button (click)=\"selectLocation()\">\u4F4D\u7F6E\u9009\u62E9</button>\n </div>\n <div class=\"flex flex-row gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u7701\u4EFD </mat-label>\n <input matInput [(ngModel)]=\"location().province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u57CE\u5E02 </mat-label>\n <input matInput [(ngModel)]=\"location().city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u533A/\u53BF </mat-label>\n <input matInput [(ngModel)]=\"location().district\" name=\"district\" required disabled />\n </mat-form-field>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5730\u5740 </mat-label>\n <input matInput [(ngModel)]=\"location().street\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8BE6\u7EC6 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location().detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n <div>\n <button mat-button (click)=\"onDelete()\">\u5220\u9664</button>\n <button mat-flat-button type=\"primary\" (click)=\"onSave()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { 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: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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"] }, { kind: "directive", type: i4.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: TitleComponent, selector: "rolatech-title", inputs: ["title", "subtitle", "large"] }], encapsulation: i0.ViewEncapsulation.None }); }
56
+ }
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationItemComponent, decorators: [{
58
+ type: Component,
59
+ args: [{ selector: 'rolatech-inventory-location-item', standalone: true, imports: [
60
+ MatFormFieldModule,
61
+ MatInputModule,
62
+ FormsModule,
63
+ MatButtonModule,
64
+ TextFieldModule,
65
+ MediaListComponent,
66
+ MediaListItemComponent,
67
+ MatDividerModule,
68
+ TitleComponent,
69
+ ], encapsulation: ViewEncapsulation.None, template: "<div class=\"mb-8\">\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u4ED3\u5E93\u540D\u79F0 </mat-label>\n <input matInput [(ngModel)]=\"location().name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8054\u7CFB\u4EBA </mat-label>\n <input matInput [(ngModel)]=\"location().contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"location().phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <rolatech-title title=\"\u4F4D\u7F6E\u4FE1\u606F\"></rolatech-title>\n\n <button mat-stroked-button (click)=\"selectLocation()\">\u4F4D\u7F6E\u9009\u62E9</button>\n </div>\n <div class=\"flex flex-row gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u7701\u4EFD </mat-label>\n <input matInput [(ngModel)]=\"location().province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u57CE\u5E02 </mat-label>\n <input matInput [(ngModel)]=\"location().city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u533A/\u53BF </mat-label>\n <input matInput [(ngModel)]=\"location().district\" name=\"district\" required disabled />\n </mat-form-field>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5730\u5740 </mat-label>\n <input matInput [(ngModel)]=\"location().street\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u8BE6\u7EC6 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location().detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n <div>\n <button mat-button (click)=\"onDelete()\">\u5220\u9664</button>\n <button mat-flat-button type=\"primary\" (click)=\"onSave()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</div>\n" }]
70
+ }] });
71
+
72
+ class InventoryLocationDetailComponent extends BaseComponent {
73
+ constructor() {
74
+ super(...arguments);
75
+ this.inventoryService = inject(InventoryService);
76
+ }
77
+ ngOnInit() {
78
+ this.get();
79
+ }
80
+ get() {
81
+ this.inventoryService.getLocation(this.id).subscribe({
82
+ next: (res) => {
83
+ this.location = res.data;
84
+ },
85
+ });
86
+ }
87
+ onLocationSave(e) {
88
+ this.inventoryService.updateLocation(e.id, e).subscribe({
89
+ next: (res) => {
90
+ this.snackBarService.open('保存成功');
91
+ },
92
+ });
93
+ }
94
+ onLocationDetele(location) {
95
+ const options = {
96
+ title: '确定删除吗',
97
+ message: `这会删除仓库, 确定吗?`,
98
+ cancelText: '取消',
99
+ confirmText: '确认',
100
+ };
101
+ this.dialogService.open(options);
102
+ this.dialogService.confirmed().subscribe({
103
+ next: (res) => {
104
+ if (res) {
105
+ this.inventoryService.deleteLocation(location.id).subscribe({
106
+ next: (res) => {
107
+ this.snackBarService.open('删除成功');
108
+ this.navigation.back();
109
+ },
110
+ });
111
+ }
112
+ },
113
+ });
114
+ }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
116
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryLocationDetailComponent, isStandalone: true, selector: "rolatech-inventory-location-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InventoryLocationItemComponent, selector: "rolatech-inventory-location-item", inputs: ["location"], outputs: ["save", "delete"] }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }], encapsulation: i0.ViewEncapsulation.None }); }
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationDetailComponent, decorators: [{
119
+ type: Component,
120
+ args: [{ selector: 'rolatech-inventory-location-detail', standalone: true, imports: [CommonModule, InventoryLocationItemComponent, ToolbarComponent], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n" }]
121
+ }] });
122
+
123
+ export { InventoryLocationDetailComponent };
124
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-location-item/inventory-location-item.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-location-item/inventory-location-item.component.html","../../../../libs/angular-inventory/src/lib/pages/inventory-location-detail/inventory-location-detail.component.ts","../../../../libs/angular-inventory/src/lib/pages/inventory-location-detail/inventory-location-detail.component.html"],"sourcesContent":["import { Component, inject, input, output, ViewEncapsulation } from '@angular/core';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MediaListComponent, MediaListItemComponent, TitleComponent } from '@rolatech/angular-components';\nimport { Location } from '../../interfaces/inventory-location';\nimport { InventoryLocationMapComponent } from '../inventory-location-map/inventory-location-map.component';\nimport { MatDialog } from '@angular/material/dialog';\n\n@Component({\n selector: 'rolatech-inventory-location-item',\n standalone: true,\n imports: [\n MatFormFieldModule,\n MatInputModule,\n FormsModule,\n MatButtonModule,\n TextFieldModule,\n MediaListComponent,\n MediaListItemComponent,\n MatDividerModule,\n TitleComponent,\n ],\n templateUrl: './inventory-location-item.component.html',\n styleUrl: './inventory-location-item.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryLocationItemComponent {\n location = input.required<Location>();\n dialog = inject(MatDialog);\n save = output<Location>();\n delete = output<Location>();\n\n selectLocation() {\n const dialogRef = this.dialog.open(InventoryLocationMapComponent, {\n width: '90%',\n data: {\n title: '选择位置',\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n const address = result.address;\n const { lat, lng } = result.location;\n this.location().detail = address;\n this.location().latitude = lat;\n this.location().longitude = lng;\n this.location().province = result.province;\n this.location().city = result.city;\n this.location().district = result.district;\n this.location().detail = result.title;\n }\n });\n }\n onSave() {\n this.save.emit(this.location());\n }\n onDelete() {\n this.delete.emit(this.location());\n }\n}\n","<div class=\"mb-8\">\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 仓库名称 </mat-label>\n <input matInput [(ngModel)]=\"location().name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 联系人 </mat-label>\n <input matInput [(ngModel)]=\"location().contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 手机号 </mat-label>\n <input matInput [(ngModel)]=\"location().phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <rolatech-title title=\"位置信息\"></rolatech-title>\n\n <button mat-stroked-button (click)=\"selectLocation()\">位置选择</button>\n </div>\n <div class=\"flex flex-row gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 省份 </mat-label>\n <input matInput [(ngModel)]=\"location().province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 城市 </mat-label>\n <input matInput [(ngModel)]=\"location().city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 区/县 </mat-label>\n <input matInput [(ngModel)]=\"location().district\" name=\"district\" required disabled />\n </mat-form-field>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label> 地址 </mat-label>\n <input matInput [(ngModel)]=\"location().street\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 详细 </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location().detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n <div>\n <button mat-button (click)=\"onDelete()\">删除</button>\n <button mat-flat-button type=\"primary\" (click)=\"onSave()\">保存</button>\n </div>\n </div>\n</div>\n","import { Component, inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InventoryLocationItemComponent } from '../../components/inventory-location-item/inventory-location-item.component';\nimport { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { Location } from '../../interfaces/inventory-location';\nimport { InventoryService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-inventory-location-detail',\n standalone: true,\n imports: [CommonModule, InventoryLocationItemComponent, ToolbarComponent],\n templateUrl: './inventory-location-detail.component.html',\n styleUrl: './inventory-location-detail.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryLocationDetailComponent extends BaseComponent implements OnInit {\n inventoryService = inject(InventoryService);\n location!: Location;\n\n ngOnInit(): void {\n this.get();\n }\n get() {\n this.inventoryService.getLocation(this.id).subscribe({\n next: (res) => {\n this.location = res.data;\n },\n });\n }\n onLocationSave(e) {\n this.inventoryService.updateLocation(e.id, e).subscribe({\n next: (res) => {\n this.snackBarService.open('保存成功');\n },\n });\n }\n onLocationDetele(location: any) {\n const options = {\n title: '确定删除吗',\n message: `这会删除仓库, 确定吗?`,\n cancelText: '取消',\n confirmText: '确认',\n };\n this.dialogService.open(options);\n this.dialogService.confirmed().subscribe({\n next: (res) => {\n if (res) {\n this.inventoryService.deleteLocation(location.id).subscribe({\n next: (res) => {\n this.snackBarService.open('删除成功');\n this.navigation.back();\n },\n });\n }\n },\n });\n }\n}\n","<rolatech-toolbar title=\"仓库详情\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n"],"names":["i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;MA8Ba,8BAA8B,CAAA;AAlB3C,IAAA,WAAA,GAAA;AAmBE,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAY,CAAC;AACtC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3B,IAAI,CAAA,IAAA,GAAG,MAAM,EAAY,CAAC;QAC1B,IAAM,CAAA,MAAA,GAAG,MAAM,EAAY,CAAC;AA6B7B,KAAA;IA3BC,cAAc,GAAA;QACZ,MAAM,SAAS,GAAG,IA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