feat: 添加用户ID和订单ID链接跳转功能
- 在团购活动页面中为用户ID添加点击跳转到用户详情的功能 - 在团购管理页面中为用户ID添加点击跳转到用户详情的功能 - 在审核相关页面中为容器ID添加点击跳转到容器详情的功能 - 在营销相关页面中为用户ID和订单ID添加点击跳转功能 - 在订单列表页面中为用户ID和商品ID添加点击跳转功能 - 在商品列表页面中为用户和商品添加点击跳转功能 - 在工单列表页面中为用户名添加点击跳转到用户详情的功能 - 在用户虚拟机列表中为商品和用户添加点击跳转功能 - 在用户余额页面中为支付订单ID添加点击跳转到订单详情的功能 - 统一使用el-link组件实现可点击的链接样式 - 添加useRouter依赖并创建router实例用于页面跳转
This commit is contained in:
@@ -634,6 +634,25 @@
|
||||
inactive-text="禁止"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买类型" prop="arg_type">
|
||||
<el-select
|
||||
v-model="productForm.arg_type"
|
||||
placeholder="请选择购买类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="所有类型" value="all" />
|
||||
<el-option label="仅套餐" value="plan" />
|
||||
<el-option label="仅自定义参数" value="customize" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="需要实名" prop="require_real_name">
|
||||
<el-switch
|
||||
v-model="productForm.require_real_name"
|
||||
active-text="需要"
|
||||
inactive-text="不需要"
|
||||
/>
|
||||
<div style="font-size:12px;color:#909399;margin-top:4px">启用后,用户购买/续费/升级此商品前须完成实名认证</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -686,18 +705,6 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数类型" prop="arg_type" class="arg-type-item">
|
||||
<el-select
|
||||
v-model="productForm.arg_type"
|
||||
placeholder="请选择参数类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="所有参数" value="all" />
|
||||
<el-option label="套餐" value="plan" />
|
||||
<el-option label="自定义" value="customize" />
|
||||
</el-select>
|
||||
<div class="form-tip">all: 所有参数 / plan: 套餐 / customize: 自定义</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -865,7 +872,8 @@ const productForm = reactive({
|
||||
recommend: false,
|
||||
recommend_rebate: 0,
|
||||
arg_type: 'all',
|
||||
can_renew: true
|
||||
can_renew: true,
|
||||
require_real_name: false
|
||||
})
|
||||
|
||||
const productRules = {
|
||||
@@ -1514,7 +1522,8 @@ const handleAddProduct = () => {
|
||||
expire_time: 0,
|
||||
recommend: false,
|
||||
recommend_rebate: 0,
|
||||
arg_type: 'all'
|
||||
arg_type: 'all',
|
||||
require_real_name: false
|
||||
})
|
||||
|
||||
selectedProductGroup.value = null
|
||||
@@ -1547,7 +1556,8 @@ const handleEditProduct = (product, parentGroupId) => {
|
||||
recommend: product.recommend,
|
||||
recommend_rebate: product.recommendRebate,
|
||||
arg_type: product.argType || 'all',
|
||||
can_renew: product.canRenew !== undefined ? product.canRenew : (product.can_renew !== undefined ? product.can_renew : true)
|
||||
can_renew: product.canRenew !== undefined ? product.canRenew : (product.can_renew !== undefined ? product.can_renew : true),
|
||||
require_real_name: product.requireRealName ?? product.require_real_name ?? false
|
||||
})
|
||||
|
||||
productDialogVisible.value = true
|
||||
@@ -1572,7 +1582,8 @@ const submitProductForm = () => {
|
||||
recommend: productForm.recommend,
|
||||
recommend_rebate: Number(productForm.recommend_rebate) || 0,
|
||||
arg_type: productForm.arg_type,
|
||||
can_renew: productForm.can_renew
|
||||
can_renew: productForm.can_renew,
|
||||
require_real_name: productForm.require_real_name
|
||||
}
|
||||
|
||||
let res
|
||||
|
||||
@@ -68,13 +68,18 @@
|
||||
<el-table-column label="用户" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<div class="user-cell">
|
||||
<span class="user-name">{{ row.user?.UserName || row.user?.username || '-' }}</span>
|
||||
<el-link v-if="row.userId || row.user_id" type="primary" :underline="false" @click.stop="router.push({ path: '/user/detail', query: { user_id: row.userId || row.user_id } })">{{ row.user?.UserName || row.user?.username || '-' }}</el-link>
|
||||
<span v-else class="user-name">-</span>
|
||||
<span class="user-id">({{ row.userId || row.user_id || '-' }})</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.good?.name || '-' }} <span style="color:#909399;font-size:12px">(ID:{{ row.good?.id || row.goodId || '-' }})</span></template>
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.good?.name" type="primary" :underline="false" @click.stop="handleDetail(row)">{{ row.good.name }}</el-link>
|
||||
<span v-else>-</span>
|
||||
<span style="color:#909399;font-size:12px"> (ID:{{ row.good?.id || row.goodId || '-' }})</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标签" width="100">
|
||||
<template #default="{ row }">
|
||||
@@ -86,7 +91,10 @@
|
||||
<template #default="{ row }">{{ row.goodPlanId || row.good_plan_id || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.order?.name || (row.orderId ? `订单 #${row.orderId}` : '-') }}</template>
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.orderId" type="primary" :underline="false" @click.stop="router.push({ path: '/order/list', query: { key: row.orderId } })">{{ row.order?.name || `订单 #${row.orderId}` }}</el-link>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="续费价格" width="110">
|
||||
<template #default="{ row }">
|
||||
|
||||
@@ -608,7 +608,7 @@ const reorderAttrs = async (param, src, dst) => {
|
||||
attr_id: item.id,
|
||||
attr_name: item.name,
|
||||
attr_value: item.value || '',
|
||||
attr_price: Number(item.price) || 0,
|
||||
attr_price: Number(item.price) / 100 || 0,
|
||||
index: newIndex
|
||||
}
|
||||
if (param?.type === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user