bmc-common-resource 1.1.131 → 1.1.133

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 (82) hide show
  1. package/dist/constants/assign-business-type-options.constant.d.ts +11 -0
  2. package/dist/constants/contract-status-options.constant.d.ts +15 -0
  3. package/dist/constants/currency-unit-options.constant.d.ts +15 -0
  4. package/dist/constants/design-type-options.constant.d.ts +15 -0
  5. package/dist/constants/dictionary-attribute-options.constant.d.ts +6 -0
  6. package/dist/constants/dictionary-business-scope-options.constant.d.ts +6 -0
  7. package/dist/constants/dictionary-business-work-phase-options.constant.d.ts +6 -0
  8. package/dist/constants/dictionary-customer-label-options.constant.d.ts +6 -0
  9. package/dist/constants/dictionary-customer-source-options.constant.d.ts +5 -0
  10. package/dist/constants/dictionary-identify-options.constant.d.ts +11 -0
  11. package/dist/constants/dictionary-process-stage-options.constant.d.ts +5 -0
  12. package/dist/constants/house-status-options.constant.d.ts +15 -0
  13. package/dist/constants/house-type-options.constant.d.ts +15 -0
  14. package/dist/constants/index.d.ts +25 -0
  15. package/dist/constants/order-status-options.constant.d.ts +15 -0
  16. package/dist/constants/price-flag-options.constant.d.ts +41 -0
  17. package/dist/constants/privilege-status-options.constant.d.ts +15 -0
  18. package/dist/constants/pro_series_type_enum.constant.d.ts +15 -0
  19. package/dist/constants/product-unit-measure.constant.d.ts +489 -0
  20. package/dist/constants/recommendation-type-options.constant.d.ts +15 -0
  21. package/dist/constants/rounding-rule-options.constant.d.ts +15 -0
  22. package/dist/constants/sales-end-app-tag.constant.d.ts +15 -0
  23. package/dist/constants/sign-style-options.constant.d.ts +15 -0
  24. package/dist/constants/solution-status-options.constant.d.ts +15 -0
  25. package/dist/constants/spatial-category-options.constant.d.ts +15 -0
  26. package/dist/constants/supply-mode-options.constant.d.ts +15 -0
  27. package/dist/enums/assign-business-type.enum.d.ts +7 -0
  28. package/dist/enums/assign-type.enum.d.ts +7 -0
  29. package/dist/enums/business-scope.enum.d.ts +13 -0
  30. package/dist/enums/business-work-phase.enum.d.ts +15 -0
  31. package/dist/enums/contract-cancel-type.enum.d.ts +9 -0
  32. package/dist/enums/contract-state.enum.d.ts +33 -0
  33. package/dist/enums/currency-unit.enum.d.ts +15 -0
  34. package/dist/enums/customer-label.enum.d.ts +11 -0
  35. package/dist/enums/customer-source.enum.d.ts +87 -0
  36. package/dist/enums/design-type.enum.d.ts +17 -0
  37. package/dist/enums/dictionary-identify.enum.d.ts +47 -0
  38. package/dist/enums/house-status.enum.d.ts +11 -0
  39. package/dist/enums/house-type.enum.d.ts +13 -0
  40. package/dist/enums/index.d.ts +23 -0
  41. package/dist/enums/mq-consumer-group-enum.d.ts +6 -0
  42. package/dist/enums/mq-receipt-type-enum.d.ts +177 -0
  43. package/dist/enums/order-status.enum.d.ts +11 -0
  44. package/dist/enums/place-order-type.enum.d.ts +9 -0
  45. package/dist/enums/price-flag.enum.d.ts +35 -0
  46. package/dist/enums/privilege-status.enum.d.ts +17 -0
  47. package/dist/enums/pro_series_type.enum.d.ts +9 -0
  48. package/dist/enums/process-stage.enum.d.ts +45 -0
  49. package/dist/enums/product-unit-measure.enum.d.ts +124 -0
  50. package/dist/enums/recommendation-type.enum.d.ts +19 -0
  51. package/dist/enums/rounding-rule.enum.d.ts +19 -0
  52. package/dist/enums/sales_end_app_tag.enum.d.ts +13 -0
  53. package/dist/enums/sign-style.enum.d.ts +9 -0
  54. package/dist/enums/solution-status.enum.d.ts +25 -0
  55. package/dist/enums/solution_price_type.enum.d.ts +11 -0
  56. package/dist/enums/spatial-category.enum.d.ts +33 -0
  57. package/dist/enums/supply-mode.enum.d.ts +19 -0
  58. package/dist/index.d.ts +124 -0
  59. package/dist/index.esm.js +2 -0
  60. package/dist/index.esm.js.map +1 -0
  61. package/dist/index.js +2 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/interfaces/dictionary.interface.d.ts +55 -0
  64. package/dist/interfaces/index.d.ts +4 -0
  65. package/dist/modules/index.d.ts +4 -0
  66. package/dist/modules/solution/categoryFormMap.d.ts +36 -0
  67. package/dist/modules/solution/classifyRoomGroupMap.d.ts +48 -0
  68. package/dist/modules/solution/groupTypes.d.ts +39 -0
  69. package/dist/modules/solution/index.d.ts +41 -0
  70. package/dist/modules/solution/mappings/group-item-mapping.d.ts +24 -0
  71. package/dist/modules/solution/mappings/index.d.ts +5 -0
  72. package/dist/modules/solution/mappings/room-group-mapping.d.ts +31 -0
  73. package/dist/modules/solution/models/QuotationItem.d.ts +266 -0
  74. package/dist/modules/solution/models/index.d.ts +4 -0
  75. package/dist/modules/solution/productCategories.d.ts +26 -0
  76. package/dist/modules/solution/roomTypes.d.ts +18 -0
  77. package/dist/modules/solution/types/index.d.ts +56 -0
  78. package/dist/modules/solution/types.d.ts +10 -0
  79. package/dist/utils/common.util.d.ts +84 -0
  80. package/dist/utils/index.d.ts +5 -0
  81. package/dist/utils/solution.util.d.ts +50 -0
  82. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 房间与分组的映射关系
