diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts
index 9d576191..70fc3b8f 100644
--- a/build/vite/optimize.ts
+++ b/build/vite/optimize.ts
@@ -102,7 +102,8 @@ const include = [
'element-plus/es/components/timeline-item/style/css',
'element-plus/es/components/collapse/style/css',
'element-plus/es/components/collapse-item/style/css',
- 'element-plus/es/components/button-group/style/css'
+ 'element-plus/es/components/button-group/style/css',
+ 'element-plus/es/components/text/style/css'
]
const exclude = ['@iconify/json']
diff --git a/src/api/mall/product/brand.ts b/src/api/mall/product/brand.ts
index dc8acc2a..94d53704 100644
--- a/src/api/mall/product/brand.ts
+++ b/src/api/mall/product/brand.ts
@@ -54,3 +54,8 @@ export const getBrand = (id: number) => {
export const getBrandParam = (params: PageParam) => {
return request.get({ url: '/product/brand/page', params })
}
+
+// 获得商品品牌精简信息列表
+export const getSimpleBrandList = () => {
+ return request.get({ url: '/product/brand/list-all-simple' })
+}
diff --git a/src/api/mall/product/management/spu.ts b/src/api/mall/product/management/spu.ts
deleted file mode 100644
index 07d7103e..00000000
--- a/src/api/mall/product/management/spu.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import request from '@/config/axios'
-import type { SpuType } from './type/spuType' // TODO @puhui999: type 和 api 一起放,简单一点哈~
-
-// TODO @puhui999:中英文之间有空格
-
-// 获得spu列表 TODO @puhui999:这个是 getSpuPage 哈
-export const getSpuList = (params: PageParam) => {
- return request.get({ url: '/product/spu/page', params })
-}
-
-// 获得spu列表tabsCount
-export const getTabsCount = () => {
- return request.get({ url: '/product/spu/tabsCount' })
-}
-
-// 创建商品spu
-export const createSpu = (data: SpuType) => {
- return request.post({ url: '/product/spu/create', data })
-}
-
-// 更新商品spu
-export const updateSpu = (data: SpuType) => {
- return request.put({ url: '/product/spu/update', data })
-}
-
-// 更新商品spu status
-export const updateStatus = (data: { id: number; status: number }) => {
- return request.put({ url: '/product/spu/updateStatus', data })
-}
-
-// 获得商品 spu
-export const getSpu = (id: number) => {
- return request.get({ url: `/product/spu/get-detail?id=${id}` })
-}
-
-// 删除商品Spu
-export const deleteSpu = (id: number) => {
- return request.delete({ url: `/product/spu/delete?id=${id}` })
-}
diff --git a/src/api/mall/product/management/type/skuType.ts b/src/api/mall/product/management/type/skuType.ts
deleted file mode 100644
index 42889dc4..00000000
--- a/src/api/mall/product/management/type/skuType.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-export interface Property {
- /**
- * 属性编号
- *
- * 关联 {@link ProductPropertyDO#getId()}
- */
- propertyId?: number
- /**
- * 属性值编号
- *
- * 关联 {@link ProductPropertyValueDO#getId()}
- */
- valueId?: number
- /**
- * 属性值名称
- */
- valueName?: string
-}
-
-export interface SkuType {
- /**
- * 商品 SKU 编号,自增
- */
- id?: number
- /**
- * SPU 编号
- */
- spuId?: number
- /**
- * 属性数组,JSON 格式
- */
- properties?: Property[]
- /**
- * 商品价格,单位:分
- */
- price?: number
- /**
- * 市场价,单位:分
- */
- marketPrice?: number
- /**
- * 成本价,单位:分
- */
- costPrice?: number
- /**
- * 商品条码
- */
- barCode?: string
- /**
- * 图片地址
- */
- picUrl?: string
- /**
- * 库存
- */
- stock?: number
- /**
- * 商品重量,单位:kg 千克
- */
- weight?: number
- /**
- * 商品体积,单位:m^3 平米
- */
- volume?: number
-
- /**
- * 一级分销的佣金,单位:分
- */
- subCommissionFirstPrice?: number
- /**
- * 二级分销的佣金,单位:分
- */
- subCommissionSecondPrice?: number
-
- /**
- * 商品销量
- */
- salesCount?: number
-}
diff --git a/src/api/mall/product/management/type/spuType.ts b/src/api/mall/product/management/type/spuType.ts
deleted file mode 100644
index 11c3c888..00000000
--- a/src/api/mall/product/management/type/spuType.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { SkuType } from './skuType'
-
-export interface SpuType {
- id?: number
- name?: string // 商品名称
- categoryId?: number | null // 商品分类
- keyword?: string // 关键字
- unit?: number | null // 单位
- picUrl?: string // 商品封面图
- sliderPicUrls?: string[] // 商品轮播图
- introduction?: string // 商品简介
- deliveryTemplateId?: number // 运费模版
- specType?: boolean // 商品规格
- subCommissionType?: boolean // 分销类型
- skus: SkuType[] // sku数组
- description?: string // 商品详情
- sort?: string // 商品排序
- giveIntegral?: number // 赠送积分
- virtualSalesCount?: number // 虚拟销量
- recommendHot?: boolean // 是否热卖
- recommendBenefit?: boolean // 是否优惠
- recommendBest?: boolean // 是否精品
- recommendNew?: boolean // 是否新品
- recommendGood?: boolean // 是否优品
-}
diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts
new file mode 100644
index 00000000..fd55e126
--- /dev/null
+++ b/src/api/mall/product/spu.ts
@@ -0,0 +1,92 @@
+import request from '@/config/axios'
+
+export interface Property {
+ propertyId?: number // 属性编号
+ propertyName?: string // 属性名称
+ valueId?: number // 属性值编号
+ valueName?: string // 属性值名称
+}
+
+// TODO puhui999:是不是直接叫 Sku 更简洁一点哈。type 待后面,总感觉有个类型?
+export interface SkuType {
+ id?: number // 商品 SKU 编号
+ spuId?: number // SPU 编号
+ properties?: Property[] // 属性数组
+ price?: number // 商品价格
+ marketPrice?: number // 市场价
+ costPrice?: number // 成本价
+ barCode?: string // 商品条码
+ picUrl?: string // 图片地址
+ stock?: number // 库存
+ weight?: number // 商品重量,单位:kg 千克
+ volume?: number // 商品体积,单位:m^3 平米
+ subCommissionFirstPrice?: number // 一级分销的佣金
+ subCommissionSecondPrice?: number // 二级分销的佣金
+ salesCount?: number // 商品销量
+}
+
+// TODO puhui999:是不是直接叫 Spu 更简洁一点哈。type 待后面,总感觉有个类型?
+export interface SpuType {
+ id?: number
+ name?: string // 商品名称
+ categoryId?: number | null // 商品分类
+ keyword?: string // 关键字
+ unit?: number | null // 单位
+ picUrl?: string // 商品封面图
+ sliderPicUrls?: string[] // 商品轮播图
+ introduction?: string // 商品简介
+ deliveryTemplateId?: number | null // 运费模版
+ brandId?: number | null // 商品品牌编号
+ specType?: boolean // 商品规格
+ subCommissionType?: boolean // 分销类型
+ skus: SkuType[] // sku数组
+ description?: string // 商品详情
+ sort?: string // 商品排序
+ giveIntegral?: number // 赠送积分
+ virtualSalesCount?: number // 虚拟销量
+ recommendHot?: boolean // 是否热卖
+ recommendBenefit?: boolean // 是否优惠
+ recommendBest?: boolean // 是否精品
+ recommendNew?: boolean // 是否新品
+ recommendGood?: boolean // 是否优品
+}
+
+// 获得 Spu 列表
+export const getSpuPage = (params: PageParam) => {
+ return request.get({ url: '/product/spu/page', params })
+}
+
+// 获得 Spu 列表 tabsCount
+export const getTabsCount = () => {
+ return request.get({ url: '/product/spu/get-count' })
+}
+
+// 创建商品 Spu
+export const createSpu = (data: SpuType) => {
+ return request.post({ url: '/product/spu/create', data })
+}
+
+// 更新商品 Spu
+export const updateSpu = (data: SpuType) => {
+ return request.put({ url: '/product/spu/update', data })
+}
+
+// 更新商品 Spu status
+export const updateStatus = (data: { id: number; status: number }) => {
+ return request.put({ url: '/product/spu/update-status', data })
+}
+
+// 获得商品 Spu
+export const getSpu = (id: number) => {
+ return request.get({ url: `/product/spu/get-detail?id=${id}` })
+}
+
+// 删除商品 Spu
+export const deleteSpu = (id: number) => {
+ return request.delete({ url: `/product/spu/delete?id=${id}` })
+}
+
+// 导出商品 Spu Excel
+export const exportSpu = async (params) => {
+ return await request.download({ url: '/product/spu/export', params })
+}
diff --git a/src/api/mall/trade/delivery/express/index.ts b/src/api/mall/trade/delivery/express/index.ts
new file mode 100644
index 00000000..95429a40
--- /dev/null
+++ b/src/api/mall/trade/delivery/express/index.ts
@@ -0,0 +1,40 @@
+import request from '@/config/axios'
+
+export interface DeliveryExpressVO {
+ id: number
+ code: string
+ name: string
+ logo: string
+ sort: number
+ status: number
+}
+
+// 查询快递公司列表
+export const getDeliveryExpressPage = async (params: PageParam) => {
+ return await request.get({ url: '/trade/delivery/express/page', params })
+}
+
+// 查询快递公司详情
+export const getDeliveryExpress = async (id: number) => {
+ return await request.get({ url: '/trade/delivery/express/get?id=' + id })
+}
+
+// 新增快递公司
+export const createDeliveryExpress = async (data: DeliveryExpressVO) => {
+ return await request.post({ url: '/trade/delivery/express/create', data })
+}
+
+// 修改快递公司
+export const updateDeliveryExpress = async (data: DeliveryExpressVO) => {
+ return await request.put({ url: '/trade/delivery/express/update', data })
+}
+
+// 删除快递公司
+export const deleteDeliveryExpress = async (id: number) => {
+ return await request.delete({ url: '/trade/delivery/express/delete?id=' + id })
+}
+
+// 导出快递公司 Excel
+export const exportDeliveryExpressApi = async (params) => {
+ return await request.download({ url: '/trade/delivery/express/export-excel', params })
+}
diff --git a/src/api/mall/trade/delivery/expressTemplate/index.ts b/src/api/mall/trade/delivery/expressTemplate/index.ts
new file mode 100644
index 00000000..9414c847
--- /dev/null
+++ b/src/api/mall/trade/delivery/expressTemplate/index.ts
@@ -0,0 +1,54 @@
+import request from '@/config/axios'
+
+export interface DeliveryExpressTemplateVO {
+ id: number
+ name: string
+ chargeMode: number
+ sort: number
+ templateCharge: ExpressTemplateChargeVO[]
+ templateFree: ExpressTemplateFreeVO[]
+}
+
+export declare type ExpressTemplateChargeVO = {
+ areaIds: number[]
+ startCount: number
+ startPrice: number
+ extraCount: number
+ extraPrice: number
+}
+
+export declare type ExpressTemplateFreeVO = {
+ areaIds: number[]
+ freeCount: number
+ freePrice: number
+}
+
+// 查询快递运费模板列表
+export const getDeliveryExpressTemplatePage = async (params: PageParam) => {
+ return await request.get({ url: '/trade/delivery/express-template/page', params })
+}
+
+// 查询快递运费模板详情
+export const getDeliveryExpressTemplate = async (id: number) => {
+ return await request.get({ url: '/trade/delivery/express-template/get?id=' + id })
+}
+
+// 新增快递运费模板
+export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => {
+ return await request.post({ url: '/trade/delivery/express-template/create', data })
+}
+
+// 修改快递运费模板
+export const updateDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => {
+ return await request.put({ url: '/trade/delivery/express-template/update', data })
+}
+
+// 删除快递运费模板
+export const deleteDeliveryExpressTemplate = async (id: number) => {
+ return await request.delete({ url: '/trade/delivery/express-template/delete?id=' + id })
+}
+
+// 导出快递运费模板 Excel
+export const exportDeliveryExpressTemplateApi = async (params) => {
+ return await request.download({ url: '/trade/delivery/express-template/export-excel', params })
+}
diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts
index e91a4997..b7da941f 100644
--- a/src/api/system/area/index.ts
+++ b/src/api/system/area/index.ts
@@ -5,6 +5,14 @@ export const getAreaTree = async () => {
return await request.get({ url: '/system/area/tree' })
}
+export const getChildrenArea = async (id: number) => {
+ return await request.get({ url: '/system/area/get-children?id=' + id })
+}
+
+export const getAreaListByIds = async (ids) => {
+ return await request.get({ url: '/system/area/get-by-ids?ids=' + ids })
+}
+
// 获得 IP 对应的地区名
export const getAreaByIp = async (ip: string) => {
return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
diff --git a/src/components/UploadFile/src/UploadImgs.vue b/src/components/UploadFile/src/UploadImgs.vue
index 82e5030c..857959bf 100644
--- a/src/components/UploadFile/src/UploadImgs.vue
+++ b/src/components/UploadFile/src/UploadImgs.vue
@@ -1,19 +1,19 @@
-
-
diff --git a/src/views/mall/trade/delivery/express/ExpressForm.vue b/src/views/mall/trade/delivery/express/ExpressForm.vue
new file mode 100644
index 00000000..ea7656e7
--- /dev/null
+++ b/src/views/mall/trade/delivery/express/ExpressForm.vue
@@ -0,0 +1,124 @@
+
+
+
+
diff --git a/src/views/mall/trade/delivery/express/index.vue b/src/views/mall/trade/delivery/express/index.vue
new file mode 100644
index 00000000..323a297f
--- /dev/null
+++ b/src/views/mall/trade/delivery/express/index.vue
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue
new file mode 100644
index 00000000..5b25422d
--- /dev/null
+++ b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue
@@ -0,0 +1,405 @@
+
+
+
+
diff --git a/src/views/mall/trade/delivery/expressTemplate/index.vue b/src/views/mall/trade/delivery/expressTemplate/index.vue
new file mode 100644
index 00000000..e9f670f5
--- /dev/null
+++ b/src/views/mall/trade/delivery/expressTemplate/index.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+