gm-printer 10.42.3-beta.1 → 10.42.3
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/build/demo.js +9 -9
- package/locales/en.json +0 -3
- package/locales/th.json +0 -3
- package/locales/zh-HK.json +0 -3
- package/package.json +1 -1
- package/src/common/common_context_menu.js +4 -6
- package/src/common/component.js +8 -64
- package/src/common/editor_edit_field.js +1 -6
- package/src/common/editor_store.js +32 -34
- package/src/common/hoc_with_store.js +0 -9
- package/src/common/style.lesss +0 -43
- package/src/editor/store.js +0 -13
- package/src/finance_voucher/components/table_subtotal_tr.js +18 -12
- package/src/index.js +0 -2
- package/src/printer/block.js +4 -154
- package/src/printer/compute_pages.js +1 -2
- package/src/printer/multi_column.js +0 -1
- package/src/printer/page_summary.js +1 -3
- package/src/printer/printer.js +1 -8
- package/src/printer/store.js +38 -129
- package/src/printer/table_diy_overallOrder_tr.js +15 -8
- package/src/printer/table_diy_summary_tr.js +35 -18
- package/src/printer/table_subtotal_tr.js +16 -13
- package/src/util.js +1 -20
- package/yarn-error.log +152 -372
package/src/util.js
CHANGED
|
@@ -120,23 +120,7 @@ function getOverallOrderTrHeight(overallOrder) {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// eslint-disable-next-line
|
|
123
|
-
// 成本权限脱敏值:后端对无成本权限用户的金额字段返回 '***'(商品维度混合脱敏)
|
|
124
|
-
const MASKED_VALUE = '***'
|
|
125
|
-
const isMaskedValue = v => v === MASKED_VALUE
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* 脱敏感知求和:任一值为 '***' 则整体返回 '***'(口径:合计不能暴露脱敏行的贡献)
|
|
129
|
-
* 非数字值按 0 容错,同时兼容原始数值字段与渲染后字符串
|
|
130
|
-
* @param {Array} values 参与求和的值
|
|
131
|
-
*/
|
|
132
|
-
const maskedSum = values => {
|
|
133
|
-
if (values.some(isMaskedValue)) return MASKED_VALUE
|
|
134
|
-
return values.reduce((a, b) => a.plus(+b || 0), Big(0)).toFixed(2)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
123
|
const coverDigit2Uppercase = n => {
|
|
138
|
-
// 脱敏值直接透传:否则 Math.abs('***') 得 NaN,Big(NaN) 会抛异常
|
|
139
|
-
if (isMaskedValue(n)) return MASKED_VALUE
|
|
140
124
|
if (_.isNil(n) || _.isNaN(n)) {
|
|
141
125
|
return '-'
|
|
142
126
|
}
|
|
@@ -400,8 +384,5 @@ export {
|
|
|
400
384
|
caclSingleDetailsPageHeight,
|
|
401
385
|
getArrayMid,
|
|
402
386
|
getColSpanLength,
|
|
403
|
-
getOverallOrderTrHeight
|
|
404
|
-
MASKED_VALUE,
|
|
405
|
-
isMaskedValue,
|
|
406
|
-
maskedSum
|
|
387
|
+
getOverallOrderTrHeight
|
|
407
388
|
}
|