@kengic/vue 0.5.16 → 0.5.18

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.
@@ -149,6 +149,8 @@ export declare class VarDTO {
149
149
  varSubmitConfig?: VarSubmitConfig | null;
150
150
  /** 提交字段. */
151
151
  varSubmitFields?: Array<VarSubmitField> | null;
152
+ /** 变量表单输入验证. */
153
+ varVariableInputs?: Array<VarVariableInput> | null;
152
154
  constructor(obj?: VarDTO);
153
155
  }
154
156
  /** 表格配置. */
@@ -509,6 +511,32 @@ export declare class VarSubmitField {
509
511
  var_nam?: string | null;
510
512
  constructor(obj?: VarSubmitField);
511
513
  }
514
+ /** 变量表单输入验证. */
515
+ export declare class VarVariableInput {
516
+ /** 定制级别(CustomLevel). */
517
+ cust_lvl?: number | null;
518
+ /** 数据类型(DataType). */
519
+ data_type?: string | null;
520
+ /** 界面标识(FormID). */
521
+ frm_id?: string | null;
522
+ /** 分组(GroupName). */
523
+ grp_nam?: string | null;
524
+ /** 主键. */
525
+ id?: string | null;
526
+ /** 语言(LocaleID). */
527
+ locale_id?: string | null;
528
+ /** 最大值. */
529
+ max?: number | null;
530
+ /** 是否包含最大值. */
531
+ max_include_flg?: number | null;
532
+ /** 最小值. */
533
+ min?: number | null;
534
+ /** 是否包含最小值. */
535
+ min_include_flg?: number | null;
536
+ /** 变量名称(VariableName). */
537
+ var_nam?: string | null;
538
+ constructor(obj?: VarVariableInput);
539
+ }
512
540
  /** 仓库(Warehouse). */
513
541
  export declare class WhVO {
514
542
  /** 是否活动 */
@@ -136,7 +136,10 @@ export declare const getProps: () => {
136
136
  };
137
137
  };
138
138
  export declare type IKgFormProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
139
- /** 依赖注入 model 参数. */
140
- export declare const DI_MODEL: InjectionKey<ComputedRef<Record<string, any>>>;
139
+ /**
140
+ * 依赖注入表单数据对象.
141
+ * 在表单组件(KgForm)的任何下级组件中, 都可以通过注入获取表单数据对象.
142
+ */
143
+ export declare const DI_FORM_MODEL: InjectionKey<ComputedRef<Record<string, any>>>;
141
144
  /** 依赖注入 formRef. */
142
145
  export declare const DI_FORM_REF: InjectionKey<Ref<FormInstance | null>>;
@@ -0,0 +1,7 @@
1
+ import { Rule } from 'ant-design-vue/es/form';
2
+ import { ComputedRef } from 'vue';
3
+ import { IKgFormItemProps } from './index.vm';
4
+ export declare type IUseRules = {
5
+ rules: ComputedRef<Rule[]>;
6
+ };
7
+ export declare function _useRules(props: IKgFormItemProps): IUseRules;
@@ -1,5 +1,5 @@
1
1
  import { IKgFormItemProps } from '../index.vm';
