review:【ANTD】相关的代码
parent
797730ca01
commit
52e04179e4
|
@ -148,6 +148,7 @@ async function handleCategorySortSubmit() {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
|
<!-- TODO @jason:体感整个页面的加载,有点卡顿。先看到分类,大概 1-2 秒后,上箭头变成下,然后看到每个模型。我本地大概 4 个分类,每个分类下 20+ 模型 -->
|
||||||
<!-- 流程分类表单弹窗 -->
|
<!-- 流程分类表单弹窗 -->
|
||||||
<CategoryFormModal @success="getList" />
|
<CategoryFormModal @success="getList" />
|
||||||
<Card
|
<Card
|
||||||
|
|
|
@ -95,8 +95,9 @@ async function onSubmit() {
|
||||||
key: 'action_process_msg',
|
key: 'action_process_msg',
|
||||||
});
|
});
|
||||||
|
|
||||||
router.push({
|
// TODO @ziye、@jason:好像跳转不了?
|
||||||
name: 'BpmOALeaveList',
|
await router.push({
|
||||||
|
name: 'BpmOALeave',
|
||||||
});
|
});
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.message);
|
message.error(error.message);
|
||||||
|
@ -105,36 +106,6 @@ async function onSubmit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 保存草稿 */
|
|
||||||
async function onDraft() {
|
|
||||||
const { valid } = await formApi.validate();
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = (await formApi.getValues()) as BpmOALeaveApi.Leave;
|
|
||||||
|
|
||||||
// 格式化开始时间和结束时间的值
|
|
||||||
const submitData: BpmOALeaveApi.Leave = {
|
|
||||||
...data,
|
|
||||||
startTime: Number(data.startTime),
|
|
||||||
endTime: Number(data.endTime),
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
formLoading.value = true;
|
|
||||||
await (formData.value?.id
|
|
||||||
? updateLeave(submitData)
|
|
||||||
: createLeave(submitData));
|
|
||||||
// 关闭并提示
|
|
||||||
message.success({
|
|
||||||
content: '保存草稿成功',
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 返回上一页 */
|
/** 返回上一页 */
|
||||||
function onBack() {
|
function onBack() {
|
||||||
confirm({
|
confirm({
|
||||||
|
@ -142,6 +113,7 @@ function onBack() {
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
beforeClose({ isConfirm }) {
|
beforeClose({ isConfirm }) {
|
||||||
if (isConfirm) {
|
if (isConfirm) {
|
||||||
|
// TODO @ziye、@jason:是不是要关闭当前标签哈。
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
|
@ -258,8 +230,6 @@ onMounted(async () => {
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<Space warp :size="12" class="w-full px-6">
|
<Space warp :size="12" class="w-full px-6">
|
||||||
<Button type="primary" @click="onSubmit"> 提交 </Button>
|
<Button type="primary" @click="onSubmit"> 提交 </Button>
|
||||||
<!-- TODO 后端接口暂不支持保存草稿 (即仅保存数据,不触发流程)-->
|
|
||||||
<!-- <Button type="default" @click="onDraft"> 保存草稿 </Button> -->
|
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
@ -164,7 +164,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 180,
|
width: 220,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { default: 'actions' },
|
slots: { default: 'actions' },
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,6 +30,7 @@ function openAfterSaleDetail(row: MallAfterSaleApi.AfterSale) {
|
||||||
push({ name: 'TradeAfterSaleDetail', params: { id: row.id } });
|
push({ name: 'TradeAfterSaleDetail', params: { id: row.id } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @xingyu:缺详情页
|
||||||
/** 查看订单详情 */
|
/** 查看订单详情 */
|
||||||
function openOrderDetail(row: MallAfterSaleApi.AfterSale) {
|
function openOrderDetail(row: MallAfterSaleApi.AfterSale) {
|
||||||
push({ name: 'TradeOrderDetail', params: { id: row.id } });
|
push({ name: 'TradeOrderDetail', params: { id: row.id } });
|
||||||
|
|
|
@ -38,6 +38,7 @@ const [Form, formApi] = useVbenForm({
|
||||||
showDefaultActions: false,
|
showDefaultActions: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO @xingyu:城市处理;
|
||||||
const [Modal, modalApi] = useVbenModal({
|
const [Modal, modalApi] = useVbenModal({
|
||||||
async onConfirm() {
|
async onConfirm() {
|
||||||
const { valid } = await formApi.validate();
|
const { valid } = await formApi.validate();
|
||||||
|
|
|
@ -175,6 +175,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
|
<!-- TODO @xingyu:样式乱的 -->
|
||||||
<Card class="mb-4 h-[10%]">
|
<Card class="mb-4 h-[10%]">
|
||||||
<template class="flex flex-row gap-4">
|
<template class="flex flex-row gap-4">
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
|
@ -215,6 +216,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Card>
|
</Card>
|
||||||
|
<!-- TODO @xingyu:核销弹不出来 -->
|
||||||
<Grid class="h-[80%]" table-title="核销订单">
|
<Grid class="h-[80%]" table-title="核销订单">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<TableAction
|
<TableAction
|
||||||
|
|
|
@ -29,6 +29,7 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
|
// TODO xingyu:貌似详情,还点不进去哇?
|
||||||
/** 详情 */
|
/** 详情 */
|
||||||
function handleDetail(row: MallOrderApi.Order) {
|
function handleDetail(row: MallOrderApi.Order) {
|
||||||
push({ name: 'TradeOrderDetail', params: { id: row.id } });
|
push({ name: 'TradeOrderDetail', params: { id: row.id } });
|
||||||
|
|
|
@ -34,6 +34,7 @@ const [Form, formApi] = useVbenForm({
|
||||||
show: () => false,
|
show: () => false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// TODO @xingyu:发货默认选中第一个?
|
||||||
{
|
{
|
||||||
fieldName: 'expressType',
|
fieldName: 'expressType',
|
||||||
label: '发货方式',
|
label: '发货方式',
|
||||||
|
|
Loading…
Reference in New Issue