fix: todo
This commit is contained in:
@@ -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 } });
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>
|
||||
<!-- TODO @xingyu:待开发 -->
|
||||
<div>detail</div>
|
||||
</template>
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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', ['绑定店员'])
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 } });
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>
|
||||
<!-- TODO @xingyu:待开发 -->
|
||||
<div>detail</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user