@kengic/vue 0.9.4 → 0.9.6-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -109,6 +109,8 @@ export declare class VarButton {
109
109
  show_modal_flg?: number | null;
110
110
  /** 是否显示成功消息提示. */
111
111
  show_success_message_flg?: number | null;
112
+ /** SQL. */
113
+ sql?: string | null;
112
114
  /** 显示顺序(SortSequence). */
113
115
  srtseq?: number | null;
114
116
  /** 按钮类型(Type). */
@@ -389,8 +391,6 @@ export declare class VarProfileDetail {
389
391
  dft_dyn_op?: string | null;
390
392
  /** 默认的值(DefaultValue). */
391
393
  dft_val?: string | null;
392
- /** 是否启用高级查询(DynamicQueryFlag). */
393
- dyn_flg?: number | null;
394
394
  /** 是否启用(EnableFlag). */
395
395
  ena_flg?: number | null;
396
396
  /** 界面标识(FormID). */
@@ -407,6 +407,8 @@ export declare class VarProfileDetail {
407
407
  rqr_flg?: number | null;
408
408
  /** 显示顺序(SortSequence). */
409
409
  srtseq?: number | null;
410
+ /** 表的别名. */
411
+ table_alias?: string | null;
410
412
  /** 变量名称(VariableName). */
411
413
  var_nam?: string | null;
412
414
  /** 是否可见(VisibleFlag). */
@@ -54,6 +54,7 @@ export interface IKgButtonState {
54
54
  export declare type IKgButtonStoreDefinition = StoreDefinition<'KgButton', IKgButtonState, {
55
55
  getClickListeners(): (formID?: string | null) => Array<IKgButtonClickCb> | null;
56
56
  }, {
57
+ dispose(formID: string | null | undefined): void;
57
58
  /**
58
59
  * 注册事件监听.
59
60
  * @param formID 界面标识.
@@ -1,10 +1,15 @@
1
1
  import { Rule } from 'ant-design-vue/es/form';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { IKgFormItemProps } from './index.vm';
4
- export declare function _useRules(props: IKgFormItemProps): {
4
+ export declare type IUseRules = {
5
+ /** 表单验证规则. */
5
6
  rules: ComputedRef<Rule[]>;
6
7
  };
7
- export declare function useKgFormItem<T1 = Record<string, any>>(props?: IKgFormItemProps): {
8
+ export declare function _useRules(props: IKgFormItemProps): IUseRules;
9
+ export declare type IUseKgFormItem<T = Record<string, any>> = {
10
+ /** 控件类型. */
8
11
  controlType: ComputedRef<string | null | undefined>;
9
- controlProperties: ComputedRef<T1>;
12
+ /** 控件配置参数. */
13
+ controlProperties: ComputedRef<T>;
10
14
  };
15
+ export declare function useKgFormItem<T = Record<string, any>>(props?: IKgFormItemProps): IUseKgFormItem<T>;
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<{
13
13
  default: undefined;
14
14
  };
15
15
  kgSpan: import("vue").PropType<number>;
16
- /** 获取下拉列表数据. */
17
16
  kgPlaceholder: import("vue").PropType<string>;
18
17
  kgShowLabel: {
19
18
  type: import("vue").PropType<boolean>;
@@ -53,7 +52,6 @@ declare const _default: import("vue").DefineComponent<{
53
52
  default: undefined;
54
53
  };
55
54
  kgSpan: import("vue").PropType<number>;
56
- /** 获取下拉列表数据. */
57
55
  kgPlaceholder: import("vue").PropType<string>;
58
56
  kgShowLabel: {
59
57
  type: import("vue").PropType<boolean>;
@@ -15,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{
15
15
  kgSpan: import("vue").PropType<number>;
16
16
  kgPlaceholder: import("vue").PropType<string>;
17
17
  kgShowLabel: {
18
+ /** 获取下拉列表数据. */
18
19
  type: import("vue").PropType<boolean>;
19
20
  default: boolean;
20
21
  };
@@ -54,6 +55,7 @@ declare const _default: import("vue").DefineComponent<{
54
55
  kgSpan: import("vue").PropType<number>;
55
56
  kgPlaceholder: import("vue").PropType<string>;
56
57
  kgShowLabel: {
58
+ /** 获取下拉列表数据. */
57
59
  type: import("vue").PropType<boolean>;
58
60
  default: boolean;
59
61
  };
@@ -1,6 +1,7 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
2
  import { VarPossibility } from '../../../apis/WMS/models';
3
- export declare type IUseServices = {
3
+ export declare type IUseKgFormItemSelect = {
4
+ /** VarPossibility 配置. */
4
5
  varPossibility: ComputedRef<VarPossibility | null>;
5
6
  /** 作为数据的列. */
6
7
  val_clm: ComputedRef<string>;
@@ -16,6 +17,6 @@ export declare type IUseServices = {
16
17
  /**
17
18
  * 获取列表数据.
18
19
  */
19
- readDatas(): Promise<void>;
20
+ retrieveDatas(): Promise<void>;
20
21
  };
21
- export declare function useKgFormItemSelect(): IUseServices;
22
+ export declare function useKgFormItemSelect(): IUseKgFormItemSelect;
@@ -32,7 +32,8 @@ export declare function _useCommon(): {
32
32
  maxHeight: import("vue").ComputedRef<number>;
33
33
  minHeight: import("vue").ComputedRef<1 | 42>;
34
34
  };
35
- export declare function _useFormModel(formRef: Ref<FormInstance | null>, kgResizableProps: Ref<IKgResizableProps>): {
35
+ export declare type IUseFormModel = {
36
36
  /** 设置表单的初始值. */
37
37
  initFormModel(): void;
38
38
  };
39
+ export declare function _useFormModel(formRef: Ref<FormInstance | null>, kgResizableProps: Ref<IKgResizableProps>): IUseFormModel;
@@ -9,6 +9,8 @@ export declare type IUseKgSearch = {
9
9
  isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
10
10
  /** 表单数据对象. */
11
11
  model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
12
+ /** 高级查询的操作符表单数据对象. */
13
+ operatorModel: ComputedRef<ReturnType<IKgSearchStore['getOperatorModel']>>;
12
14
  /**
13
15
  * 执行查询.
14
16
  * @param resetPageIndex 是否从第一页开始查询.
@@ -28,6 +28,8 @@ export interface IKgSearchState {
28
28
  isReadyMap: Map<string, boolean>;
29
29
  /** 表单数据对象. */
30
30
  modelMap: Map<string, Record<string, any>>;
31
+ /** 高级查询的操作符表单数据对象. */
32
+ operatorModelMap: Map<string, Record<string, string>>;
31
33
  /** 事件监听函数列表: search. */
32
34
  onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
33
35
  /** 事件监听函数列表: reset. */
@@ -43,6 +45,7 @@ export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSe
43
45
  /** 是否就绪. */
44
46
  getIsReady(): (formID?: string | null) => boolean;
45
47
  getModel(): (formID?: string | null) => Record<string, any> | null;
48
+ getOperatorModel(): (formID?: string | null) => Record<string, string> | null;
46
49
  getSearchFn(): (formID?: string | null) => IKgSearchSearchFn | null;
47
50
  getResetFn(): (formID?: string | null) => IKgSearchResetFn | null;
48
51
  }, {
@@ -63,12 +66,19 @@ export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSe
63
66
  */
64
67
  setIsReady(formID?: string | null, ready?: boolean): void;
65
68
  setModel(formID: string, model: Record<string, any>): void;
69
+ setOperatorModel(formID: string, model: Record<string, string>): void;
66
70
  /**
67
71
  * 修改部分查询字段的值.
68
72
  * @param formID 界面标识.
69
- * @param model 要修改的查询字段和值.
73
+ * @param model 要修改的查询字段.
70
74
  */
71
75
  patchModel(formID: string, model: Record<string, any>): Promise<void>;
76
+ /**
77
+ * 修改部分查询字段的高级查询操作符.
78
+ * @param formID 界面标识.
79
+ * @param model 要修改的查询字段.
80
+ */
81
+ patchOperatorModel(formID: string, model: Record<string, string>): Promise<void>;
72
82
  setSearchFn(formID?: string | null, fn?: IKgSearchSearchFn | null): void;
73
83
  setResetFn(formID?: string | null, fn?: IKgSearchResetFn | null): void;
74
84
  }>;
@@ -86,6 +86,10 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
86
86
  getIsRetrieving(): (formID: string | null | undefined) => boolean | null;
87
87
  getTableWidth(): (formID: string | null | undefined) => number | null;
88
88
  }, {
89
+ /**
90
+ * 清理数据.
91
+ * @param formID 页面标识.
92
+ */
89
93
  dispose(formID: string | null | undefined): void;
90
94
  addEventListener(formID: string | null | undefined, event: IKgTableEvent, cb: IKgTableCb): void;
91
95
  removeEventListener(formID: string | null | undefined, event: IKgTableEvent, cb?: IKgTableCb): void;
@@ -16,6 +16,28 @@ declare const _default: {
16
16
  title: string;
17
17
  };
18
18
  KgSearchConfigModal: {
19
+ BETWEEN: string;
20
+ 'BETWEEN-desc': string;
21
+ CONTAIN: string;
22
+ 'CONTAIN-desc': string;
23
+ END_WITH: string;
24
+ 'END_WITH-desc': string;
25
+ EQ: string;
26
+ 'EQ-desc': string;
27
+ GT: string;
28
+ 'GT-desc': string;
29
+ GTE: string;
30
+ 'GTE-desc': string;
31
+ IN: string;
32
+ 'IN-desc': string;
33
+ LT: string;
34
+ 'LT-desc': string;
35
+ LTE: string;
36
+ 'LTE-desc': string;
37
+ NE: string;
38
+ 'NE-desc': string;
39
+ START_WITH: string;
40
+ 'START_WITH-desc': string;
19
41
  VarProfileConfig: string;
20
42
  VarProfileMaster: string;
21
43
  canNotUpdateSystemVarProfileMaster: string;
@@ -16,6 +16,28 @@ declare const _default: {
16
16
  title: string;
17
17
  };
18
18
  KgSearchConfigModal: {
19
+ BETWEEN: string;
20
+ 'BETWEEN-desc': string;
21
+ CONTAIN: string;
22
+ 'CONTAIN-desc': string;
23
+ END_WITH: string;
24
+ 'END_WITH-desc': string;
25
+ EQ: string;
26
+ 'EQ-desc': string;
27
+ GT: string;
28
+ 'GT-desc': string;
29
+ GTE: string;
30
+ 'GTE-desc': string;
31
+ IN: string;
32
+ 'IN-desc': string;
33
+ LT: string;
34
+ 'LT-desc': string;
35
+ LTE: string;
36
+ 'LTE-desc': string;
37
+ NE: string;
38
+ 'NE-desc': string;
39
+ START_WITH: string;
40
+ 'START_WITH-desc': string;
19
41
  VarProfileConfig: string;
20
42
  VarProfileMaster: string;
21
43
  canNotUpdateSystemVarProfileMaster: string;
@@ -60,8 +60,6 @@ export declare const enum KG_FORM_ITEM_TYPE {
60
60
  DATE_WEEK = "DATE_WEEK",
61
61
  DATE_MONTH = "DATE_MONTH",
62
62
  DATE_YEAR = "DATE_YEAR",
63
- /** 单位. */
64
- UOM = "UOM",
65
63
  /** 文件上传按钮. */
66
64
  BUTTON_UPLOAD = "BUTTON_UPLOAD"
67
65
  }
@@ -196,3 +194,28 @@ export declare const enum KG_DESCRIPTION_CODE_NAME {
196
194
  /** 宽度单位. */
197
195
  VAR_WIDTH_UNIT = "var_width_unit"
198
196
  }
197
+ /** 高级查询的操作符. */
198
+ export declare enum KG_DYNAMIC_QUERY_OPERATOR {
199
+ /** 等于. */
200
+ EQ = "eq",
201
+ /** 不等于. */
202
+ NE = "ne",
203
+ /** 大于. */
204
+ GT = "gt",
205
+ /** 小于. */
206
+ LT = "lt",
207
+ /** 大于等于. */
208
+ GTE = "gte",
209
+ /** 小于等于. */
210
+ LTE = "lte",
211
+ /** 以之开始. */
212
+ START_WITH = "start",
213
+ /** 以之结束. */
214
+ END_WITH = "end",
215
+ /** 包含. */
216
+ CONTAIN = "contain",
217
+ /** 属于. */
218
+ IN = "in",
219
+ /** 范围之内. */
220
+ BETWEEN = "between"
221
+ }
@@ -24,9 +24,14 @@ export declare class KgUtil {
24
24
  */
25
25
  static downloadFile(data: string | BlobPart, fileName: string, contentType?: string): void;
26
26
  /**
27
- * 处理请求参数.
28
- * 1. 填充通用参数的值
29
- * a. 仓库: '{WAREHOUSE}'
27
+ * <p>处理请求参数.</p>
28
+ * <ol>
29
+ * <li>填充通用参数的值:
30
+ * <ul>
31
+ * <li>仓库: '{WAREHOUSE}'</li>
32
+ * </ul>
33
+ * </li>
34
+ * </ol>
30
35
  * @param params 请求参数.
31
36
  * @param formID 界面标识.
32
37
  * @param $dayjs dayjs.
@@ -1,4 +1,5 @@
1
1
  import dayjs from 'dayjs';
2
+ import { KG_FORM_ITEM_TYPE } from '../consts';
2
3
  /**
3
4
  * 变量相关工具.
4
5
  */
@@ -11,12 +12,25 @@ export declare class KgVarUtil {
11
12
  static parseCommandParameter(params?: string | null): Record<string, any>;
12
13
  /**
13
14
  * 根据控件类型, 将任意的值(可能非法)转换为合法的值.
14
- * @param formID 界面标识.
15
+ * @param frm_id 界面标识.
15
16
  * @param var_name 变量名称.
16
17
  * @param $dayjs dayjs.
17
18
  * @param value 原始的值.
18
19
  * @param op 操作类型. C: 创建, R: 查询, U: 更新, D: 删除, CP: 复制.
19
20
  * @return 转换后的合法的值.
20
21
  */
21
- static transformValueByControlType(formID: string, var_name: string, $dayjs: typeof dayjs, value: any, op: 'C' | 'R' | 'U' | 'D' | 'CP'): any;
22
+ static transformFormItemValue(frm_id: string, var_name: string, $dayjs: typeof dayjs, value: any, op: 'C' | 'R' | 'U' | 'D' | 'CP'): any;
23
+ /**
24
+ * 根据控件类型, 将任意的高级查询操作符(可能非法)转换为合法的值.
25
+ * @param frm_id 界面标识.
26
+ * @param var_name 变量名称.
27
+ * @param value 原始的高级查询操作符.
28
+ * @return 转换后的合法的值.
29
+ */
30
+ static transformFormItemDynamicQueryOperator(frm_id: string, var_name: string, value: string | null | undefined): string;
31
+ /**
32
+ * 根据控件类型获取高级查询操作符的下拉列表.
33
+ * @param controlType 控件类型.
34
+ */
35
+ static getDynamicQueryOperatorSelectOptions(controlType: KG_FORM_ITEM_TYPE): any;
22
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.9.4",
3
+ "version": "0.9.6-beta.0",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",