Skip to content

Commit 2aeba12

Browse files
author
youkehai
committed
Merge remote-tracking branch 'upstream/master' into feature/bpm-delegate
# Conflicts: # src/views/bpm/processInstance/detail/index.vue
2 parents 20fe343 + 99a0c7c commit 2aeba12

File tree

37 files changed

+2684
-208
lines changed

37 files changed

+2684
-208
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yudao-ui-admin-vue3",
3-
"version": "1.8.1-snapshot",
3+
"version": "1.8.2-snapshot",
44
"description": "基于vue3、vite4、element-plus、typesScript",
55
"author": "xingyu",
66
"private": false,

src/api/bpm/task/index.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,14 @@ export const exportTask = async (params) => {
4242
return await request.download({ url: '/bpm/task/export', params })
4343
}
4444

45-
/**
46-
* 获取所有可回退的节点
47-
* @param params
48-
*/
45+
// 获取所有可回退的节点
4946
export const getReturnList = async (params) => {
5047
return await request.get({ url: '/bpm/task/get-return-list', params })
5148
}
5249

53-
/**
54-
* 确认回退
55-
* @param params
56-
*/
57-
export const okRollback = async (data) => {
58-
return await request.put({ url: '/bpm/task/rollback', data })
50+
// 回退
51+
export const returnTask = async (data) => {
52+
return await request.put({ url: '/bpm/task/return', data })
5953
}
6054

6155
/**

src/api/mall/product/spu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export interface Sku {
2020
stock?: number // 库存
2121
weight?: number // 商品重量,单位:kg 千克
2222
volume?: number // 商品体积,单位:m^3 平米
23-
subCommissionFirstPrice?: number | string // 一级分销的佣金
24-
subCommissionSecondPrice?: number | string // 二级分销的佣金
23+
firstBrokerageRecord?: number | string // 一级分销的佣金
24+
secondBrokerageRecord?: number | string // 二级分销的佣金
2525
salesCount?: number // 商品销量
2626
}
2727

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import request from '@/config/axios'
2+
3+
// 查询佣金记录列表
4+
export const getBrokerageRecordPage = async (params: any) => {
5+
return await request.get({ url: `/trade/brokerage-record/page`, params })
6+
}
7+
8+
// 查询佣金记录详情
9+
export const getBrokerageRecord = async (id: number) => {
10+
return await request.get({ url: `/trade/brokerage-record/get?id=` + id })
11+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import request from '@/config/axios'
2+
3+
export interface BrokerageUserVO {
4+
id: number
5+
bindUserId: number
6+
bindUserTime: Date
7+
brokerageEnabled: boolean
8+
brokerageTime: Date
9+
price: number
10+
frozenPrice: number
11+
12+
nickname: string
13+
avatar: string
14+
}
15+
16+
// 查询分销用户列表
17+
export const getBrokerageUserPage = async (params: any) => {
18+
return await request.get({ url: `/trade/brokerage-user/page`, params })
19+
}
20+
21+
// 查询分销用户详情
22+
export const getBrokerageUser = async (id: number) => {
23+
return await request.get({ url: `/trade/brokerage-user/get?id=` + id })
24+
}
25+
26+
// 修改推广员
27+
export const updateBindUser = async (data: any) => {
28+
return await request.put({ url: `/trade/brokerage-user/update-bind-user`, data })
29+
}
30+
31+
// 清除推广员
32+
export const clearBindUser = async (data: any) => {
33+
return await request.put({ url: `/trade/brokerage-user/clear-bind-user`, data })
34+
}
35+
36+
// 修改推广资格
37+
export const updateBrokerageEnabled = async (data: any) => {
38+
return await request.put({ url: `/trade/brokerage-user/update-brokerage-enable`, data })
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import request from '@/config/axios'
2+
3+
export interface BrokerageWithdrawVO {
4+
id: number
5+
userId: number
6+
price: number
7+
feePrice: number
8+
totalPrice: number
9+
type: number
10+
name: string
11+
accountNo: string
12+
bankName: string
13+
bankAddress: string
14+
accountQrCodeUrl: string
15+
status: number
16+
auditReason: string
17+
auditTime: Date
18+
remark: string
19+
}
20+
21+
// 查询佣金提现列表
22+
export const getBrokerageWithdrawPage = async (params: any) => {
23+
return await request.get({ url: `/trade/brokerage-withdraw/page`, params })
24+
}
25+
26+
// 查询佣金提现详情
27+
export const getBrokerageWithdraw = async (id: number) => {
28+
return await request.get({ url: `/trade/brokerage-withdraw/get?id=` + id })
29+
}
30+
31+
// 佣金提现 - 通过申请
32+
export const approveBrokerageWithdraw = async (id: number) => {
33+
return await request.put({ url: `/trade/brokerage-withdraw/approve?id=` + id })
34+
}
35+
36+
// 审核佣金提现 - 驳回申请
37+
export const rejectBrokerageWithdraw = async (data: BrokerageWithdrawVO) => {
38+
return await request.put({ url: `/trade/brokerage-withdraw/reject`, data })
39+
}

src/api/mall/trade/config/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import request from '@/config/axios'
2+
3+
export interface ConfigVO {
4+
brokerageEnabled: boolean
5+
brokerageEnabledCondition: number
6+
brokerageBindMode: number
7+
brokeragePostUrls: string
8+
brokerageFirstPercent: number
9+
brokerageSecondPercent: number
10+
brokerageWithdrawMinPrice: number
11+
brokerageBankNames: string
12+
brokerageFrozenDays: number
13+
brokerageWithdrawType: string
14+
}
15+
16+
// 查询交易中心配置详情
17+
export const getTradeConfig = async () => {
18+
return await request.get({ url: `/trade/config/get` })
19+
}
20+
21+
// 保存交易中心配置
22+
export const saveTradeConfig = async (data: ConfigVO) => {
23+
return await request.put({ url: `/trade/config/save`, data })
24+
}

src/api/mall/trade/order/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ export interface OrderVO {
5151
avatar?: string
5252
}
5353
// 订单操作日志
54-
orderLog: orderLog[]
54+
logs?: OrderLogRespVO[]
5555
}
5656

57-
export interface orderLog {
57+
export interface OrderLogRespVO {
5858
content?: string
5959
createTime?: Date
60+
userType?: number
6061
}
6162

6263
export interface OrderItemRespVO {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import request from '@/config/axios'
2+
3+
export interface ExperienceRecordVO {
4+
id: number
5+
userId: number
6+
bizId: string
7+
bizType: number
8+
title: string
9+
description: string
10+
experience: number
11+
totalExperience: number
12+
}
13+
14+
// 查询会员经验记录列表
15+
export const getExperienceRecordPage = async (params) => {
16+
return await request.get({ url: `/member/experience-record/page`, params })
17+
}
18+
19+
// 查询会员经验记录详情
20+
export const getExperienceRecord = async (id: number) => {
21+
return await request.get({ url: `/member/experience-record/get?id=` + id })
22+
}

src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import BpmnViewer from 'bpmn-js/lib/Viewer'
1111
import DefaultEmptyXML from './plugins/defaultEmpty'
1212
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
1313
import { formatDate } from '@/utils/formatTime'
14+
import { isEmpty } from '@/utils/is'
1415
1516
defineOptions({ name: 'MyProcessViewer' })
1617
@@ -85,6 +86,7 @@ const createNewDiagram = async (xml) => {
8586
// console.error(`[Process Designer Warn]: ${e?.message || e}`);
8687
}
8788
}
89+
8890
/* 高亮流程图 */
8991
// TODO 芋艿:如果多个 endActivity 的话,目前的逻辑可能有一定的问题。https://www.jdon.com/workflow/multi-events.html
9092
const highlightDiagram = async () => {
@@ -97,6 +99,9 @@ const highlightDiagram = async () => {
9799
let canvas = bpmnModeler.get('canvas')
98100
let todoActivity: any = activityList.find((m: any) => !m.endTime) // 找到待办的任务
99101
let endActivity: any = activityList[activityList.length - 1] // 获得最后一个任务
102+
let findProcessTask = false //是否已经高亮了进行中的任务
103+
//进行中高亮之后的任务 key 集合,用于过滤掉 taskList 进行中后面的任务,避免进行中后面的数据 Hover 还有数据
104+
let removeTaskDefinitionKeyList = []
100105
// debugger
101106
bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n: any) => {
102107
let activity: any = activityList.find((m: any) => m.key === n.id) // 找到对应的活动
@@ -110,9 +115,17 @@ const highlightDiagram = async () => {
110115
if (!task) {
111116
return
112117
}
118+
//进行中的任务已经高亮过了,则不高亮后面的任务了
119+
if (findProcessTask) {
120+
removeTaskDefinitionKeyList.push(n.id)
121+
return
122+
}
113123
// 高亮任务
114124
canvas.addMarker(n.id, getResultCss(task.result))
115-
125+
//标记是否高亮了进行中任务
126+
if (task.result === 1) {
127+
findProcessTask = true
128+
}
116129
// 如果非通过,就不走后面的线条了
117130
if (task.result !== 2) {
118131
return
@@ -212,6 +225,11 @@ const highlightDiagram = async () => {
212225
}
213226
}
214227
})
228+
if (!isEmpty(removeTaskDefinitionKeyList)) {
229+
taskList.value = taskList.value.filter(
230+
(item) => !removeTaskDefinitionKeyList.includes(item.definitionKey)
231+
)
232+
}
215233
}
216234
const getActivityHighlightCss = (activity) => {
217235
return activity.endTime ? 'highlight' : 'highlight-todo'
@@ -231,7 +249,7 @@ const getResultCss = (result) => {
231249
return 'highlight-cancel'
232250
} else if (result === 5) {
233251
// 退回
234-
return 'highlight-rollback'
252+
return 'highlight-return'
235253
}
236254
return ''
237255
}
@@ -276,9 +294,9 @@ const elementHover = (element) => {
276294
console.log(element.value, 'element.value')
277295
const activity = activityLists.value.find((m) => m.key === element.value.id)
278296
console.log(activity, 'activityactivityactivityactivity')
279-
// if (!activity) {
280-
// return
281-
// }
297+
if (!activity) {
298+
return
299+
}
282300
if (!elementOverlayIds.value[element.value.id] && element.value.type !== 'bpmn:Process') {
283301
let html = `<div class="element-overlays">
284302
<p>Elemet id: ${element.value.id}</p>
@@ -568,41 +586,41 @@ watch(
568586
}
569587
570588
/** 回退 */
571-
.highlight-rollback.djs-shape .djs-visual > :nth-child(1) {
589+
.highlight-return.djs-shape .djs-visual > :nth-child(1) {
572590
fill: #e6a23c !important;
573591
stroke: #e6a23c !important;
574592
fill-opacity: 0.2 !important;
575593
}
576-
.highlight-rollback.djs-shape .djs-visual > :nth-child(2) {
594+
.highlight-return.djs-shape .djs-visual > :nth-child(2) {
577595
fill: #e6a23c !important;
578596
}
579-
.highlight-rollback.djs-shape .djs-visual > path {
597+
.highlight-return.djs-shape .djs-visual > path {
580598
fill: #e6a23c !important;
581599
fill-opacity: 0.2 !important;
582600
stroke: #e6a23c !important;
583601
}
584-
.highlight-rollback.djs-connection > .djs-visual > path {
602+
.highlight-return.djs-connection > .djs-visual > path {
585603
stroke: #e6a23c !important;
586604
}
587605
588-
.highlight-rollback:not(.djs-connection) .djs-visual > :nth-child(1) {
606+
.highlight-return:not(.djs-connection) .djs-visual > :nth-child(1) {
589607
fill: #e6a23c !important; /* color elements as green */
590608
}
591609
592-
:deep(.highlight-rollback.djs-shape .djs-visual > :nth-child(1)) {
610+
:deep(.highlight-return.djs-shape .djs-visual > :nth-child(1)) {
593611
fill: #e6a23c !important;
594612
stroke: #e6a23c !important;
595613
fill-opacity: 0.2 !important;
596614
}
597-
:deep(.highlight-rollback.djs-shape .djs-visual > :nth-child(2)) {
615+
:deep(.highlight-return.djs-shape .djs-visual > :nth-child(2)) {
598616
fill: #e6a23c !important;
599617
}
600-
:deep(.highlight-rollback.djs-shape .djs-visual > path) {
618+
:deep(.highlight-return.djs-shape .djs-visual > path) {
601619
fill: #e6a23c !important;
602620
fill-opacity: 0.2 !important;
603621
stroke: #e6a23c !important;
604622
}
605-
:deep(.highlight-rollback.djs-connection > .djs-visual > path) {
623+
:deep(.highlight-return.djs-connection > .djs-visual > path) {
606624
stroke: #e6a23c !important;
607625
}
608626

0 commit comments

Comments
 (0)