imeik-bizui 2.5.6 → 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/src/FieldFloorPriceBoard/README.md +8 -2
- package/dist/bizui/src/FieldFloorPriceBoard/adapters/ApplyCenterAdapter.vue +31 -130
- package/dist/imeik-bizui.common.js +66 -323
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.umd.js +66 -323
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +6 -6
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -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,30 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
ApplyCenterAdapter ·
|
|
2
|
+
ApplyCenterAdapter · 申请中心域底价适配器(薄壳)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
4
|
+
职责(仅):
|
|
5
|
+
- 接收业务侧已组装好的 requestPayload
|
|
6
|
+
- 调申请中心丽臻底价 openApi
|
|
7
|
+
- 交给 FloorPriceDashboard 拉数展示
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
- 传 formDataCode / formDataNumber → 优先查库快照
|
|
10
|
-
- 未传单号 → 用表单字段实时查
|
|
11
|
-
- formBaseNo 有则传
|
|
12
|
-
- saleBasePriceList / costBasePriceList:有数据才传,无则不带该字段
|
|
13
|
-
- 不按 B07/B05 等表单类型分支,避免业务耦合
|
|
9
|
+
不负责:formProps / 物料 / 专家字段映射(放在业务系统 FieldApplyFloorPriceBoard)
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
宿主用法:
|
|
16
12
|
<FieldFloorPriceBoard
|
|
17
13
|
scene="applyCenter"
|
|
18
|
-
:
|
|
19
|
-
:
|
|
20
|
-
:form-data-code="..."
|
|
21
|
-
:form-data-number="..."
|
|
22
|
-
:org-code="..."
|
|
23
|
-
:apply-user="..."
|
|
24
|
-
:cost-bear-dept-code="..."
|
|
25
|
-
:product-lines="..."
|
|
26
|
-
:expert-lines="..."
|
|
14
|
+
:request-payload="payload"
|
|
15
|
+
:customer-name="name"
|
|
27
16
|
:show-detail-link="hasPerm"
|
|
17
|
+
:use-mock="false"
|
|
28
18
|
/>
|
|
29
19
|
-->
|
|
30
20
|
<template>
|
|
@@ -37,7 +27,7 @@
|
|
|
37
27
|
:use-demo="useMock"
|
|
38
28
|
:show-title="false"
|
|
39
29
|
:show-detail-link="showDetailLink"
|
|
40
|
-
empty-text="
|
|
30
|
+
:empty-text="emptyText"
|
|
41
31
|
/>
|
|
42
32
|
</template>
|
|
43
33
|
|
|
@@ -50,123 +40,34 @@ export default {
|
|
|
50
40
|
components: { FloorPriceDashboard },
|
|
51
41
|
props: {
|
|
52
42
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* - businessCode → businessLineNumber(文档约定)
|
|
56
|
-
* - customerName
|
|
43
|
+
* 业务侧组装好的请求体;null 表示不发请求
|
|
44
|
+
* 结构见《丽臻底价查询接口文档》
|
|
57
45
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/** 申请单数据 code;有则优先查库快照 */
|
|
62
|
-
formDataCode: { type: String, default: '' },
|
|
63
|
-
/** 申请单号;formDataCode 优先 */
|
|
64
|
-
formDataNumber: { type: String, default: '' },
|
|
65
|
-
/** 申请人部门编码 orgCode */
|
|
66
|
-
orgCode: { type: [String, Number], default: undefined },
|
|
67
|
-
/** 申请人编码 applyUser */
|
|
68
|
-
applyUser: { type: [String, Number], default: undefined },
|
|
69
|
-
/** 费用承担部门,有则透传 */
|
|
70
|
-
costBearDeptCode: { type: [String, Number], default: undefined },
|
|
71
|
-
/**
|
|
72
|
-
* 业务线兜底(客户无 businessCode 时,如合作主体 belongCompany)
|
|
73
|
-
*/
|
|
74
|
-
businessLineNumberFallback: { type: [String, Number], default: undefined },
|
|
75
|
-
/**
|
|
76
|
-
* 产品行 → saleBasePriceList(有数据才进请求体)
|
|
77
|
-
*/
|
|
78
|
-
productLines: { type: Array, default: () => [] },
|
|
79
|
-
/**
|
|
80
|
-
* 专家行 → costBasePriceList(有合计金额才进请求体;costType 固定「专家费(非会议)」)
|
|
81
|
-
*/
|
|
82
|
-
expertLines: { type: Array, default: () => [] },
|
|
83
|
-
showDetailLink: { type: Boolean, default: true },
|
|
84
|
-
useMock: { type: Boolean, default: false }
|
|
85
|
-
},
|
|
86
|
-
computed: {
|
|
87
|
-
customerName() {
|
|
88
|
-
const c = this.customerInfo || {}
|
|
89
|
-
return c.CustomerName || c.customerName || c.customName || ''
|
|
46
|
+
requestPayload: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: null
|
|
90
49
|
},
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return rows
|
|
96
|
-
.filter(Boolean)
|
|
97
|
-
.map((row) => {
|
|
98
|
-
const productCode = String(row.productCode || row.materialCode || row.erpCode || row.productErpCode || '')
|
|
99
|
-
const productQuantity = Number(row.materialQuantity ?? row.productQuantity ?? row.applyCount ?? row.quantity) || 0
|
|
100
|
-
const productPrice = Number(row.orderPrice ?? row.productPrice ?? row.unitPrice)
|
|
101
|
-
return {
|
|
102
|
-
productCode,
|
|
103
|
-
abbreviation: row.abbreviation || row.materialName || row.productShortName || row.productName || '',
|
|
104
|
-
productQuantity,
|
|
105
|
-
productPrice: Number.isFinite(productPrice) ? productPrice : undefined
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
.filter((r) => r.productCode && r.productQuantity > 0)
|
|
50
|
+
/** 看板展示用客户名 */
|
|
51
|
+
customerName: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
109
54
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (!Array.isArray(rows) || !rows.length) return []
|
|
114
|
-
const costAmount = rows.filter(Boolean).reduce((sum, row) => sum + (Number(row.costAmount) || 0), 0)
|
|
115
|
-
if (costAmount <= 0) return []
|
|
116
|
-
return [
|
|
117
|
-
{
|
|
118
|
-
costType: '专家费(非会议)',
|
|
119
|
-
costAmount
|
|
120
|
-
}
|
|
121
|
-
]
|
|
55
|
+
showDetailLink: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
122
58
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// 有单号:按文档可只传单号查快照
|
|
131
|
-
if (formDataCode || formDataNumber) {
|
|
132
|
-
const payload = {}
|
|
133
|
-
if (formDataCode) payload.formDataCode = String(formDataCode)
|
|
134
|
-
if (formDataNumber) payload.formDataNumber = String(formDataNumber)
|
|
135
|
-
Object.assign(payload, this.buildRealtimeFields())
|
|
136
|
-
return payload
|
|
137
|
-
}
|
|
138
|
-
// 实时查:仅要求合作机构(客户唯一编码)
|
|
139
|
-
const realtime = this.buildRealtimeFields()
|
|
140
|
-
if (!realtime.customUniqueCode) return null
|
|
141
|
-
return realtime
|
|
59
|
+
useMock: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
emptyText: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '请选择合作机构后查看底价'
|
|
142
66
|
}
|
|
143
67
|
},
|
|
144
68
|
methods: {
|
|
145
69
|
getLizhenBasePriceOverview,
|
|
146
|
-
getLizhenBasePriceDetail
|
|
147
|
-
/** 组装实时查询字段(不含单号);列表仅在有数据时挂载 */
|
|
148
|
-
buildRealtimeFields() {
|
|
149
|
-
const c = this.customerInfo || {}
|
|
150
|
-
const customUniqueCode = c.customUniqueCode || c.CustomUniqueCode || c.customerUniqueCode || ''
|
|
151
|
-
const businessLineNumber =
|
|
152
|
-
c.businessCode || c.businessLineNumber || c.BusinessLineNumber || this.businessLineNumberFallback || ''
|
|
153
|
-
const payload = {}
|
|
154
|
-
if (this.formBaseNo) payload.formBaseNo = String(this.formBaseNo)
|
|
155
|
-
if (customUniqueCode) payload.customUniqueCode = String(customUniqueCode)
|
|
156
|
-
if (businessLineNumber) payload.businessLineNumber = String(businessLineNumber)
|
|
157
|
-
if (this.orgCode != null && this.orgCode !== '') payload.orgCode = String(this.orgCode)
|
|
158
|
-
if (this.applyUser != null && this.applyUser !== '') payload.applyUser = String(this.applyUser)
|
|
159
|
-
if (this.costBearDeptCode != null && this.costBearDeptCode !== '') {
|
|
160
|
-
payload.costBearDeptCode = String(this.costBearDeptCode)
|
|
161
|
-
}
|
|
162
|
-
if (this.saleBasePriceList.length) {
|
|
163
|
-
payload.saleBasePriceList = this.saleBasePriceList
|
|
164
|
-
}
|
|
165
|
-
if (this.costBasePriceList.length) {
|
|
166
|
-
payload.costBasePriceList = this.costBasePriceList
|
|
167
|
-
}
|
|
168
|
-
return payload
|
|
169
|
-
}
|
|
70
|
+
getLizhenBasePriceDetail
|
|
170
71
|
}
|
|
171
72
|
}
|
|
172
73
|
</script>
|