3
+ */
4
+ /**
5
+ * 房间与分组的映射关系配置
6
+ * key: 房间ID
7
+ * value: 该房间可用的分组ID数组
8
+ */
9
+ export declare const ROOM_GROUP_MAPPING: Record<string, string[]>;
10
+ /**
11
+ * 获取指定房间可用的分组ID列表
12
+ * @param roomId 房间ID
13
+ * @returns 分组ID数组
14
+ */
15
+ export declare function getGroupsByRoomId(roomId: string): string[];
16
+ /**
17
+ * 获取指定房间可用的分组对象列表
18
+ * @param roomId 房间ID
19
+ * @returns 分组对象数组
20
+ */
21
+ export declare function getGroupObjectsByRoomId(roomId: string): {
22
+ groupId: string;
23
+ groupName: string;
24
+ }[];
25
+ /**
26
+ * 检查指定分组是否可用于指定房间
27
+ * @param roomId 房间ID
28
+ * @param groupId 分组ID
29
+ * @returns 是否可用
30
+ */
31
+ export declare function isGroupAvailableForRoom(roomId: string, groupId: string): boolean;
@@ -0,0 +1,266 @@
1
+ import { SkuAttributes } from "../types";
2
+ /**
3
+ * 报价产品项类定义
4
+ * 用于统一前端报价单产品项的数据结构
5
+ */
6
+ export default class QuotationItem {
7
+ /**
8
+ * 报价产品唯一标识,供数据查询定位等操作
9
+ */
10
+ uuid: string;
11
+ /**
12
+ * 产品在价格体系中的唯一标识(关联产品主数据, skuId)
13
+ */
14
+ productId: string;
15
+ /**
16
+ * 产品标准零售价(单价)
17
+ * @remarks 当为组合产品时未组合产品总价
18
+ */
19
+ unitPrice: number;
20
+ /**
21
+ * 产品供货价(单价)
22
+ */
23
+ supplyPrice: number;
24
+ /**
25
+ * 产品价格版本标识
26
+ */
27
+ productPriceId: string;
28
+ /**
29
+ * 产品单元名称(SPU名称)
30
+ * @example "悬浮式电视柜-XWSTDSG34804752600"
31
+ */
32
+ spuName: string;
33
+ /**
34
+ * 拆分单元后的名称
35
+ */
36
+ unitLabel: string;
37
+ /**
38
+ * 标准化产品单元id
39
+ */
40
+ spuId: string;
41
+ /**
42
+ * 品牌id
43
+ */
44
+ brandId: string;
45
+ /**
46
+ * 品牌名称
47
+ */
48
+ brandName: string;
49
+ /**
50
+ * 品类项id
51
+ */
52
+ classifyId: string;
53
+ /**
54
+ * 品类名称
55
+ */
56
+ classifyName: string;
57
+ /**
58
+ * 品类code
59
+ */
60
+ classifyCode: string;
61
+ /**
62
+ * 型号单名称
63
+ */
64
+ model: string;
65
+ /**
66
+ * 供货模式
67
+ */
68
+ supplyMode: string;
69
+ /**
70
+ * 轮廓尺寸
71
+ */
72
+ outlineDemension: string;
73
+ /**
74
+ * 产品分裂标签code
75
+ * @example "DOOR_BOARD"
76
+ */
77
+ categoryCode: string;
78
+ /**
79
+ * 产品分裂标签名称
80
+ */
81
+ categoryName: string;
82
+ /**
83
+ * 父级产品分类标签code
84
+ */
85
+ parentCategoryCode: string;
86
+ /**
87
+ * 父级产品分类标签
88
+ */
89
+ parentCategoryName: string;
90
+ /**
91
+ * 款式id
92
+ */
93
+ styleId: string;
94
+ /**
95
+ * 款式名称(前端展示用)
96
+ * @example "现代简约"
97
+ */
98
+ styleName: string;
99
+ /**
100
+ * 所属房间/空间名称(展示用)
101
+ * @example "主卧"
102
+ */
103
+ roomName: string;
104
+ /**
105
+ * 房间统一编码(业务系统标准编码)
106
+ * @remarks 用于空间分组逻辑,建议使用英文标识
107
+ * @example "master_bedroom"
108
+ */
109
+ roomCode: string;
110
+ /**
111
+ * 空间方案版本
112
+ * @remarks 用于空间下的多套风格报价, 默认按照方案A B C 形式排序
113
+ * @example "方案A"
114
+ */
115
+ schemeName: string;
116
+ /**
117
+ * 所属分组名称
118
+ * @example "定制柜"
119
+ */
120
+ groupName: string;
121
+ /**
122
+ * 分组统一编码
123
+ * @example "wall_construction"
124
+ */
125
+ groupCode: string;
126
+ /**
127
+ * 实际测量宽度(单位:毫米)
128
+ */
129
+ width: number | null;
130
+ /**
131
+ * 实际测量高度(单位:毫米)
132
+ */
133
+ height: number | null;
134
+ /**
135
+ * 实际测量深度(单位:毫米)
136
+ */
137
+ depth: number | null;
138
+ /**
139
+ * 产品原始宽度(出厂标准尺寸)
140
+ * @remarks 用于非标系数计算
141
+ */
142
+ originWidth: number | null;
143
+ /**
144
+ * 产品原始高度(单位:毫米)
145
+ */
146
+ originHeight: number | null;
147
+ /**
148
+ * 产品原始深度(单位:毫米)
149
+ */
150
+ originDepth: number | null;
151
+ /**
152
+ * 产品sku属性集合
153
+ */
154
+ skuAttributes: SkuAttributes[];
155
+ /**
156
+ * 开启方向(基于安装位置的方向描述)
157
+ * @example "左开"、"双向推拉"
158
+ */
159
+ moveDirection: string;
160
+ /**
161
+ * 安装位置描述(相对空间的位置信息)
162
+ * @example "靠南墙居中安装"
163
+ */
164
+ location: string;
165
+ /**
166
+ * 计量单位
167
+ * @example "件"、"米"、"平方米"
168
+ */
169
+ measureUnit: string;
170
+ /**
171
+ * 计量, 由云函数根据计量单位规则计算而来
172
+ * @example 1.2
173
+ */
174
+ measure: number;
175
+ /**
176
+ * 自定义参与计量计量的尺寸类型
177
+ */
178
+ measureCalcParams: string[];
179
+ /**
180
+ * 是否为专属套包产品
181
+ */
182
+ isExclusivePackage: boolean;
183
+ /**
184
+ * 计价标记
185
+ */
186
+ priceFlag: string;
187
+ /**
188
+ * 标准金额 (由规则关联计算得出)
189
+ */
190
+ standardPrice: number;
191
+ /**
192
+ * 实际金额(由规则关联计算得出)
193
+ */
194
+ actualPrice: number;
195
+ /**
196
+ * 含税费金额(由规则关联计算得出)
197
+ */
198
+ taxFeePrice: number;
199
+ /**
200
+ * 数量
201
+ * @min 0
202
+ */
203
+ count: number;
204
+ /**
205
+ * 备注
206
+ * @example "需与吊顶留缝5mm"
207
+ */
208
+ remark: string;
209
+ /**
210
+ * 非标系数(用于尺寸适配价格计算)
211
+ * @default 1
212
+ * @example 1.2 表示加价20%
213
+ */
214
+ productCoefficient: number;
215
+ /**
216
+ * 分项折扣率(基于标准价的折扣)
217
+ * @default 100
218
+ * @min 0
219
+ * @max 100
220
+ * @example 85 表示85折
221
+ */
222
+ itemDiscount: number;
223
+ /**
224
+ * 税率
225
+ * @default 0
226
+ * @min 0
227
+ * @max 100
228
+ */
229
+ taxRate: number;
230
+ /**
231
+ * 税金
232
+ */
233
+ taxAmount: number;
234
+ /**
235
+ * 管理费率
236
+ * @default 0
237
+ * @min 0
238
+ * @max 100
239
+ */
240
+ managementFeeRate: number;
241
+ /**
242
+ * 管理费
243
+ */
244
+ managementFee: number;
245
+ /**
246
+ * 产品预览图集合(最多6张)
247
+ * @remarks 按序存储,首张作为主图
248
+ * @example ["https://cdn.example.com/img1.jpg"]
249
+ */
250
+ picture: string[];
251
+ /**
252
+ * 子项集合(用于产品柜分拆 、墙板拆分)
253
+ * @remarks 形成递归数据
254
+ */
255
+ children: QuotationItem[];
256
+ /**
257
+ * 组合产品子项,仅提供原始产品信息,若清单编辑相关规格无需更新此字段
258
+ * @remarks 例如柜类产品由门板和箱体组成,将保存组合项QuotationItem格式数据
259
+ */
260
+ components: QuotationItem[];
261
+ /**
262
+ * 构造方法
263
+ * @param config 初始化配置(支持部分字段赋值)
264
+ */
265
+ constructor(config?: Partial<QuotationItem>);
266
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 模型类统一导出文件
3
+ */
4
+ export { default as QuotationItem } from './QuotationItem';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 产品分类接口定义
3
+ */
4
+ export interface ProductCategory {
5
+ name: string;
6
+ code: string;
7
+ children?: Record<string, ProductCategory>;
8
+ parentKey?: string;
9
+ }
10
+ declare const PRODUCT_CATEGORIES: Record<string, ProductCategory>;
11
+ /**
12
+ * 根据产品分类键获取产品分类信息
13
+ * @param categoryKey 产品分类键
14
+ * @returns 产品分类信息
15
+ */
16
+ export declare function getProductCategoryByKey(categoryKey: string): ProductCategory | null;
17
+ /**
18
+ * 获取所有产品分类
19
+ * @returns 包含产品分类代码和名称的对象数组
20
+ */
21
+ export declare function getAllProductCategories(): Array<{
22
+ code: string;
23
+ name: string;
24
+ }>;
25
+ export { PRODUCT_CATEGORIES };
26
+ export default PRODUCT_CATEGORIES;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 房间类型定义
3
+ * 定义系统中所有可用的房间类型
4
+ */
5
+ import { RoomType } from './types/index';
6
+ export declare const ROOM_TYPES: Record<string, RoomType>;
7
+ /**
8
+ * 获取排序后的房间类型数组
9
+ * @returns 按order排序的房间类型数组
10
+ */
11
+ export declare function getSortedRoomTypes(): RoomType[];
12
+ /**
13
+ * 根据房间类型键获取房间信息
14
+ * @param roomTypeKey 房间类型键
15
+ * @returns 房间类型信息
16
+ */
17
+ export declare function getRoomTypeByKey(roomTypeKey: string): RoomType | null;
18
+ export default ROOM_TYPES;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * 公共类型定义
3
+ */
4
+ export interface RoomType {
5
+ name: string;
6
+ order: number;
7
+ icon?: string;
8
+ }
9
+ export interface GroupType {
10
+ name: string;
11
+ order: number;
12
+ includeClassify?: string[];
13
+ mainCategory: string[];
14
+ productCategories?: string[];
15
+ classifyType?: string;
16
+ }
17
+ export interface ProductCategory {
18
+ name: string;
19
+ order: number;
20
+ products?: string[];
21
+ }
22
+ export interface ClassifyType {
23
+ name: string;
24
+ icon?: string;
25
+ order: number;
26
+ roomTypes?: string[];
27
+ }
28
+ export interface RoomGroupMapping {
29
+ room: RoomType;
30
+ groups: GroupType[];
31
+ }
32
+ export interface ClassifyRoomGroupMapping {
33
+ name: string;
34
+ icon?: string;
35
+ order: number;
36
+ matchUnit?: string[];
37
+ roomGroups: RoomGroupMapping[];
38
+ }
39
+ export interface ClassifyRoomGroupMapType {
40
+ [key: string]: ClassifyRoomGroupMapping;
41
+ }
42
+ export interface ProductCategoryData {
43
+ categoryName: string;
44
+ categoryCode: string;
45
+ }
46
+ export interface GroupData {
47
+ groupName: string;
48
+ groupCode: string;
49
+ productCategories: ProductCategoryData[];
50
+ classifyType?: string;
51
+ }
52
+ export interface RoomData {
53
+ roomName: string;
54
+ roomCode: string;
55
+ groups: GroupData[];
56
+ }
@@ -0,0 +1,10 @@
1
+ export interface SkuAttributes {
2
+ attributeId: string;
3
+ attributeName: string;
4
+ attributeCode: string;
5
+ attributeValue: string;
6
+ attributeValueId: string;
7
+ categoryCode: string;
8
+ categoryName: string;
9
+ color: any;
10
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * 生成UUID v4
3
+ * 使用随机数生成算法,确保生成的UUID唯一
4
+ * @returns {string} 返回格式为'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'的UUID
5
+ */
6
+ export declare function generateUUID(): string;
7
+ /**
8
+ * 生成随机指定位数字符串
9
+ * @param length 随机字符串长度
10
+ * @returns
11
+ */
12
+ export declare function generateRandomId(length?: number): string;
13
+ /**
14
+ * 格式化数字为千分位显示。
15
+ *
16
+ * 此函数将传入的值格式化为带有千分位分隔符的字符串。如果传入值无效(例如 null、空字符串、非数字字符串),则返回默认值 `"0"`。
17
+ * 保持原有的小数位数,不会因为数值转换而丢失末尾的零。
18
+ *
19
+ * @param {number|string|null|undefined} value - 需要格式化的值,可以是数字、数字字符串、null 或 undefined。如果为无效值,则返回默认值 "0"。
20
+ * @returns {string} 格式化后的千分位数字字符串。如果输入无效,返回 `"0"`。
21
+ *
22
+ * @example
23
+ * formatNumberWithCommas(1234567.89); // 返回 "1,234,567.89"
24
+ * formatNumberWithCommas('123.10'); // 返回 "123.10"
25
+ * formatNumberWithCommas('123.100'); // 返回 "123.100"
26
+ * formatNumberWithCommas(null); // 返回 "0"
27
+ * formatNumberWithCommas(''); // 返回 "0"
28
+ * formatNumberWithCommas('1234567.89'); // 返回 "1,234,567.89"
29
+ * formatNumberWithCommas('abc'); // 返回 "0"
30
+ */
31
+ export declare function formatNumberWithCommas(value: number | string | null | undefined): string;
32
+ /**
33
+ * 从选项列表中查找匹配特定值的选项
34
+ *
35
+ * 此函数接受一个值和一个选项列表,返回列表中与该值匹配的选项对象。
36
+ * 支持标准格式的选项列表:[{name: string, value: any}, ...]
37
+ *
38
+ * @param {any} value - 要查找的值
39
+ * @param {Array<{name: string, value: any}>} options - 选项列表,每个选项必须包含name和value属性
40
+ * @param {boolean | string} [strictOrField=false] - 是否使用严格相等(===)进行比较,默认为false;或者指定要匹配的字段名
41
+ * @param {string} [valueField='value'] - 要匹配的字段名,默认为'value'
42
+ * @returns {{name: string, value: any} | undefined} 找到的选项对象,如果未找到则返回undefined
43
+ *
44
+ * @example
45
+ * // 基本用法
46
+ * const options = [
47
+ * { name: '选项1', value: 'value1' },
48
+ * { name: '选项2', value: 'value2' }
49
+ * ];
50
+ * findOptionByValue('value1', options); // 返回 { name: '选项1', value: 'value1' }
51
+ *
52
+ * // 使用严格匹配
53
+ * findOptionByValue(1, options, true); // 使用严格匹配(===)
54
+ *
55
+ * // 匹配自定义字段
56
+ * const users = [
57
+ * { name: '张三', id: 1001, role: 'admin' },
58
+ * { name: '李四', id: 1002, role: 'user' }
59
+ * ];
60
+ * findOptionByValue('admin', users, 'role'); // 返回 { name: '张三', id: 1001, role: 'admin' }
61
+ *
62
+ * // 同时指定严格匹配和自定义字段
63
+ * findOptionByValue(1001, users, true, 'id'); // 返回 { name: '张三', id: 1001, role: 'admin' }
64
+ */
65
+ export declare function findOptionByValue<T = any>(value: any, options: Array<Record<string, any>>, valueField?: string, strictOrField?: boolean | string): Record<string, any> | undefined;
66
+ /**
67
+ * 获取文件扩展名
68
+ * @param filename 文件名
69
+ * @returns 文件扩展名
70
+ */
71
+ export declare function getFileExtension(filename: string): string;
72
+ /**
73
+ * 格式化中国大陆手机号为 138 1234 5678 形式
74
+ * @param {string} phone 原始手机号
75
+ * @returns {string|null} 格式化后的手机号,不合法则返回 null
76
+ */
77
+ export declare function formatChineseMobile(phone: string): string | null;
78
+ /**
79
+ * 小数处理函数(四舍五入、格式统一)
80
+ * @param {string|number} value - 要处理的值
81
+ * @param {number} decimals - 保留的小数位数,默认0(取整)
82
+ * @returns {number} 处理后的数字
83
+ */
84
+ export declare function formatDecimal(value: any, decimals?: number): number;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 工具函数的统一导出
3
+ */
4
+ export * from './solution.util';
5
+ export * from './common.util';
@@ -0,0 +1,50 @@
1
+ import QuotationItem from "../modules/solution/models/QuotationItem";
2
+ /**
3
+ * 计算报价产品项标准金额 (计量 * 数量 * 单价 * 非标系数)
4
+ * @param item 报价清单项
5
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
6
+ * @returns 计算后的标准金额
7
+ */
8
+ export declare const calcStandardPrice: (item: QuotationItem, decimalPlaces?: number) => number;
9
+ /**
10
+ * 计算报价产品项实际金额
11
+ * 实际金额 = 标准金额 * 分项折扣(百分比形式,100表示100%)
12
+ * 标配或赠品价格标识的产品不计算金额(返回0)
13
+ * 特殊处理:墙板类(WALLBOARD)且有子项时,实际金额为所有子项实际金额之和
14
+ *
15
+ * @param item 报价清单项
16
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
17
+ * @returns 计算后的实际金额
18
+ */
19
+ export declare const calcActualPrice: (item: QuotationItem, decimalPlaces?: number) => number;
20
+ /**
21
+ * 计算报价产品项单价
22
+ * 区分处理已拆分
23
+ * @param item 报价清单项
24
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
25
+ * @returns 计算后的产品单价
26
+ */
27
+ export declare const calcItemUnitPrice: (item: QuotationItem, decimalPlaces?: number) => number;
28
+ /**
29
+ * 计算报价产品项指定税率税金
30
+ * @param item 报价产品项
31
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
32
+ * @returns 计算后的税金
33
+ */
34
+ export declare const calcTaxAmount: (item: QuotationItem, decimalPlaces?: number) => number;
35
+ /**
36
+ * 计算报价产品项指定管理费率管理费金额
37
+ * @param item 报价产品项
38
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
39
+ * @returns 计算后的管理费金额
40
+ */
41
+ export declare const managementFeeAmount: (item: QuotationItem, decimalPlaces?: number) => number;
42
+ /**
43
+ * 计算报价产品项含税费金额
44
+ * @param item 报价产品项
45
+ * @param enableTaxRate 是否启用税率计算
46
+ * @param enableManagementFeeRate 是否启用管理费率
47
+ * @param decimalPlaces 小数保留位数(可选),如果传入则按四舍五入保留指定位数小数
48
+ * @returns 计算后的含税费金额
49
+ */
50
+ export declare const calcTaxFeePrice: (item: QuotationItem, enableTaxRate: boolean, enableManagementFeeRate: boolean, decimalPlaces?: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmc-common-resource",
3
- "version": "1.1.131",
3
+ "version": "1.1.133",
4
4
  "description": "通用枚举、常量和资源的npm包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",