imeik-bizui 2.7.4 → 2.7.6
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 +1 -1
- package/dist/bizui/src/FieldFloorPriceBoard/core/utils.js +49 -24
- package/dist/imeik-bizui.common.js +181 -123
- 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 +181 -123
- 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;
|
|
@@ -172,7 +172,7 @@ function buildSections(data = {}) {
|
|
|
172
172
|
label: '合计(含本次)',
|
|
173
173
|
theme: 'danger',
|
|
174
174
|
values: [
|
|
175
|
-
`数量 ${
|
|
175
|
+
`数量 ${sumBy(nonSaleRows, 'qty')}`,
|
|
176
176
|
`折算费用 ${formatNumber(sumBy(nonSaleRows, 'amount'))}`
|
|
177
177
|
]
|
|
178
178
|
}
|
|
@@ -10,7 +10,38 @@ export function roundMoney(value) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* 价格展示:不足 minDigits 位小数右侧补 0;已达则原样(不截断、不去尾)。
|
|
14
|
+
* 201 → 201.00;5756.3 → 5756.30;433.68 → 433.68;1442.7875 → 1442.7875
|
|
15
|
+
*/
|
|
16
|
+
export function padDecimalMin(value, minDigits = 2) {
|
|
17
|
+
if (value === undefined || value === null || value === '') return null
|
|
18
|
+
|
|
19
|
+
let raw
|
|
20
|
+
if (typeof value === 'string') {
|
|
21
|
+
raw = value.trim()
|
|
22
|
+
if (raw === '') return null
|
|
23
|
+
if (Number.isNaN(Number(raw))) return raw
|
|
24
|
+
} else {
|
|
25
|
+
const n = Number(value)
|
|
26
|
+
if (Number.isNaN(n)) return String(value)
|
|
27
|
+
raw = String(n)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const sign = raw[0] === '-' ? '-' : ''
|
|
31
|
+
const body = sign ? raw.slice(1) : raw
|
|
32
|
+
if (!/^\d+(\.\d+)?$/.test(body)) return raw
|
|
33
|
+
|
|
34
|
+
const dot = body.indexOf('.')
|
|
35
|
+
if (dot < 0) {
|
|
36
|
+
return `${sign}${body}.${'0'.repeat(minDigits)}`
|
|
37
|
+
}
|
|
38
|
+
const decLen = body.length - dot - 1
|
|
39
|
+
if (decLen >= minDigits) return `${sign}${body}`
|
|
40
|
+
return `${sign}${body}${'0'.repeat(minDigits - decLen)}`
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 数值展示:默认「不足两位补 0,两位及以上原样」。
|
|
14
45
|
* 仅当显式传入 digits 时才按固定小数位输出。
|
|
15
46
|
* 注意:toLocaleString 默认最多 3 位小数,会导致四位金额被截断,故原样路径不用它。
|
|
16
47
|
*/
|
|
@@ -18,15 +49,9 @@ export function formatNumber(value, { digits = null, fallback = '-' } = {}) {
|
|
|
18
49
|
if (value === undefined || value === null || value === '') return fallback
|
|
19
50
|
|
|
20
51
|
if (digits === null || digits === undefined) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (Number.isNaN(Number(s))) return fallback
|
|
25
|
-
return s
|
|
26
|
-
}
|
|
27
|
-
const n = Number(value)
|
|
28
|
-
if (Number.isNaN(n)) return String(value)
|
|
29
|
-
return String(n)
|
|
52
|
+
const padded = padDecimalMin(value, 2)
|
|
53
|
+
if (padded == null) return fallback
|
|
54
|
+
return padded
|
|
30
55
|
}
|
|
31
56
|
|
|
32
57
|
const n = Number(value)
|
|
@@ -34,30 +59,30 @@ export function formatNumber(value, { digits = null, fallback = '-' } = {}) {
|
|
|
34
59
|
return n.toFixed(digits)
|
|
35
60
|
}
|
|
36
61
|
|
|
37
|
-
/** 金额带
|
|
62
|
+
/** 金额带 ¥;默认不足两位补 0,两位及以上原样,如 ¥ 201.00 / ¥ 2401.4385 */
|
|
38
63
|
export function formatMoney(value, { digits = null, fallback = '-' } = {}) {
|
|
39
64
|
const body = formatNumber(value, { digits, fallback: null })
|
|
40
65
|
if (body == null) return fallback
|
|
41
66
|
return `¥ ${body}`
|
|
42
67
|
}
|
|
43
68
|
|
|
44
|
-
/**
|
|
45
|
-
function rawAbsBody(value, n) {
|
|
46
|
-
if (typeof value === 'string') {
|
|
47
|
-
return value.trim().replace(/^[+-]/, '')
|
|
48
|
-
}
|
|
49
|
-
return String(Math.abs(n))
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** 带正负号的差距展示;默认跟随原精度,如 +23.6800 / -3.1 */
|
|
69
|
+
/** 带正负号的差距展示;规则同 formatNumber */
|
|
53
70
|
export function formatSignedNumber(value, { digits = null, fallback = '-' } = {}) {
|
|
54
71
|
if (value === undefined || value === null || value === '') return fallback
|
|
55
72
|
const n = Number(value)
|
|
56
73
|
if (Number.isNaN(n)) return String(value)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
|
|
75
|
+
let body
|
|
76
|
+
if (digits === null || digits === undefined) {
|
|
77
|
+
const absRaw =
|
|
78
|
+
typeof value === 'string'
|
|
79
|
+
? value.trim().replace(/^[+-]/, '')
|
|
80
|
+
: String(Math.abs(n))
|
|
81
|
+
body = padDecimalMin(absRaw, 2) || absRaw
|
|
82
|
+
} else {
|
|
83
|
+
body = Math.abs(n).toFixed(digits)
|
|
84
|
+
}
|
|
85
|
+
|
|
61
86
|
if (n > 0) return `+${body}`
|
|
62
87
|
if (n < 0) return `-${body}`
|
|
63
88
|
return body
|