Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
owen 2023-09-29 21:08:48 +08:00
commit 6475f81534
15 changed files with 372 additions and 34 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "yudao-ui-admin-vue3", "name": "yudao-ui-admin-vue3",
"version": "1.8.1-snapshot", "version": "1.8.2-snapshot",
"description": "基于vue3、vite4、element-plus、typesScript", "description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,

View File

@ -41,3 +41,20 @@ export const getTaskListByProcessInstanceId = async (processInstanceId) => {
export const exportTask = async (params) => { export const exportTask = async (params) => {
return await request.download({ url: '/bpm/task/export', params }) return await request.download({ url: '/bpm/task/export', params })
} }
// 获取所有可回退的节点
export const getReturnList = async (params) => {
return await request.get({ url: '/bpm/task/get-return-list', params })
}
// 回退
export const returnTask = async (data) => {
return await request.put({ url: '/bpm/task/return', data })
}
/**
*
*/
export const delegateTask = async (data) => {
return await request.put({ url: '/bpm/task/delegate', data })
}

View File

@ -11,6 +11,7 @@ import BpmnViewer from 'bpmn-js/lib/Viewer'
import DefaultEmptyXML from './plugins/defaultEmpty' import DefaultEmptyXML from './plugins/defaultEmpty'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { isEmpty } from '@/utils/is'
defineOptions({ name: 'MyProcessViewer' }) defineOptions({ name: 'MyProcessViewer' })
@ -85,6 +86,7 @@ const createNewDiagram = async (xml) => {
// console.error(`[Process Designer Warn]: ${e?.message || e}`); // console.error(`[Process Designer Warn]: ${e?.message || e}`);
} }
} }
/* 高亮流程图 */ /* 高亮流程图 */
// TODO endActivity https://www.jdon.com/workflow/multi-events.html // TODO endActivity https://www.jdon.com/workflow/multi-events.html
const highlightDiagram = async () => { const highlightDiagram = async () => {
@ -97,6 +99,9 @@ const highlightDiagram = async () => {
let canvas = bpmnModeler.get('canvas') let canvas = bpmnModeler.get('canvas')
let todoActivity: any = activityList.find((m: any) => !m.endTime) // let todoActivity: any = activityList.find((m: any) => !m.endTime) //
let endActivity: any = activityList[activityList.length - 1] // let endActivity: any = activityList[activityList.length - 1] //
let findProcessTask = false //
// key taskList Hover
let removeTaskDefinitionKeyList = []
// debugger // debugger
bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n: any) => { bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n: any) => {
let activity: any = activityList.find((m: any) => m.key === n.id) // let activity: any = activityList.find((m: any) => m.key === n.id) //
@ -110,9 +115,17 @@ const highlightDiagram = async () => {
if (!task) { if (!task) {
return return
} }
//
if (findProcessTask) {
removeTaskDefinitionKeyList.push(n.id)
return
}
// //
canvas.addMarker(n.id, getResultCss(task.result)) canvas.addMarker(n.id, getResultCss(task.result))
//
if (task.result === 1) {
findProcessTask = true
}
// 线 // 线
if (task.result !== 2) { if (task.result !== 2) {
return return
@ -212,6 +225,11 @@ const highlightDiagram = async () => {
} }
} }
}) })
if (!isEmpty(removeTaskDefinitionKeyList)) {
taskList.value = taskList.value.filter(
(item) => !removeTaskDefinitionKeyList.includes(item.definitionKey)
)
}
} }
const getActivityHighlightCss = (activity) => { const getActivityHighlightCss = (activity) => {
return activity.endTime ? 'highlight' : 'highlight-todo' return activity.endTime ? 'highlight' : 'highlight-todo'
@ -229,6 +247,9 @@ const getResultCss = (result) => {
} else if (result === 4) { } else if (result === 4) {
// //
return 'highlight-cancel' return 'highlight-cancel'
} else if (result === 5) {
// 退
return 'highlight-return'
} }
return '' return ''
} }
@ -273,9 +294,9 @@ const elementHover = (element) => {
console.log(element.value, 'element.value') console.log(element.value, 'element.value')
const activity = activityLists.value.find((m) => m.key === element.value.id) const activity = activityLists.value.find((m) => m.key === element.value.id)
console.log(activity, 'activityactivityactivityactivity') console.log(activity, 'activityactivityactivityactivity')
// if (!activity) { if (!activity) {
// return return
// } }
if (!elementOverlayIds.value[element.value.id] && element.value.type !== 'bpmn:Process') { if (!elementOverlayIds.value[element.value.id] && element.value.type !== 'bpmn:Process') {
let html = `<div class="element-overlays"> let html = `<div class="element-overlays">
<p>Elemet id: ${element.value.id}</p> <p>Elemet id: ${element.value.id}</p>
@ -564,6 +585,45 @@ watch(
stroke: grey !important; stroke: grey !important;
} }
/** 回退 */
.highlight-return.djs-shape .djs-visual > :nth-child(1) {
fill: #e6a23c !important;
stroke: #e6a23c !important;
fill-opacity: 0.2 !important;
}
.highlight-return.djs-shape .djs-visual > :nth-child(2) {
fill: #e6a23c !important;
}
.highlight-return.djs-shape .djs-visual > path {
fill: #e6a23c !important;
fill-opacity: 0.2 !important;
stroke: #e6a23c !important;
}
.highlight-return.djs-connection > .djs-visual > path {
stroke: #e6a23c !important;
}
.highlight-return:not(.djs-connection) .djs-visual > :nth-child(1) {
fill: #e6a23c !important; /* color elements as green */
}
:deep(.highlight-return.djs-shape .djs-visual > :nth-child(1)) {
fill: #e6a23c !important;
stroke: #e6a23c !important;
fill-opacity: 0.2 !important;
}
:deep(.highlight-return.djs-shape .djs-visual > :nth-child(2)) {
fill: #e6a23c !important;
}
:deep(.highlight-return.djs-shape .djs-visual > path) {
fill: #e6a23c !important;
fill-opacity: 0.2 !important;
stroke: #e6a23c !important;
}
:deep(.highlight-return.djs-connection > .djs-visual > path) {
stroke: #e6a23c !important;
}
.element-overlays { .element-overlays {
width: 200px; width: 200px;
padding: 8px; padding: 8px;

View File

@ -278,12 +278,16 @@ export const PromotionDiscountTypeEnum = {
*/ */
export const BrokerageBindModeEnum = { export const BrokerageBindModeEnum = {
ANYTIME: { ANYTIME: {
mode: 0, mode: 1,
name: '没有推广人' name: '首次绑定'
}, },
REGISTER: { REGISTER: {
mode: 1, mode: 2,
name: '新用户' name: '注册绑定'
},
OVERRIDE: {
mode: 3,
name: '覆盖绑定'
} }
} }
/** /**
@ -291,11 +295,11 @@ export const BrokerageBindModeEnum = {
*/ */
export const BrokerageEnabledConditionEnum = { export const BrokerageEnabledConditionEnum = {
ALL: { ALL: {
condition: 0, condition: 1,
name: '人人分销' name: '人人分销'
}, },
ADMIN: { ADMIN: {
condition: 1, condition: 2,
name: '指定分销' name: '指定分销'
} }
} }

View File

@ -69,6 +69,9 @@ const getTimelineItemIcon = (item) => {
if (item.result === 4) { if (item.result === 4) {
return 'el-icon-remove-outline' return 'el-icon-remove-outline'
} }
if (item.result === 5) {
return 'el-icon-back'
}
return '' return ''
} }
@ -86,6 +89,12 @@ const getTimelineItemType = (item) => {
if (item.result === 4) { if (item.result === 4) {
return 'info' return 'info'
} }
if (item.result === 5) {
return 'warning'
}
if (item.result === 6) {
return 'default'
}
return '' return ''
} }
</script> </script>

View File

@ -0,0 +1,86 @@
<template>
<Dialog v-model="dialogVisible" title="委派任务" width="500">
<el-form
ref="formRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="110px"
>
<el-form-item label="接收人" prop="delegateUserId">
<el-select v-model="formData.delegateUserId" clearable style="width: 100%">
<el-option
v-for="item in userList"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="委派理由" prop="reason">
<el-input v-model="formData.reason" clearable placeholder="请输入委派理由" />
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import * as TaskApi from '@/api/bpm/task'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'BpmTaskDelegateForm' })
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const formData = ref({
id: '',
delegateUserId: undefined
})
const formRules = ref({
delegateUserId: [{ required: true, message: '接收人不能为空', trigger: 'change' }]
})
const formRef = ref() // Ref
const userList = ref<any[]>([]) //
/** 打开弹窗 */
const open = async (id: string) => {
dialogVisible.value = true
resetForm()
formData.value.id = id
//
userList.value = await UserApi.getSimpleUserList()
}
defineExpose({ open }) // openModal
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
await TaskApi.delegateTask(formData.value)
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: '',
delegateUserId: undefined
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,90 @@
<template>
<Dialog v-model="dialogVisible" title="回退" width="500">
<el-form
ref="formRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="110px"
>
<el-form-item label="退回节点" prop="targetDefinitionKey">
<el-select v-model="formData.targetDefinitionKey" clearable style="width: 100%">
<el-option
v-for="item in returnList"
:key="item.definitionKey"
:label="item.name"
:value="item.definitionKey"
/>
</el-select>
</el-form-item>
<el-form-item label="回退理由" prop="reason">
<el-input v-model="formData.reason" clearable placeholder="请输入回退理由" />
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" name="TaskRollbackDialogForm" setup>
import * as TaskApi from '@/api/bpm/task'
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const formData = ref({
id: '',
targetDefinitionKey: undefined,
reason: ''
})
const formRules = ref({
targetDefinitionKey: [{ required: true, message: '必须选择回退节点', trigger: 'change' }],
reason: [{ required: true, message: '回退理由不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
const returnList = ref([])
/** 打开弹窗 */
const open = async (id: string) => {
returnList.value = await TaskApi.getReturnList({ taskId: id })
if (returnList.value.length === 0) {
message.warning('当前没有可回退的节点')
return false
}
dialogVisible.value = true
resetForm()
formData.value.id = id
}
defineExpose({ open }) // openModal
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
await TaskApi.returnTask(formData.value)
message.success('回退成功')
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: '',
targetDefinitionKey: undefined,
reason: ''
}
formRef.value?.resetFields()
}
</script>

View File

@ -91,6 +91,10 @@
<!-- 弹窗转派审批人 --> <!-- 弹窗转派审批人 -->
<TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" /> <TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" />
<!-- 弹窗回退节点 -->
<TaskReturnDialog ref="taskReturnDialogRef" @success="getDetail" />
<!-- 委派将任务委派给别人处理处理完成后会重新回到原审批人手中-->
<TaskDelegateForm ref="taskDelegateForm" @success="getDetail" />
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -103,6 +107,8 @@ import * as TaskApi from '@/api/bpm/task'
import TaskUpdateAssigneeForm from './TaskUpdateAssigneeForm.vue' import TaskUpdateAssigneeForm from './TaskUpdateAssigneeForm.vue'
import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue' import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue'
import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue' import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
import TaskReturnDialog from './TaskReturnDialogForm.vue'
import TaskDelegateForm from './taskDelegateForm.vue'
import { registerComponent } from '@/utils/routerHelper' import { registerComponent } from '@/utils/routerHelper'
defineOptions({ name: 'BpmProcessInstanceDetail' }) defineOptions({ name: 'BpmProcessInstanceDetail' })
@ -166,16 +172,17 @@ const openTaskUpdateAssigneeForm = (id: string) => {
taskUpdateAssigneeFormRef.value.open(id) taskUpdateAssigneeFormRef.value.open(id)
} }
const taskDelegateForm = ref()
/** 处理审批退回的操作 */ /** 处理审批退回的操作 */
const handleDelegate = async (task) => { const handleDelegate = async (task) => {
message.error('暂不支持【委派】功能,可以使用【转派】替代!') taskDelegateForm.value.open(task.id)
console.log(task)
} }
//退
const taskReturnDialogRef = ref()
/** 处理审批退回的操作 */ /** 处理审批退回的操作 */
const handleBack = async (task) => { const handleBack = async (task) => {
message.error('暂不支持【退回】功能!') taskReturnDialogRef.value.open(task.id)
console.log(task)
} }
/** 获得详情 */ /** 获得详情 */
@ -256,7 +263,7 @@ const getTaskList = async () => {
auditForms.value = [] auditForms.value = []
tasks.value.forEach((task) => { tasks.value.forEach((task) => {
// 2.1 // 2.1
if (task.result !== 1) { if (task.result !== 1 && task.result !== 6) {
return return
} }
// 2.2 // 2.2

View File

@ -19,6 +19,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 展示上级推广人的信息 -->
<el-descriptions v-if="bindUser" :column="1" border> <el-descriptions v-if="bindUser" :column="1" border>
<el-descriptions-item label="头像"> <el-descriptions-item label="头像">
<el-avatar :src="bindUser.avatar" /> <el-avatar :src="bindUser.avatar" />
@ -79,7 +80,7 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
//
if (!bindUser.value) { if (!bindUser.value) {
message.error('请先查询并确认推广人') message.error('请先查询并确认推广人')
return return
@ -116,7 +117,6 @@ const handleGetUser = async () => {
message.error('不能绑定自己为推广人') message.error('不能绑定自己为推广人')
return return
} }
formLoading.value = true formLoading.value = true
bindUser.value = await BrokerageUserApi.getBrokerageUser(formData.value.bindUserId) bindUser.value = await BrokerageUserApi.getBrokerageUser(formData.value.bindUserId)
if (!bindUser.value) { if (!bindUser.value) {

View File

@ -204,7 +204,7 @@ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
bindUserId: null, bindUserId: null,
brokerageEnabled: null, brokerageEnabled: true,
createTime: [] createTime: []
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
@ -281,7 +281,7 @@ const handleClearBindUser = async (row: BrokerageUserApi.BrokerageUserVO) => {
} catch {} } catch {}
} }
/** 推广资格 开通/关闭 */ /** 推广资格开通/关闭 */
const handleBrokerageEnabledChange = async (row: BrokerageUserApi.BrokerageUserVO) => { const handleBrokerageEnabledChange = async (row: BrokerageUserApi.BrokerageUserVO) => {
try { try {
// //

View File

@ -132,7 +132,7 @@
align="left" align="left"
prop="createTime" prop="createTime"
:formatter="dateFormatter" :formatter="dateFormatter"
width="170px" width="180px"
/> />
<el-table-column label="备注" align="left" prop="remark" /> <el-table-column label="备注" align="left" prop="remark" />
<el-table-column label="状态" align="left" prop="status" min-width="120px"> <el-table-column label="状态" align="left" prop="status" min-width="120px">

View File

@ -10,8 +10,43 @@
<el-form-item label="hideId" v-show="false"> <el-form-item label="hideId" v-show="false">
<el-input v-model="formData.id" /> <el-input v-model="formData.id" />
</el-form-item> </el-form-item>
<el-tabs> <el-tabs>
<!-- 售后 -->
<el-tab-pane label="售后">
<el-form-item label="退款理由" prop="afterSaleRefundReasons">
<el-select
v-model="formData.afterSaleRefundReasons"
allow-create
filterable
multiple
placeholder="请直接输入退款理由"
>
<el-option
v-for="reason in formData.afterSaleRefundReasons"
:key="reason"
:label="reason"
:value="reason"
/>
</el-select>
</el-form-item>
<el-form-item label="退货理由" prop="afterSaleReturnReasons">
<el-select
v-model="formData.afterSaleReturnReasons"
allow-create
filterable
multiple
placeholder="请直接输入退货理由"
>
<el-option
v-for="reason in formData.afterSaleReturnReasons"
:key="reason"
:label="reason"
:value="reason"
/>
</el-select>
</el-form-item>
</el-tab-pane>
<!-- 配送 -->
<el-tab-pane label="配送"> <el-tab-pane label="配送">
<el-form-item label="启用包邮" prop="deliveryExpressFreeEnabled"> <el-form-item label="启用包邮" prop="deliveryExpressFreeEnabled">
<el-switch v-model="formData.deliveryExpressFreeEnabled" style="user-select: none" /> <el-switch v-model="formData.deliveryExpressFreeEnabled" style="user-select: none" />
@ -22,10 +57,15 @@
v-model="formData.deliveryExpressFreePrice" v-model="formData.deliveryExpressFreePrice"
placeholder="请输入满额包邮" placeholder="请输入满额包邮"
class="!w-xs" class="!w-xs"
:precision="2"
:min="0"
/> />
<el-text class="w-full" size="small" type="info"> 商城商品满多少金额即可包邮 </el-text> <el-text class="w-full" size="small" type="info">
商城商品满多少金额即可包邮单位
</el-text>
</el-form-item> </el-form-item>
</el-tab-pane> </el-tab-pane>
<!-- 分销 -->
<el-tab-pane label="分销"> <el-tab-pane label="分销">
<el-form-item label="分佣启用" prop="brokerageEnabled"> <el-form-item label="分佣启用" prop="brokerageEnabled">
<el-switch v-model="formData.brokerageEnabled" style="user-select: none" /> <el-switch v-model="formData.brokerageEnabled" style="user-select: none" />
@ -59,10 +99,10 @@
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
没有推广人只要用户没有推广人随时都可以绑定推广关系 首次绑定只要用户没有推广人随时都可以绑定推广关系
</el-text> </el-text>
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
新用户只有新用户注册时或首次进入系统时才可以绑定推广关系 注册绑定只有新用户注册时或首次进入系统时才可以绑定推广关系
</el-text> </el-text>
</el-form-item> </el-form-item>
<el-form-item label="分销海报图"> <el-form-item label="分销海报图">
@ -76,6 +116,8 @@
v-model="formData.brokerageFirstPercent" v-model="formData.brokerageFirstPercent"
placeholder="请输入一级返佣比例" placeholder="请输入一级返佣比例"
class="!w-xs" class="!w-xs"
:min="0"
:max="100"
/> />
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
订单交易成功后给推广人返佣的百分比 订单交易成功后给推广人返佣的百分比
@ -86,6 +128,8 @@
v-model="formData.brokerageSecondPercent" v-model="formData.brokerageSecondPercent"
placeholder="请输入二级返佣比例" placeholder="请输入二级返佣比例"
class="!w-xs" class="!w-xs"
:min="0"
:max="100"
/> />
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
订单交易成功后给推广人的推荐人返佣的百分比 订单交易成功后给推广人的推荐人返佣的百分比
@ -96,6 +140,7 @@
v-model="formData.brokerageFrozenDays" v-model="formData.brokerageFrozenDays"
placeholder="请输入佣金冻结天数" placeholder="请输入佣金冻结天数"
class="!w-xs" class="!w-xs"
:min="0"
/> />
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
防止用户退款佣金被提现了所以需要设置佣金冻结时间单位 防止用户退款佣金被提现了所以需要设置佣金冻结时间单位
@ -106,6 +151,8 @@
v-model="formData.brokerageWithdrawMinPrice" v-model="formData.brokerageWithdrawMinPrice"
placeholder="请输入提现最低金额" placeholder="请输入提现最低金额"
class="!w-xs" class="!w-xs"
:precision="2"
:min="0"
/> />
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
用户提现最低金额限制单位 用户提现最低金额限制单位
@ -116,9 +163,12 @@
v-model="formData.brokerageWithdrawFeePercent" v-model="formData.brokerageWithdrawFeePercent"
placeholder="请输入提现手续费" placeholder="请输入提现手续费"
class="!w-xs" class="!w-xs"
:min="0"
:max="100"
/> />
<el-text class="w-full" size="small" type="info"> <el-text class="w-full" size="small" type="info">
提现手续费百分比范围0-1000为无提现手续费设置10即收取10%手续费提现100元到账90元10元手续费 提现手续费百分比范围 0-1000 为无提现手续费设置 10即收取 10% 手续费提现
10 到账 9 1 元手续费
</el-text> </el-text>
</el-form-item> </el-form-item>
<el-form-item label="提现方式" prop="brokerageWithdrawTypes"> <el-form-item label="提现方式" prop="brokerageWithdrawTypes">
@ -146,7 +196,7 @@
</el-form-item> </el-form-item>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 保存 -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="submitForm" :loading="formLoading"> 保存 </el-button> <el-button type="primary" @click="submitForm" :loading="formLoading"> 保存 </el-button>
</el-form-item> </el-form-item>
@ -167,11 +217,13 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const formRef = ref() const formRef = ref()
const formData = ref({ const formData = ref({
id: null, id: null,
deliveryExpressFreeEnabled: true, afterSaleRefundReasons: [],
afterSaleReturnReasons: [],
deliveryExpressFreeEnabled: false,
deliveryExpressFreePrice: 0, deliveryExpressFreePrice: 0,
brokerageEnabled: true, brokerageEnabled: false,
brokerageEnabledCondition: BrokerageEnabledConditionEnum.ALL.condition, brokerageEnabledCondition: undefined,
brokerageBindMode: BrokerageBindModeEnum.ANYTIME.mode, brokerageBindMode: undefined,
brokeragePosterUrls: [], brokeragePosterUrls: [],
brokerageFirstPercent: 0, brokerageFirstPercent: 0,
brokerageSecondPercent: 0, brokerageSecondPercent: 0,
@ -211,10 +263,15 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as ConfigApi.ConfigVO const data = {
...formData.value
} as unknown as ConfigApi.ConfigVO
data.brokeragePosterUrls = formData.value.brokeragePosterUrls.map((item: any) => { data.brokeragePosterUrls = formData.value.brokeragePosterUrls.map((item: any) => {
return item?.url ? item.url : item return item?.url ? item.url : item
}) })
//
data.deliveryExpressFreePrice = data.deliveryExpressFreePrice * 100
data.brokerageWithdrawMinPrice = data.brokerageWithdrawMinPrice * 100
await ConfigApi.saveTradeConfig(data) await ConfigApi.saveTradeConfig(data)
message.success('保存成功') message.success('保存成功')
} finally { } finally {
@ -230,6 +287,9 @@ const getConfig = async () => {
if (data != null) { if (data != null) {
data.brokeragePosterUrls = data.brokeragePosterUrls.map((url) => ({ url })) data.brokeragePosterUrls = data.brokeragePosterUrls.map((url) => ({ url }))
formData.value = data formData.value = data
//
formData.value.deliveryExpressFreePrice = data.deliveryExpressFreePrice / 100
formData.value.brokerageWithdrawMinPrice = data.brokerageWithdrawMinPrice / 100
} }
} finally { } finally {
formLoading.value = false formLoading.value = false

View File

@ -24,7 +24,7 @@
</template> </template>
{{ user.totalPoint || 0 }} {{ user.totalPoint || 0 }}
</el-descriptions-item> </el-descriptions-item>
<!-- TODO 芋艿后续接入余额支付金额 --> <!-- TODO @疯狂 wallet 读取下对应字段 -->
<el-descriptions-item> <el-descriptions-item>
<template #label> <template #label>
<descriptions-item-label label=" 当前余额 " icon="svg-icon:member_balance" /> <descriptions-item-label label=" 当前余额 " icon="svg-icon:member_balance" />

View File

@ -39,6 +39,7 @@
<el-tab-pane label="成长值" name="experience" lazy> <el-tab-pane label="成长值" name="experience" lazy>
<UserExperienceRecordList :user-id="id" <UserExperienceRecordList :user-id="id"
/></el-tab-pane> /></el-tab-pane>
<!-- TODO @jason增加一个余额变化 -->
<el-tab-pane label="余额" name="fourth">余额(WIP)</el-tab-pane> <el-tab-pane label="余额" name="fourth">余额(WIP)</el-tab-pane>
<el-tab-pane label="收货地址" name="address" lazy> <el-tab-pane label="收货地址" name="address" lazy>
<UserAddressList :user-id="id" /> <UserAddressList :user-id="id" />
@ -48,7 +49,9 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="售后管理" name="fourth">售后管理(WIP)</el-tab-pane> <el-tab-pane label="售后管理" name="fourth">售后管理(WIP)</el-tab-pane>
<el-tab-pane label="收藏记录" name="fourth">收藏记录(WIP)</el-tab-pane> <el-tab-pane label="收藏记录" name="fourth">收藏记录(WIP)</el-tab-pane>
<!-- TODO @疯狂优惠劵的读取 -->
<el-tab-pane label="优惠劵" name="fourth">优惠劵(WIP)</el-tab-pane> <el-tab-pane label="优惠劵" name="fourth">优惠劵(WIP)</el-tab-pane>
<!-- TODO @疯狂增加获得分校用户直接查询出所有需要体现出是一级还是二级用户编号昵称级别绑定时间 -->
</el-tabs> </el-tabs>
</el-card> </el-card>
</el-row> </el-row>

View File

@ -128,6 +128,8 @@
> >
编辑 编辑
</el-button> </el-button>
<!-- todo @jason增加一个修改余额 -->
<!-- todo @疯狂增加一个修改积分表单是radio 增加/减少input 具体的变化积分 -->
<!-- todo 放到更多菜单中 --> <!-- todo 放到更多菜单中 -->
<el-button <el-button
link link