2
- export declare type IUseService = {
2
+ export declare type IUseServices = {
3
3
  transformDatas(datas?: Array<Record<string, any>> | null): Array<Record<string, any>>;
4
4
  };
5
- export declare function _useService(props: IKgFormItemProps): IUseService;
5
+ export declare function _useServices(props: IKgFormItemProps): IUseServices;
@@ -1,9 +1,12 @@
1
+ import { Ref } from 'vue';
1
2
  import { IRemoveEventListenerHandler } from '../../consts';
2
3
  import { IKgSubmitBeforeOkCb, IKgSubmitCloseCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
3
4
  export declare type IUseKgSubmit = {
4
5
  formID: string;
5
6
  /** 状态数据. */
6
7
  store: IKgSubmitStore;
8
+ /** 表单数据对象. */
9
+ model: Ref<Record<string, any>>;
7
10
  /** 监听事件: 打开抽屉. */
8
11
  onOpen(cb: IKgSubmitOpenCb): IRemoveEventListenerHandler;
9
12
  /** 监听事件: 关闭抽屉. 点击取消或者点击确定并且成功之后, 都会触发 */
@@ -37,10 +37,13 @@ export interface IKgSubmitState {
37
37
  beforeOkListenersMap: Map<string, Array<IKgSubmitBeforeOkCb>>;
38
38
  okListenersMap: Map<string, Array<IKgSubmitOkCb>>;
39
39
  isLoadingMap: Map<string, boolean>;
40
+ /** 表单数据对象. */
41
+ modelMap: Map<string, Record<string, any>>;
40
42
  }
41
43
  export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSubmitState, {
42
44
  /** 是否处于加载状态. */
43
45
  isLoading(): (formID?: string | null) => boolean;
46
+ getModel(): (formID?: string | null) => Record<string, any> | null;
44
47
  }, {
45
48
  dispose(formID?: string | null): void;
46
49
  addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
@@ -53,6 +56,7 @@ export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSu
53
56
  */
54
57
  emit(formID: string, event: IKgSubmitEvent, args?: any | null): Promise<boolean>;
55
58
  setIsLoading(formID: string, value: boolean): void;
59
+ setModel(formID: string, model: Record<string, any>): void;
56
60
  }>;
57
61
  export declare type IKgSubmitStore = ReturnType<IKgSubmitStoreDefinition>;
58
62
  export declare const useKgSubmitStore: () => IKgSubmitStoreDefinition;
@@ -0,0 +1,11 @@
1
+ import { VarGridDetail } from '../../../../apis/WMS/models';
2
+ export declare type IUseServices = {
3
+ /**
4
+ * 用于表格的列下拉列表, 根据关键字搜索某列, 如果匹配就显示该列, 否则隐藏该列.
5
+ * 匹配时忽略大小写.
6
+ * @param varGridDetail
7
+ * @param key 关键字.
8
+ */
9
+ filterVarGridDetailByKey: (varGridDetail: VarGridDetail, key?: string | null) => boolean;
10
+ };
11
+ export declare function _useServices(): IUseServices;
@@ -1,5 +1,5 @@
1
1
  import { type StoreDefinition } from 'pinia';
2
- import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
2
+ import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField, VarVariableInput } from '../../apis/WMS/models';
3
3
  export declare type IFormID = {
4
4
  formID: string;
5
5
  /**
@@ -40,13 +40,14 @@ export interface IKgVarState {
40
40
  isDeletingRequestingMap: Map<string, boolean>;
41
41
  /** 其他按钮: 正在调用接口. */
42
42
  isOtherRequestingMap: Map<string, boolean>;
43
- varCatalogsMap: Map<string, Array<VarCatalog>>;
44
- varLookupsMap: Map<string, Array<VarLookup>>;
45
- varPossibilitiesMap: Map<string, Array<VarPossibility>>;
46
- varConfigsMap: Map<string, Array<VarConfig>>;
47
- varButtonsMap: Map<string, Array<VarButton>>;
43
+ varCatalogMap: Map<string, Array<VarCatalog>>;
44
+ varLookupMap: Map<string, Array<VarLookup>>;
45
+ varPossibilityMap: Map<string, Array<VarPossibility>>;
46
+ varConfigMap: Map<string, Array<VarConfig>>;
47
+ varVariableInputMap: Map<string, Array<VarVariableInput>>;
48
+ varButtonMap: Map<string, Array<VarButton>>;
48
49
  varSubmitConfigMap: Map<string, VarSubmitConfig | null>;
49
- varSubmitFieldsMap: Map<string, Array<VarSubmitField>>;
50
+ varSubmitFieldMap: Map<string, Array<VarSubmitField>>;
50
51
  varProfileConfigMap: Map<string, VarProfileConfig | null>;
51
52
  varProfileMap: Map<string, {
52
53
  varProfile: VarProfileDTO | null;
@@ -81,6 +82,7 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
81
82
  getVarLookup(): (formID?: string | null, var_nam?: string | null) => VarLookup | null;
82
83
  getVarPossibility(): (formID?: string | null, var_nam?: string | null) => VarPossibility | null;
83
84
  getVarConfig(): (formID?: string | null, var_nam?: string | null) => VarConfig | null;
85
+ getVarVariableInput(): (formID?: string | null, var_nam?: string | null) => VarVariableInput | null;
84
86
  getVarButtons(): (formID?: string | null) => Array<VarButton> | null;
85
87
  getVarSubmitConfig(): (formID?: string | null) => VarSubmitConfig | null;
86
88
  /** 获取所有提交字段. */
@@ -1,5 +1,9 @@
1
1
  declare const _default: {
2
2
  kg: {
3
+ KgFormItem: {
4
+ mustGT: string;
5
+ mustGTE: string;
6
+ };
3
7
  KgSearch: {
4
8
  title: string;
5
9
  };
@@ -1,5 +1,9 @@
1
1
  declare const _default: {
2
2
  kg: {
3
+ KgFormItem: {
4
+ mustGT: string;
5
+ mustGTE: string;
6
+ };
3
7
  KgSearch: {
4
8
  title: string;
5
9
  };
@@ -107,19 +107,24 @@ export declare const enum KG_BUTTON_DISPLAY_TYPE {
107
107
  SELECT = "SELECT"
108
108
  }
109
109
  /** 表单显示方式. */
110
- export declare const enum KG_SUBMIT_DISPLAY_TYPE {
110
+ export declare const enum KG_VAR_SUBMIT__DISPLAY_TYPE {
111
111
  /** 弹窗. */
112
112
  MODAL = "MODAL",
113
113
  /** 抽屉. */
114
114
  DRAWER = "DRAWER"
115
115
  }
116
116
  /** 表单布局方式. */
117
- export declare const enum KG_SUBMIT_LAYOUT {
117
+ export declare const enum KG_VAR_SUBMIT__LAYOUT {
118
118
  /** 垂直. */
119
119
  VERTICAL = "vertical",
120
120
  /** 水平. */
121
121
  HORIZONTAL = "horizontal"
122
122
  }
123
+ /** 变量表单输入验证: 数据类型. */
124
+ export declare const enum KG_VAR_INPUT__DATA_TYPE {
125
+ /** 数字(整数, 小数). */
126
+ NUMBER = "NUMBER"
127
+ }
123
128
  /** 定制级别. */
124
129
  export declare const enum KG_CUSTOM_LEVEL {
125
130
  /** 系统. */
@@ -11,7 +11,7 @@ export declare function isPathInApp(path: string | undefined | null, app: KG_APP
11
11
  */
12
12
  export declare function getAppByPath(path: string): KG_APP;
13
13
  /**
14
- * 获取模块首页地址.
14
+ * 根据模块获取首页地址.
15
15
  * @param app 模块.
16
16
  */
17
17
  export declare function getAppIndexPath(app: KG_APP): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",