ocpview-pro 0.1.12 → 0.1.14
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/dist/index.js +13 -3
- package/dist/ocpviewplus.min.js +2 -2
- package/package.json +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTable.vue +2 -0
- package/src/components/masterplate/RewriteBillListDetails/BillListPanelTable.vue +7 -2
- package/src/method/const/const.js +2 -0
package/package.json
CHANGED
|
@@ -432,11 +432,13 @@ export default {
|
|
|
432
432
|
const notzero = columnConfig?.notzero;
|
|
433
433
|
// 修复 -0 显示为 -0.00 的问题
|
|
434
434
|
const rawValue = (serverValue === 0) ? 0 : serverValue;
|
|
435
|
-
|
|
435
|
+
const result = this.$Method.formatNumber(
|
|
436
436
|
rawValue,
|
|
437
437
|
format,
|
|
438
438
|
notzero
|
|
439
439
|
);
|
|
440
|
+
if (result === '-0.00' || result === '-0') return '0.00';
|
|
441
|
+
return result;
|
|
440
442
|
}
|
|
441
443
|
// 服务端无合计时从当前页数据计算
|
|
442
444
|
const sumData = this.handleSumField({
|
|
@@ -448,11 +450,14 @@ export default {
|
|
|
448
450
|
);
|
|
449
451
|
const format = columnConfig?.format;
|
|
450
452
|
const notzero = columnConfig?.notzero;
|
|
451
|
-
|
|
453
|
+
const result2 = this.$Method.formatNumber(
|
|
452
454
|
sumData,
|
|
453
455
|
format,
|
|
454
456
|
notzero
|
|
455
457
|
);
|
|
458
|
+
// 修复 -0.00 显示问题
|
|
459
|
+
if (result2 === '-0.00' || result2 === '-0') return '0.00';
|
|
460
|
+
return result2;
|
|
456
461
|
}
|
|
457
462
|
return null;
|
|
458
463
|
}),
|
|
@@ -197,6 +197,8 @@ commom.formatNumber= function (value,style, notzero) {
|
|
|
197
197
|
if (style.startsWith('p')) {
|
|
198
198
|
result = result + '%';
|
|
199
199
|
}
|
|
200
|
+
// 修复 -0.00 显示问题:Number("-0.0001").toFixed(2) = "-0.00"
|
|
201
|
+
if (Number(result) === 0) result = result.replace('-', '');
|
|
200
202
|
return result;
|
|
201
203
|
};
|
|
202
204
|
|