imeik-bizui 2.5.5 → 2.5.7
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/api/applycenter.js +24 -0
- package/dist/bizui/src/FieldFloorPriceBoard/README.md +8 -2
- package/dist/bizui/src/FieldFloorPriceBoard/adapters/ApplyCenterAdapter.vue +36 -138
- package/dist/bizui/src/FieldFloorPriceBoard/core/FloorPriceBoard.vue +21 -4
- package/dist/bizui/src/FieldFloorPriceBoard/core/FloorPriceDashboard.vue +5 -1
- package/dist/bizui/src/FieldFloorPriceBoard/core/mock.js +3 -19
- package/dist/imeik-bizui.common.js +464 -537
- 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 +464 -537
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +4 -4
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -255,3 +255,27 @@ export function queryBudgetDepartManage(data) {
|
|
|
255
255
|
data
|
|
256
256
|
})
|
|
257
257
|
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* 丽臻底价概览
|
|
261
|
+
* POST /application-center-admin/openApi/lizhen/basePrice/overview
|
|
262
|
+
*/
|
|
263
|
+
export function getLizhenBasePriceOverview(data) {
|
|
264
|
+
return request({
|
|
265
|
+
url: '/application-center-admin/openApi/lizhen/basePrice/overview',
|
|
266
|
+
method: 'post',
|
|
267
|
+
data
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* 丽臻底价详情
|
|
273
|
+
* POST /application-center-admin/openApi/lizhen/basePrice/detail
|
|
274
|
+
*/
|
|
275
|
+
export function getLizhenBasePriceDetail(data) {
|
|
276
|
+
return request({
|
|
277
|
+
url: '/application-center-admin/openApi/lizhen/basePrice/detail',
|
|
278
|
+
method: 'post',
|
|
279
|
+
data
|
|
280
|
+
})
|
|
281
|
+
}
|
|
@@ -39,12 +39,18 @@ imeik-bizui/src/bizui/
|
|
|
39
39
|
<!-- 会议 -->
|
|
40
40
|
<FieldFloorPriceBoard scene="meeting" :customer-info="..." :inject-rows="..." ... />
|
|
41
41
|
|
|
42
|
-
<!--
|
|
43
|
-
<FieldFloorPriceBoard
|
|
42
|
+
<!-- 申请中心:业务侧组装好 requestPayload 再传入(字段映射不放组件库) -->
|
|
43
|
+
<FieldFloorPriceBoard
|
|
44
|
+
scene="applyCenter"
|
|
45
|
+
:request-payload="payload"
|
|
46
|
+
:customer-name="..."
|
|
47
|
+
:show-detail-link="hasPerm"
|
|
48
|
+
/>
|
|
44
49
|
```
|
|
45
50
|
|
|
46
51
|
`scene` 取值:`supplies` | `meeting` | `apply` / `applyCenter`。
|
|
47
52
|
|
|
53
|
+
申请中心请求体组装在业务系统(如 `FieldApplyFloorPriceBoard/buildRequestPayload.js`),适配器只负责调 openApi + 展示。
|
|
48
54
|
---
|
|
49
55
|
|
|
50
56
|
## 二、分层原则(对齐 bizui 既有写法)
|
|
@@ -1,175 +1,73 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
ApplyCenterAdapter ·
|
|
2
|
+
ApplyCenterAdapter · 申请中心域底价适配器(薄壳)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
- 交给 FloorPriceDashboard
|
|
4
|
+
职责(仅):
|
|
5
|
+
- 接收业务侧已组装好的 requestPayload
|
|
6
|
+
- 调申请中心丽臻底价 openApi
|
|
7
|
+
- 交给 FloorPriceDashboard 拉数展示
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- 概述、明细共用同一份 requestPayload;可带字段尽量都带上,用不用由接口决定
|
|
11
|
-
- 新增/编辑:主要靠表单字段(客户、部门、费用类型、materialList)
|
|
12
|
-
- 已落库详情:通常有 applyCode,后端可只认单号;前端仍附带表单字段,便于草稿/兼容
|
|
13
|
-
- materialList 仅来自 productLines(申请中心产品明细,无组合拆分)
|
|
9
|
+
不负责:formProps / 物料 / 专家字段映射(放在业务系统 FieldApplyFloorPriceBoard)
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
- 客户 prop 名为 customerInfo(物资为 applyCustomerInfo)
|
|
17
|
-
- 物料来源单一:productLines,字段名兼容面更宽(含 productErpCode、count 等)
|
|
18
|
-
- 缺客户唯一编码 / 业务线 / 部门 / 费用类型时 requestPayload 为 null(Dashboard 不发请求)
|
|
19
|
-
|
|
20
|
-
宿主用法
|
|
11
|
+
宿主用法:
|
|
21
12
|
<FieldFloorPriceBoard
|
|
22
13
|
scene="applyCenter"
|
|
23
|
-
:
|
|
24
|
-
:
|
|
25
|
-
:apply-dept-code="..."
|
|
26
|
-
:cost-bear-dept-code="..."
|
|
27
|
-
:apply-code="..."
|
|
28
|
-
:product-lines="..."
|
|
14
|
+
:request-payload="payload"
|
|
15
|
+
:customer-name="name"
|
|
29
16
|
:show-detail-link="hasPerm"
|
|
17
|
+
:use-mock="false"
|
|
30
18
|
/>
|
|
31
|
-
|
|
32
|
-
scene 也可传 apply(index.vue 会映射到本适配器)
|
|
33
|
-
|
|
34
|
-
接口:api/mms.getProductPrice / getProductPriceDetail(mmsRequest,随 $bizui.env 切环境)
|
|
35
19
|
-->
|
|
36
20
|
<template>
|
|
37
21
|
<FloorPriceDashboard
|
|
38
22
|
:overview-payload="requestPayload"
|
|
39
23
|
:detail-payload="requestPayload"
|
|
40
24
|
:customer-name="customerName"
|
|
41
|
-
:fetch-overview="useMock ? null :
|
|
42
|
-
:fetch-detail="useMock ? null :
|
|
25
|
+
:fetch-overview="useMock ? null : getLizhenBasePriceOverview"
|
|
26
|
+
:fetch-detail="useMock ? null : getLizhenBasePriceDetail"
|
|
43
27
|
:use-demo="useMock"
|
|
44
28
|
:show-title="false"
|
|
45
29
|
:show-detail-link="showDetailLink"
|
|
30
|
+
:empty-text="emptyText"
|
|
46
31
|
/>
|
|
47
32
|
</template>
|
|
48
33
|
|
|
49
34
|
<script>
|
|
50
35
|
import FloorPriceDashboard from '../core/FloorPriceDashboard.vue'
|
|
51
|
-
import {
|
|
36
|
+
import { getLizhenBasePriceOverview, getLizhenBasePriceDetail } from '../../../api/applycenter'
|
|
52
37
|
|
|
53
38
|
export default {
|
|
54
39
|
name: 'ApplyCenterAdapter',
|
|
55
40
|
components: { FloorPriceDashboard },
|
|
56
41
|
props: {
|
|
57
42
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* 读取字段(大小写兼容):
|
|
61
|
-
* - customUniqueCode / CustomUniqueCode → 客户唯一编码(缺则不发请求)
|
|
62
|
-
* - businessLineNumber / BusinessLineNumber → 业务线(缺则不发请求)
|
|
63
|
-
* - isGroupCustomer → 是否集团客户(原样透传)
|
|
64
|
-
* - CustomerName / customerName / customName → 看板展示用客户名
|
|
65
|
-
*/
|
|
66
|
-
customerInfo: { type: Object, default: () => ({}) },
|
|
67
|
-
/**
|
|
68
|
-
* 费用类型(表单 costType);为空则不发请求
|
|
69
|
-
*/
|
|
70
|
-
costType: { type: [String, Number], default: undefined },
|
|
71
|
-
/**
|
|
72
|
-
* 申请部门业务编码;为空则不发请求
|
|
73
|
-
*/
|
|
74
|
-
applyDeptCode: { type: [String, Number], default: undefined },
|
|
75
|
-
/**
|
|
76
|
-
* 费用承担部门业务编码;为空则不发请求
|
|
77
|
-
*/
|
|
78
|
-
costBearDeptCode: { type: [String, Number], default: undefined },
|
|
79
|
-
/**
|
|
80
|
-
* 已落库申请单编码(objectCode / applyCode)
|
|
81
|
-
* - 草稿 / 新增未保存:传空,payload 里为 undefined
|
|
82
|
-
* - 编辑 / 查看:有值则带上;详情接口可主要依赖此字段,其它字段仍一并传递
|
|
83
|
-
*/
|
|
84
|
-
applyCode: { type: String, default: '' },
|
|
85
|
-
/**
|
|
86
|
-
* 申请中心产品明细行 → 映射为接口 materialList
|
|
87
|
-
*
|
|
88
|
-
* 编码候选:erpCode / productCode / 物料编码 / productErpCode
|
|
89
|
-
* 数量候选:applyCount / 数量 / qty / count / quantity
|
|
90
|
-
* 过滤:无 erpCode 或 applyCount<=0 的行丢弃;无产品时 materialList 为 []
|
|
91
|
-
*/
|
|
92
|
-
productLines: { type: Array, default: () => [] },
|
|
93
|
-
/**
|
|
94
|
-
* 是否展示「查看底价明细」入口
|
|
95
|
-
* 权限由宿主页传入,本组件不读权限中心
|
|
43
|
+
* 业务侧组装好的请求体;null 表示不发请求
|
|
44
|
+
* 结构见《丽臻底价查询接口文档》
|
|
96
45
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* 联调 / 上线请传 false
|
|
101
|
-
*/
|
|
102
|
-
useMock: { type: Boolean, default: false }
|
|
103
|
-
},
|
|
104
|
-
computed: {
|
|
105
|
-
/** 看板标题旁展示的客户名称 */
|
|
106
|
-
customerName() {
|
|
107
|
-
const c = this.customerInfo || {}
|
|
108
|
-
return c.CustomerName || c.customerName || c.customName || ''
|
|
46
|
+
requestPayload: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: null
|
|
109
49
|
},
|
|
110
|
-
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
materialList() {
|
|
115
|
-
const rows = this.productLines
|
|
116
|
-
if (!Array.isArray(rows) || !rows.length) return []
|
|
117
|
-
const erpCodeKeys = ['erpCode', 'productCode', '物料编码', 'productErpCode']
|
|
118
|
-
const countKeys = ['applyCount', '数量', 'qty', 'count', 'quantity']
|
|
119
|
-
const pick = (row, keys) => {
|
|
120
|
-
for (let i = 0; i < keys.length; i++) {
|
|
121
|
-
const k = keys[i]
|
|
122
|
-
if (row[k] != null && row[k] !== '') return row[k]
|
|
123
|
-
}
|
|
124
|
-
return ''
|
|
125
|
-
}
|
|
126
|
-
return rows
|
|
127
|
-
.filter(Boolean)
|
|
128
|
-
.map((row) => ({
|
|
129
|
-
erpCode: String(pick(row, erpCodeKeys) || ''),
|
|
130
|
-
applyCount: Number(pick(row, countKeys)) || 0
|
|
131
|
-
}))
|
|
132
|
-
.filter((r) => r.erpCode && r.applyCount > 0)
|
|
50
|
+
/** 看板展示用客户名 */
|
|
51
|
+
customerName: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
133
54
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
* - applyDeptCode 申请部门
|
|
146
|
-
* - costBearDeptCode 费用承担部门
|
|
147
|
-
* - costType 费用类型
|
|
148
|
-
* - materialList 产品行;允许 []
|
|
149
|
-
*/
|
|
150
|
-
requestPayload() {
|
|
151
|
-
const c = this.customerInfo || {}
|
|
152
|
-
const customUniqueCode = c.customUniqueCode || c.CustomUniqueCode || ''
|
|
153
|
-
const businessLineNumber = c.businessLineNumber || c.BusinessLineNumber || ''
|
|
154
|
-
const { applyDeptCode, costBearDeptCode, costType, materialList } = this
|
|
155
|
-
if (!customUniqueCode || !businessLineNumber) return null
|
|
156
|
-
if (!applyDeptCode || !costBearDeptCode) return null
|
|
157
|
-
if (costType == null || costType === '') return null
|
|
158
|
-
return {
|
|
159
|
-
applyCode: this.applyCode || undefined,
|
|
160
|
-
customUniqueCode: String(customUniqueCode),
|
|
161
|
-
businessLineNumber: String(businessLineNumber),
|
|
162
|
-
isGroupCustomer: c.isGroupCustomer,
|
|
163
|
-
applyDeptCode: String(applyDeptCode),
|
|
164
|
-
costBearDeptCode: String(costBearDeptCode),
|
|
165
|
-
costType: String(costType),
|
|
166
|
-
materialList: Array.isArray(materialList) ? materialList : []
|
|
167
|
-
}
|
|
55
|
+
showDetailLink: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
useMock: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
emptyText: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '请选择合作机构后查看底价'
|
|
168
66
|
}
|
|
169
67
|
},
|
|
170
68
|
methods: {
|
|
171
|
-
|
|
172
|
-
|
|
69
|
+
getLizhenBasePriceOverview,
|
|
70
|
+
getLizhenBasePriceDetail
|
|
173
71
|
}
|
|
174
72
|
}
|
|
175
73
|
</script>
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
<div v-if="error" class="fpb-msg fpb-msg--error">{{ error }}</div>
|
|
14
14
|
|
|
15
15
|
<div v-else-if="hasContent" :class="['fpb-panel', panelThemeClass]">
|
|
16
|
-
<!-- 状态标识:申请后触底 /
|
|
17
|
-
<div v-if="resolvedStatusLabel" class="fpb-status-row">
|
|
18
|
-
<span :class="['fpb-tag', statusTagClass]">{{ resolvedStatusLabel }}</span>
|
|
16
|
+
<!-- 状态标识:申请后触底 / 申请后正常;Mock 时同排展示 -->
|
|
17
|
+
<div v-if="resolvedStatusLabel || useDemo" class="fpb-status-row">
|
|
18
|
+
<span v-if="resolvedStatusLabel" :class="['fpb-tag', statusTagClass]">{{ resolvedStatusLabel }}</span>
|
|
19
|
+
<span v-if="useDemo" class="fpb-tag fpb-tag--mock">Mock 演示数据</span>
|
|
19
20
|
</div>
|
|
20
21
|
|
|
21
22
|
<!-- 左元信息 · 右查看明细 -->
|
|
@@ -160,6 +161,11 @@ export default {
|
|
|
160
161
|
type: String,
|
|
161
162
|
default: '查看底价明细 →'
|
|
162
163
|
},
|
|
164
|
+
/** 演示数据标识:为 true 时在看板内展示 Mock 徽标 */
|
|
165
|
+
useDemo: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false
|
|
168
|
+
},
|
|
163
169
|
numberDigits: {
|
|
164
170
|
type: Number,
|
|
165
171
|
default: null
|
|
@@ -197,8 +203,12 @@ export default {
|
|
|
197
203
|
panelThemeClass() {
|
|
198
204
|
return this.resolvedStatus === 'hit' ? 'fpb-panel--hit' : 'fpb-panel--ok'
|
|
199
205
|
},
|
|
206
|
+
/**
|
|
207
|
+
* 有产品 / 元信息 / 接口显式状态才算有内容
|
|
208
|
+
* 不用 resolvedStatusLabel:空数据时默认「申请后正常」会误出空看板
|
|
209
|
+
*/
|
|
200
210
|
hasContent() {
|
|
201
|
-
return this.displayProducts.length > 0 || !!this.metaText || !!this.
|
|
211
|
+
return this.displayProducts.length > 0 || !!this.metaText || !!this.statusLabel
|
|
202
212
|
},
|
|
203
213
|
pagedProducts() {
|
|
204
214
|
const size = this.resolvedPageSize
|
|
@@ -333,6 +343,7 @@ export default {
|
|
|
333
343
|
.fpb-status-row {
|
|
334
344
|
display: flex;
|
|
335
345
|
align-items: center;
|
|
346
|
+
gap: 8px;
|
|
336
347
|
margin-bottom: 8px;
|
|
337
348
|
min-width: 0;
|
|
338
349
|
}
|
|
@@ -375,6 +386,12 @@ export default {
|
|
|
375
386
|
background: #f6ffed;
|
|
376
387
|
}
|
|
377
388
|
|
|
389
|
+
.fpb-tag--mock {
|
|
390
|
+
color: #d48806;
|
|
391
|
+
border: 1px solid #ffc53d;
|
|
392
|
+
background: #fffbe6;
|
|
393
|
+
}
|
|
394
|
+
|
|
378
395
|
.fpb-meta-row {
|
|
379
396
|
display: flex;
|
|
380
397
|
align-items: center;
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
:meta-text="board.metaText"
|
|
30
30
|
:footer-text="board.footerText"
|
|
31
31
|
:show-detail-link="showDetailLink"
|
|
32
|
+
:use-demo="useDemo"
|
|
33
|
+
:empty-text="emptyText"
|
|
32
34
|
@view-detail="onViewDetail"
|
|
33
35
|
/>
|
|
34
36
|
<FloorPriceDetailDialog
|
|
@@ -111,7 +113,9 @@ export default {
|
|
|
111
113
|
showTitle: { type: Boolean, default: false },
|
|
112
114
|
showDetailLink: { type: Boolean, default: true },
|
|
113
115
|
useDemo: { type: Boolean, default: false },
|
|
114
|
-
customerName: { type: String, default: '' }
|
|
116
|
+
customerName: { type: String, default: '' },
|
|
117
|
+
/** 无概览数据时的空态文案 */
|
|
118
|
+
emptyText: { type: String, default: '请选择客户并添加产品/专家后查看底价' }
|
|
115
119
|
},
|
|
116
120
|
data() {
|
|
117
121
|
return {
|
|
@@ -43,29 +43,13 @@ export function createDemoOverview() {
|
|
|
43
43
|
applyThisFeeAmount: 4792,
|
|
44
44
|
applyAfterGenuineNum: 90,
|
|
45
45
|
applyAfterFreeNum: 6
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
productCode: 'haiti25',
|
|
49
|
-
erpCode: 'haiti25',
|
|
50
|
-
productName: '嗨体 2.5ml',
|
|
51
|
-
productShortName: '嗨体2.5ml',
|
|
52
|
-
applyBeforePrice: 612,
|
|
53
|
-
applyAfterPrice: 598,
|
|
54
|
-
productBasePrice: 605,
|
|
55
|
-
touchBottom: true,
|
|
56
|
-
applyAfterSaleOrderAmount: 45600,
|
|
57
|
-
applyAfterNoSaleOrderAmount: 900,
|
|
58
|
-
applyAfterFeeAmount: 1500,
|
|
59
|
-
applyThisFeeAmount: 2100,
|
|
60
|
-
applyAfterGenuineNum: 66,
|
|
61
|
-
applyAfterFreeNum: 6
|
|
62
46
|
}
|
|
63
47
|
]
|
|
64
48
|
}
|
|
65
49
|
}
|
|
66
50
|
|
|
67
51
|
function buildSalesOrderRows() {
|
|
68
|
-
const products = ['灵塑100', '塑菲200'
|
|
52
|
+
const products = ['灵塑100', '塑菲200']
|
|
69
53
|
const types = ['GENUINE', 'FREE']
|
|
70
54
|
const rows = []
|
|
71
55
|
for (let i = 1; i <= 12; i++) {
|
|
@@ -76,14 +60,14 @@ function buildSalesOrderRows() {
|
|
|
76
60
|
productName,
|
|
77
61
|
saleType: types[i % types.length],
|
|
78
62
|
qty,
|
|
79
|
-
amount: qty * (productName === '塑菲200' ? 1040 :
|
|
63
|
+
amount: qty * (productName === '塑菲200' ? 1040 : 820)
|
|
80
64
|
})
|
|
81
65
|
}
|
|
82
66
|
return rows
|
|
83
67
|
}
|
|
84
68
|
|
|
85
69
|
function buildNonSalesRows() {
|
|
86
|
-
const products = ['灵塑100', '塑菲200'
|
|
70
|
+
const products = ['灵塑100', '塑菲200']
|
|
87
71
|
const rows = []
|
|
88
72
|
for (let i = 1; i <= 8; i++) {
|
|
89
73
|
const qty = 2 + (i % 5)
|