review:【antd/ele】【mall】营销模块的迁移

This commit is contained in:
YunaiV
2025-12-21 20:50:27 +08:00
parent a3f282cba3
commit 3ea5510a21
15 changed files with 23 additions and 23 deletions

View File

@@ -3,9 +3,7 @@ import 'bpmn-js/dist/assets/diagram-js.css';
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css';
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
// TODO @puhui999样式问题设计器那位置不太对
export { default as MyProcessDesigner } from './designer';
// TODO @puhui999流程发起时预览相关的需要使用
export { default as MyProcessViewer } from './designer/index2';
export { default as MyProcessPenal } from './penal';

View File

@@ -133,7 +133,7 @@ watch(
<Image
v-if="row.picUrl"
:src="row.picUrl"
class="h-[30px] w-[30px] cursor-pointer"
class="!h-[30px] !w-[30px] cursor-pointer"
:preview="true"
/>
</template>

View File

@@ -217,6 +217,7 @@ export function useFormSchema(): VbenFormSchema[] {
},
rules: 'required',
},
// TODO @puhui9991新增时一直报“请输入优惠设置”2修改老数据出现报“请求参数类型错误:50.00”;
{
fieldName: 'rules',
label: '优惠设置',

View File

@@ -61,7 +61,6 @@ const [Modal, modalApi] = useVbenModal({
// 提交表单
try {
const values = await formApi.getValues();
// 合并表单值和 formData含 id、productSpuIds、productCategoryIds 等)
const data = { ...formData.value, ...values };
if (data.startAndEndTime && Array.isArray(data.startAndEndTime)) {
data.startTime = data.startAndEndTime[0];
@@ -74,7 +73,6 @@ const [Modal, modalApi] = useVbenModal({
item.limit = convertToInteger(item.limit || 0);
}
});
// productScopeValues 已通过 data.ts 中的 dependencies.trigger 自动同步到表单值中
await (data.id
? updateRewardActivity(data as MallRewardActivityApi.RewardActivity)
: createRewardActivity(data as MallRewardActivityApi.RewardActivity));
@@ -99,7 +97,6 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
try {
const result = await getReward(data.id);
// antd RangePicker 需要 dayjs 对象
result.startAndEndTime = [
result.startTime ? dayjs(result.startTime) : undefined,
result.endTime ? dayjs(result.endTime) : undefined,

View File

@@ -490,6 +490,7 @@ defineExpose({
@checkbox-all="handleSelectionChange"
>
<VxeColumn v-if="isComponent" type="checkbox" width="45" fixed="left" />
<!-- TODO @puhui999这里的宽度貌似有点问题图片会寄出来 -->
<VxeColumn align="center" title="图片" max-width="140" fixed="left">
<template #default="{ row }">
<ElImage
@@ -582,6 +583,7 @@ defineExpose({
}"
>
<VxeColumn v-if="isComponent" type="checkbox" width="45" fixed="left" />
<!-- TODO @puhui999这里的宽度貌似有点问题图片会寄出来 -->
<VxeColumn align="center" title="图片" max-width="140" fixed="left">
<template #default="{ row }">
<ElImage

View File

@@ -130,6 +130,7 @@ watch(
<VxeColumn field="id" align="center" title="商品编号" min-width="30" />
<VxeColumn title="商品图" min-width="80">
<template #default="{ row }">
<!-- TODO @puhui999它的 preview 貌似展示有点奇怪,不像 antd 是全屏的。。。 -->
<ElImage
v-if="row.picUrl"
:src="row.picUrl"

View File

@@ -9,7 +9,7 @@ import { computed, nextTick, onMounted, ref } from 'vue';
import { handleTree } from '@vben/utils';
import { ElDialog, ElMessage } from 'element-plus';
import { ElButton, ElDialog, ElMessage } from 'element-plus';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getCategoryList } from '#/api/mall/product/category';
@@ -314,8 +314,8 @@ onMounted(async () => {
</Grid>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeModal">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
<ElButton @click="closeModal">取消</ElButton>
<ElButton type="primary" @click="handleConfirm">确定</ElButton>
</span>
</template>
</ElDialog>

View File

@@ -9,7 +9,7 @@ import { computed, nextTick, onMounted, ref } from 'vue';
import { handleTree } from '@vben/utils';
import { ElDialog } from 'element-plus';
import { ElButton, ElDialog } from 'element-plus';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getCategoryList } from '#/api/mall/product/category';
@@ -236,8 +236,8 @@ onMounted(async () => {
<Grid />
<template #footer>
<span v-if="props.multiple" class="dialog-footer">
<el-button @click="closeModal">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
<ElButton @click="closeModal">取消</ElButton>
<ElButton type="primary" @click="handleConfirm">确定</ElButton>
</span>
</template>
</ElDialog>

View File

@@ -320,6 +320,7 @@ onMounted(async () => {
<ElCard class="h-full w-full" v-loading="formLoading">
<template #header>
<div class="flex items-center justify-between">
<!-- TODO @puhui999这里有告警需要修复下 -->
<ElTabs v-model="activeTabName" @tab-change="handleTabChange">
<ElTabPane label="基础设置" name="info" />
<ElTabPane label="价格库存" name="sku" />

View File

@@ -141,7 +141,7 @@ async function getSpuDetails(
// ================= end =================
const [Dialog, modalApi] = useVbenModal({
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();
if (!valid) {
@@ -214,7 +214,7 @@ const [Dialog, modalApi] = useVbenModal({
<template>
<div>
<Dialog :title="getTitle" class="w-[70%]">
<Modal :title="getTitle" class="w-[70%]">
<Form class="mx-4">
<!-- 商品选择 -->
<template #spuId>
@@ -253,7 +253,7 @@ const [Dialog, modalApi] = useVbenModal({
</div>
</template>
</Form>
</Dialog>
</Modal>
<!-- 商品选择器弹窗 -->
<SpuSkuSelect

View File

@@ -4,7 +4,7 @@ import type { MallCouponTemplateApi } from '#/api/mall/promotion/coupon/couponTe
import { ref } from 'vue';
import { ElDialog } from 'element-plus';
import { ElButton, ElDialog } from 'element-plus';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getCouponTemplatePage } from '#/api/mall/promotion/coupon/couponTemplate';
@@ -90,8 +90,8 @@ defineExpose({
>
<Grid />
<template #footer>
<el-button @click="closeModal">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
<ElButton @click="closeModal">取消</ElButton>
<ElButton type="primary" @click="handleConfirm">确定</ElButton>
</template>
</ElDialog>
</template>

View File

@@ -44,6 +44,7 @@ const [Form, formApi] = useVbenForm({
showDefaultActions: false,
});
// TODO @puhui999antd 和 ele 里,修改时,商品都没展示。
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();

View File

@@ -72,7 +72,6 @@ const [Modal, modalApi] = useVbenModal({
item.limit = convertToInteger(item.limit || 0);
}
});
// productScopeValues 已通过 data.ts 中的 dependencies.trigger 自动同步到表单值中
await (data.id
? updateRewardActivity(data as MallRewardActivityApi.RewardActivity)
: createRewardActivity(data as MallRewardActivityApi.RewardActivity));

View File

@@ -107,7 +107,7 @@ function handleDelete(ruleIndex: number) {
<span>{{ isPriceCondition ? '元' : '件' }}</span>
</div>
</ElFormItem>
<!-- 优惠内容 -->
<ElFormItem label="优惠内容:" class="!mb-0">
<div class="flex flex-col gap-3">
<div
@@ -134,7 +134,7 @@ function handleDelete(ruleIndex: number) {
<span class="w-20 shrink-0 text-sm text-gray-500">包邮</span>
<ElSwitch v-model="rule.freeDelivery" />
</div>
<!-- 送积分 -->
<div
class="flex items-center gap-2 rounded-md bg-gray-50 px-3 py-2"
>

View File

@@ -53,7 +53,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
},
{
field: 'logType',
title: '操作类型',
title: '登录类型',
minWidth: 120,
cellRender: {
name: 'CellDict',
@@ -108,7 +108,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
},
{
field: 'logType',
label: '操作类型',
label: '登录类型',
render: (val) => {
return h(DictTag, {
type: DICT_TYPE.SYSTEM_LOGIN_TYPE,