jgy-public-component 0.0.43 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,6 +47,8 @@ import 'jgy-public-component/dist/style.css'
47
47
  | JListSearchHeader | 列表页搜索头(Tabs + 筛选 + 操作 + 导出/列设置) |
48
48
  | JSearchInputDialog | 关键词搜索(类型下拉 + 输入 + 批量弹窗) |
49
49
  | JRemoteSelect | 远程搜索下拉(分页滚动 + 联动前置校验 + 编辑回显) |
50
+ | JSupplierCycleSelect | 供应商周期选择(内采 / 抬头 / 生命周期,需注入 request) |
51
+ | JSupplierCycleDisplay | 供应商周期展示(按 keyword 查询,展示逻辑同选择器) |
50
52
  | JProductSelectDialog | 产品选择弹窗(跨页多选 + 已选 Popover) |
51
53
  | JImportExcel | Excel 导入 |
52
54
  | JSidebar / JSideMenuItem | 侧边栏菜单 |
@@ -305,6 +307,37 @@ const getAreaList = (params: Record<string, unknown>) =>
305
307
  />
306
308
  ```
307
309
 
310
+ ### JSupplierCycleSelect 快速示例
311
+
312
+ 供应商选择(含生命周期 / 抬头 / 内采标签)。接口写死,请求走 `provideProductRequest`,与产品详情同一套注入。完整说明见 [`src/components/JSupplierCycleSelect/README.md`](src/components/JSupplierCycleSelect/README.md)。
313
+
314
+ ```vue
315
+ <template>
316
+ <JSupplierCycleSelect
317
+ v-model="form.supplier_codes"
318
+ :params="{ sku_code: form.sku_code }"
319
+ @change="onSupplierChange"
320
+ />
321
+ </template>
322
+
323
+ <script setup lang="ts">
324
+ import { reactive } from 'vue'
325
+ import { JSupplierCycleSelect } from 'jgy-public-component'
326
+ import type { JSupplierCycleItem, JSupplierCycleSelectValue } from 'jgy-public-component'
327
+
328
+ const form = reactive({ sku_code: '', supplier_codes: '' })
329
+
330
+ const onSupplierChange = (
331
+ value: JSupplierCycleSelectValue,
332
+ options: JSupplierCycleItem[],
333
+ ) => {
334
+ console.log(value, options)
335
+ }
336
+ </script>
337
+ ```
338
+
339
+ `v-model` 统一为逗号分隔的 `supplier_code` 字符串(空为 `''`)。默认多选,需点确定;`:multiple="false"` 时点行即选。
340
+
308
341
  ### JProductSelectDialog 快速示例
309
342
 
310
343
  弹窗只负责分页请求、跨页多选与已选管理;筛选表单和表格列由插槽提供。
@@ -0,0 +1,157 @@
1
+ /**
2
+ * 单据详情 / 关联单据用到的接口地址
3
+ * 未注入 adapter 时,由 provideRequest + 这里的 URL 拉数。WMS 单据 path 以 wms_front 为准。
4
+ */
5
+ /** 打开弹窗时的主详情 */
6
+ export declare const DOC_DETAIL_API: {
7
+ receipt: {
8
+ url: string;
9
+ param: string;
10
+ };
11
+ qc: {
12
+ url: string;
13
+ param: string;
14
+ };
15
+ inbound: {
16
+ url: string;
17
+ param: string;
18
+ };
19
+ putaway: {
20
+ url: string;
21
+ param: string;
22
+ };
23
+ delivery: {
24
+ url: string;
25
+ param: string;
26
+ };
27
+ transfer: {
28
+ url: string;
29
+ param: string;
30
+ };
31
+ processing: {
32
+ url: string;
33
+ param: string;
34
+ };
35
+ stockTake: {
36
+ url: string;
37
+ param: string;
38
+ };
39
+ packing: {
40
+ url: string;
41
+ param: string;
42
+ };
43
+ transport: {
44
+ url: string;
45
+ param: string;
46
+ };
47
+ abnormal: {
48
+ url: string;
49
+ param: string;
50
+ };
51
+ returnGoods: {
52
+ url: string;
53
+ param: string;
54
+ };
55
+ purchase: {
56
+ url: string;
57
+ param: string;
58
+ };
59
+ purchasePlan: {
60
+ url: string;
61
+ param: string;
62
+ };
63
+ payment: {
64
+ url: string;
65
+ param: string;
66
+ };
67
+ costExpense: {
68
+ url: string;
69
+ param: string;
70
+ };
71
+ receiptVoucher: {
72
+ url: string;
73
+ param: string;
74
+ };
75
+ deliveryDoc: {
76
+ url: string;
77
+ param: string;
78
+ };
79
+ purchaseContract: {
80
+ url: string;
81
+ param: string;
82
+ };
83
+ };
84
+ /** 合同详情第二步(用列表拿到的 id) */
85
+ export declare const PURCHASE_CONTRACT_DETAIL_URL = "/scm-app/comm/PurchaseContract/queryContract";
86
+ /** 打开详情后,按 Tab / 附属数据再打的接口 */
87
+ export declare const DOC_EXTRA_API: {
88
+ skuDetail: {
89
+ url: string;
90
+ param: string;
91
+ };
92
+ actionLogList: {
93
+ url: string;
94
+ };
95
+ purchaseItemList: {
96
+ url: string;
97
+ param: string;
98
+ };
99
+ qtyByPurchaseNo: {
100
+ url: string;
101
+ param: string;
102
+ };
103
+ deliveryQtyByPurchaseNo: {
104
+ url: string;
105
+ param: string;
106
+ };
107
+ declarationConfirmStatus: {
108
+ url: string;
109
+ param: string;
110
+ };
111
+ purchaseInvoiceList: {
112
+ url: string;
113
+ param: string;
114
+ };
115
+ deliveryDocLogistics: {
116
+ url: string;
117
+ param: string;
118
+ };
119
+ deliveryDocPurchaseItems: {
120
+ url: string;
121
+ param: string;
122
+ };
123
+ deliveryDocLogs: {
124
+ url: string;
125
+ param: string;
126
+ };
127
+ productTags: {
128
+ url: string;
129
+ param: string;
130
+ };
131
+ approvalTimeline: {
132
+ url: string;
133
+ param: string;
134
+ };
135
+ receiptVoucherLogs: {
136
+ url: string;
137
+ param: string;
138
+ };
139
+ };
140
+ /** 关联单据列表。入参字段由各详情里的 relatedDocTypes.paramKey 决定,这里只收 URL */
141
+ export declare const RELATED_DOC_API: {
142
+ purchase: string;
143
+ purchaseItem: string;
144
+ purchasePlan: string;
145
+ deliveryDoc: string;
146
+ shipping: string;
147
+ payment: string;
148
+ receiptVoucher: string;
149
+ customs: string;
150
+ receipt: string;
151
+ qc: string;
152
+ inbound: string;
153
+ putaway: string;
154
+ processing: string;
155
+ returnGoods: string;
156
+ abnormal: string;
157
+ };
@@ -0,0 +1,42 @@
1
+ export declare function postDoc(url: string, data?: any): Promise<any>;
2
+ /** 按单据 type 打详情。合同 / 送货单现网是先列表再取一条。 */
3
+ export declare function fetchDocByType(type: string, orderNo: string): Promise<any>;
4
+ export declare function fetchSkuDetail(skuCode: string): Promise<any>;
5
+ export declare function fetchActionLogList(params: any): Promise<any>;
6
+ export declare function fetchPurchaseItemList(purchaseNo: string): Promise<any>;
7
+ export declare function fetchQtyByPurchaseNo(purchaseNo: string): Promise<any>;
8
+ export declare function fetchDeliveryQtyByPurchaseNo(purchaseNo: string): Promise<any>;
9
+ export declare function fetchPurchaseInvoices(purchaseNo: string): Promise<{
10
+ code: any;
11
+ data: any[];
12
+ msg: any;
13
+ }>;
14
+ export declare function fetchDeliveryDocLogistics(deliveryNo: string): Promise<{
15
+ code: any;
16
+ data: any[];
17
+ msg: any;
18
+ }>;
19
+ export declare function fetchPurchaseLogistics(purchaseNo: string): Promise<{
20
+ code: any;
21
+ data: any[];
22
+ msg: any;
23
+ }>;
24
+ export declare function fetchDeliveryDocPurchaseItems(deliveryNo: string): Promise<{
25
+ code: any;
26
+ data: any[];
27
+ msg: any;
28
+ }>;
29
+ export declare function fetchDeliveryDocProductTags(deliveryNo: string): Promise<{
30
+ code: any;
31
+ data: any[];
32
+ msg: any;
33
+ }>;
34
+ export declare function fetchPurchaseCustomsProducts(purchaseNo: string): Promise<{
35
+ code: number;
36
+ data: {
37
+ products: any[];
38
+ declaration_confirm_status: any;
39
+ };
40
+ msg: any;
41
+ }>;
42
+ export declare function fetchRelatedList(type: string, params?: Record<string, any>): Promise<any>;
@@ -2,15 +2,19 @@
2
2
  * JDocDetail — 全局单据详情(传单号打开只读弹窗)
3
3
  *
4
4
  * 用法概要:
5
- * 1. createDocDetail({ components, adapters }) // 注册组件 + 注入接口
6
- * 2. MainLayout 挂载 <DocDetailHost />
7
- * 3. 列表使用 <DocNoLink type="receipt" :order-no="xxx" />
5
+ * 1. provideRequest(app, request) // 和产品详情共用
6
+ * 2. createDocDetail({ components }) // 仍可传 adapters 覆盖
7
+ * 3. MainLayout 挂载 <DocDetailHost />
8
+ * 4. 列表使用 <DocNoLink type="receipt" :order-no="xxx" />
8
9
  *
9
10
  * WMS 可直接用 wmsDocDetailComponents 作为 components。
10
11
  */
11
12
  export type { DocDetailType, DocDetailAdapters, DocDetailRegistryItem, DocDetailComponents, CreateDocDetailOptions, DocDetailViewOptions, PurchaseOrderTabName, } from './types';
12
13
  export { createDocDetail, registerDocDetail, getDocDetailRegistry, getDocDetailAdapters, getDocDetailViewOptions, getDocDetailEntry, isDocDetailInitialized, } from './registry';
13
14
  export { useDocDetailStore } from './store';
15
+ export { provideDocRequest, setDocRequest, getDocRequest } from './request';
16
+ export type { JDocRequestFn } from './request';
17
+ export { DOC_DETAIL_API, DOC_EXTRA_API, RELATED_DOC_API, PURCHASE_CONTRACT_DETAIL_URL, } from './apiPaths';
14
18
  export { default as DocNoLink } from './DocNoLink';
15
19
  export { default as DocDetailHost } from './DocDetailHost';
16
20
  export { wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, AbnormalOrderDetailView, PaymentRequestDetailView, ReturnOrderDetailView, CostExpenseDetailView, ReceiptVoucherDetailView, PurchaseOrderDetailView, PurchasePlanDetailView, PurchaseContractDetailView, DeliveryDocDetailView, StockTakeOrderDetailView, PackingTaskDetailView, TransportOrderDetailView, } from './wmsViews';
@@ -0,0 +1,8 @@
1
+ import { App } from 'vue';
2
+ import { JRequestFn } from '../../request';
3
+
4
+ export type JDocRequestFn = JRequestFn;
5
+ /** @deprecated 请用 provideRequest,效果相同 */
6
+ export declare function provideDocRequest(app: App, request: JDocRequestFn): void;
7
+ export declare function setDocRequest(request: JDocRequestFn): void;
8
+ export declare function getDocRequest(): JDocRequestFn | null;
@@ -127,8 +127,15 @@ export type DocDetailViewOptions = {
127
127
  export type CreateDocDetailOptions = {
128
128
  /** type → 详情组件 */
129
129
  components: DocDetailComponents;
130
- /** 接口适配器(各项目自行注入) */
130
+ /** 接口适配器(可选;有则优先于 provideRequest + 内置 URL) */
131
131
  adapters?: DocDetailAdapters;
132
+ /** 和 provideRequest 一样,注入项目 request */
133
+ request?: (config: {
134
+ url: string;
135
+ method?: string;
136
+ data?: any;
137
+ params?: any;
138
+ }) => Promise<any>;
132
139
  /** 视图展示配置(如采购订单 Tab 顺序) */
133
140
  viewOptions?: DocDetailViewOptions;
134
141
  };
@@ -21,8 +21,8 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
21
21
  type: "sku" | "spu";
22
22
  code: string;
23
23
  id: number | string;
24
- visible: boolean;
25
24
  request: JProductRequestFn;
25
+ visible: boolean;
26
26
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
27
27
  export default _default;
28
28
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,28 +1,12 @@
1
1
  import { App, InjectionKey } from 'vue';
2
+ import { getRequest, setRequest } from '../../request';
2
3
  import { JProductRequestFn } from './types';
4
+ import { JRequestFn } from '../..';
3
5
 
4
- /** provide/inject 用的 key,业务方一般无需直接使用 */
5
- export declare const J_PRODUCT_REQUEST_KEY: InjectionKey<JProductRequestFn>;
6
- /**
7
- * 在应用入口注入 request(推荐,全项目只需一次)。
8
- *
9
- * @example
10
- * ```ts
11
- * import { createApp } from 'vue'
12
- * import request from '@/api'
13
- * import { provideProductRequest } from 'jgy-public-component'
14
- *
15
- * const app = createApp(App)
16
- * provideProductRequest(app, (config) => request(config))
17
- * ```
18
- */
6
+ /** @deprecated 与 J_REQUEST_KEY 相同,请用 provideRequest */
7
+ export declare const J_PRODUCT_REQUEST_KEY: InjectionKey<JRequestFn>;
8
+ /** @deprecated 请用 provideRequest,效果相同 */
19
9
  export declare function provideProductRequest(app: App, request: JProductRequestFn): void;
20
- /**
21
- * 在 setup 中读取全局注入的 request(必须在 setup 同步阶段调用 inject)。
22
- */
23
10
  export declare function useInjectedProductRequest(): JProductRequestFn | null;
24
- /**
25
- * 解析最终 request:prop 优先,否则用全局 provide。
26
- * 可在 setup 外调用,但需把 setup 阶段拿到的 injected 传进来。
27
- */
28
11
  export declare function resolveProductRequest(propRequest?: JProductRequestFn | null, injectedRequest?: JProductRequestFn | null): JProductRequestFn;
12
+ export { getRequest, setRequest };
@@ -5,7 +5,7 @@
5
5
  * 组件内部不直接依赖任何具体项目的 request 封装。
6
6
  *
7
7
  * 注入方式二选一(推荐 1):
8
- * 1. main.ts: provideProductRequest(app, request)
8
+ * 1. main.ts: provideRequest(app, request)
9
9
  * 2. 组件 prop: <JProductDetailDialog :request="request" ... />
10
10
  */
11
11
  /** request 请求配置(与各项目 axios 实例调用签名对齐) */
@@ -33,7 +33,7 @@ export interface JProductDetailDialogProps {
33
33
  id?: number | string;
34
34
  /**
35
35
  * request 函数。可选:
36
- * - 未传时使用 provideProductRequest 注入的全局 request
36
+ * - 未传时使用 provideRequest 注入的全局 request
37
37
  * - 传入时优先使用 prop(便于单页覆盖)
38
38
  */
39
39
  request?: JProductRequestFn;
@@ -38,6 +38,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
38
38
  type: PropType<string>;
39
39
  default: string;
40
40
  };
41
+ popoverWidth: {
42
+ type: PropType<number>;
43
+ default: number;
44
+ };
41
45
  fetchApi: {
42
46
  type: PropType<JProductSelectFetchApi>;
43
47
  required: true;
@@ -49,10 +53,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
49
53
  type: PropType<string | number>;
50
54
  default: number;
51
55
  };
52
- popoverWidth: {
53
- type: PropType<number>;
54
- default: number;
55
- };
56
56
  responseAdapter: {
57
57
  type: PropType<(res: any) => JProductSelectListResult>;
58
58
  };
@@ -96,6 +96,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
96
96
  type: PropType<string>;
97
97
  default: string;
98
98
  };
99
+ popoverWidth: {
100
+ type: PropType<number>;
101
+ default: number;
102
+ };
99
103
  fetchApi: {
100
104
  type: PropType<JProductSelectFetchApi>;
101
105
  required: true;
@@ -107,10 +111,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
107
111
  type: PropType<string | number>;
108
112
  default: number;
109
113
  };
110
- popoverWidth: {
111
- type: PropType<number>;
112
- default: number;
113
- };
114
114
  responseAdapter: {
115
115
  type: PropType<(res: any) => JProductSelectListResult>;
116
116
  };
@@ -132,8 +132,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
132
132
  pageSizes: number[];
133
133
  teleported: boolean;
134
134
  rowKey: string;
135
- tableHeight: string | number;
136
135
  popoverWidth: number;
136
+ tableHeight: string | number;
137
137
  loadErrorMessage: string;
138
138
  fetchOnOpen: boolean;
139
139
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -104,15 +104,15 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
104
104
  clearable: boolean;
105
105
  placeholder: string;
106
106
  multiple: boolean;
107
+ allowEmpty: boolean;
108
+ paginated: boolean;
109
+ searchable: boolean;
107
110
  labelField: string;
108
111
  valueField: string;
109
112
  searchField: string;
110
- searchable: boolean;
111
113
  localFilter: boolean;
112
- paginated: boolean;
113
114
  dependsPlaceholder: string;
114
115
  autoClearOnParamsChange: boolean;
115
- allowEmpty: boolean;
116
116
  requiredParams: string[];
117
117
  collapseTags: boolean;
118
118
  collapseTagsTooltip: boolean;
@@ -0,0 +1,54 @@
1
+ import { JProductRequestFn } from '../JProductDetail/types';
2
+ import { JSupplierCycleItem } from './types';
3
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
4
+
5
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
6
+ keyword?: string | number | null;
7
+ params?: Record<string, unknown>;
8
+ pageSize?: number;
9
+ emptyText?: string;
10
+ request?: JProductRequestFn;
11
+ }>, {
12
+ params: () => {};
13
+ pageSize: number;
14
+ emptyText: string;
15
+ request: undefined;
16
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
17
+ loaded: (items: JSupplierCycleItem[]) => void;
18
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
19
+ keyword?: string | number | null;
20
+ params?: Record<string, unknown>;
21
+ pageSize?: number;
22
+ emptyText?: string;
23
+ request?: JProductRequestFn;
24
+ }>, {
25
+ params: () => {};
26
+ pageSize: number;
27
+ emptyText: string;
28
+ request: undefined;
29
+ }>>> & Readonly<{
30
+ onLoaded?: ((items: JSupplierCycleItem[]) => any) | undefined;
31
+ }>, {
32
+ pageSize: number;
33
+ emptyText: string;
34
+ request: JProductRequestFn;
35
+ params: Record<string, unknown>;
36
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
37
+ export default _default;
38
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
39
+ type __VLS_TypePropsToRuntimeProps<T> = {
40
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
41
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
42
+ } : {
43
+ type: PropType<T[K]>;
44
+ required: true;
45
+ };
46
+ };
47
+ type __VLS_WithDefaults<P, D> = {
48
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
49
+ default: D[K];
50
+ }> : P[K];
51
+ };
52
+ type __VLS_Prettify<T> = {
53
+ [K in keyof T]: T[K];
54
+ } & {};
@@ -25,10 +25,6 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
25
25
  teleported?: boolean;
26
26
  /** 触发器 hover 时展示完整已选项 */
27
27
  showTooltip?: boolean;
28
- /** 生命周期状态筛选,有值时才传给接口 */
29
- status?: string | number | (string | number)[];
30
- /** 生命周期阶段筛选,有值时才传给接口 */
31
- stage?: string | number | (string | number)[];
32
28
  request?: JProductRequestFn;
33
29
  }>, {
34
30
  params: () => {};
@@ -74,10 +70,6 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
74
70
  teleported?: boolean;
75
71
  /** 触发器 hover 时展示完整已选项 */
76
72
  showTooltip?: boolean;
77
- /** 生命周期状态筛选,有值时才传给接口 */
78
- status?: string | number | (string | number)[];
79
- /** 生命周期阶段筛选,有值时才传给接口 */
80
- stage?: string | number | (string | number)[];
81
73
  request?: JProductRequestFn;
82
74
  }>, {
83
75
  params: () => {};
@@ -109,13 +101,13 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
109
101
  size: "large" | "default" | "small";
110
102
  width: string;
111
103
  teleported: boolean;
112
- params: Record<string, unknown>;
113
104
  request: JProductRequestFn;
105
+ params: Record<string, unknown>;
114
106
  multiple: boolean;
115
- popoverWidth: number | string;
116
- searchable: boolean;
117
- paginated: boolean;
118
107
  allowEmpty: boolean;
108
+ paginated: boolean;
109
+ searchable: boolean;
110
+ popoverWidth: number | string;
119
111
  showTooltip: boolean;
120
112
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
121
113
  export default _default;
@@ -1,2 +1,3 @@
1
1
  export { default as JSupplierCycleSelect } from './JSupplierCycleSelect';
2
- export type { JSupplierCycleSelectProps, JSupplierCycleSelectValue, JSupplierCycleItem, JSupplierLifeCycle, JSupplierRelatedItem, JSupplierTitleHistoryItem, } from './types';
2
+ export { default as JSupplierCycleDisplay } from './JSupplierCycleDisplay';
3
+ export type { JSupplierCycleSelectProps, JSupplierCycleSelectValue, JSupplierCycleDisplayProps, JSupplierCycleItem, JSupplierLifeCycle, JSupplierRelatedItem, JSupplierTitleHistoryItem, } from './types';
@@ -46,12 +46,8 @@ export interface JSupplierCycleItem {
46
46
  }
47
47
  export interface JSupplierCycleSelectProps {
48
48
  modelValue?: JSupplierCycleSelectValue;
49
- /** 额外请求参数,会合并进每次请求(如 sku_code) */
49
+ /** 额外请求参数,会合并进每次请求(如 sku_code、status、stage) */
50
50
  params?: Record<string, unknown>;
51
- /** 生命周期 status 筛选,有值时才传给接口 */
52
- status?: string | number | (string | number)[];
53
- /** 生命周期 stage 筛选,有值时才传给接口 */
54
- stage?: string | number | (string | number)[];
55
51
  /** false=单选(点行即选中并关闭),true=多选(默认,需点确定) */
56
52
  multiple?: boolean;
57
53
  clearable?: boolean;
@@ -75,3 +71,12 @@ export interface JSupplierCycleSelectProps {
75
71
  /** 覆盖全局注入的 request,一般不用传 */
76
72
  request?: JProductRequestFn;
77
73
  }
74
+ export interface JSupplierCycleDisplayProps {
75
+ /** 搜索关键字(供应商编码或名称),对应接口 keyword */
76
+ keyword?: string | number | null;
77
+ /** 额外请求参数,会合并进每次请求(如 sku_code、status、stage) */
78
+ params?: Record<string, unknown>;
79
+ pageSize?: number;
80
+ emptyText?: string;
81
+ request?: JProductRequestFn;
82
+ }
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { JAdminLayout } from './components/JAdminLayout';
10
10
  import { JProductDetailDialog, JSkuLink, ProductDetailHost } from './components/JProductDetail';
11
11
  import { JSearchInputDialog } from './components/JSearchInputDialog';
12
12
  import { JRemoteSelect } from './components/JRemoteSelect';
13
- import { JSupplierCycleSelect } from './components/JSupplierCycleSelect';
13
+ import { JSupplierCycleSelect, JSupplierCycleDisplay } from './components/JSupplierCycleSelect';
14
14
  import { JProductSelectDialog } from './components/JProductSelectDialog';
15
15
  import { DocNoLink, DocDetailHost } from './components/JDocDetail';
16
16
  import { JRelatedDocs } from './components/JRelatedDocs';
@@ -19,9 +19,11 @@ declare const _default: {
19
19
  install: (app: App) => void;
20
20
  };
21
21
  export default _default;
22
- export { JButton, JUploadImg, JIconRender, JSearchHeader, JListSearchHeader, JImportExcel, JSidebar, JSideMenuItem, JAdminLayout, JProductDetailDialog, JSkuLink, ProductDetailHost, JSearchInputDialog, JRemoteSelect, JSupplierCycleSelect, JProductSelectDialog, DocNoLink, DocDetailHost, JRelatedDocs, };
22
+ export { JButton, JUploadImg, JIconRender, JSearchHeader, JListSearchHeader, JImportExcel, JSidebar, JSideMenuItem, JAdminLayout, JProductDetailDialog, JSkuLink, ProductDetailHost, JSearchInputDialog, JRemoteSelect, JSupplierCycleSelect, JSupplierCycleDisplay, JProductSelectDialog, DocNoLink, DocDetailHost, JRelatedDocs, };
23
+ export { provideRequest, getRequest, setRequest, useInjectedRequest, J_REQUEST_KEY, } from './request';
24
+ export type { JRequestFn } from './request';
23
25
  export { useProductDetailDialog, useProductDetailStore, provideProductRequest, resolveProductRequest, useInjectedProductRequest, J_PRODUCT_REQUEST_KEY, } from './components/JProductDetail';
24
- export { createDocDetail, registerDocDetail, getDocDetailAdapters, getDocDetailViewOptions, getDocDetailEntry, getDocDetailRegistry, isDocDetailInitialized, useDocDetailStore, wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, AbnormalOrderDetailView, PaymentRequestDetailView, ReturnOrderDetailView, CostExpenseDetailView, ReceiptVoucherDetailView, PurchaseOrderDetailView, PurchasePlanDetailView, PurchaseContractDetailView, DeliveryDocDetailView, StockTakeOrderDetailView, PackingTaskDetailView, TransportOrderDetailView, } from './components/JDocDetail';
26
+ export { provideDocRequest, setDocRequest, getDocRequest, createDocDetail, registerDocDetail, getDocDetailAdapters, getDocDetailViewOptions, getDocDetailEntry, getDocDetailRegistry, isDocDetailInitialized, useDocDetailStore, wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, AbnormalOrderDetailView, PaymentRequestDetailView, ReturnOrderDetailView, CostExpenseDetailView, ReceiptVoucherDetailView, PurchaseOrderDetailView, PurchasePlanDetailView, PurchaseContractDetailView, DeliveryDocDetailView, StockTakeOrderDetailView, PackingTaskDetailView, TransportOrderDetailView, } from './components/JDocDetail';
25
27
  export { createRelatedDocs, registerRelatedDocs, getRelatedListAdapter, getRelatedTableComponent, getRelatedDocsTableComponents, isRelatedDocsInitialized, RelatedDocSubTabs, RelatedDocNoCopy, RelatedDocPanel, RelatedReceiptOrderTable, RelatedQcOrderTable, RelatedInboundOrderTable, RelatedPutawayOrderTable, RelatedPurchaseOrderTable, RelatedPurchasePlanTable, RelatedDeliveryDocTable, RelatedProcessingOrderTable, RelatedReturnOrderTable, RelatedAbnormalOrderTable, RelatedPaymentRequestTable, RelatedReceiptVoucherTable, RelatedDeclarationTable, RelatedShipmentOrderTable, flattenOrderItems, sumOrderItemField, useRelatedCollapseExpand, parseListResponse, parseListTotal, } from './components/JRelatedDocs';
26
28
  export { toSnakeCase, toCamelCase, pick, omit, deepClone, filterEmpty, flatten, unflatten, toTableColumns, checkBtnPermission, provideBtnPermission, useInjectedBtnPermission, useInjectedBtnPermissions, J_BTN_PERMISSION_KEY, J_BTN_PERMISSIONS_KEY, isAllStatusTab, resolveListStatusParam, toTabName, getAllTabName, syncActiveTabIfAll, buildStatusCountLookup, buildFallbackStatusTabs, unwrapStatusCountList, mapStatusCountToTabs, exportStyledExcel, } from './utils';
27
29
  export { useBtnPermissionGate } from './composables/useBtnPermissionGate';
@@ -39,7 +41,7 @@ export type { AdminLayoutMenuItem, JAdminLayoutProps } from './components/JAdmin
39
41
  export type { JProductDetailDialogProps, JSkuLinkProps, JProductRequestFn, JProductRequestConfig, } from './components/JProductDetail';
40
42
  export type { JSearchInputDialogProps, SearchInputOption, SearchInputModel, } from './components/JSearchInputDialog';
41
43
  export type { JRemoteSelectProps, RemoteSelectFetchApi, RemoteSelectModelValue, } from './components/JRemoteSelect';
42
- export type { JSupplierCycleSelectProps, JSupplierCycleSelectValue, JSupplierCycleItem, JSupplierLifeCycle, JSupplierRelatedItem, JSupplierTitleHistoryItem, } from './components/JSupplierCycleSelect';
44
+ export type { JSupplierCycleSelectProps, JSupplierCycleSelectValue, JSupplierCycleDisplayProps, JSupplierCycleItem, JSupplierLifeCycle, JSupplierRelatedItem, JSupplierTitleHistoryItem, } from './components/JSupplierCycleSelect';
43
45
  export type { JProductSelectDialogProps, JProductSelectFetchApi, JProductSelectListResult, } from './components/JProductSelectDialog';
44
- export type { DocDetailType, DocDetailAdapters, DocDetailRegistryItem, DocDetailComponents, CreateDocDetailOptions, DocDetailViewOptions, PurchaseOrderTabName, } from './components/JDocDetail';
46
+ export type { DocDetailType, DocDetailAdapters, DocDetailRegistryItem, DocDetailComponents, CreateDocDetailOptions, DocDetailViewOptions, PurchaseOrderTabName, JDocRequestFn, } from './components/JDocDetail';
45
47
  export type { RelatedListAdapter, RelatedDocTypeItem, CreateRelatedDocsOptions, RelatedDocsContainerProps, } from './components/JRelatedDocs';