diff --git a/.env.development b/.env.development index 49162dc..b5845e1 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api -#VITE_API_URL=https://modules.gxwebsoft.com/api +#VITE_API_URL=https://ngb-service-api.websoft.top/api #VITE_SERVER_URL=http://127.0.0.1:9090/api diff --git a/.env.production b/.env.production index b356e41..c6735fc 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api -VITE_API_URL=https://modules.gxwebsoft.com/api +VITE_API_URL=https://ngb-service-api.websoft.top/api diff --git a/src/api/cms/article/model/index.ts b/src/api/cms/article/model/index.ts index 055907f..d93c063 100644 --- a/src/api/cms/article/model/index.ts +++ b/src/api/cms/article/model/index.ts @@ -18,6 +18,8 @@ export interface Article { categoryName?: string; // 封面图 image?: string; + imageWidth?: number; + imageHeight?: number; // 附件 files?: string; // 缩列图 diff --git a/src/api/cms/designCategory/index.ts b/src/api/cms/designCategory/index.ts new file mode 100644 index 0000000..c0b8e15 --- /dev/null +++ b/src/api/cms/designCategory/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { DesignCategory, DesignCategoryParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询设计征集报名分类 + */ +export async function pageDesignCategory(params: DesignCategoryParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/design-category/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询设计征集报名分类列表 + */ +export async function listDesignCategory(params?: DesignCategoryParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-category', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加设计征集报名分类 + */ +export async function addDesignCategory(data: DesignCategory) { + const res = await request.post>( + MODULES_API_URL + '/cms/design-category', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改设计征集报名分类 + */ +export async function updateDesignCategory(data: DesignCategory) { + const res = await request.put>( + MODULES_API_URL + '/cms/design-category', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除设计征集报名分类 + */ +export async function removeDesignCategory(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-category/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除设计征集报名分类 + */ +export async function removeBatchDesignCategory(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-category/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询设计征集报名分类 + */ +export async function getDesignCategory(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-category/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/designCategory/model/index.ts b/src/api/cms/designCategory/model/index.ts new file mode 100644 index 0000000..0b458d0 --- /dev/null +++ b/src/api/cms/designCategory/model/index.ts @@ -0,0 +1,35 @@ +import type { PageParam } from '@/api'; + +/** + * 设计征集报名分类 + */ +export interface DesignCategory { + // + id?: number; + // + title?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0已发布, 1待审核 2已驳回 3违规内容 + status?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 设计征集报名分类搜索条件 + */ +export interface DesignCategoryParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/designCollect/index.ts b/src/api/cms/designCollect/index.ts new file mode 100644 index 0000000..ab034ed --- /dev/null +++ b/src/api/cms/designCollect/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { DesignCollect, DesignCollectParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询设计征集 + */ +export async function pageDesignCollect(params: DesignCollectParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/design-collect/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询设计征集列表 + */ +export async function listDesignCollect(params?: DesignCollectParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-collect', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加设计征集 + */ +export async function addDesignCollect(data: DesignCollect) { + const res = await request.post>( + MODULES_API_URL + '/cms/design-collect', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改设计征集 + */ +export async function updateDesignCollect(data: DesignCollect) { + const res = await request.put>( + MODULES_API_URL + '/cms/design-collect', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除设计征集 + */ +export async function removeDesignCollect(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-collect/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除设计征集 + */ +export async function removeBatchDesignCollect(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-collect/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询设计征集 + */ +export async function getDesignCollect(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-collect/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/designCollect/model/index.ts b/src/api/cms/designCollect/model/index.ts new file mode 100644 index 0000000..3ef4061 --- /dev/null +++ b/src/api/cms/designCollect/model/index.ts @@ -0,0 +1,40 @@ +import type { PageParam } from '@/api'; + +/** + * 设计征集 + */ +export interface DesignCollect { + // + id?: number; + categoryId?: number; + // + title?: string; + // + content?: string; + // + image?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0已发布, 1待审核 2已驳回 3违规内容 + status?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 设计征集搜索条件 + */ +export interface DesignCollectParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/designSignUp/index.ts b/src/api/cms/designSignUp/index.ts new file mode 100644 index 0000000..fb2572b --- /dev/null +++ b/src/api/cms/designSignUp/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { DesignSignUp, DesignSignUpParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询设计征集报名 + */ +export async function pageDesignSignUp(params: DesignSignUpParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/design-sign-up/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询设计征集报名列表 + */ +export async function listDesignSignUp(params?: DesignSignUpParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-sign-up', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加设计征集报名 + */ +export async function addDesignSignUp(data: DesignSignUp) { + const res = await request.post>( + MODULES_API_URL + '/cms/design-sign-up', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改设计征集报名 + */ +export async function updateDesignSignUp(data: DesignSignUp) { + const res = await request.put>( + MODULES_API_URL + '/cms/design-sign-up', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除设计征集报名 + */ +export async function removeDesignSignUp(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-sign-up/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除设计征集报名 + */ +export async function removeBatchDesignSignUp(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-sign-up/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询设计征集报名 + */ +export async function getDesignSignUp(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-sign-up/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/designSignUp/model/index.ts b/src/api/cms/designSignUp/model/index.ts new file mode 100644 index 0000000..4b942f1 --- /dev/null +++ b/src/api/cms/designSignUp/model/index.ts @@ -0,0 +1,42 @@ +import type {PageParam} from '@/api'; + +/** + * 设计征集报名 + */ +export interface DesignSignUp { + // + id?: number; + // + designId?: number; + // + name?: string; + // + phone?: string; + // + content?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0已发布, 1待审核 2已驳回 3违规内容 + status?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 设计征集报名搜索条件 + */ +export interface DesignSignUpParam extends PageParam { + id?: number; + designId?: number; + keywords?: string; +} diff --git a/src/api/shop/count/index.ts~merged b/src/api/shop/count/index.ts~merged new file mode 100644 index 0000000..2c7aca5 --- /dev/null +++ b/src/api/shop/count/index.ts~merged @@ -0,0 +1,231 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +<<<<<<< HEAD +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts +import type { Order, OrderParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询 + */ +export async function pageOrder(params: OrderParam) { + const res = await request.get>>( + MODULES_API_URL + '/booking/order/page', +======= +>>>>>>> origin/master +import type { Count, CountParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +export async function data(params: CountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/count/data', +<<<<<<< HEAD +======= +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 查询列表 + */ +export async function listOrder(params?: OrderParam) { + const res = await request.get>( + MODULES_API_URL + '/booking/order', +======= +>>>>>>> origin/master + * 分页查询商城销售统计表 + */ +export async function pageCount(params: CountParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/count/page', +<<<<<<< HEAD +======= +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 添加 +======= +>>>>>>> origin/master + * 查询商城销售统计表列表 + */ +export async function listCount(params?: CountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/count', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商城销售统计表 +<<<<<<< HEAD + */ +export async function addCount(data: Count) { + const res = await request.post>( + MODULES_API_URL + '/shop/count', +======= +>>>>>>> origin/master:src/api/shop/count/index.ts + */ +export async function addCount(data: Count) { + const res = await request.post>( +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + MODULES_API_URL + '/booking/order', +======= + MODULES_API_URL + '/shop/count', +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD + * 修改商城销售统计表 + */ +export async function updateCount(data: Count) { + const res = await request.put>( + MODULES_API_URL + '/shop/count', +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 修改 +======= + * 修改商城销售统计表 +>>>>>>> origin/master:src/api/shop/count/index.ts + */ +export async function updateCount(data: Count) { + const res = await request.put>( +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + MODULES_API_URL + '/booking/order', +======= + MODULES_API_URL + '/shop/count', +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD + * 删除商城销售统计表 + */ +export async function removeCount(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/count/' + id +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 删除 +======= + * 删除商城销售统计表 +>>>>>>> origin/master:src/api/shop/count/index.ts + */ +export async function removeCount(id?: number) { + const res = await request.delete>( +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + MODULES_API_URL + '/booking/order/' + id +======= + MODULES_API_URL + '/shop/count/' + id +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD + * 批量删除商城销售统计表 + */ +export async function removeBatchCount(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/count/batch', +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 批量删除 +======= + * 批量删除商城销售统计表 +>>>>>>> origin/master:src/api/shop/count/index.ts + */ +export async function removeBatchCount(data: (number | undefined)[]) { + const res = await request.delete>( +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + MODULES_API_URL + '/booking/order/batch', +======= + MODULES_API_URL + '/shop/count/batch', +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** +<<<<<<< HEAD +======= +<<<<<<< HEAD:modules/api/booking_____/order/index.ts + * 根据id查询 + */ +export async function getOrder(id: number) { + const res = await request.get>( + MODULES_API_URL + '/booking/order/' + id +======= +>>>>>>> origin/master + * 根据id查询商城销售统计表 + */ +export async function getCount(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/count/' + id +<<<<<<< HEAD +======= +>>>>>>> origin/master:src/api/shop/count/index.ts +>>>>>>> origin/master + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/goods/model/index.ts b/src/api/shop/goods/model/index.ts index d439e56..330c487 100644 --- a/src/api/shop/goods/model/index.ts +++ b/src/api/shop/goods/model/index.ts @@ -45,18 +45,30 @@ export interface Goods { price?: string; // 销售价格 salePrice?: string; - // 有赠品 - priceGift?: boolean; + chainStorePrice?: string; + chainStoreRate?: string; + memberStoreRate?: string; + memberMarketRate?: string; + memberStorePrice?: string; + memberMarketPrice?: string; // 经销商价格 dealerPrice?: string; // 有赠品 - dealerGift?: string; + buyingGift?: boolean; + // 有赠品 + priceGift?: boolean; + // 有赠品 + dealerGift?: boolean; + buyingGiftNum?: number; + priceGiftNum?: number; + dealerGiftNum?: number; // 库存计算方式(10下单减库存 20付款减库存) deductStockType?: number; // 封面图 files?: string; // 销量 sales?: number; + isNew?: number; // 库存 stock?: number; // 商品重量 @@ -69,6 +81,8 @@ export interface Goods { merchantId?: number; // 商户名称 merchantName?: string; + supplierMerchantId?: number; + supplierName?: string; // 状态(0:未上架,1:上架) isShow?: number; // 状态, 0上架 1待上架 2待审核 3审核不通过 diff --git a/src/api/shop/goodsIncomeConfig/index.ts b/src/api/shop/goodsIncomeConfig/index.ts new file mode 100644 index 0000000..6c2af77 --- /dev/null +++ b/src/api/shop/goodsIncomeConfig/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { GoodsIncomeConfig, GoodsIncomeConfigParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询分润配置 + */ +export async function pageGoodsIncomeConfig(params: GoodsIncomeConfigParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/goods-income-config/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询分润配置列表 + */ +export async function listGoodsIncomeConfig(params?: GoodsIncomeConfigParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/goods-income-config', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加分润配置 + */ +export async function addGoodsIncomeConfig(data: GoodsIncomeConfig) { + const res = await request.post>( + MODULES_API_URL + '/shop/goods-income-config', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改分润配置 + */ +export async function updateGoodsIncomeConfig(data: GoodsIncomeConfig) { + const res = await request.put>( + MODULES_API_URL + '/shop/goods-income-config', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除分润配置 + */ +export async function removeGoodsIncomeConfig(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/goods-income-config/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除分润配置 + */ +export async function removeBatchGoodsIncomeConfig(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/goods-income-config/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询分润配置 + */ +export async function getGoodsIncomeConfig(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/goods-income-config/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/goodsIncomeConfig/model/index.ts b/src/api/shop/goodsIncomeConfig/model/index.ts new file mode 100644 index 0000000..d51e7a9 --- /dev/null +++ b/src/api/shop/goodsIncomeConfig/model/index.ts @@ -0,0 +1,39 @@ +import type { PageParam } from '@/api'; + +/** + * 分润配置 + */ +export interface GoodsIncomeConfig { + // + id?: number; + // + goodsId?: number; + // 店铺类型 + merchantShopType?: string; + // + skuId?: number; + // 比例 + rate?: string; + // 用户id + userId?: number; + // 备注 + comments?: string; + // 排序号 + sortNumber?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 修改时间 + updateTime?: string; + // 创建时间 + createTime?: string; +} + +/** + * 分润配置搜索条件 + */ +export interface GoodsIncomeConfigParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/goodsStockInMerchant/index.ts b/src/api/shop/goodsStockInMerchant/index.ts new file mode 100644 index 0000000..ae268cb --- /dev/null +++ b/src/api/shop/goodsStockInMerchant/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { GoodsStockInMerchant, GoodsStockInMerchantParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户商品库存 + */ +export async function pageGoodsStockInMerchant(params: GoodsStockInMerchantParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/goods-stock-in-merchant/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户商品库存列表 + */ +export async function listGoodsStockInMerchant(params?: GoodsStockInMerchantParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/goods-stock-in-merchant', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户商品库存 + */ +export async function addGoodsStockInMerchant(data: GoodsStockInMerchant) { + const res = await request.post>( + MODULES_API_URL + '/shop/goods-stock-in-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户商品库存 + */ +export async function updateGoodsStockInMerchant(data: GoodsStockInMerchant) { + const res = await request.put>( + MODULES_API_URL + '/shop/goods-stock-in-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户商品库存 + */ +export async function removeGoodsStockInMerchant(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/goods-stock-in-merchant/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户商品库存 + */ +export async function removeBatchGoodsStockInMerchant(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/goods-stock-in-merchant/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户商品库存 + */ +export async function getGoodsStockInMerchant(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/goods-stock-in-merchant/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/goodsStockInMerchant/model/index.ts b/src/api/shop/goodsStockInMerchant/model/index.ts new file mode 100644 index 0000000..1324f2e --- /dev/null +++ b/src/api/shop/goodsStockInMerchant/model/index.ts @@ -0,0 +1,43 @@ +import type { PageParam } from '@/api'; + +/** + * 商户商品库存 + */ +export interface GoodsStockInMerchant { + // + id?: number; + // + goodsId?: number; + // + skuId?: number; + // + num?: number; + // + merchantId?: number; + // + stock?: number; + // 状态, 0上架 1待上架 2待审核 3审核不通过 + status?: number; + // 备注 + comments?: string; + // 排序号 + sortNumber?: number; + // 用户ID + userId?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 商户商品库存搜索条件 + */ +export interface GoodsStockInMerchantParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/merchant/model/index.ts b/src/api/shop/merchant/model/index.ts index 02cd8eb..e282464 100644 --- a/src/api/shop/merchant/model/index.ts +++ b/src/api/shop/merchant/model/index.ts @@ -53,12 +53,16 @@ export interface Merchant { ownStore?: number; // 是否推荐 recommend?: number; + taxRate?: number; // 是否需要审核 goodsReview?: number; // 管理入口 adminUrl?: string; // 备注 comments?: string; + startTime?: string; + endTime?: string; + isOn?: number; // 状态 status?: number; // 排序号 diff --git a/src/api/shop/order/model/index.ts b/src/api/shop/order/model/index.ts index 49f82f6..2059165 100644 --- a/src/api/shop/order/model/index.ts +++ b/src/api/shop/order/model/index.ts @@ -1,6 +1,8 @@ import type { PageParam } from '@/api'; -import { ShopOrderGoods } from '@/api/shop/shopOrderGoods/model'; import { OrderInfo } from '@/api/shop/orderInfo/model'; +import {OrderDelivery} from "@/api/shop/orderDelivery/model"; +import {OrderGoods} from "@/api/shop/orderGoods/model"; +import {Merchant} from "@/api/shop/merchant/model"; /** * @@ -63,11 +65,11 @@ export interface Order { // 教练id coachId?: number; // 1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡 - payType?: string; + payType?: number; // 1已付款,2未付款 - payStatus?: string; + payStatus?: number; // 1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款 - orderStatus?: string; + orderStatus?: number; // 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡 couponType?: string; // 二维码地址,保存订单号,支付成功后才生成 @@ -88,6 +90,7 @@ export interface Order { updateTime?: number; // 付款时间 payTime?: number; + deliveryType?: number; // 退款时间 refundTime?: number; // 申请退款时间 @@ -106,8 +109,18 @@ export interface Order { deleted?: number; // 租户id tenantId?: number; + selfTakeMerchantId?: number; + selfTakeMerchantName?: string; + expressMerchantId?: number; + expressMerchantName?: string; + sendStartTime?: string; + sendEndTime?: string; + hasTakeGift?: number; + selfTakeMerchant?: Merchant; + merchant?: Merchant; orderInfo?: OrderInfo[]; - orderGoods?: ShopOrderGoods[]; + orderGoods?: OrderGoods[]; + orderDelivery?: OrderDelivery } /** diff --git a/src/api/shop/orderDelivery/index.ts b/src/api/shop/orderDelivery/index.ts new file mode 100644 index 0000000..0fa12ce --- /dev/null +++ b/src/api/shop/orderDelivery/index.ts @@ -0,0 +1,19 @@ +import request from '@/utils/request'; +import type { ApiResult } from '@/api'; +import { MODULES_API_URL } from '@/config/setting'; +import {OrderDelivery} from "@/api/shop/orderDelivery/model"; + + +/** + * 添加 + */ +export async function addOrderDelivery(data: OrderDelivery) { + const res = await request.post>( + MODULES_API_URL + '/shop/order-delivery', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/orderDelivery/model/index.ts b/src/api/shop/orderDelivery/model/index.ts new file mode 100644 index 0000000..2f923f7 --- /dev/null +++ b/src/api/shop/orderDelivery/model/index.ts @@ -0,0 +1,27 @@ +import type { PageParam } from '@/api'; +import {Express} from "@/api/shop/express/model"; + +/** + * + */ +export interface OrderDelivery { + // + deliveryId?: number; + orderId?: number; + deliveryMethod?: number; + expressId?: number; + expressNo?: string; + eorderHtml?: string; + // 创建时间 + createTime?: string; + express?: Express; +} + +/** + * 搜索条件 + */ +export interface OrderDeliveryParam extends PageParam { + id?: number; + oid?: number; + keywords?: string; +} diff --git a/src/api/shop/splash/index.ts b/src/api/shop/splash/index.ts new file mode 100644 index 0000000..02e7abe --- /dev/null +++ b/src/api/shop/splash/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { Splash, SplashParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询开屏广告 + */ +export async function pageSplash(params: SplashParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/splash/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询开屏广告列表 + */ +export async function listSplash(params?: SplashParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/splash', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加开屏广告 + */ +export async function addSplash(data: Splash) { + const res = await request.post>( + MODULES_API_URL + '/shop/splash', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改开屏广告 + */ +export async function updateSplash(data: Splash) { + const res = await request.put>( + MODULES_API_URL + '/shop/splash', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除开屏广告 + */ +export async function removeSplash(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/splash/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除开屏广告 + */ +export async function removeBatchSplash(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/splash/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询开屏广告 + */ +export async function getSplash(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/splash/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/splash/model/index.ts b/src/api/shop/splash/model/index.ts new file mode 100644 index 0000000..ba529ca --- /dev/null +++ b/src/api/shop/splash/model/index.ts @@ -0,0 +1,50 @@ +import type {PageParam} from '@/api'; + +/** + * 开屏广告 + */ +export interface Splash { + // + id?: number; + // 标题 + title?: string; + // 图片 + image?: string; + // 跳转类型 + jumpType?: string; + // 跳转主键 + jumpPk?: number; + // 备注 + comments?: string; + // 排序号 + sortNumber?: number; + // 用户ID + userId?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 开屏广告搜索条件 + */ +export interface SplashParam extends PageParam { + id?: number; + keywords?: string; +} + +export const SplashJumpType = [ + { + label: '商品', + value: 'goods' + }, + { + label: '店铺', + value: 'merchant' + } +] diff --git a/src/api/shop/swiper/index.ts b/src/api/shop/swiper/index.ts new file mode 100644 index 0000000..b9d1594 --- /dev/null +++ b/src/api/shop/swiper/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { Swiper, SwiperParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询轮播图 + */ +export async function pageSwiper(params: SwiperParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/swiper/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询轮播图列表 + */ +export async function listSwiper(params?: SwiperParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/swiper', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加轮播图 + */ +export async function addSwiper(data: Swiper) { + const res = await request.post>( + MODULES_API_URL + '/shop/swiper', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改轮播图 + */ +export async function updateSwiper(data: Swiper) { + const res = await request.put>( + MODULES_API_URL + '/shop/swiper', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除轮播图 + */ +export async function removeSwiper(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/swiper/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除轮播图 + */ +export async function removeBatchSwiper(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/swiper/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询轮播图 + */ +export async function getSwiper(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/swiper/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/swiper/model/index.ts b/src/api/shop/swiper/model/index.ts new file mode 100644 index 0000000..d003ad7 --- /dev/null +++ b/src/api/shop/swiper/model/index.ts @@ -0,0 +1,79 @@ +import type { PageParam } from '@/api'; + +/** + * 轮播图 + */ +export interface Swiper { + // + id?: number; + // 所属页面 + type?: string; + // 图片 + image?: string; + // 跳转类型 + jumpType?: string; + // 跳转主键 + jumpPk?: number; + // 备注 + comments?: string; + color?: string; + // 排序号 + sortNumber?: number; + // 用户ID + userId?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 轮播图搜索条件 + */ +export interface SwiperParam extends PageParam { + id?: number; + keywords?: string; +} + + +export const SwiperType = [ + { + label: '会员商城', + value: '会员商城' + }, + { + label: '会员店', + value: '会员店' + }, + { + label: '实体连锁店', + value: '实体连锁店' + }, + { + label: '会员超市', + value: '会员超市' + }, + { + label: '物流配送', + value: '物流配送' + }, + { + label: '设计征集', + value: '设计征集' + }, + { + label: '招商', + value: '招商' + }, +] + +export const SwiperJumpType = [ + { + label: '商品', + value: 'goods' + } +] diff --git a/src/api/shop/userCollection/index.ts b/src/api/shop/userCollection/index.ts new file mode 100644 index 0000000..d737555 --- /dev/null +++ b/src/api/shop/userCollection/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { UserCollection, UserCollectionParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询我的收藏 + */ +export async function pageUserCollection(params: UserCollectionParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/user-collection/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询我的收藏列表 + */ +export async function listUserCollection(params?: UserCollectionParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/user-collection', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加我的收藏 + */ +export async function addUserCollection(data: UserCollection) { + const res = await request.post>( + MODULES_API_URL + '/shop/user-collection', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改我的收藏 + */ +export async function updateUserCollection(data: UserCollection) { + const res = await request.put>( + MODULES_API_URL + '/shop/user-collection', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除我的收藏 + */ +export async function removeUserCollection(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/user-collection/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除我的收藏 + */ +export async function removeBatchUserCollection(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/user-collection/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询我的收藏 + */ +export async function getUserCollection(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/user-collection/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/userCollection/model/index.ts b/src/api/shop/userCollection/model/index.ts new file mode 100644 index 0000000..c83c5ee --- /dev/null +++ b/src/api/shop/userCollection/model/index.ts @@ -0,0 +1,27 @@ +import type { PageParam } from '@/api'; + +/** + * 我的收藏 + */ +export interface UserCollection { + // 主键ID + id?: number; + // 0店铺,1商品 + type?: string; + // 租户ID + tid?: number; + // 用户ID + userId?: number; + // 租户id + tenantId?: number; + // 注册时间 + createTime?: string; +} + +/** + * 我的收藏搜索条件 + */ +export interface UserCollectionParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/components/PayMethod/index.vue b/src/components/PayMethod/index.vue index 3f810e8..73c19f1 100644 --- a/src/components/PayMethod/index.vue +++ b/src/components/PayMethod/index.vue @@ -60,6 +60,12 @@ label: '现金支付', key: 'cashPayment', icon: 'PayCircleOutlined' + }, + { + value: 16, + label: '代付', + key: 'friendPayment', + icon: 'https://oss.wsdns.cn/20241002/3fe17586c7394a1290fd0dae03eb1f24.png' } ]); diff --git a/src/components/SelectFile/components/select-data.vue b/src/components/SelectFile/components/select-data.vue index a039bbf..d052cda 100644 --- a/src/components/SelectFile/components/select-data.vue +++ b/src/components/SelectFile/components/select-data.vue @@ -1,164 +1,166 @@ + + + + diff --git a/src/components/SelectFile/index.vue b/src/components/SelectFile/index.vue index 03ade59..1240251 100644 --- a/src/components/SelectFile/index.vue +++ b/src/components/SelectFile/index.vue @@ -3,12 +3,20 @@ align-items: center; justify-content: flex-start;flex-wrap: wrap">