imeik-bizui 2.6.4 → 2.6.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.
@@ -10,7 +10,12 @@
10
10
  <span class="fpb-title__text">{{ title }}</span>
11
11
  </div>
12
12
 
13
- <div v-loading="loading" class="fpb-body">
13
+ <div
14
+ v-loading="loading"
15
+ class="fpb-body"
16
+ :class="{ 'fpb-body--loading': loading }"
17
+ element-loading-text="加载中..."
18
+ >
14
19
  <div v-if="error" class="fpb-msg fpb-msg--error">{{ error }}</div>
15
20
 
16
21
  <div v-else-if="hasContent" :class="['fpb-panel', panelThemeClass]" role="status">
@@ -406,10 +411,21 @@ export default {
406
411
  }
407
412
 
408
413
  .fpb-body {
414
+ position: relative;
409
415
  min-width: 0;
410
416
  max-width: 100%;
411
417
  }
412
418
 
419
+ /* loading 时内容为空会高度塌陷,spinner 会溢出到下方区块;对齐费率看板预留占位 */
420
+ .fpb-body--loading {
421
+ min-height: 80px;
422
+
423
+ /* Element 默认 loading 文案 margin 过小,和转圈贴在一起 */
424
+ ::v-deep .el-loading-spinner .el-loading-text {
425
+ margin-top: 12px;
426
+ }
427
+ }
428
+
413
429
  .fpb-msg {
414
430
  padding: 12px 16px;
415
431
  font-size: 13px;
@@ -167,6 +167,7 @@ export default {
167
167
  const raw = this.innerDetail || this.detail
168
168
  if (!raw) return EMPTY_DETAIL
169
169
  return normalizeDetail(raw, {
170
+ // 优先接口 customName(在 normalizeDetail 内读取);prop / 概览作兜底
170
171
  customerName: this.customerName || this.board.customerName,
171
172
  // 顶部汇总取概览产品行(与看板同源),明细接口只负责三区列表
172
173
  overviewProducts: this.board.products
@@ -280,10 +281,10 @@ export default {
280
281
  }
281
282
  const res = await this.fetchDetail(detailPayload)
282
283
  if (res && res.code === 200) {
284
+ // 保留接口 customName,勿用空 prop 覆盖
283
285
  this.innerDetail = {
284
286
  ...base,
285
- ...(res.data || {}),
286
- customerName: this.customerName
287
+ ...(res.data || {})
287
288
  }
288
289
  } else {
289
290
  throw new Error((res && res.message) || '底价明细获取失败')
@@ -172,8 +172,10 @@ function buildExpenseRows() {
172
172
 
173
173
  /** 模拟 getProductPriceDetail data */
174
174
  export function createDemoDetail(overview = {}) {
175
+ const name = overview.customerName || overview.customName || DEMO_CUSTOMER
175
176
  return {
176
- customerName: overview.customerName || DEMO_CUSTOMER,
177
+ customName: name,
178
+ customerName: name,
177
179
  saleOrderList: buildSalesOrderRows(),
178
180
  noSaleOrderList: buildNonSalesRows(),
179
181
  costList: buildExpenseRows()
@@ -83,7 +83,7 @@ export function normalizeOverview(data = {}, options = {}) {
83
83
  applyTotalFee: data.applyTotalFee,
84
84
  year: data.year,
85
85
  footerText: DEFAULT_FOOTER_TEXT,
86
- customerName: options.customerName || data.customerName || '',
86
+ customerName: options.customerName || data.customName || data.customerName || '',
87
87
  controlMethod: data.controlMethod
88
88
  }
89
89
  }
@@ -196,7 +196,9 @@ function buildSections(data = {}) {
196
196
  * getProductPriceDetail data → DetailDialog
197
197
  */
198
198
  export function normalizeDetail(data = {}, options = {}) {
199
- const customerName = options.customerName || data.customerName || ''
199
+ // 详情标题优先接口 customName,其次外部传入 / customerName 兼容字段
200
+ const customerName =
201
+ data.customName || options.customerName || data.customerName || ''
200
202
  const overviewProducts = options.overviewProducts
201
203
  const summaryRows =
202
204
  Array.isArray(overviewProducts) && overviewProducts.length