imeik-bizui 2.7.3 → 2.7.5
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/bizui/src/FieldFloorPriceBoard/core/FloorPriceBoard.vue +10 -4
- package/dist/bizui/src/FieldFloorPriceBoard/core/FloorPriceSectionPager.vue +2 -5
- package/dist/bizui/src/FieldFloorPriceBoard/core/normalize.js +4 -2
- package/dist/bizui/src/FieldFloorPriceBoard/core/utils.js +11 -8
- package/dist/imeik-bizui.common.js +136 -117
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +1 -1
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +136 -117
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +3 -3
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -86,21 +86,27 @@
|
|
|
86
86
|
<dl class="fpb-price-grid">
|
|
87
87
|
<div class="fpb-price-item">
|
|
88
88
|
<dt>申请前</dt>
|
|
89
|
-
<dd>{{ formatMoney(row.beforePrice) }}</dd>
|
|
89
|
+
<dd :title="formatMoney(row.beforePrice)">{{ formatMoney(row.beforePrice) }}</dd>
|
|
90
90
|
</div>
|
|
91
91
|
<div class="fpb-price-item">
|
|
92
92
|
<dt>申请后</dt>
|
|
93
|
-
<dd
|
|
93
|
+
<dd
|
|
94
|
+
:class="{ 'is-danger': row.hit, 'is-strong': true }"
|
|
95
|
+
:title="formatMoney(row.afterPrice)"
|
|
96
|
+
>
|
|
94
97
|
{{ formatMoney(row.afterPrice) }}
|
|
95
98
|
</dd>
|
|
96
99
|
</div>
|
|
97
100
|
<div class="fpb-price-item">
|
|
98
101
|
<dt>标准底价</dt>
|
|
99
|
-
<dd>{{ formatMoney(row.standard) }}</dd>
|
|
102
|
+
<dd :title="formatMoney(row.standard)">{{ formatMoney(row.standard) }}</dd>
|
|
100
103
|
</div>
|
|
101
104
|
<div class="fpb-price-item">
|
|
102
105
|
<dt>与标准差额</dt>
|
|
103
|
-
<dd
|
|
106
|
+
<dd
|
|
107
|
+
:class="{ 'is-danger': row.hit, 'is-ok': !row.hit && row.gap > 0 }"
|
|
108
|
+
:title="row.gapLabel || '-'"
|
|
109
|
+
>
|
|
104
110
|
{{ row.gapLabel || '-' }}
|
|
105
111
|
</dd>
|
|
106
112
|
</div>
|
|
@@ -83,14 +83,11 @@ export default {
|
|
|
83
83
|
box-sizing: border-box;
|
|
84
84
|
font-size: 12px;
|
|
85
85
|
color: rgba(0, 0, 0, 0.65);
|
|
86
|
-
border-
|
|
86
|
+
/* 满页时末行 border 会被 el-table 裁掉,靠 pager 顶边承接分隔线(含占位) */
|
|
87
|
+
border-top: 1px solid #eef0f3;
|
|
87
88
|
background: #fff;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
.fpd-pager--placeholder {
|
|
91
|
-
border-top-color: transparent;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
91
|
.fpd-pager--compact {
|
|
95
92
|
gap: 4px 8px;
|
|
96
93
|
padding: 6px 10px;
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
buildResultCopy,
|
|
10
10
|
computePriceGap,
|
|
11
11
|
formatNumber,
|
|
12
|
-
resolvePanelState
|
|
12
|
+
resolvePanelState,
|
|
13
|
+
roundMoney
|
|
13
14
|
} from './utils'
|
|
14
15
|
|
|
15
16
|
const SALE_TYPE_LABEL = {
|
|
@@ -119,7 +120,8 @@ function summaryColumns() {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
function sumBy(rows, prop) {
|
|
122
|
-
|
|
123
|
+
const total = (rows || []).reduce((sum, row) => sum + (Number(row[prop]) || 0), 0)
|
|
124
|
+
return roundMoney(total)
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
/** getProductPriceDetail:saleOrderList / noSaleOrderList / costList */
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
* 底价看板 / 明细弹窗 · 纯展示工具(格式化、默认文案、前端差距推导)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
/** 前端运算结果统一保留两位小数(避免 45.44999999999999) */
|
|
6
|
+
export function roundMoney(value) {
|
|
7
|
+
const n = Number(value)
|
|
8
|
+
if (!Number.isFinite(n)) return n
|
|
9
|
+
return Math.round(n * 100) / 100
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
/**
|
|
6
13
|
* 数值展示:默认按接口原样(不千分位、不截断小数位)。
|
|
7
14
|
* 仅当显式传入 digits 时才按固定小数位输出。
|
|
@@ -61,9 +68,9 @@ export function formatSignedNumber(value, { digits = null, fallback = '-' } = {}
|
|
|
61
68
|
* - gap < 0 → 低于底价 / 禁止;文案「低 N 元/支」
|
|
62
69
|
* - gap > 0 → 通过;文案「高 N 元/支」
|
|
63
70
|
* - gap = 0 → 持平
|
|
64
|
-
*
|
|
71
|
+
* 运算结果保留两位小数
|
|
65
72
|
*/
|
|
66
|
-
export function computePriceGap(afterPrice, standard
|
|
73
|
+
export function computePriceGap(afterPrice, standard) {
|
|
67
74
|
const after = Number(afterPrice)
|
|
68
75
|
const std = Number(standard)
|
|
69
76
|
if (
|
|
@@ -78,13 +85,9 @@ export function computePriceGap(afterPrice, standard, { digits = null } = {}) {
|
|
|
78
85
|
) {
|
|
79
86
|
return { gap: null, gapLabel: '', hit: false, tone: 'ok' }
|
|
80
87
|
}
|
|
81
|
-
const gap = after - std
|
|
88
|
+
const gap = roundMoney(after - std)
|
|
82
89
|
const hit = gap < 0
|
|
83
|
-
const
|
|
84
|
-
const body =
|
|
85
|
-
digits === null || digits === undefined
|
|
86
|
-
? String(abs)
|
|
87
|
-
: abs.toFixed(digits)
|
|
90
|
+
const body = Math.abs(gap).toFixed(2)
|
|
88
91
|
let gapLabel = '持平'
|
|
89
92
|
if (gap < 0) gapLabel = `低 ${body} 元/支`
|
|
90
93
|
else if (gap > 0) gapLabel = `高 ${body} 元/支`
|