Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # apps/web-antd/src/views/mall/promotion/point/activity/data.ts # apps/web-antd/src/views/mall/promotion/point/activity/index.vue
This commit is contained in:
@@ -143,7 +143,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'status',
|
||||
minWidth: 150,
|
||||
cellRender: {
|
||||
name: 'CellDictTag',
|
||||
name: 'CellDict',
|
||||
props: {
|
||||
dictType: DICT_TYPE.COMMON_STATUS,
|
||||
},
|
||||
@@ -154,7 +154,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'position',
|
||||
minWidth: 150,
|
||||
cellRender: {
|
||||
name: 'CellDictTag',
|
||||
name: 'CellDict',
|
||||
props: {
|
||||
dictType: DICT_TYPE.PROMOTION_BANNER_POSITION,
|
||||
},
|
||||
|
||||
@@ -197,15 +197,9 @@ function selectSku(skus: MallSpuApi.Sku[]) {
|
||||
selectedSkuIds.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO @puhui999:有 idea 告警
|
||||
if (props.radio) {
|
||||
// 单选模式
|
||||
selectedSkuIds.value = [skus[0]?.id!];
|
||||
} else {
|
||||
// 多选模式
|
||||
selectedSkuIds.value = skus.map((sku) => sku.id!);
|
||||
}
|
||||
props.radio
|
||||
? (selectedSkuIds.value = [skus[0]?.id!])
|
||||
: (selectedSkuIds.value = skus.map((sku) => sku.id!));
|
||||
}
|
||||
|
||||
/** 展开行,加载 SKU 列表 */
|
||||
@@ -280,7 +274,10 @@ const [Modal, modalApi] = useVbenModal({
|
||||
await gridApi.query();
|
||||
},
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
open: modalApi.open,
|
||||
close: modalApi.close,
|
||||
});
|
||||
/** 初始化分类数据 */
|
||||
onMounted(async () => {
|
||||
categoryList.value = await getCategoryList({});
|
||||
|
||||
@@ -110,6 +110,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
label: $t('ui.actionTitle.create', ['积分活动']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.ADD,
|
||||
auth: ['promotion:point-activity:create'],
|
||||
onClick: handleCreate,
|
||||
},
|
||||
]"
|
||||
@@ -122,6 +123,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
label: $t('common.edit'),
|
||||
type: 'link',
|
||||
icon: ACTION_ICON.EDIT,
|
||||
auth: ['promotion:point-activity:update'],
|
||||
onClick: handleEdit.bind(null, row),
|
||||
},
|
||||
{
|
||||
@@ -130,6 +132,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
danger: true,
|
||||
icon: ACTION_ICON.CLOSE,
|
||||
ifShow: row.status === 0,
|
||||
auth: ['promotion:point-activity:close'],
|
||||
popConfirm: {
|
||||
title: '确认关闭该积分商城活动吗?',
|
||||
confirm: handleClose.bind(null, row),
|
||||
@@ -141,6 +144,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
danger: true,
|
||||
icon: ACTION_ICON.DELETE,
|
||||
ifShow: row.status !== 0,
|
||||
auth: ['promotion:point-activity:delete'],
|
||||
popConfirm: {
|
||||
title: $t('ui.actionMessage.deleteConfirm', [row.spuName]),
|
||||
confirm: handleDelete.bind(null, row),
|
||||
|
||||
@@ -109,7 +109,7 @@ const gridColumns = computed<VxeGridProps['columns']>(() => {
|
||||
field: 'marketPrice',
|
||||
title: '原价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
||||
@@ -64,7 +64,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
minWidth: 120,
|
||||
align: 'center',
|
||||
cellRender: {
|
||||
name: 'CellDictTag',
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.PROMOTION_PRODUCT_SCOPE },
|
||||
},
|
||||
},
|
||||
@@ -88,7 +88,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
cellRender: {
|
||||
name: 'CellDictTag',
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -53,7 +53,9 @@ async function handleClose(row: MallRewardActivityApi.RewardActivity) {
|
||||
|
||||
async function handleDelete(row: MallRewardActivityApi.RewardActivity) {
|
||||
await deleteRewardActivity(row.id!);
|
||||
message.success($t('common.delSuccess'));
|
||||
message.success({
|
||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
||||
});
|
||||
handleRefresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user