jgy-public-component 0.0.24 → 0.0.28

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 (36) hide show
  1. package/README.md +47 -1
  2. package/dist/components/JDocDetail/index.d.ts +1 -1
  3. package/dist/components/JDocDetail/types.d.ts +2 -0
  4. package/dist/components/JDocDetail/views/AbnormalOrderDetailView.d.ts +22 -0
  5. package/dist/components/JDocDetail/wmsViews.d.ts +2 -1
  6. package/dist/components/JListSearchHeader/JListSearchHeader.d.ts +73 -0
  7. package/dist/components/JListSearchHeader/index.d.ts +2 -0
  8. package/dist/components/JListSearchHeader/types.d.ts +10 -0
  9. package/dist/components/JProductDetail/JSkuLink.d.ts +9 -0
  10. package/dist/components/JProductDetail/ProductDetailHost.d.ts +3 -0
  11. package/dist/components/JProductDetail/index.d.ts +3 -0
  12. package/dist/components/JProductDetail/store.d.ts +36 -0
  13. package/dist/components/JProductDetail/useProductDetailDialog.d.ts +2 -21
  14. package/dist/components/JRelatedDocs/JRelatedDocs.d.ts +41 -0
  15. package/dist/components/JRelatedDocs/RelatedDocNoCopy.d.ts +34 -0
  16. package/dist/components/JRelatedDocs/RelatedDocPanel.d.ts +41 -0
  17. package/dist/components/JRelatedDocs/RelatedDocSubTabs.d.ts +30 -0
  18. package/dist/components/JRelatedDocs/index.d.ts +22 -0
  19. package/dist/components/JRelatedDocs/registry.d.ts +19 -0
  20. package/dist/components/JRelatedDocs/tables/RelatedInboundOrderTable.d.ts +40 -0
  21. package/dist/components/JRelatedDocs/tables/RelatedPutawayOrderTable.d.ts +35 -0
  22. package/dist/components/JRelatedDocs/tables/RelatedQcOrderTable.d.ts +35 -0
  23. package/dist/components/JRelatedDocs/tables/RelatedReceiptOrderTable.d.ts +45 -0
  24. package/dist/components/JRelatedDocs/types.d.ts +34 -0
  25. package/dist/components/JRelatedDocs/utils/flattenOrderItems.d.ts +7 -0
  26. package/dist/components/JRelatedDocs/utils/labels.d.ts +35 -0
  27. package/dist/components/JRelatedDocs/utils/parseList.d.ts +2 -0
  28. package/dist/components/JRelatedDocs/utils/useRelatedCollapseExpand.d.ts +12 -0
  29. package/dist/components/JSidebar/JSideMenuItem.d.ts +5 -0
  30. package/dist/index.d.ts +9 -4
  31. package/dist/index.js +4283 -2472
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.umd.cjs +2 -2
  34. package/dist/index.umd.cjs.map +1 -1
  35. package/dist/style.css +1 -1
  36. package/package.json +1 -1
package/README.md CHANGED
@@ -41,8 +41,54 @@ import 'jgy-public-component/dist/style.css'
41
41
  | 组件名 | 说明 |
42
42
  |--------|------|
43
43
  | JButton | 按钮 |
44
- | JSearchHeader | 搜索头部 |
44
+ | JSearchHeader | 筛选操作条(折叠筛选 + 新增/删除/搜索) |
45
+ | JListSearchHeader | 列表页搜索头(Tabs + 筛选 + 操作 + 导出/列设置) |
45
46
  | JImportExcel | Excel 导入 |
