imeik-bizui 2.6.8 → 2.7.0
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/FloorPriceDetailDialog.vue +10 -3
- package/dist/bizui/src/FieldFloorPriceBoard/core/mock.js +4 -2
- package/dist/bizui/src/FieldFloorPriceBoard/core/normalize.js +20 -14
- package/dist/bizui/src/FieldFloorPriceBoard/core/utils.js +5 -4
- package/dist/imeik-bizui.common.js +116 -116
- 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 +116 -116
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +7 -7
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -396,14 +396,21 @@ export default {
|
|
|
396
396
|
return rows.slice(start, start + size)
|
|
397
397
|
},
|
|
398
398
|
formatCell(value, col = {}) {
|
|
399
|
-
if (col.type === 'number' || col.digits != null) {
|
|
400
|
-
|
|
399
|
+
if (col.type === 'number' || col.type === 'highlight' || col.digits != null) {
|
|
400
|
+
// 与看板一致:不强制小数位,保留接口原值精度
|
|
401
|
+
return formatNumber(value, {
|
|
402
|
+
digits: col.digits != null ? col.digits : null,
|
|
403
|
+
fallback: '-'
|
|
404
|
+
})
|
|
401
405
|
}
|
|
402
406
|
if (value === undefined || value === null || value === '') return '-'
|
|
403
407
|
return String(value)
|
|
404
408
|
},
|
|
405
409
|
formatGapCell(value, col = {}) {
|
|
406
|
-
return formatSignedNumber(value, {
|
|
410
|
+
return formatSignedNumber(value, {
|
|
411
|
+
digits: col.digits != null ? col.digits : null,
|
|
412
|
+
fallback: '-'
|
|
413
|
+
})
|
|
407
414
|
},
|
|
408
415
|
gapClass(value, row) {
|
|
409
416
|
const n = Number(value != null ? value : row && row.gap)
|
|
@@ -19,6 +19,7 @@ const PRODUCT_LING = {
|
|
|
19
19
|
erpCode: 'lingSu100',
|
|
20
20
|
productName: '臻爱 灵塑100',
|
|
21
21
|
productShortName: '灵塑100',
|
|
22
|
+
needRcoiProcess: true,
|
|
22
23
|
applyAfterSaleOrderAmount: 82000,
|
|
23
24
|
applyAfterNoSaleOrderAmount: 2000,
|
|
24
25
|
applyAfterFeeAmount: 1200,
|
|
@@ -32,6 +33,7 @@ const PRODUCT_SU = {
|
|
|
32
33
|
erpCode: 'suFei200',
|
|
33
34
|
productName: '臻爱 塑菲200',
|
|
34
35
|
productShortName: '塑菲200',
|
|
36
|
+
needRcoiProcess: true,
|
|
35
37
|
applyAfterSaleOrderAmount: 115000,
|
|
36
38
|
applyAfterNoSaleOrderAmount: 3000,
|
|
37
39
|
applyAfterFeeAmount: 1500,
|
|
@@ -157,13 +159,13 @@ function buildExpenseRows() {
|
|
|
157
159
|
for (let i = 1; i <= 9; i++) {
|
|
158
160
|
rows.push({
|
|
159
161
|
bizOrderCode: `FY2026${String(200 + i).padStart(4, '0')}`,
|
|
160
|
-
|
|
162
|
+
costType: types[(i - 1) % types.length],
|
|
161
163
|
costAmount: 800 + i * 350
|
|
162
164
|
})
|
|
163
165
|
}
|
|
164
166
|
rows.push({
|
|
165
167
|
bizOrderCode: '本次申请',
|
|
166
|
-
|
|
168
|
+
costType: '会议费用',
|
|
167
169
|
costAmount: 10000,
|
|
168
170
|
current: true
|
|
169
171
|
})
|
|
@@ -32,6 +32,13 @@ function buildQtyText(genuine, free) {
|
|
|
32
32
|
return `${g + f}(${g}+${f})`
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/** 概览仅展示 needRcoiProcess 为 true 的产品 */
|
|
36
|
+
function listOverviewProducts(list) {
|
|
37
|
+
return (list || [])
|
|
38
|
+
.filter((row) => row && row.needRcoiProcess === true)
|
|
39
|
+
.map(mapOverviewProduct)
|
|
40
|
+
}
|
|
41
|
+
|
|
35
42
|
/** getProductPrice.productBasePriceList → 卡片 / 明细汇总行 */
|
|
36
43
|
function mapOverviewProduct(row = {}) {
|
|
37
44
|
const beforePrice = row.applyBeforePrice
|
|
@@ -66,7 +73,7 @@ function mapOverviewProduct(row = {}) {
|
|
|
66
73
|
* getProductPrice data → FloorPriceBoard
|
|
67
74
|
*/
|
|
68
75
|
export function normalizeOverview(data = {}, options = {}) {
|
|
69
|
-
const products = (data.productBasePriceList
|
|
76
|
+
const products = listOverviewProducts(data.productBasePriceList)
|
|
70
77
|
const status = resolvePanelState(data.controlMethod, products)
|
|
71
78
|
const hitCount = products.filter((p) => p.hit).length
|
|
72
79
|
const result = buildResultCopy(status, {
|
|
@@ -91,18 +98,17 @@ export function normalizeOverview(data = {}, options = {}) {
|
|
|
91
98
|
function summaryColumns() {
|
|
92
99
|
return [
|
|
93
100
|
{ prop: 'name', label: '产品', minWidth: 110, fixed: 'left' },
|
|
94
|
-
{ prop: 'beforePrice', label: '当前底价', type: 'number',
|
|
95
|
-
{ prop: 'afterPrice', label: '申请后底价', type: 'number',
|
|
96
|
-
{ prop: 'standard', label: '标准底价', type: 'number',
|
|
97
|
-
{ prop: 'gap', label: '差距', type: 'gap',
|
|
98
|
-
{ prop: 'orderAmount', label: '订单金额', type: 'number',
|
|
99
|
-
{ prop: 'nonSalesFee', label: '非销售促进费', type: 'number',
|
|
100
|
-
{ prop: 'spentFee', label: '已花费用', type: 'number',
|
|
101
|
+
{ prop: 'beforePrice', label: '当前底价', type: 'number', minWidth: 88, align: 'right' },
|
|
102
|
+
{ prop: 'afterPrice', label: '申请后底价', type: 'number', minWidth: 96, align: 'right', bold: true },
|
|
103
|
+
{ prop: 'standard', label: '标准底价', type: 'number', minWidth: 88, align: 'right' },
|
|
104
|
+
{ prop: 'gap', label: '差距', type: 'gap', minWidth: 80, align: 'right' },
|
|
105
|
+
{ prop: 'orderAmount', label: '订单金额', type: 'number', minWidth: 96, align: 'right' },
|
|
106
|
+
{ prop: 'nonSalesFee', label: '非销售促进费', type: 'number', minWidth: 110, align: 'right' },
|
|
107
|
+
{ prop: 'spentFee', label: '已花费用', type: 'number', minWidth: 88, align: 'right' },
|
|
101
108
|
{
|
|
102
109
|
prop: 'currentAllocation',
|
|
103
110
|
label: '本次分摊',
|
|
104
111
|
type: 'highlight',
|
|
105
|
-
digits: 0,
|
|
106
112
|
minWidth: 88,
|
|
107
113
|
align: 'right',
|
|
108
114
|
highlightTone: 'current'
|
|
@@ -137,7 +143,7 @@ function buildSections(data = {}) {
|
|
|
137
143
|
{ prop: 'productName', label: '产品', minWidth: 100 },
|
|
138
144
|
{ prop: 'saleTypeLabel', label: '类型', width: 64 },
|
|
139
145
|
{ prop: 'qty', label: '数量', align: 'right', width: 56 },
|
|
140
|
-
{ prop: 'amount', label: '金额', type: 'number',
|
|
146
|
+
{ prop: 'amount', label: '金额', type: 'number', align: 'right', width: 96 }
|
|
141
147
|
],
|
|
142
148
|
rows: saleRows,
|
|
143
149
|
footer: {
|
|
@@ -157,7 +163,7 @@ function buildSections(data = {}) {
|
|
|
157
163
|
{ prop: 'orderNum', label: '出库单号', minWidth: 140 },
|
|
158
164
|
{ prop: 'productName', label: '产品', minWidth: 100 },
|
|
159
165
|
{ prop: 'qty', label: '数量', align: 'right', width: 56 },
|
|
160
|
-
{ prop: 'amount', label: '折算费用', type: 'number',
|
|
166
|
+
{ prop: 'amount', label: '折算费用', type: 'number', align: 'right', width: 96 }
|
|
161
167
|
],
|
|
162
168
|
rows: nonSaleRows,
|
|
163
169
|
footer: {
|
|
@@ -178,8 +184,8 @@ function buildSections(data = {}) {
|
|
|
178
184
|
theme: 'danger',
|
|
179
185
|
columns: [
|
|
180
186
|
{ prop: 'bizOrderCode', label: '单号', minWidth: 120 },
|
|
181
|
-
{ prop: '
|
|
182
|
-
{ prop: 'costAmount', label: '金额', type: 'number',
|
|
187
|
+
{ prop: 'costType', label: '类型', minWidth: 88 },
|
|
188
|
+
{ prop: 'costAmount', label: '金额', type: 'number', align: 'right', width: 96 }
|
|
183
189
|
],
|
|
184
190
|
rows: expenseRows,
|
|
185
191
|
footer: {
|
|
@@ -203,7 +209,7 @@ export function normalizeDetail(data = {}, options = {}) {
|
|
|
203
209
|
const summaryRows =
|
|
204
210
|
Array.isArray(overviewProducts) && overviewProducts.length
|
|
205
211
|
? overviewProducts
|
|
206
|
-
: (data.productBasePriceList
|
|
212
|
+
: listOverviewProducts(data.productBasePriceList)
|
|
207
213
|
|
|
208
214
|
return {
|
|
209
215
|
title: customerName ? `底价明细 · ${customerName}` : '底价明细',
|
|
@@ -23,14 +23,14 @@ export function formatMoney(value, { digits = null, fallback = '-' } = {}) {
|
|
|
23
23
|
return `¥ ${body}`
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/** 带正负号的差距展示,如 -23.
|
|
27
|
-
export function formatSignedNumber(value, { digits =
|
|
26
|
+
/** 带正负号的差距展示,如 -23.68 / +3.1;digits 默认 null 保留原精度 */
|
|
27
|
+
export function formatSignedNumber(value, { digits = null, fallback = '-' } = {}) {
|
|
28
28
|
if (value === undefined || value === null || value === '') return fallback
|
|
29
29
|
const n = Number(value)
|
|
30
30
|
if (Number.isNaN(n)) return String(value)
|
|
31
31
|
const abs = Math.abs(n)
|
|
32
32
|
const body =
|
|
33
|
-
digits === null
|
|
33
|
+
digits === null || digits === undefined
|
|
34
34
|
? abs.toLocaleString('zh-CN')
|
|
35
35
|
: abs.toLocaleString('zh-CN', {
|
|
36
36
|
minimumFractionDigits: digits,
|
|
@@ -46,8 +46,9 @@ export function formatSignedNumber(value, { digits = 1, fallback = '-' } = {}) {
|
|
|
46
46
|
* - gap < 0 → 低于底价 / 禁止;文案「低 N 元/支」
|
|
47
47
|
* - gap > 0 → 通过;文案「高 N 元/支」
|
|
48
48
|
* - gap = 0 → 持平
|
|
49
|
+
* digits 默认 null,与看板金额一致不强制取整
|
|
49
50
|
*/
|
|
50
|
-
export function computePriceGap(afterPrice, standard, { digits =
|
|
51
|
+
export function computePriceGap(afterPrice, standard, { digits = null } = {}) {
|
|
51
52
|
const after = Number(afterPrice)
|
|
52
53
|
const std = Number(standard)
|
|
53
54
|
if (
|