mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 17:49:20 +08:00
perf: 优化
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 664 B |
@@ -1,135 +0,0 @@
|
|||||||
import type { ProductDTO, ProductVO } from './types';
|
|
||||||
|
|
||||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品管理API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取商品列表
|
|
||||||
*/
|
|
||||||
export async function getProductPageApi(
|
|
||||||
params: PageQueryDTO<ProductDTO.Filters>,
|
|
||||||
) {
|
|
||||||
return requestClient.post<PageResultVO<ProductVO.Info>>(
|
|
||||||
'/ec/product/page',
|
|
||||||
params,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建商品
|
|
||||||
*/
|
|
||||||
export async function createProductApi(data: ProductDTO.Create) {
|
|
||||||
return requestClient.post<ProductVO.Info>('/ec/product/create', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新商品
|
|
||||||
*/
|
|
||||||
export async function updateProductApi(id: number, data: ProductDTO.Update) {
|
|
||||||
return requestClient.put<ProductVO.Info>(`/ec/product/update/${id}`, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除商品
|
|
||||||
*/
|
|
||||||
export async function deleteProductApi(id: number) {
|
|
||||||
return requestClient.delete(`/ec/product/delete/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品规格管理API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取商品规格列表
|
|
||||||
*/
|
|
||||||
export async function getProductSpecPageApi(
|
|
||||||
params: PageQueryDTO<ProductDTO.SpecFilters>,
|
|
||||||
) {
|
|
||||||
return requestClient.post<PageResultVO<ProductVO.SpecInfo>>(
|
|
||||||
'/ec/product-spec/page',
|
|
||||||
params,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建商品规格
|
|
||||||
*/
|
|
||||||
export async function createProductSpecApi(data: ProductDTO.CreateSpec) {
|
|
||||||
return requestClient.post<ProductVO.SpecInfo>(
|
|
||||||
'/ec/product-spec/create',
|
|
||||||
data,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新商品规格
|
|
||||||
*/
|
|
||||||
export async function updateProductSpecApi(
|
|
||||||
id: number,
|
|
||||||
data: ProductDTO.UpdateSpec,
|
|
||||||
) {
|
|
||||||
return requestClient.put<ProductVO.SpecInfo>(
|
|
||||||
`/ec/product-spec/update/${id}`,
|
|
||||||
data,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除商品规格
|
|
||||||
*/
|
|
||||||
export async function deleteProductSpecApi(id: number) {
|
|
||||||
return requestClient.delete(`/ec/product-spec/delete/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 精准查询API - 用于数据导入
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据名称精准查询商品
|
|
||||||
*/
|
|
||||||
export async function getProductByNameApi(name: string) {
|
|
||||||
return requestClient.get<ProductVO.Info>(
|
|
||||||
`/ec/product/find-by-name/${encodeURIComponent(name)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量根据名称查询商品
|
|
||||||
*/
|
|
||||||
export async function getProductsByNamesApi(names: string[]) {
|
|
||||||
return requestClient.post<ProductVO.Info[]>(
|
|
||||||
'/ec/product/find-by-names',
|
|
||||||
names,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据商品名称和规格编码精准查询商品规格
|
|
||||||
*/
|
|
||||||
export async function getProductSpecByProductAndSpecApi(
|
|
||||||
productName: string,
|
|
||||||
specCode: string,
|
|
||||||
) {
|
|
||||||
return requestClient.get<ProductVO.SpecInfo>(
|
|
||||||
`/ec/product-spec/find-by-product-and-spec/${encodeURIComponent(productName)}/${encodeURIComponent(specCode)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量根据商品名称和规格编码查询商品规格
|
|
||||||
*/
|
|
||||||
export async function getProductSpecsByProductAndSpecsApi(
|
|
||||||
queries: { productName: string; specCode: string }[],
|
|
||||||
) {
|
|
||||||
return requestClient.post<ProductVO.Info[]>(
|
|
||||||
'/ec/product-spec/find-by-product-and-specs',
|
|
||||||
queries,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './apis';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export * from './types.dto';
|
|
||||||
export * from './types.vo';
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
/**
|
|
||||||
* 商品相关DTO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace ProductDTO {
|
|
||||||
/** 创建商品参数 */
|
|
||||||
export interface Create {
|
|
||||||
/** 商品名称 */
|
|
||||||
name: string;
|
|
||||||
/** 商品编码 */
|
|
||||||
productCode?: string;
|
|
||||||
/** 主图图片ID */
|
|
||||||
mainImageId?: number;
|
|
||||||
/** 商品规格列表(可选) */
|
|
||||||
specs?: Spec[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新商品参数 */
|
|
||||||
export interface Update {
|
|
||||||
/** 商品名称 */
|
|
||||||
name: string;
|
|
||||||
/** 商品编码 */
|
|
||||||
productCode?: string;
|
|
||||||
/** 商品编码 */
|
|
||||||
specCode?: string;
|
|
||||||
/** 商品SKU */
|
|
||||||
skuCode?: string;
|
|
||||||
/** 主图图片ID */
|
|
||||||
mainImageId?: number;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 商品规格DTO */
|
|
||||||
export interface Spec {
|
|
||||||
/** 规格名称 */
|
|
||||||
name: string;
|
|
||||||
/** 规格编码 */
|
|
||||||
specCode?: string;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 创建商品规格参数 */
|
|
||||||
export interface CreateSpec {
|
|
||||||
/** 商品ID */
|
|
||||||
productId: number;
|
|
||||||
/** 规格名称 */
|
|
||||||
name: string;
|
|
||||||
/** 规格编码 */
|
|
||||||
specCode?: string;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新商品规格参数 */
|
|
||||||
export interface UpdateSpec {
|
|
||||||
/** 规格名称 */
|
|
||||||
name: string;
|
|
||||||
/** 规格编码 */
|
|
||||||
specCode?: string;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 商品过滤条件 */
|
|
||||||
export interface Filters {
|
|
||||||
/** 商品名称(模糊查询) */
|
|
||||||
name?: string;
|
|
||||||
/** 商品编码(模糊查询) */
|
|
||||||
productCode?: string;
|
|
||||||
/** 商品编码(模糊查询) */
|
|
||||||
specCode?: string;
|
|
||||||
/** 商品SKU(模糊查询) */
|
|
||||||
skuCode?: string;
|
|
||||||
/** 成本价范围-最小值 */
|
|
||||||
minCostPrice?: number;
|
|
||||||
/** 成本价范围-最大值 */
|
|
||||||
maxCostPrice?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 商品规格过滤条件 */
|
|
||||||
export interface SpecFilters {
|
|
||||||
/** 商品ID */
|
|
||||||
productId?: number;
|
|
||||||
/** 商品名称(模糊查询) */
|
|
||||||
productName?: string;
|
|
||||||
/** 规格名称(模糊查询) */
|
|
||||||
name?: string;
|
|
||||||
/** 规格编码(模糊查询) */
|
|
||||||
specCode?: string;
|
|
||||||
/** 成本价范围-最小值 */
|
|
||||||
minCostPrice?: number;
|
|
||||||
/** 成本价范围-最大值 */
|
|
||||||
maxCostPrice?: number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/**
|
|
||||||
* 商品相关VO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace ProductVO {
|
|
||||||
/** 商品信息 */
|
|
||||||
export interface Info {
|
|
||||||
/** 商品ID */
|
|
||||||
id: number;
|
|
||||||
/** 公司ID */
|
|
||||||
companyId: number;
|
|
||||||
/** 商品名称 */
|
|
||||||
name: string;
|
|
||||||
/** 商品编码 */
|
|
||||||
productCode?: string;
|
|
||||||
/** 主图URL(冗余字段) */
|
|
||||||
mainImage?: string;
|
|
||||||
/** 主图图片ID */
|
|
||||||
mainImageId?: number;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: string;
|
|
||||||
/** 更新时间 */
|
|
||||||
updateTime: string;
|
|
||||||
/** 创建人ID */
|
|
||||||
createBy?: number;
|
|
||||||
/** 更新人ID */
|
|
||||||
updateBy?: number;
|
|
||||||
/** 商品规格列表 */
|
|
||||||
specs?: SpecInfo[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 商品规格信息 */
|
|
||||||
export interface SpecInfo {
|
|
||||||
/** 规格ID */
|
|
||||||
id: number;
|
|
||||||
/** 公司ID */
|
|
||||||
companyId: number;
|
|
||||||
/** 商品ID */
|
|
||||||
productId: number;
|
|
||||||
/** 商品名称 */
|
|
||||||
productName: string;
|
|
||||||
/** 规格名称 */
|
|
||||||
name: string;
|
|
||||||
/** 规格编码 */
|
|
||||||
specCode?: string;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice: number;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: string;
|
|
||||||
/** 更新时间 */
|
|
||||||
updateTime: string;
|
|
||||||
/** 创建人ID */
|
|
||||||
createBy?: number;
|
|
||||||
/** 更新人ID */
|
|
||||||
updateBy?: number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
|
||||||
import type { PromotionFeeDTO, PromotionFeeVO } from './types';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广费管理API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取推广费记录列表
|
|
||||||
*/
|
|
||||||
export async function getPromotionFeePageApi(params: PageQueryDTO<PromotionFeeDTO.Filters>) {
|
|
||||||
return requestClient.post<PageResultVO<PromotionFeeVO.Info>>('/ec/promotion-fee/page', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建推广费记录
|
|
||||||
*/
|
|
||||||
export async function createPromotionFeeApi(data: PromotionFeeDTO.Create) {
|
|
||||||
return requestClient.post<number>('/ec/promotion-fee', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新推广费记录
|
|
||||||
*/
|
|
||||||
export async function updatePromotionFeeApi(data: PromotionFeeDTO.Update) {
|
|
||||||
return requestClient.put<void>('/ec/promotion-fee', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除推广费记录
|
|
||||||
*/
|
|
||||||
export async function deletePromotionFeeApi(id: number) {
|
|
||||||
return requestClient.delete<void>(`/ec/promotion-fee/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取推广费记录详情
|
|
||||||
*/
|
|
||||||
export async function getPromotionFeeByIdApi(id: number) {
|
|
||||||
return requestClient.get<PromotionFeeVO.Info>(`/ec/promotion-fee/${id}`);
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './apis';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export * from './types.dto';
|
|
||||||
export * from './types.vo';
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
/**
|
|
||||||
* 推广费管理相关DTO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace PromotionFeeDTO {
|
|
||||||
/** 推广费查询过滤条件 */
|
|
||||||
export interface Filters {
|
|
||||||
/** 店铺ID */
|
|
||||||
shopId?: number;
|
|
||||||
/** 推广费类型ID */
|
|
||||||
feeTypeId?: number;
|
|
||||||
/** 平台 */
|
|
||||||
platform?: string;
|
|
||||||
/** 推广费发生日期开始 */
|
|
||||||
feeDateStart?: string;
|
|
||||||
/** 推广费发生日期结束 */
|
|
||||||
feeDateEnd?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 创建推广费记录 */
|
|
||||||
export interface Create {
|
|
||||||
/** 店铺ID */
|
|
||||||
shopId: number;
|
|
||||||
/** 推广费类型ID */
|
|
||||||
feeTypeId: number;
|
|
||||||
/** 推广费名称 */
|
|
||||||
feeName: string;
|
|
||||||
/** 平台(淘宝、京东、拼多多等) */
|
|
||||||
platform?: string;
|
|
||||||
/** 推广活动名称 */
|
|
||||||
campaignName?: string;
|
|
||||||
/** 推广费金额 */
|
|
||||||
feeAmount: number;
|
|
||||||
/** 基础金额(用于按比例计算) */
|
|
||||||
baseAmount?: number;
|
|
||||||
/** 费率(用于按比例计算) */
|
|
||||||
feeRate?: number;
|
|
||||||
/** 点击次数 */
|
|
||||||
clickCount?: number;
|
|
||||||
/** 展示次数 */
|
|
||||||
impressionCount?: number;
|
|
||||||
/** 转化次数 */
|
|
||||||
conversionCount?: number;
|
|
||||||
/** 推广费发生日期 */
|
|
||||||
feeDate: string;
|
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新推广费记录 */
|
|
||||||
export interface Update {
|
|
||||||
/** 推广费记录ID */
|
|
||||||
id: number;
|
|
||||||
/** 店铺ID */
|
|
||||||
shopId: number;
|
|
||||||
/** 推广费类型ID */
|
|
||||||
feeTypeId: number;
|
|
||||||
/** 推广费名称 */
|
|
||||||
feeName: string;
|
|
||||||
/** 平台(淘宝、京东、拼多多等) */
|
|
||||||
platform?: string;
|
|
||||||
/** 推广活动名称 */
|
|
||||||
campaignName?: string;
|
|
||||||
/** 推广费金额 */
|
|
||||||
feeAmount: number;
|
|
||||||
/** 基础金额(用于按比例计算) */
|
|
||||||
baseAmount?: number;
|
|
||||||
/** 费率(用于按比例计算) */
|
|
||||||
feeRate?: number;
|
|
||||||
/** 点击次数 */
|
|
||||||
clickCount?: number;
|
|
||||||
/** 展示次数 */
|
|
||||||
impressionCount?: number;
|
|
||||||
/** 转化次数 */
|
|
||||||
conversionCount?: number;
|
|
||||||
/** 推广费发生日期 */
|
|
||||||
feeDate: string;
|
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/**
|
|
||||||
* 推广费管理相关VO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace PromotionFeeVO {
|
|
||||||
/** 推广费记录信息 */
|
|
||||||
export interface Info {
|
|
||||||
/** 推广费记录ID */
|
|
||||||
id: number;
|
|
||||||
/** 公司ID */
|
|
||||||
companyId: number;
|
|
||||||
/** 店铺ID */
|
|
||||||
shopId: number;
|
|
||||||
/** 店铺名称 */
|
|
||||||
shopName?: string;
|
|
||||||
/** 推广费类型ID */
|
|
||||||
feeTypeId: number;
|
|
||||||
/** 推广费类型名称 */
|
|
||||||
feeTypeName?: string;
|
|
||||||
/** 推广费名称 */
|
|
||||||
feeName: string;
|
|
||||||
/** 平台(淘宝、京东、拼多多等) */
|
|
||||||
platform?: string;
|
|
||||||
/** 推广活动名称 */
|
|
||||||
campaignName?: string;
|
|
||||||
/** 推广费金额 */
|
|
||||||
feeAmount: number;
|
|
||||||
/** 基础金额(用于按比例计算) */
|
|
||||||
baseAmount?: number;
|
|
||||||
/** 费率(用于按比例计算) */
|
|
||||||
feeRate?: number;
|
|
||||||
/** 点击次数 */
|
|
||||||
clickCount?: number;
|
|
||||||
/** 展示次数 */
|
|
||||||
impressionCount?: number;
|
|
||||||
/** 转化次数 */
|
|
||||||
conversionCount?: number;
|
|
||||||
/** 推广费发生日期 */
|
|
||||||
feeDate: string;
|
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: string;
|
|
||||||
/** 更新时间 */
|
|
||||||
updateTime?: string;
|
|
||||||
/** 创建人ID */
|
|
||||||
createBy?: number;
|
|
||||||
/** 更新人ID */
|
|
||||||
updateBy?: number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
import type { ShopDTO, ShopVO } from './types';
|
|
||||||
|
|
||||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 店铺管理API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取店铺列表
|
|
||||||
*/
|
|
||||||
export async function getShopPageApi(params: PageQueryDTO<ShopDTO.Filters>) {
|
|
||||||
return requestClient.post<PageResultVO<ShopVO.Info>>('/ec/shop/page', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建店铺
|
|
||||||
*/
|
|
||||||
export async function createShopApi(data: ShopDTO.Create) {
|
|
||||||
return requestClient.post<ShopVO.Info>('/ec/shop/create', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新店铺
|
|
||||||
*/
|
|
||||||
export async function updateShopApi(id: number, data: ShopDTO.Update) {
|
|
||||||
return requestClient.put<ShopVO.Info>(`/ec/shop/update/${id}`, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除店铺
|
|
||||||
*/
|
|
||||||
export async function deleteShopApi(id: number) {
|
|
||||||
return requestClient.delete(`/ec/shop/delete/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传店铺Logo
|
|
||||||
*/
|
|
||||||
export async function uploadShopLogoApi(file: File) {
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append('file', file);
|
|
||||||
return requestClient.post<ShopVO.Info>('/ec/shop/upload-logo', formData, {
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'multipart/form-data',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 精准查询API - 用于数据导入
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据名称精准查询店铺
|
|
||||||
*/
|
|
||||||
export async function getShopByNameApi(name: string) {
|
|
||||||
return requestClient.get<ShopVO.Info>(
|
|
||||||
`/ec/shop/find-by-name/${encodeURIComponent(name)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量根据名称查询店铺
|
|
||||||
*/
|
|
||||||
export async function getShopsByNamesApi(names: string[]) {
|
|
||||||
return requestClient.post<ShopVO.Info[]>('/ec/shop/find-by-names', names);
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './apis';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export * from './types.dto';
|
|
||||||
export * from './types.vo';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/**
|
|
||||||
* 店铺相关DTO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace ShopDTO {
|
|
||||||
/** 创建店铺参数 */
|
|
||||||
export interface Create {
|
|
||||||
/** 店铺名称 */
|
|
||||||
name: string;
|
|
||||||
/** logo图片ID */
|
|
||||||
logoImageId?: number;
|
|
||||||
/** 平台(如淘宝、京东、拼多多) */
|
|
||||||
platform?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新店铺参数 */
|
|
||||||
export interface Update {
|
|
||||||
/** 店铺名称 */
|
|
||||||
name: string;
|
|
||||||
/** logo图片ID */
|
|
||||||
logoImageId?: number;
|
|
||||||
/** 平台(如淘宝、京东、拼多多) */
|
|
||||||
platform?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 店铺过滤条件 */
|
|
||||||
export interface Filters {
|
|
||||||
/** 店铺名称(模糊查询) */
|
|
||||||
name?: string;
|
|
||||||
/** 平台 */
|
|
||||||
platform?: string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/**
|
|
||||||
* 店铺相关VO类型定义
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace ShopVO {
|
|
||||||
/** 店铺信息 */
|
|
||||||
export interface Info {
|
|
||||||
/** 店铺ID */
|
|
||||||
id: number;
|
|
||||||
/** 所属公司ID */
|
|
||||||
companyId: number;
|
|
||||||
/** 店铺名称 */
|
|
||||||
name: string;
|
|
||||||
/** logo URL(冗余字段) */
|
|
||||||
logo?: string;
|
|
||||||
/** logo图片ID */
|
|
||||||
logoImageId?: number;
|
|
||||||
/** 平台(如淘宝、京东、拼多多) */
|
|
||||||
platform?: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: string;
|
|
||||||
/** 更新时间 */
|
|
||||||
updateTime: string;
|
|
||||||
/** 创建人ID */
|
|
||||||
createBy?: number;
|
|
||||||
/** 更新人ID */
|
|
||||||
updateBy?: number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,4 +15,11 @@ export const overridesPreferences = defineOverridesPreferences({
|
|||||||
navigation: {
|
navigation: {
|
||||||
accordion: false, // 关闭手风琴模式,允许多个菜单同时展开
|
accordion: false, // 关闭手风琴模式,允许多个菜单同时展开
|
||||||
},
|
},
|
||||||
|
theme: {
|
||||||
|
mode: 'light',
|
||||||
|
},
|
||||||
|
transition: {
|
||||||
|
enable: false,
|
||||||
|
name: 'fade',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
+7
-2
@@ -7,7 +7,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -218,7 +218,12 @@ function handleModalSuccess() {
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个订单状态吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+7
-2
@@ -7,7 +7,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -242,7 +242,12 @@ function handleModalSuccess() {
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个推广费类型吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
|
||||||
|
|
||||||
import { Card } from 'ant-design-vue';
|
|
||||||
|
|
||||||
defineOptions({ name: 'DataAnalysis' });
|
|
||||||
|
|
||||||
// 创建图标组件
|
|
||||||
const BarChartIcon = createIconifyIcon('lucide:bar-chart-3');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="p-6">
|
|
||||||
<Card title="数据分析" class="mb-6">
|
|
||||||
<div class="py-12 text-center">
|
|
||||||
<BarChartIcon class="mx-auto mb-4 h-16 w-16 text-gray-400" />
|
|
||||||
<h3 class="mb-2 text-lg font-medium text-gray-700">数据分析功能</h3>
|
|
||||||
<p class="text-gray-500">此功能正在开发中,敬请期待...</p>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
+2
-2
@@ -5,7 +5,7 @@ import type {
|
|||||||
ImportMappingVO,
|
ImportMappingVO,
|
||||||
} from '#/api/ecommerce/import-mapping';
|
} from '#/api/ecommerce/import-mapping';
|
||||||
import type { ImportTaskDTO } from '#/api/ecommerce/import-task';
|
import type { ImportTaskDTO } from '#/api/ecommerce/import-task';
|
||||||
import type { ShopVO } from '#/api/shop/shop/types';
|
import type { ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
|
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
@@ -27,8 +27,8 @@ import {
|
|||||||
getImportMappingPageApi,
|
getImportMappingPageApi,
|
||||||
} from '#/api/ecommerce/import-mapping';
|
} from '#/api/ecommerce/import-mapping';
|
||||||
import { createImportTaskApi } from '#/api/ecommerce/import-task';
|
import { createImportTaskApi } from '#/api/ecommerce/import-task';
|
||||||
|
import { getShopPageApi } from '#/api/ecommerce/shop';
|
||||||
import { uploadFileApi } from '#/api/media/file';
|
import { uploadFileApi } from '#/api/media/file';
|
||||||
import { getShopPageApi } from '#/api/shop/shop';
|
|
||||||
import { useImportTaskStore } from '#/store';
|
import { useImportTaskStore } from '#/store';
|
||||||
|
|
||||||
// 定义映射项数据结构
|
// 定义映射项数据结构
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { OrderDTO, OrderVO } from '#/api/ecommerce/order';
|
import type { OrderDTO, OrderVO } from '#/api/ecommerce/order';
|
||||||
import type { OrderStatusVO } from '#/api/ecommerce/order-status';
|
import type { OrderStatusVO } from '#/api/ecommerce/order-status';
|
||||||
import type { ShopVO } from '#/api/shop/shop/types';
|
import type { ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ import dayjs from 'dayjs';
|
|||||||
|
|
||||||
import { createOrderApi, updateOrderApi } from '#/api/ecommerce/order';
|
import { createOrderApi, updateOrderApi } from '#/api/ecommerce/order';
|
||||||
import { getActiveOrderStatusListApi } from '#/api/ecommerce/order-status';
|
import { getActiveOrderStatusListApi } from '#/api/ecommerce/order-status';
|
||||||
import { getShopPageApi } from '#/api/shop/shop';
|
import { getShopPageApi } from '#/api/ecommerce/shop';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
cancel: [];
|
cancel: [];
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import type { OrderDTO, OrderVO } from '#/api/ecommerce/order';
|
import type { OrderDTO, OrderVO } from '#/api/ecommerce/order';
|
||||||
import type { OrderStatusVO } from '#/api/ecommerce/order-status';
|
import type { OrderStatusVO } from '#/api/ecommerce/order-status';
|
||||||
import type { ShopVO } from '#/api/shop/shop/types';
|
import type { ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
@@ -10,12 +10,12 @@ import { computed, onMounted, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { deleteOrderApi, getOrderPageApi } from '#/api/ecommerce/order';
|
import { deleteOrderApi, getOrderPageApi } from '#/api/ecommerce/order';
|
||||||
import { getActiveOrderStatusListApi } from '#/api/ecommerce/order-status';
|
import { getActiveOrderStatusListApi } from '#/api/ecommerce/order-status';
|
||||||
import { getShopPageApi } from '#/api/shop/shop';
|
import { getShopPageApi } from '#/api/ecommerce/shop';
|
||||||
|
|
||||||
import OrderFormModal from './components/OrderFormModal.vue';
|
import OrderFormModal from './components/OrderFormModal.vue';
|
||||||
|
|
||||||
@@ -350,7 +350,12 @@ onMounted(async () => {
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个订单吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ProductVO } from '#/api/shop/product/types';
|
import type { ProductVO } from '#/api/ecommerce/product/types';
|
||||||
|
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ProductDTO, ProductVO } from '#/api/shop/product/types';
|
import type { ProductDTO, ProductVO } from '#/api/ecommerce/product/types';
|
||||||
|
|
||||||
import { computed, h, onUnmounted, ref, resolveComponent } from 'vue';
|
import { computed, h, onUnmounted, ref, resolveComponent } from 'vue';
|
||||||
|
|
||||||
@@ -16,8 +16,8 @@ import {
|
|||||||
Table,
|
Table,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
|
import { createProductApi, updateProductApi } from '#/api/ecommerce/product';
|
||||||
import { uploadImageApi } from '#/api/media/image';
|
import { uploadImageApi } from '#/api/media/image';
|
||||||
import { createProductApi, updateProductApi } from '#/api/shop/product';
|
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'success'): void;
|
(e: 'success'): void;
|
||||||
|
|||||||
+18
-7
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ProductDTO, ProductVO } from '#/api/shop/product/types';
|
import type { ProductDTO, ProductVO } from '#/api/ecommerce/product/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
message,
|
message,
|
||||||
|
Popconfirm,
|
||||||
Table,
|
Table,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ import {
|
|||||||
deleteProductSpecApi,
|
deleteProductSpecApi,
|
||||||
getProductSpecPageApi,
|
getProductSpecPageApi,
|
||||||
updateProductSpecApi,
|
updateProductSpecApi,
|
||||||
} from '#/api/shop/product';
|
} from '#/api/ecommerce/product';
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'success'): void;
|
(e: 'success'): void;
|
||||||
@@ -174,14 +175,20 @@ const columns = [
|
|||||||
{ default: () => '编辑' },
|
{ default: () => '编辑' },
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
Button,
|
Popconfirm,
|
||||||
{
|
{
|
||||||
size: 'small',
|
title: '确定要删除这个规格吗?',
|
||||||
danger: true,
|
onConfirm: () => handleDeleteSpec(record),
|
||||||
onClick: () => handleDeleteSpec(record),
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
default: () =>
|
||||||
|
h(
|
||||||
|
Button,
|
||||||
|
{ size: 'small', danger: true },
|
||||||
{ default: () => '删除' },
|
{ default: () => '删除' },
|
||||||
),
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -335,7 +342,11 @@ defineExpose({
|
|||||||
<Input v-model:value="specFormData.name" placeholder="请输入规格名称" />
|
<Input v-model:value="specFormData.name" placeholder="请输入规格名称" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item label="规格编码" name="specCode">
|
<Form.Item
|
||||||
|
label="规格编码"
|
||||||
|
name="specCode"
|
||||||
|
:rules="[{ required: true, message: '请输入规格编码' }]"
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
v-model:value="specFormData.specCode"
|
v-model:value="specFormData.specCode"
|
||||||
placeholder="请输入规格编码"
|
placeholder="请输入规格编码"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ProductVO } from '#/api/shop/product/types';
|
import type { ProductVO } from '#/api/ecommerce/product/types';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ import { createIconifyIcon } from '@vben/icons';
|
|||||||
|
|
||||||
import { Button, Divider, Flex, Space } from 'ant-design-vue';
|
import { Button, Divider, Flex, Space } from 'ant-design-vue';
|
||||||
|
|
||||||
import { deleteProductApi } from '#/api/shop/product';
|
import { deleteProductApi } from '#/api/ecommerce/product';
|
||||||
|
|
||||||
import ProductFormModal from './components/ProductFormModal.vue';
|
import ProductFormModal from './components/ProductFormModal.vue';
|
||||||
import ProductSpecModal from './components/ProductSpecModal.vue';
|
import ProductSpecModal from './components/ProductSpecModal.vue';
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ProductDTO, ProductVO } from '#/api/shop/product/types';
|
import type { ProductDTO, ProductVO } from '#/api/ecommerce/product/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
Spin,
|
Spin,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
import { getProductPageApi } from '#/api/shop/product';
|
import { getProductPageApi } from '#/api/ecommerce/product';
|
||||||
|
|
||||||
import ProductCard from '../../components/ProductCard.vue';
|
import ProductCard from '../../components/ProductCard.vue';
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -1,14 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import type { ProductDTO, ProductVO } from '#/api/shop/product/types';
|
import type { ProductDTO, ProductVO } from '#/api/ecommerce/product/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { Button, Image, message, Space, Tag } from 'ant-design-vue';
|
import { Button, Image, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getProductPageApi } from '#/api/shop/product';
|
import { getProductPageApi } from '#/api/ecommerce/product';
|
||||||
|
|
||||||
defineOptions({ name: 'ProductListView' });
|
defineOptions({ name: 'ProductListView' });
|
||||||
|
|
||||||
@@ -328,7 +328,9 @@ defineExpose({
|
|||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" @click="handleManageSpecs(row)"> 规格 </Button>
|
<Button size="small" @click="handleManageSpecs(row)"> 规格 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm title="确定要删除这个商品吗?" @confirm="handleDelete(row)">
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+5
-5
@@ -3,8 +3,8 @@ import type { PromotionFeeTypeVO } from '#/api/ecommerce/promotion-fee-type';
|
|||||||
import type {
|
import type {
|
||||||
PromotionFeeDTO,
|
PromotionFeeDTO,
|
||||||
PromotionFeeVO,
|
PromotionFeeVO,
|
||||||
} from '#/api/shop/promotion-fee/types';
|
} from '#/api/ecommerce/promotion-fee/types';
|
||||||
import type { ShopVO } from '#/api/shop/shop/types';
|
import type { ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
@@ -19,12 +19,12 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
import { getActivePromotionFeeTypeListApi } from '#/api/ecommerce/promotion-fee-type';
|
|
||||||
import {
|
import {
|
||||||
createPromotionFeeApi,
|
createPromotionFeeApi,
|
||||||
updatePromotionFeeApi,
|
updatePromotionFeeApi,
|
||||||
} from '#/api/shop/promotion-fee';
|
} from '#/api/ecommerce/promotion-fee';
|
||||||
import { getShopPageApi } from '#/api/shop/shop';
|
import { getActivePromotionFeeTypeListApi } from '#/api/ecommerce/promotion-fee-type';
|
||||||
|
import { getShopPageApi } from '#/api/ecommerce/shop';
|
||||||
|
|
||||||
defineOptions({ name: 'PromotionFeeFormModal' });
|
defineOptions({ name: 'PromotionFeeFormModal' });
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
|
|||||||
import type {
|
import type {
|
||||||
PromotionFeeDTO,
|
PromotionFeeDTO,
|
||||||
PromotionFeeVO,
|
PromotionFeeVO,
|
||||||
} from '#/api/shop/promotion-fee/types';
|
} from '#/api/ecommerce/promotion-fee/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
@@ -11,13 +11,13 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
deletePromotionFeeApi,
|
deletePromotionFeeApi,
|
||||||
getPromotionFeePageApi,
|
getPromotionFeePageApi,
|
||||||
} from '#/api/shop/promotion-fee';
|
} from '#/api/ecommerce/promotion-fee';
|
||||||
|
|
||||||
import PromotionFeeFormModal from './components/PromotionFeeFormModal.vue';
|
import PromotionFeeFormModal from './components/PromotionFeeFormModal.vue';
|
||||||
|
|
||||||
@@ -359,9 +359,12 @@ const getPlatformColor = (platform: string | undefined) => {
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row.id)">
|
<Popconfirm
|
||||||
删除
|
title="确定要删除这条推广费记录吗?"
|
||||||
</Button>
|
@confirm="handleDelete(row.id)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ShopDTO, ShopVO } from '#/api/shop/shop/types';
|
import type { ShopDTO, ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
|
|
||||||
import { computed, onUnmounted, ref } from 'vue';
|
import { computed, onUnmounted, ref } from 'vue';
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
createShopApi,
|
createShopApi,
|
||||||
updateShopApi,
|
updateShopApi,
|
||||||
uploadShopLogoApi,
|
uploadShopLogoApi,
|
||||||
} from '#/api/shop/shop';
|
} from '#/api/ecommerce/shop';
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'success'): void;
|
(e: 'success'): void;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import type { ShopDTO, ShopVO } from '#/api/shop/shop/types';
|
import type { ShopDTO, ShopVO } from '#/api/ecommerce/shop/types';
|
||||||
import type { PageQueryDTO } from '#/types/common';
|
import type { PageQueryDTO } from '#/types/common';
|
||||||
|
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
@@ -8,10 +8,10 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { deleteShopApi, getShopPageApi } from '#/api/shop/shop';
|
import { deleteShopApi, getShopPageApi } from '#/api/ecommerce/shop';
|
||||||
|
|
||||||
import ShopFormModal from './components/ShopFormModal.vue';
|
import ShopFormModal from './components/ShopFormModal.vue';
|
||||||
|
|
||||||
@@ -271,7 +271,12 @@ function handleModalSuccess() {
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个店铺吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { PageQueryDTO } from '#/types/common';
|
|||||||
|
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { Button, Image, message, Space, Tag } from 'ant-design-vue';
|
import { Button, Image, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getImagePageApi } from '#/api/media/image';
|
import { getImagePageApi } from '#/api/media/image';
|
||||||
@@ -334,9 +334,12 @@ defineExpose({
|
|||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleDownload(row)"> 下载 </Button>
|
<Button size="small" @click="handleDownload(row)"> 下载 </Button>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row.id)">
|
<Popconfirm
|
||||||
删除
|
title="确定要删除这张图片吗?"
|
||||||
</Button>
|
@confirm="handleDelete(row.id)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -336,7 +336,12 @@ const getStatusColor = (status: number) => {
|
|||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个账户吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -333,7 +333,12 @@ function handleModalSuccess() {
|
|||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个账户吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -373,7 +373,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<Button size="small" type="primary" @click="handleMenuManage(row)">
|
<Button size="small" type="primary" @click="handleMenuManage(row)">
|
||||||
菜单
|
菜单
|
||||||
</Button>
|
</Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个公司吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -322,7 +322,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个部门吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -275,7 +275,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<template #action="{ row }: { row: any }">
|
<template #action="{ row }: { row: any }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个岗位吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { computed, onMounted, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -368,10 +368,15 @@ onMounted(() => {
|
|||||||
<EditIcon class="h-3 w-3" />
|
<EditIcon class="h-3 w-3" />
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)">
|
<Popconfirm
|
||||||
|
title="确定要删除这个字段吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger>
|
||||||
<TrashIcon class="h-3 w-3" />
|
<TrashIcon class="h-3 w-3" />
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { onMounted, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -405,10 +405,15 @@ onMounted(() => {
|
|||||||
<EditIcon class="h-3 w-3" />
|
<EditIcon class="h-3 w-3" />
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)">
|
<Popconfirm
|
||||||
|
title="确定要删除这个菜单吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger>
|
||||||
<TrashIcon class="h-3 w-3" />
|
<TrashIcon class="h-3 w-3" />
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
import { createIconifyIcon } from '@vben/icons';
|
import { createIconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tag } from 'ant-design-vue';
|
import { Button, message, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -341,7 +341,12 @@ const getStatusColor = (status: number) => {
|
|||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
<Button size="small" @click="handleEdit(row)"> 编辑 </Button>
|
||||||
<Button size="small" danger @click="handleDelete(row)"> 删除 </Button>
|
<Popconfirm
|
||||||
|
title="确定要删除这个权限吗?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<Button size="small" danger> 删除 </Button>
|
||||||
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user