47
+
48
+ ### JListSearchHeader 快速示例
49
+
50
+ 列表页完整头部,API 对齐 SCM 原 `SearchHeader`:
51
+
52
+ ```vue
53
+ <template>
54
+ <JListSearchHeader
55
+ v-model="activeTab"
56
+ :show-more-filter="false"
57
+ @search="handleSearch"
58
+ @reset="handleReset"
59
+ @download="handleDownload"
60
+ @settings-save="handleSettingsSave"
61
+ @restore-default="handleRestoreDefault"
62
+ @tab-change="handleTabChange"
63
+ >
64
+ <template #tabs>
65
+ <el-tab-pane label="全部" name="all" />
66
+ <el-tab-pane label="待处理" name="pending" />
67
+ </template>
68
+
69
+ <template #filter>
70
+ <el-form inline>
71
+ <el-form-item>
72
+ <el-input v-model="keyword" placeholder="关键词" />
73
+ </el-form-item>
74
+ </el-form>
75
+ </template>
76
+
77
+ <template #actions>
78
+ <el-button type="primary">审批</el-button>
79
+ </template>
80
+
81
+ <template #settings>
82
+ <!-- 列设置内容 -->
83
+ </template>
84
+ </JListSearchHeader>
85
+ </template>
86
+
87
+ <script setup lang="ts">
88
+ import { ref } from 'vue'
89
+ import { JListSearchHeader } from 'jgy-public-component'
90
+ </script>
91
+ ```
46
92
  | JSearchInputDialog | 关键词搜索(类型下拉 + 输入 + 批量弹窗) |
47
93
  | JUploadImg | 图片上传 |
48
94
  | JSidebar / JSideMenuItem | 侧边栏菜单 |
