fix: todo

This commit is contained in:
xingyu4j
2025-09-05 14:11:35 +08:00
parent 2369f06654
commit f30a3451de
27 changed files with 170 additions and 137 deletions

View File

@@ -43,13 +43,12 @@ function handleEdit(row: MallCategoryApi.Category) {
/** 查看商品操作 */
const router = useRouter(); // 路由
const handleViewSpu = (id: number) => {
// TODO @xingyu貌似跳转不到详情
function handleViewSpu(id: number) {
router.push({
name: 'ProductSpu',
query: { categoryId: id },
});
};
}
/** 删除分类 */
async function handleDelete(row: MallCategoryApi.Category) {

View File

@@ -269,7 +269,7 @@ onMounted(async () => {
<!-- TODO @xingyu展开的样子有点丑 -->
<Descriptions
:column="4"
class="mt-4"
class="m-4"
:label-style="{
width: '100px',
fontWeight: 'bold',
@@ -278,7 +278,7 @@ onMounted(async () => {
:content-style="{ width: '100px', fontSize: '14px' }"
>
<Descriptions.Item label="商品分类">
{{ treeToString(categoryList, row.categoryId as string) }}
{{ treeToString(categoryList, row.categoryId!) }}
</Descriptions.Item>
<Descriptions.Item label="商品名称">
{{ row.name }}
@@ -291,7 +291,7 @@ onMounted(async () => {
{{ fenToYuan(row.costPrice as number) }}
</Descriptions.Item>
<Descriptions.Item label="浏览量">
{{ row.browseCount as number }}
{{ row.browseCount }}
</Descriptions.Item>
<Descriptions.Item label="虚拟销量">
{{ row.virtualSalesCount }}
@@ -320,7 +320,7 @@ onMounted(async () => {
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['product:spu:delete'],
ifShow: () => row.type === 4,
ifShow: () => tabType === 4,
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.name]),
confirm: handleDelete.bind(null, row),
@@ -331,7 +331,6 @@ onMounted(async () => {
type: 'link',
icon: ACTION_ICON.EDIT,
auth: ['product:spu:update'],
ifShow: () => row.type === 4,
onClick: handleStatus02Change.bind(
null,
row,
@@ -343,7 +342,6 @@ onMounted(async () => {
type: 'link',
icon: ACTION_ICON.EDIT,
auth: ['product:spu:update'],
ifShow: () => row.type !== 4,
onClick: handleStatus02Change.bind(
null,
row,

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup></script>
<template>
detail
<!-- TODO @xingyu待开发 -->
<div>detail</div>
</template>

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup></script>
<template>
form
<!-- TODO @xingyu待开发 -->
<div>form</div>
</template>

View File

@@ -31,7 +31,6 @@ function openAfterSaleDetail(row: MallAfterSaleApi.AfterSale) {
push({ name: 'TradeAfterSaleDetail', params: { id: row.id } });
}
// TODO @xingyu缺详情页
/** 查看订单详情 */
function openOrderDetail(row: MallAfterSaleApi.AfterSale) {
push({ name: 'TradeOrderDetail', params: { id: row.id } });

View File

@@ -0,0 +1,6 @@
<script lang="ts" setup></script>
<template>
<!-- TODO @xingyu待开发 -->
<div>detail</div>
</template>

View File

@@ -7,14 +7,12 @@ import type { MallBrokerageUserApi } from '#/api/mall/trade/brokerage/user';
import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { BrokerageRecordBizTypeEnum } from '@vben/constants';
import { BrokerageRecordBizTypeEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { fenToYuan } from '@vben/utils';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getBrokerageRecordPage } from '#/api/mall/trade/brokerage/record';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getRangePickerDefaultProps } from '#/utils';
/** 推广订单列表 */
@@ -52,16 +50,13 @@ function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'sourceUserLevel',
label: '用户类型',
component: 'RadioGroup',
// TODO @xingyu这里会折行
component: 'Select',
componentProps: {
options: [
{ label: '全部', value: 0 },
{ label: '一级推广人', value: 1 },
{ label: '二级推广人', value: 2 },
],
buttonStyle: 'solid',
optionType: 'button',
},
defaultValue: 0,
},

View File

@@ -41,16 +41,13 @@ function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'level',
label: '用户类型',
component: 'RadioGroup',
// TODO @xingyu这里会折行
component: 'Select',
componentProps: {
options: [
{ label: '全部', value: undefined },
{ label: '一级推广人', value: '1' },
{ label: '二级推广人', value: '2' },
],
buttonStyle: 'solid',
optionType: 'button',
},
},
{

View File

@@ -58,18 +58,22 @@ export function useFormSchema(): VbenFormSchema[] {
label: '详细地址',
rules: 'required',
},
// TODO @xingyu时间类型不对
{
component: 'TimePicker',
fieldName: 'openingTime',
label: '营业开始时间',
rules: 'required',
},
{
component: 'TimePicker',
fieldName: 'closingTime',
label: '营业结束时间',
component: 'TimeRangePicker',
fieldName: 'rangeTime',
label: '营业时间',
rules: 'required',
componentProps: {
format: 'HH:mm',
minuteStep: 15,
disabledTime: () => {
return {
disabledHours: () => {
return [0, 1, 2, 3, 4, 5, 6, 7];
},
};
},
},
},
{
component: 'Input',

View File

@@ -18,7 +18,6 @@ import { useBindFormSchema } from '../data';
const emit = defineEmits(['success']);
const formData = ref<MallDeliveryPickUpStoreApi.PickUpStore>();
// TODO @xingyu店员是多选
const getTitle = computed(() => {
return formData.value?.id
? $t('ui.actionTitle.edit', ['绑定店员'])

View File

@@ -6,6 +6,7 @@ import { computed, ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'ant-design-vue';
import dayjs from 'dayjs';
import { useVbenForm } from '#/adapter/form';
import {
@@ -33,6 +34,7 @@ const [Form, formApi] = useVbenForm({
formItemClass: 'col-span-2',
labelWidth: 120,
},
fieldMappingTime: [['rangeTime', ['openingTime', 'closingTime'], 'HH:mm']],
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,
@@ -73,6 +75,10 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
try {
formData.value = await getDeliveryPickUpStore(data.id);
formData.value.rangeTime = [
dayjs(formData.value.openingTime, 'HH:mm'),
dayjs(formData.value.closingTime, 'HH:mm'),
];
// 设置到 values
await formApi.setValues(formData.value);
} finally {

View File

@@ -33,7 +33,6 @@ function onRefresh() {
gridApi.query();
}
const { push } = useRouter();
// TODO xingyu貌似详情还点不进去哇
/** 详情 */
function handleDetail(row: MallOrderApi.Order) {
push({ name: 'TradeOrderDetail', params: { id: row.id } });

View File

@@ -0,0 +1,6 @@
<script lang="ts" setup></script>
<template>
<!-- TODO @xingyu待开发 -->
<div>detail</div>
</template>