@gct-paas/word 0.2.36-beta.1 → 0.2.36-beta.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.
@@ -37,12 +37,15 @@ export declare class BomEntryValidator {
37
37
  /** 物料和code的映射 */
38
38
  productCodes: Record<string, string>;
39
39
  /** 历史数据中已经消耗的 */
40
- hasConsumed: number;
40
+ private readonly historyQty;
41
+ get hasConsumed(): number;
42
+ private get remainingQty();
41
43
  /** 剩于可消耗数量 */
42
44
  get remainingNum(): number;
43
45
  /** 批次/生产数量(用时读取,避免构造快照过期) */
44
46
  get materialNoNum(): number;
45
47
  /** 需求总量 = 数量倍数 × BOM 单位用量 */
48
+ private get totalQty();
46
49
  get total(): number;
47
50
  constructor(bomEntry: IBomEntry,
48
51
  /** 是否启用顺序投料 */
@@ -106,9 +109,11 @@ export declare class BomEntryValidator {
106
109
  * @param arr
107
110
  * @return {*}
108
111
  */
109
- calcQtyConsumed(arr: IMaterialConsumeData[], source?: ConsumeDataSource): number;
112
+ calcQtyConsumed(arr: IMaterialConsumeData[], source?: ConsumeDataSource): BigNumber;
110
113
  /** 上下限校验优先使用单位转换后的数量,历史数据未转换时兼容原数量。 */
111
- calcQtyForBounds(arr: IMaterialConsumeData[], source?: ConsumeDataSource): number;
114
+ calcQtyForBounds(arr: IMaterialConsumeData[], source?: ConsumeDataSource): BigNumber;
115
+ private calcTotalForBounds;
116
+ calcRunningQtyConsumed(arr: IMaterialConsumeData[]): number;
112
117
  /**
113
118
  * 计算自定义的数量校验的最大值和最小值
114
119
  * @param data
@@ -14,14 +14,7 @@ declare function __VLS_template(): {
14
14
  default?(_: {}): any;
15
15
  };
16
16
  refs: {
17
- dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
18
- P: {};
19
- B: {};
20
- D: {};
21
- C: {};
22
- M: {};
23
- Defaults: {};
24
- }, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
17
+ dropdownRef: unknown;
25
18
  };
26
19
  rootEl: HTMLDivElement;
27
20
  };
@@ -47,14 +40,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
47
40
  active: boolean;
48
41
  noDropdown: boolean;
49
42
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
50
- dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
51
- P: {};
52
- B: {};
53
- D: {};
54
- C: {};
55
- M: {};
56
- Defaults: {};
57
- }, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
43
+ dropdownRef: unknown;
58
44
  }, HTMLDivElement>;
59
45
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
60
46
  export default _default;
@@ -17,14 +17,7 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
17
17
  $refs: {
18
18
  [x: string]: unknown;
19
19
  } & {
20
- dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
21
- P: {};
22
- B: {};
23
- D: {};
24
- C: {};
25
- M: {};
26
- Defaults: {};
27
- }, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
20
+ dropdownRef: unknown;
28
21
  };
29
22
  $slots: Readonly<{
30
23
  [name: string]: import('vue').Slot<any> | undefined;
@@ -139,14 +132,7 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
139
132
  $refs: {
140
133
  [x: string]: unknown;
141
134
  } & {
142
- dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
143
- P: {};
144
- B: {};
145
- D: {};
146
- C: {};
147
- M: {};
148
- Defaults: {};
149
- }, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
135
+ dropdownRef: unknown;
150
136
  };
151
137
  $slots: Readonly<{
152
138
  [name: string]: import('vue').Slot<any> | undefined;
@@ -105,9 +105,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
105
105
  keyup: (event: KeyboardEvent) => any;
106
106
  pressEnter: (event: KeyboardEvent) => any;
107
107
  }, string, {
108
+ name: string;
108
109
  type: import('../../../../base/input/src/types').InputType;
109
110
  id: string;
110
- name: string;
111
111
  readonly: boolean;
112
112
  disabled: boolean;
113
113
  size: import('../../../../base/input/src/types').InputSize;
@@ -149,9 +149,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
149
149
  $nextTick: typeof nextTick;
150
150
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
151
151
  } & Readonly<{
152
+ name: string;
152
153
  type: import('../../../../base/input/src/types').InputType;
153
154
  id: string;
154
- name: string;
155
155
  readonly: boolean;
156
156
  disabled: boolean;
157
157
  size: import('../../../../base/input/src/types').InputSize;
@@ -184,7 +184,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
184
184
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
185
185
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
186
186
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
187
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
187
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
188
188
  focus: () => void;
189
189
  blur: () => void;
190
190
  select: () => void;
@@ -103,9 +103,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
103
103
  keyup: (event: KeyboardEvent) => any;
104
104
  pressEnter: (event: KeyboardEvent) => any;
105
105
  }, string, {
106
+ name: string;
106
107
  type: import('../../../../base/input/src/types').InputType;
107
108
  id: string;
108
- name: string;
109
109
  readonly: boolean;
110
110
  disabled: boolean;
111
111
  size: import('../../../../base/input/src/types').InputSize;
@@ -147,9 +147,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
147
147
  $nextTick: typeof import('vue').nextTick;
148
148
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
149
149
  } & Readonly<{
150
+ name: string;
150
151
  type: import('../../../../base/input/src/types').InputType;
151
152
  id: string;
152
- name: string;
153
153
  readonly: boolean;
154
154
  disabled: boolean;
155
155
  size: import('../../../../base/input/src/types').InputSize;
@@ -182,7 +182,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
182
182
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
183
183
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
184
184
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
185
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
185
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
186
186
  focus: () => void;
187
187
  blur: () => void;
188
188
  select: () => void;
@@ -105,9 +105,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
105
105
  keyup: (event: KeyboardEvent) => any;
106
106
  pressEnter: (event: KeyboardEvent) => any;
107
107
  }, string, {
108
+ name: string;
108
109
  type: import('../../../../../base/input/src/types').InputType;
109
110
  id: string;
110
- name: string;
111
111
  readonly: boolean;
112
112
  disabled: boolean;
113
113
  size: import('../../../../../base/input/src/types').InputSize;
@@ -149,9 +149,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
149
149
  $nextTick: typeof import('vue').nextTick;
150
150
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
151
151
  } & Readonly<{
152
+ name: string;
152
153
  type: import('../../../../../base/input/src/types').InputType;
153
154
  id: string;
154
- name: string;
155
155
  readonly: boolean;
156
156
  disabled: boolean;
157
157
  size: import('../../../../../base/input/src/types').InputSize;
@@ -184,7 +184,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
184
184
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
185
185
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
186
186
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
187
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
187
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
188
188
  focus: () => void;
189
189
  blur: () => void;
190
190
  select: () => void;
@@ -100,9 +100,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
100
100
  keyup: (event: KeyboardEvent) => any;
101
101
  pressEnter: (event: KeyboardEvent) => any;
102
102
  }, string, {
103
+ name: string;
103
104
  type: import('../../../../../base/input/src/types').InputType;
104
105
  id: string;
105
- name: string;
106
106
  readonly: boolean;
107
107
  disabled: boolean;
108
108
  size: import('../../../../../base/input/src/types').InputSize;
@@ -144,9 +144,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
144
144
  $nextTick: typeof import('vue').nextTick;
145
145
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
146
146
  } & Readonly<{
147
+ name: string;
147
148
  type: import('../../../../../base/input/src/types').InputType;
148
149
  id: string;
149
- name: string;
150
150
  readonly: boolean;
151
151
  disabled: boolean;
152
152
  size: import('../../../../../base/input/src/types').InputSize;
@@ -179,7 +179,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
179
179
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
180
180
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
181
181
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
182
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
182
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
183
183
  focus: () => void;
184
184
  blur: () => void;
185
185
  select: () => void;
@@ -122,9 +122,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
122
122
  keyup: (event: KeyboardEvent) => any;
123
123
  pressEnter: (event: KeyboardEvent) => any;
124
124
  }, string, {
125
+ name: string;
125
126
  type: import('../../../../../base/input/src/types').InputType;
126
127
  id: string;
127
- name: string;
128
128
  readonly: boolean;
129
129
  disabled: boolean;
130
130
  size: import('../../../../../base/input/src/types').InputSize;
@@ -166,9 +166,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
166
166
  $nextTick: typeof nextTick;
167
167
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
168
168
  } & Readonly<{
169
+ name: string;
169
170
  type: import('../../../../../base/input/src/types').InputType;
170
171
  id: string;
171
- name: string;
172
172
  readonly: boolean;
173
173
  disabled: boolean;
174
174
  size: import('../../../../../base/input/src/types').InputSize;
@@ -201,7 +201,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
201
201
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
202
202
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
203
203
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
204
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
204
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
205
205
  focus: () => void;
206
206
  blur: () => void;
207
207
  select: () => void;
@@ -102,9 +102,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
102
102
  keyup: (event: KeyboardEvent) => any;
103
103
  pressEnter: (event: KeyboardEvent) => any;
104
104
  }, string, {
105
+ name: string;
105
106
  type: import('../../../../../base/input/src/types').InputType;
106
107
  id: string;
107
- name: string;
108
108
  readonly: boolean;
109
109
  disabled: boolean;
110
110
  size: import('../../../../../base/input/src/types').InputSize;
@@ -146,9 +146,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
146
146
  $nextTick: typeof import('vue').nextTick;
147
147
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
148
148
  } & Readonly<{
149
+ name: string;
149
150
  type: import('../../../../../base/input/src/types').InputType;
150
151
  id: string;
151
- name: string;
152
152
  readonly: boolean;
153
153
  disabled: boolean;
154
154
  size: import('../../../../../base/input/src/types').InputSize;
@@ -181,7 +181,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
181
181
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
182
182
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
183
183
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
184
- }>, "select" | "blur" | "focus" | "inputRef" | ("type" | "id" | "name" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
184
+ }>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
185
185
  focus: () => void;
186
186
  blur: () => void;
187
187
  select: () => void;
@@ -0,0 +1,6 @@
1
+ /** 注册基础函数执行体,供表单填报和预览时计算公式。 */
2
+ export declare function registerBaseFormulaFuncs(): void;
3
+ /** 保留调用方已有函数,并按各自分组追加基础函数描述。 */
4
+ export declare function appendBaseFormulaFunctions(options: Record<string, any>): {
5
+ functions: any[];
6
+ };
@@ -0,0 +1,9 @@
1
+ import { default as BigNumber } from 'bignumber.js';
2
+ export type Decimal = BigNumber;
3
+ type Numeric = BigNumber.Value;
4
+ export declare function plus(a: Numeric, b: Numeric): Decimal;
5
+ export declare function minus(a: Numeric, b: Numeric): Decimal;
6
+ export declare function multiply(a: Numeric, b: Numeric): Decimal;
7
+ export declare function sum(values: readonly Numeric[], initial?: Numeric): Decimal;
8
+ export declare function compare(a: Numeric, b: Numeric): -1 | 0 | 1 | null;
9
+ export {};