@@ -13,4 +13,4 @@ export { createDocDetail, registerDocDetail, getDocDetailRegistry, getDocDetailA
13
13
  export { useDocDetailStore } from './store';
14
14
  export { default as DocNoLink } from './DocNoLink';
15
15
  export { default as DocDetailHost } from './DocDetailHost';
16
- export { wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, } from './wmsViews';
16
+ export { wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, AbnormalOrderDetailView, } from './wmsViews';
@@ -16,6 +16,8 @@ export type DocDetailAdapters = {
16
16
  getDeliveryDetail?: (orderNo: string) => Promise<any>;
17
17
  getTransferDetail?: (orderNo: string) => Promise<any>;
18
18
  getProcessingDetail?: (orderNo: string) => Promise<any>;
19
+ /** 异常单详情 */
20
+ getAbnormalDetail?: (orderNo: string) => Promise<any>;
19
21
  /** 业务方可自行扩展 key */
20
22
  [key: string]: ((...args: any[]) => Promise<any>) | undefined;
21
23
  };
@@ -0,0 +1,22 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ modelValue: boolean;
4
+ abnormalOrderNo: string;
5
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
6
+ "update:modelValue": (val: boolean) => void;
7
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ modelValue: boolean;
9
+ abnormalOrderNo: string;
10
+ }>>> & Readonly<{
11
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToRuntimeProps<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
@@ -6,7 +6,8 @@ import { default as PutawayOrderDetailView } from './views/PutawayOrderDetailVie
6
6
  import { default as DeliveryOrderDetailView } from './views/DeliveryOrderDetailView';
7
7
  import { default as TransferOrderDetailView } from './views/TransferOrderDetailView';
8
8
  import { default as WorkOrderDetailView } from './views/WorkOrderDetailView';
9
+ import { default as AbnormalOrderDetailView } from './views/AbnormalOrderDetailView';
9
10
 
10
11
  /** WMS 默认只读详情组件映射(接口由业务项目 adapters 注入) */
11
12
  export declare const wmsDocDetailComponents: DocDetailComponents;
12
- export { ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, };
13
+ export { ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, AbnormalOrderDetailView, };
@@ -0,0 +1,73 @@
1
+ import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare function __VLS_template(): {
3
+ tabs?(_: {}): any;
4
+ filter?(_: {}): any;
5
+ "more-filter"?(_: {}): any;
6
+ actions?(_: {}): any;
7
+ settings?(_: {}): any;
8
+ };
9
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
10
+ modelValue: PropType<string | number>;
11
+ showMoreFilter: {
12
+ type: PropType<boolean>;
13
+ default: boolean;
14
+ };
15
+ showDownload: {
16
+ type: PropType<boolean>;
17
+ default: boolean;
18
+ };
19
+ showSettings: {
20
+ type: PropType<boolean>;
21
+ default: boolean;
22
+ };
23
+ showTabs: {
24
+ type: PropType<boolean>;
25
+ default: boolean;
26
+ };
27
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
28
+ search: () => void;
29
+ reset: () => void;
30
+ download: () => void;
31
+ "settings-save": () => void;
32
+ "restore-default": () => void;
33
+ "more-filter-search": () => void;
34
+ "tab-change": (name: string) => void;
35
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
36
+ modelValue: PropType<string | number>;
37
+ showMoreFilter: {
38
+ type: PropType<boolean>;
39
+ default: boolean;
40
+ };
41
+ showDownload: {
42
+ type: PropType<boolean>;
43
+ default: boolean;
44
+ };
45
+ showSettings: {
46
+ type: PropType<boolean>;
47
+ default: boolean;
48
+ };
49
+ showTabs: {
50
+ type: PropType<boolean>;
51
+ default: boolean;
52
+ };
53
+ }>> & Readonly<{
54
+ onSearch?: (() => any) | undefined;
55
+ onReset?: (() => any) | undefined;
56
+ onDownload?: (() => any) | undefined;
57
+ "onSettings-save"?: (() => any) | undefined;
58
+ "onRestore-default"?: (() => any) | undefined;
59
+ "onMore-filter-search"?: (() => any) | undefined;
60
+ "onTab-change"?: ((name: string) => any) | undefined;
61
+ }>, {
62
+ showMoreFilter: boolean;
63
+ showDownload: boolean;
64
+ showSettings: boolean;
65
+ showTabs: boolean;
66
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
67
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
68
+ export default _default;
69
+ type __VLS_WithTemplateSlots<T, S> = T & {
70
+ new (): {
71
+ $slots: S;
72
+ };
73
+ };
@@ -0,0 +1,2 @@
1
+ export { default as JListSearchHeader } from './JListSearchHeader';
2
+ export type { JListSearchHeaderProps } from './types';
@@ -0,0 +1,10 @@
1
+ export interface JListSearchHeaderProps {
2
+ /** 是否展示「更多筛选」 */
3
+ showMoreFilter?: boolean;
4
+ /** 是否展示导出图标 */
5
+ showDownload?: boolean;
6
+ /** 是否展示列设置图标 */
7
+ showSettings?: boolean;
8
+ /** 是否展示顶部状态 Tabs(无 #tabs 插槽时自动隐藏) */
9
+ showTabs?: boolean;
10
+ }
@@ -1,19 +1,28 @@
1
+ import { ProductDetailType } from './store';
1
2
  import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
3
+
2
4
  declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
5
  code?: string | null;
4
6
  emptyText?: string;
7
+ /** sku 或 spu,默认 sku */
8
+ type?: ProductDetailType;
5
9
  }>, {
6
10
  emptyText: string;
11
+ type: string;
7
12
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
13
  open: (code: string) => void;
9
14
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
15
  code?: string | null;
11
16
  emptyText?: string;
17
+ /** sku 或 spu,默认 sku */
18
+ type?: ProductDetailType;
12
19
  }>, {
13
20
  emptyText: string;
21
+ type: string;
14
22
  }>>> & Readonly<{
15
23
  onOpen?: ((code: string) => any) | undefined;
16
24
  }>, {
25
+ type: ProductDetailType;
17
26
  emptyText: string;
18
27
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
19
28
  export default _default;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
@@ -1,5 +1,8 @@
1
1
  export { default as JProductDetailDialog } from './JProductDetailDialog';
2
2
  export { default as JSkuLink } from './JSkuLink';
3
+ export { default as ProductDetailHost } from './ProductDetailHost';
3
4
  export { useProductDetailDialog } from './useProductDetailDialog';
5
+ export { useProductDetailStore } from './store';
6
+ export type { ProductDetailType } from './store';
4
7
  export { provideProductRequest, resolveProductRequest, useInjectedProductRequest, J_PRODUCT_REQUEST_KEY, } from './request';
5
8
  export type { JProductDetailDialogProps, JSkuLinkProps, JProductRequestFn, JProductRequestConfig, } from './types';
@@ -0,0 +1,36 @@
1
+ import { StoreDefinition } from 'pinia';
2
+ import { Ref } from 'vue';
3
+ export type ProductDetailType = 'sku' | 'spu';
4
+ /**
5
+ * 全局产品详情状态
6
+ * 业务页:JSkuLink / store.open(code)
7
+ * 宿主:ProductDetailHost 渲染 JProductDetailDialog
8
+ */
9
+ export declare const useProductDetailStore: StoreDefinition<"jgyProductDetail", Pick<{
10
+ visible: Ref<boolean, boolean>;
11
+ code: Ref<string, string>;
12
+ type: Ref<ProductDetailType, ProductDetailType>;
13
+ open: (skuCode: string, opts?: {
14
+ type?: ProductDetailType;
15
+ }) => Promise<void>;
16
+ close: () => void;
17
+ reset: () => void;
18
+ }, "type" | "code" | "visible">, Pick<{
19
+ visible: Ref<boolean, boolean>;
20
+ code: Ref<string, string>;
21
+ type: Ref<ProductDetailType, ProductDetailType>;
22
+ open: (skuCode: string, opts?: {
23
+ type?: ProductDetailType;
24
+ }) => Promise<void>;
25
+ close: () => void;
26
+ reset: () => void;
27
+ }, never>, Pick<{
28
+ visible: Ref<boolean, boolean>;
29
+ code: Ref<string, string>;
30
+ type: Ref<ProductDetailType, ProductDetailType>;
31
+ open: (skuCode: string, opts?: {
32
+ type?: ProductDetailType;
33
+ }) => Promise<void>;
34
+ close: () => void;
35
+ reset: () => void;
36
+ }, "close" | "open" | "reset">>;
@@ -1,26 +1,7 @@
1
1
  import { Ref } from 'vue';
2
2
  /**
3
- * 产品详情弹窗状态管理(页面级:多个 JSkuLink 共用一个 Dialog)。
4
- *
5
- * @example
6
- * ```ts
7
- * const {
8
- * productDetailDialogVisible,
9
- * productDetailDialogCode,
10
- * openProductDetailDialog,
11
- * } = useProductDetailDialog()
12
- * ```
13
- *
14
- * ```vue
15
- * <JSkuLink :code="row.sku" @open="openProductDetailDialog" />
16
- * <JProductDetailDialog
17
- * v-model:visible="productDetailDialogVisible"
18
- * :code="productDetailDialogCode"
19
- * type="sku"
20
- * />
21
- * ```
22
- *
23
- * 注意:列表中每行只用 JSkuLink,Dialog 放页面底部只挂一次,不要每行一个 Dialog。
3
+ * @deprecated 推荐 MainLayout 挂载 ProductDetailHost,页面只用 JSkuLink。
4
+ * 保留兼容:内部转调全局 store。
24
5
  */
25
6
  export declare function useProductDetailDialog(): {
26
7
  productDetailDialogVisible: Ref<boolean, boolean>;
@@ -0,0 +1,41 @@
1
+ import { RelatedDocTypeItem } from './types';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
3
+
4
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
+ docTypes: RelatedDocTypeItem[];
6
+ docNo?: string | number;
7
+ paramKey?: string;
8
+ pageSize?: number;
9
+ }>, {
10
+ docTypes: () => never[];
11
+ pageSize: number;
12
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
13
+ docTypes: RelatedDocTypeItem[];
14
+ docNo?: string | number;
15
+ paramKey?: string;
16
+ pageSize?: number;
17
+ }>, {
18
+ docTypes: () => never[];
19
+ pageSize: number;
20
+ }>>> & Readonly<{}>, {
21
+ pageSize: number;
22
+ docTypes: RelatedDocTypeItem[];
23
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
25
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
26
+ type __VLS_TypePropsToRuntimeProps<T> = {
27
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
28
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
29
+ } : {
30
+ type: PropType<T[K]>;
31
+ required: true;
32
+ };
33
+ };
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
36
+ default: D[K];
37
+ }> : P[K];
38
+ };
39
+ type __VLS_Prettify<T> = {
40
+ [K in keyof T]: T[K];
41
+ } & {};
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ value?: string | number | null;
4
+ label?: string;
5
+ link?: boolean;
6
+ }>, {
7
+ link: boolean;
8
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ value?: string | number | null;
10
+ label?: string;
11
+ link?: boolean;
12
+ }>, {
13
+ link: boolean;
14
+ }>>> & Readonly<{}>, {
15
+ link: boolean;
16
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_WithDefaults<P, D> = {
28
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
29
+ default: D[K];
30
+ }> : P[K];
31
+ };
32
+ type __VLS_Prettify<T> = {
33
+ [K in keyof T]: T[K];
34
+ } & {};
@@ -0,0 +1,41 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ type: string;
4
+ docNo?: string | number;
5
+ paramKey?: string;
6
+ pageSize?: number;
7
+ tableProps?: Record<string, any>;
8
+ }>, {
9
+ pageSize: number;
10
+ tableProps: () => {};
11
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
+ type: string;
13
+ docNo?: string | number;
14
+ paramKey?: string;
15
+ pageSize?: number;
16
+ tableProps?: Record<string, any>;
17
+ }>, {
18
+ pageSize: number;
19
+ tableProps: () => {};
20
+ }>>> & Readonly<{}>, {
21
+ pageSize: number;
22
+ tableProps: Record<string, any>;
23
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
25
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
26
+ type __VLS_TypePropsToRuntimeProps<T> = {
27
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
28
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
29
+ } : {
30
+ type: PropType<T[K]>;
31
+ required: true;
32
+ };
33
+ };
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
36
+ default: D[K];
37
+ }> : P[K];
38
+ };
39
+ type __VLS_Prettify<T> = {
40
+ [K in keyof T]: T[K];
41
+ } & {};
@@ -0,0 +1,30 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ tabs: Array<{
4
+ key: string;
5
+ label: string;
6
+ count?: number;
7
+ }>;
8
+ modelValue: string;
9
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
+ "update:modelValue": (value: string) => void;
11
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ tabs: Array<{
13
+ key: string;
14
+ label: string;
15
+ count?: number;
16
+ }>;
17
+ modelValue: string;
18
+ }>>> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToRuntimeProps<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * JRelatedDocs — 关联单据
3
+ *
4
+ * 用法:
5
+ * 1. createRelatedDocs({ listAdapters: { receipt, qc, inbound, putaway } })
6
+ * 2. 只读详情 / 业务页:
7
+ * <JRelatedDocs :doc-types="[...]" :doc-no="orderNo" />
8
+ * 3. 也可单独使用纯展示表:RelatedReceiptOrderTable 等(父页自请求)
9
+ */
10
+ export type { RelatedListAdapter, RelatedDocTypeItem, CreateRelatedDocsOptions, RelatedDocsContainerProps, } from './types';
11
+ export { createRelatedDocs, registerRelatedDocs, getRelatedListAdapter, getRelatedTableComponent, getRelatedDocsTableComponents, isRelatedDocsInitialized, DEFAULT_TABLE_COMPONENTS, } from './registry';
12
+ export { default as JRelatedDocs } from './JRelatedDocs';
13
+ export { default as RelatedDocSubTabs } from './RelatedDocSubTabs';
14
+ export { default as RelatedDocNoCopy } from './RelatedDocNoCopy';
15
+ export { default as RelatedDocPanel } from './RelatedDocPanel';
16
+ export { default as RelatedReceiptOrderTable } from './tables/RelatedReceiptOrderTable';
17
+ export { default as RelatedQcOrderTable } from './tables/RelatedQcOrderTable';
18
+ export { default as RelatedInboundOrderTable } from './tables/RelatedInboundOrderTable';
19
+ export { default as RelatedPutawayOrderTable } from './tables/RelatedPutawayOrderTable';
20
+ export { flattenOrderItems, sumOrderItemField } from './utils/flattenOrderItems';
21
+ export { useRelatedCollapseExpand } from './utils/useRelatedCollapseExpand';
22
+ export { parseListResponse } from './utils/parseList';
@@ -0,0 +1,19 @@
1
+ import { Component } from 'vue';
2
+ import { CreateRelatedDocsOptions, RelatedListAdapter } from './types';
3
+
4
+ declare const DEFAULT_TABLE_COMPONENTS: Record<string, Component>;
5
+ /**
6
+ * 注册关联单据:list 适配器 + 可选表格组件覆盖
7
+ * 建议在 main.ts 中 createDocDetail 旁调用一次
8
+ */
9
+ export declare function createRelatedDocs(options?: CreateRelatedDocsOptions): {
10
+ listAdapters: Record<string, RelatedListAdapter>;
11
+ tableComponents: Record<string, Component>;
12
+ };
13
+ /** 合并追加注册 */
14
+ export declare function registerRelatedDocs(options: Partial<CreateRelatedDocsOptions>): void;
15
+ export declare function getRelatedListAdapter(type: string): RelatedListAdapter | null;
16
+ export declare function getRelatedTableComponent(type: string): Component | null;
17
+ export declare function getRelatedDocsTableComponents(): Record<string, Component>;
18
+ export declare function isRelatedDocsInitialized(): boolean;
19
+ export { DEFAULT_TABLE_COMPONENTS };
@@ -0,0 +1,40 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ orders?: Record<string, any>[];
4
+ loading?: boolean;
5
+ defaultExpandAll?: boolean;
6
+ }>, {
7
+ orders: () => never[];
8
+ loading: boolean;
9
+ defaultExpandAll: boolean;
10
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
+ orders?: Record<string, any>[];
12
+ loading?: boolean;
13
+ defaultExpandAll?: boolean;
14
+ }>, {
15
+ orders: () => never[];
16
+ loading: boolean;
17
+ defaultExpandAll: boolean;
18
+ }>>> & Readonly<{}>, {
19
+ loading: boolean;
20
+ defaultExpandAll: boolean;
21
+ orders: Record<string, any>[];
22
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
23
+ export default _default;
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToRuntimeProps<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ type __VLS_WithDefaults<P, D> = {
34
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
35
+ default: D[K];
36
+ }> : P[K];
37
+ };
38
+ type __VLS_Prettify<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
@@ -0,0 +1,35 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ list?: Record<string, any>[];
4
+ loading?: boolean;
5
+ }>, {
6
+ list: () => never[];
7
+ loading: boolean;
8
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ list?: Record<string, any>[];
10
+ loading?: boolean;
11
+ }>, {
12
+ list: () => never[];
13
+ loading: boolean;
14
+ }>>> & Readonly<{}>, {
15
+ loading: boolean;
16
+ list: Record<string, any>[];
17
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_WithDefaults<P, D> = {
29
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
30
+ default: D[K];
31
+ }> : P[K];
32
+ };
33
+ type __VLS_Prettify<T> = {
34
+ [K in keyof T]: T[K];
35
+ } & {};
@@ -0,0 +1,35 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ list?: Record<string, any>[];
4
+ loading?: boolean;
5
+ }>, {
6
+ list: () => never[];
7
+ loading: boolean;
8
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ list?: Record<string, any>[];
10
+ loading?: boolean;
11
+ }>, {
12
+ list: () => never[];
13
+ loading: boolean;
14
+ }>>> & Readonly<{}>, {
15
+ loading: boolean;
16
+ list: Record<string, any>[];
17
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_WithDefaults<P, D> = {
29
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
30
+ default: D[K];
31
+ }> : P[K];
32
+ };
33
+ type __VLS_Prettify<T> = {
34
+ [K in keyof T]: T[K];
35
+ } & {};
@@ -0,0 +1,45 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ orders?: Record<string, any>[];
4
+ loading?: boolean;
5
+ showQcType?: boolean;
6
+ defaultExpandAll?: boolean;
7
+ }>, {
8
+ orders: () => never[];
9
+ loading: boolean;
10
+ showQcType: boolean;
11
+ defaultExpandAll: boolean;
12
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
13
+ orders?: Record<string, any>[];
14
+ loading?: boolean;
15
+ showQcType?: boolean;
16
+ defaultExpandAll?: boolean;
17
+ }>, {
18
+ orders: () => never[];
19
+ loading: boolean;
20
+ showQcType: boolean;
21
+ defaultExpandAll: boolean;
22
+ }>>> & Readonly<{}>, {
23
+ loading: boolean;
24
+ defaultExpandAll: boolean;
25
+ orders: Record<string, any>[];
26
+ showQcType: boolean;
27
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
29
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
+ type __VLS_TypePropsToRuntimeProps<T> = {
31
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
32
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
33
+ } : {
34
+ type: PropType<T[K]>;
35
+ required: true;
36
+ };
37
+ };
38
+ type __VLS_WithDefaults<P, D> = {
39
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
40
+ default: D[K];
41
+ }> : P[K];
42
+ };
43
+ type __VLS_Prettify<T> = {
44
+ [K in keyof T]: T[K];
45
+ } & {};