imeik-bizui 2.7.0 → 2.7.1

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.
@@ -59,7 +59,7 @@ bizui: scene 选接口 → Dashboard 拉数 → Board / Detail
59
59
  | 物资入参 | `customUniqueCode`、`businessLineNumber`、`isGroupCustomer`、`applyDeptCode`、`costBearDeptCode`、`costType`、`materialList[]`(允许 `[]`) |
60
60
  | 会议入参 | `meetTypeCode`、`meetFormJson`、`customUniqueCode`、`forceRefresh`;`meetCode` 有值才传 |
61
61
  | 申请中心入参 | 见丽臻底价接口文档 |
62
- | 展示 | 看板 `normalizeOverview`;三端 **data 同形**;明细顶部汇总取概览;**差距 = 申请后 − 标准(前端算)** |
62
+ | 展示 | 看板 `normalizeOverview`;三端 **data 同形**;明细顶部汇总优先 `basePriceOverview`,无则回退概览;**差距 = 申请后 − 标准(前端算)** |
63
63
 
64
64
  ---
65
65
 
@@ -169,7 +169,7 @@ export default {
169
169
  return normalizeDetail(raw, {
170
170
  // 优先接口 customName(在 normalizeDetail 内读取);prop / 概览作兜底
171
171
  customerName: this.customerName || this.board.customerName,
172
- // 顶部汇总取概览产品行(与看板同源),明细接口只负责三区列表
172
+ // 顶部汇总优先 detail.basePriceOverview;无该字段时回退概览产品行
173
173
  overviewProducts: this.board.products
174
174
  })
175
175
  },
@@ -1,6 +1,6 @@
1
1
  <!--
2
2
  通用「底价明细」弹窗(纯展示,无接口依赖)
3
- - 顶部汇总:由 Dashboard 传入概览产品行
3
+ - 顶部汇总:优先详情 basePriceOverview,无则回退 Dashboard 传入的概览产品行
4
4
  - 下方三区(销售订单 / 非销出库 / 销售费用)等分三列并排
5
5
  - 三列卡片等高:表格固定高度按 pageSize 撑开,合计底对齐
6
6
  - 分区数据前端分页(pageSize);无底部关闭按钮,右上角关闭即可
@@ -198,6 +198,24 @@ function buildSections(data = {}) {
198
198
  return sections
199
199
  }
200
200
 
201
+ /**
202
+ * 明细顶部汇总产品行:
203
+ * 1. 优先详情接口新增的 basePriceOverview.productBasePriceList
204
+ * 2. 其次外部传入的概览产品行(看板同源)
205
+ * 3. 最后兼容详情根上的 productBasePriceList
206
+ */
207
+ function resolveDetailSummaryRows(data = {}, options = {}) {
208
+ const embedded = data.basePriceOverview
209
+ if (embedded && Array.isArray(embedded.productBasePriceList)) {
210
+ return listOverviewProducts(embedded.productBasePriceList)
211
+ }
212
+ const overviewProducts = options.overviewProducts
213
+ if (Array.isArray(overviewProducts) && overviewProducts.length) {
214
+ return overviewProducts
215
+ }
216
+ return listOverviewProducts(data.productBasePriceList)
217
+ }
218
+
201
219
  /**
202
220
  * getProductPriceDetail data → DetailDialog
203
221
  */
@@ -205,16 +223,11 @@ export function normalizeDetail(data = {}, options = {}) {
205
223
  // 详情标题优先接口 customName,其次外部传入 / customerName 兼容字段
206
224
  const customerName =
207
225
  data.customName || options.customerName || data.customerName || ''
208
- const overviewProducts = options.overviewProducts
209
- const summaryRows =
210
- Array.isArray(overviewProducts) && overviewProducts.length
211
- ? overviewProducts
212
- : listOverviewProducts(data.productBasePriceList)
213
226
 
214
227
  return {
215
228
  title: customerName ? `底价明细 · ${customerName}` : '底价明细',
216
229
  summaryColumns: summaryColumns(),
217
- summaryRows,
230
+ summaryRows: resolveDetailSummaryRows(data, options),
218
231
  sections: buildSections(data),
219
232
  formulas: DEFAULT_DETAIL_FORMULAS
220
233
  }