imeik-bizui 2.8.0 → 2.8.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.
- package/dist/bizui/api/meeting.js +55 -3
- package/dist/bizui/src/FieldPersonBudgetBoard/README.md +36 -9
- package/dist/bizui/src/FieldPersonBudgetBoard/core/PersonBudgetDashboard.vue +5 -0
- package/dist/bizui/src/FieldPersonBudgetBoard/core/PersonBudgetDetailPanel.vue +35 -3
- package/dist/bizui/src/FieldPersonBudgetBoard/index.vue +17 -7
- package/dist/imeik-bizui.common.js +267 -163
- 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 +267 -163
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* 会议系统接口(FieldFloorPriceBoard / FieldPersonBudgetBoard scene=meeting)
|
|
3
|
+
* 底价:总览 / 明细均为 POST,入参同形
|
|
4
|
+
* 个人预算:overview / usagePage / performancePage,入参对齐底价(forceRefresh + meetFormJson)
|
|
5
5
|
*/
|
|
6
6
|
import request from '../utils/userRequest.js'
|
|
7
7
|
|
|
@@ -38,3 +38,55 @@ export function fetchMeetingBasePriceOverview(data) {
|
|
|
38
38
|
export function fetchMeetingBasePriceDetail(payload) {
|
|
39
39
|
return getBasePriceDetail(payload)
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 个人预算概述
|
|
44
|
+
* POST /qxcollege/meeting/personBudget/overview
|
|
45
|
+
* 入参对齐底价:forceRefresh + meetFormJson + meetTypeCode;meetCode / insFlowCode 有值才传
|
|
46
|
+
*/
|
|
47
|
+
export function getPersonBudgetOverview(data) {
|
|
48
|
+
return request({
|
|
49
|
+
url: '/qxcollege/meeting/personBudget/overview',
|
|
50
|
+
method: 'post',
|
|
51
|
+
data
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 个人预算使用明细分页
|
|
57
|
+
* POST /qxcollege/meeting/personBudget/usagePage
|
|
58
|
+
*/
|
|
59
|
+
export function getPersonBudgetUsagePage(data) {
|
|
60
|
+
return request({
|
|
61
|
+
url: '/qxcollege/meeting/personBudget/usagePage',
|
|
62
|
+
method: 'post',
|
|
63
|
+
data
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 个人预算业绩明细分页
|
|
69
|
+
* POST /qxcollege/meeting/personBudget/performancePage
|
|
70
|
+
*/
|
|
71
|
+
export function getPersonBudgetPerformancePage(data) {
|
|
72
|
+
return request({
|
|
73
|
+
url: '/qxcollege/meeting/personBudget/performancePage',
|
|
74
|
+
method: 'post',
|
|
75
|
+
data
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** 个人预算概述:业务侧已拼好 requestPayload */
|
|
80
|
+
export function fetchMeetingPersonBudgetOverview(data) {
|
|
81
|
+
return getPersonBudgetOverview(data)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** 个人预算使用明细分页 */
|
|
85
|
+
export function fetchMeetingPersonBudgetUsagePage(data) {
|
|
86
|
+
return getPersonBudgetUsagePage(data)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** 个人预算业绩明细分页 */
|
|
90
|
+
export function fetchMeetingPersonBudgetPerformancePage(data) {
|
|
91
|
+
return getPersonBudgetPerformancePage(data)
|
|
92
|
+
}
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
imeik-bizui/src/bizui/
|
|
13
|
-
├── api/mms.js #
|
|
13
|
+
├── api/mms.js # 物资 getPersonBudgetOverview / UsagePage / PerformancePage
|
|
14
|
+
├── api/meeting.js # 会议 personBudget/overview|usagePage|performancePage
|
|
14
15
|
├── api/applycenter.js # 申请中心 openApi/personBudget/*
|
|
15
16
|
└── src/
|
|
16
17
|
└── FieldPersonBudgetBoard/
|
|
@@ -23,7 +24,7 @@ imeik-bizui/src/bizui/
|
|
|
23
24
|
|
|
24
25
|
```vue
|
|
25
26
|
<FieldPersonBudgetBoard
|
|
26
|
-
scene="
|
|
27
|
+
scene="meeting"
|
|
27
28
|
:request-payload="payload"
|
|
28
29
|
:show-detail-link="hasPerm"
|
|
29
30
|
@submit-blocked="onBlocked"
|
|
@@ -34,16 +35,16 @@ imeik-bizui/src/bizui/
|
|
|
34
35
|
|
|
35
36
|
`scene`:`supplies` | `meeting` | `apply` / `applyCenter`。
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
请求体组装在业务系统(如会议 `buildPersonBudgetPayload.js` / 物资 / 申请中心 `buildRequestPayload.js`)。
|
|
38
39
|
|
|
39
40
|
---
|
|
40
41
|
|
|
41
42
|
## 二、分层原则
|
|
42
43
|
|
|
43
|
-
1. **接口**在 `api/mms.js
|
|
44
|
+
1. **接口**在 `api/mms.js`(物资)、`api/meeting.js`(会议)、`api/applycenter.js`(申请中心)。
|
|
44
45
|
2. **对外只注册** `FieldPersonBudgetBoard`;`index.vue` 按 `scene` 选 fetch。
|
|
45
46
|
3. **宿主组装** `requestPayload` + 权限;不写 debounce / 看板 UI。
|
|
46
|
-
4. **bizui 不解析**各域表单字段(费用承担人、snapshotList、整表 formDataJson 等)。
|
|
47
|
+
4. **bizui 不解析**各域表单字段(费用承担人、snapshotList、整表 meetFormJson / formDataJson 等)。
|
|
47
48
|
|
|
48
49
|
```
|
|
49
50
|
业务系统:表单字段 → requestPayload
|
|
@@ -60,10 +61,12 @@ bizui: scene 选接口 → Dashboard 拉数 → Overview / Detail
|
|
|
60
61
|
| Props | `scene`、`requestPayload`、`showDetailLink`、`narrowDetailMode`、`useMock`、`emptyText`、`debounceMs` |
|
|
61
62
|
| Events | `submit-blocked`:`{ blocked, warn }`(禁止提交 / 预警) |
|
|
62
63
|
| 明细形态 | 宽屏始终弹窗;窄屏(≤768px)由 `narrowDetailMode`:`inline`(默认)或 `dialog` |
|
|
63
|
-
|
|
|
64
|
-
|
|
|
64
|
+
| 物资 · 查看 | `{ applyNumber }`(真实申请单号,不是 objectCode) |
|
|
65
|
+
| 物资 · 实时 | `{ costBearEmployeeNo, costType, materialList[] }`;`materialList` **允许 `[]`**;可选 `budgetDate` |
|
|
66
|
+
| 会议 | `{ forceRefresh, meetTypeCode, meetFormJson, meetCode?, insFlowCode? }`(**对齐底价**;费用承担人/金额由后端从 `meetFormJson` 解析) |
|
|
65
67
|
| 申请中心 | `{ forceRefresh, formDataJson?, formDataNumber? }`(`PersonBudgetQueryDTO`);明细另带 `usageCurrPage` / `performanceCurrPage` 等 |
|
|
66
68
|
| 编辑态(物资) | **不传** `applyNumber`(即使草稿已有单号) |
|
|
69
|
+
| 编辑态(会议) | `forceRefresh=true`;`meetCode` **有值才传**(不作为读快照依据,分流看 `forceRefresh`) |
|
|
67
70
|
|
|
68
71
|
---
|
|
69
72
|
|
|
@@ -72,8 +75,8 @@ bizui: scene 选接口 → Dashboard 拉数 → Overview / Detail
|
|
|
72
75
|
| 域 | scene | 接口 |
|
|
73
76
|
| --- | --- | --- |
|
|
74
77
|
| 物资 | `supplies` | `mms.getPersonBudgetOverview` / `UsagePage` / `PerformancePage` |
|
|
75
|
-
| 会议 | `meeting` |
|
|
76
|
-
| 申请中心 | `apply` / `applyCenter` | `applycenter` `openApi/personBudget/overview
|
|
78
|
+
| 会议 | `meeting` | `meeting` `personBudget/overview\|usagePage\|performancePage` |
|
|
79
|
+
| 申请中心 | `apply` / `applyCenter` | `applycenter` `openApi/personBudget/overview\|usagePage\|performancePage` |
|
|
77
80
|
|
|
78
81
|
---
|
|
79
82
|
|
|
@@ -98,6 +101,30 @@ export function buildSuppliesPersonBudgetPayload(ctx) {
|
|
|
98
101
|
}
|
|
99
102
|
```
|
|
100
103
|
|
|
104
|
+
### 会议(对齐底价 buildFloorPricePayload)
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
export function buildPersonBudgetPayload(options = {}) {
|
|
108
|
+
const meetTypeCode = String(options.meetTypeCode || '').trim()
|
|
109
|
+
if (!meetTypeCode) return null
|
|
110
|
+
const node = options.nodeFormJsonData || {}
|
|
111
|
+
const budget = options.budgetValue || node.meetingBudgetDTO
|
|
112
|
+
const meetFormSource = options.isAddBudget
|
|
113
|
+
? { ...node, meetingBudgetDTO: budget }
|
|
114
|
+
: node
|
|
115
|
+
const payload = {
|
|
116
|
+
meetTypeCode,
|
|
117
|
+
meetFormJson: JSON.stringify(meetFormSource),
|
|
118
|
+
forceRefresh: !!options.forceRefresh
|
|
119
|
+
}
|
|
120
|
+
const meetCode = String(options.meetCode || '').trim()
|
|
121
|
+
if (meetCode) payload.meetCode = meetCode
|
|
122
|
+
const insFlowCode = String(options.insFlowCode || '').trim()
|
|
123
|
+
if (insFlowCode) payload.insFlowCode = insFlowCode
|
|
124
|
+
return payload
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
101
128
|
### 申请中心
|
|
102
129
|
|
|
103
130
|
```js
|
|
@@ -290,6 +290,11 @@ export default {
|
|
|
290
290
|
.person-budget-dashboard {
|
|
291
291
|
width: 100%;
|
|
292
292
|
max-width: 100%;
|
|
293
|
+
margin: 0 0 12px;
|
|
294
|
+
padding: 0;
|
|
295
|
+
box-sizing: border-box;
|
|
293
296
|
min-width: 0;
|
|
297
|
+
/* 收起明细回滚时给宿主固定顶栏留位(对齐底价看板) */
|
|
298
|
+
scroll-margin-top: 80px;
|
|
294
299
|
}
|
|
295
300
|
</style>
|
|
@@ -371,15 +371,28 @@ export default {
|
|
|
371
371
|
usageDateText(row) {
|
|
372
372
|
return formatDateTime(row && row.lastPostingTime)
|
|
373
373
|
},
|
|
374
|
-
/** 是否申请中心 PersonBudgetQueryDTO 形(
|
|
374
|
+
/** 是否申请中心 PersonBudgetQueryDTO 形(formDataJson / formDataNumber) */
|
|
375
375
|
isApplyCenterPayload() {
|
|
376
376
|
const p = this.requestPayload || {}
|
|
377
377
|
return (
|
|
378
|
-
Object.prototype.hasOwnProperty.call(p, 'forceRefresh') ||
|
|
379
378
|
Object.prototype.hasOwnProperty.call(p, 'formDataJson') ||
|
|
380
379
|
Object.prototype.hasOwnProperty.call(p, 'formDataNumber')
|
|
381
380
|
)
|
|
382
381
|
},
|
|
382
|
+
/**
|
|
383
|
+
* 是否会议形(对齐底价:forceRefresh + meetFormJson + meetTypeCode)
|
|
384
|
+
* 注意:不可仅凭 forceRefresh 判断,申请中心也有该字段
|
|
385
|
+
*/
|
|
386
|
+
isMeetingPayload() {
|
|
387
|
+
const p = this.requestPayload || {}
|
|
388
|
+
if (this.isApplyCenterPayload()) return false
|
|
389
|
+
return (
|
|
390
|
+
Object.prototype.hasOwnProperty.call(p, 'meetFormJson') ||
|
|
391
|
+
Object.prototype.hasOwnProperty.call(p, 'meetTypeCode') ||
|
|
392
|
+
(Object.prototype.hasOwnProperty.call(p, 'forceRefresh') &&
|
|
393
|
+
Object.prototype.hasOwnProperty.call(p, 'meetCode'))
|
|
394
|
+
)
|
|
395
|
+
},
|
|
383
396
|
/** 申请中心:透传查询主键字段 */
|
|
384
397
|
applyCenterScopeBody() {
|
|
385
398
|
const p = this.requestPayload || {}
|
|
@@ -393,10 +406,28 @@ export default {
|
|
|
393
406
|
if (formDataNumber) body.formDataNumber = formDataNumber
|
|
394
407
|
return body
|
|
395
408
|
},
|
|
396
|
-
/**
|
|
409
|
+
/** 会议:透传底价同形主键字段 */
|
|
410
|
+
meetingScopeBody() {
|
|
411
|
+
const p = this.requestPayload || {}
|
|
412
|
+
const body = {}
|
|
413
|
+
if (Object.prototype.hasOwnProperty.call(p, 'forceRefresh')) {
|
|
414
|
+
body.forceRefresh = !!p.forceRefresh
|
|
415
|
+
}
|
|
416
|
+
const meetTypeCode = p.meetTypeCode != null ? String(p.meetTypeCode).trim() : ''
|
|
417
|
+
if (meetTypeCode) body.meetTypeCode = meetTypeCode
|
|
418
|
+
const meetFormJson = p.meetFormJson != null ? String(p.meetFormJson) : ''
|
|
419
|
+
if (meetFormJson) body.meetFormJson = meetFormJson
|
|
420
|
+
const meetCode = p.meetCode != null ? String(p.meetCode).trim() : ''
|
|
421
|
+
if (meetCode) body.meetCode = meetCode
|
|
422
|
+
const insFlowCode = p.insFlowCode != null ? String(p.insFlowCode).trim() : ''
|
|
423
|
+
if (insFlowCode) body.insFlowCode = insFlowCode
|
|
424
|
+
return body
|
|
425
|
+
},
|
|
426
|
+
/** 物资 MMS 形 / 会议 / 申请中心 */
|
|
397
427
|
scopeBody() {
|
|
398
428
|
const p = this.requestPayload || {}
|
|
399
429
|
if (this.isApplyCenterPayload()) return this.applyCenterScopeBody()
|
|
430
|
+
if (this.isMeetingPayload()) return this.meetingScopeBody()
|
|
400
431
|
if (p.applyNumber) return { applyNumber: p.applyNumber }
|
|
401
432
|
return {
|
|
402
433
|
costBearEmployeeNo: p.costBearEmployeeNo,
|
|
@@ -408,6 +439,7 @@ export default {
|
|
|
408
439
|
performanceScopeBody() {
|
|
409
440
|
const p = this.requestPayload || {}
|
|
410
441
|
if (this.isApplyCenterPayload()) return this.applyCenterScopeBody()
|
|
442
|
+
if (this.isMeetingPayload()) return this.meetingScopeBody()
|
|
411
443
|
if (p.applyNumber) return { applyNumber: p.applyNumber }
|
|
412
444
|
return {
|
|
413
445
|
costBearEmployeeNo: p.costBearEmployeeNo,
|
|
@@ -40,10 +40,15 @@ import {
|
|
|
40
40
|
getPersonBudgetUsagePage as getApplyPersonBudgetUsagePage,
|
|
41
41
|
getPersonBudgetPerformancePage as getApplyPersonBudgetPerformancePage
|
|
42
42
|
} from '../../api/applycenter'
|
|
43
|
+
import {
|
|
44
|
+
fetchMeetingPersonBudgetOverview,
|
|
45
|
+
fetchMeetingPersonBudgetUsagePage,
|
|
46
|
+
fetchMeetingPersonBudgetPerformancePage
|
|
47
|
+
} from '../../api/meeting'
|
|
43
48
|
|
|
44
49
|
/**
|
|
45
50
|
* scene → 个人预算接口
|
|
46
|
-
*
|
|
51
|
+
* 物资走 MMS;会议走 qxcollege personBudget;申请中心走 application-center openApi
|
|
47
52
|
*/
|
|
48
53
|
const MMS_PERSON_BUDGET = {
|
|
49
54
|
fetchOverview: getMmsPersonBudgetOverview,
|
|
@@ -52,6 +57,13 @@ const MMS_PERSON_BUDGET = {
|
|
|
52
57
|
emptyText: '请完善费用承担人和费用类型后查看个人预算'
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
const MEETING_PERSON_BUDGET = {
|
|
61
|
+
fetchOverview: fetchMeetingPersonBudgetOverview,
|
|
62
|
+
fetchUsagePage: fetchMeetingPersonBudgetUsagePage,
|
|
63
|
+
fetchPerformancePage: fetchMeetingPersonBudgetPerformancePage,
|
|
64
|
+
emptyText: '请完善会议预算后查看个人预算'
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
const APPLY_CENTER_PERSON_BUDGET = {
|
|
56
68
|
fetchOverview: getApplyPersonBudgetOverview,
|
|
57
69
|
fetchUsagePage: getApplyPersonBudgetUsagePage,
|
|
@@ -61,10 +73,7 @@ const APPLY_CENTER_PERSON_BUDGET = {
|
|
|
61
73
|
|
|
62
74
|
const SCENE_API = {
|
|
63
75
|
supplies: MMS_PERSON_BUDGET,
|
|
64
|
-
meeting:
|
|
65
|
-
...MMS_PERSON_BUDGET,
|
|
66
|
-
emptyText: '请完善费用承担人和费用类型后查看个人预算'
|
|
67
|
-
},
|
|
76
|
+
meeting: MEETING_PERSON_BUDGET,
|
|
68
77
|
applyCenter: APPLY_CENTER_PERSON_BUDGET
|
|
69
78
|
}
|
|
70
79
|
SCENE_API.apply = SCENE_API.applyCenter
|
|
@@ -87,8 +96,9 @@ export default {
|
|
|
87
96
|
},
|
|
88
97
|
/**
|
|
89
98
|
* 业务侧组装好的请求体;null 表示不发请求
|
|
90
|
-
*
|
|
91
|
-
*
|
|
99
|
+
* 物资查看:{ applyNumber }
|
|
100
|
+
* 物资实时:{ costBearEmployeeNo, costType, materialList[] }
|
|
101
|
+
* 会议:{ forceRefresh, meetTypeCode, meetFormJson, meetCode?, insFlowCode? }(对齐底价)
|
|
92
102
|
* 申请中心:{ forceRefresh, formDataJson?, formDataNumber? }(PersonBudgetQueryDTO)
|
|
93
103
|
*/
|
|
94
104
|
requestPayload: {
|