fit:工单修改和商品关联修改

This commit is contained in:
2025-12-10 20:17:13 +08:00
parent a09631551b
commit 0fe4ece1a9
5 changed files with 173 additions and 51 deletions
+21 -17
View File
@@ -69,9 +69,19 @@
<el-table-column type="selection" width="55" />
<el-table-column prop="id" label="ID" width="80" />
<el-table-column prop="discountId" label="代金券ID" width="120" v-if="!codeId" />
<el-table-column label="关联对象ID" min-width="150">
<el-table-column label="用户名" min-width="150">
<template #default="{ row }">
{{ row.userId || row.userGroupId || '-' }}
{{ row?.user?.user_name || '-' }}
</template>
</el-table-column>
<el-table-column label="手机号" min-width="150">
<template #default="{ row }">
{{ row?.user?.phone || '-' }}
</template>
</el-table-column>
<el-table-column label="邮箱" min-width="150">
<template #default="{ row }">
{{ row?.user?.email || '-' }}
</template>
</el-table-column>
<el-table-column label="类型" width="120">
@@ -81,11 +91,6 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" width="180">
<template #default="{ row }">
{{ formatDate(row.CreatedAt) }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" fixed="right">
<template #default="{ row }">
<div class="action-buttons">
@@ -328,25 +333,24 @@ const formatDate = (dateStr) => {
// 获取用户类型名称(根据行数据)
const getUserTypeNameByRow = (row) => {
// userId 不为 0 说明是用户
if (row.userId && row.userId !== 0) {
//通过看是否有user对象参数判断是否为用户还是用户组类型
if(row.user){
return '用户'
}
// userGroupId 不为 0 说明是用户组
if (row.userGroupId && row.userGroupId !== 0) {
}else{
return '用户组'
}
return '-'
}
// 获取用户类型标签(根据行数据)
const getUserTypeTagByRow = (row) => {
// 用户用蓝色
if (row.userId && row.userId !== 0) {
if(row.user){
return 'primary'
}
// 用户组用橙色
if (row.userGroupId && row.userGroupId !== 0) {
}else{
return 'warning'
}
return 'info'