diff --git a/biome.json b/biome.json
index 8b41825..3acf0db 100644
--- a/biome.json
+++ b/biome.json
@@ -12,7 +12,7 @@
"!**/mock",
"!**/dist",
"!**/server",
- "!**/public/**/*",
+ "!**/public",
"!**/coverage",
"!**/node_modules",
"!biome.json"
diff --git a/config/defaultSettings.ts b/config/defaultSettings.ts
index 8229df4..754152f 100644
--- a/config/defaultSettings.ts
+++ b/config/defaultSettings.ts
@@ -20,6 +20,7 @@ const Settings: ProLayoutProps & {
logo: '/logo.svg',
iconfontUrl: '',
splitMenus: true,
+
token: {
// 参见ts声明,demo 见文档,通过token 修改样式
// 设置内容区域的边距
diff --git a/config/proxy.ts b/config/proxy.ts
index 14dbab5..0494fe5 100644
--- a/config/proxy.ts
+++ b/config/proxy.ts
@@ -13,13 +13,10 @@ export default {
// 如果需要自定义本地开发服务器 请取消注释按需调整
dev: {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
- "/admin-api/": {
- // 要代理的地址
+ '/admin-api/': {
// http://192.168.1.231:48080 伟强
// https://petshy.tashowz.com/
- target: "https://petshy.tashowz.com/",
- // 配置了这个可以从 http 代理到 https
- // 依赖 origin 的功能可能需要这个,比如 cookie
+ target: 'https://petshy.tashowz.com',
changeOrigin: true,
},
},
@@ -29,17 +26,17 @@ export default {
*/
test: {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
- "/api/": {
- target: "https://petshy.tashowz.com/",
+ '/api/': {
+ target: 'https://petshy.tashowz.com/',
changeOrigin: true,
- pathRewrite: { "^": "" },
+ pathRewrite: { '^': '' },
},
},
pre: {
- "/api/": {
- target: "your pre url",
+ '/api/': {
+ target: 'https://petshy.tashowz.com/',
changeOrigin: true,
- pathRewrite: { "^": "" },
+ pathRewrite: { '^': '' },
},
},
};
diff --git a/config/routes.ts b/config/routes.ts
index 0a2c3b5..7059fc2 100644
--- a/config/routes.ts
+++ b/config/routes.ts
@@ -34,35 +34,26 @@ export default [
path: '/',
redirect: '/welcome',
},
- {
- path: '/trade',
- name: '交易管理',
- routes: [
- {
- name: '订单管理',
- path: '/trade/order',
- component: './trade/order/index',
- },
- ],
- },
+ // {
+ // path: "/trade",
+ // name: "交易管理",
+ // routes: [
+ // {
+ // name: "订单管理",
+ // path: "/trade/order",
+ // component: "./trade/order/index",
+ // },
+ // ],
+ // },
{
- path: '/prod1',
- name: '商品管理1',
+ path: '/ai1',
+ name: 'AI1',
routes: [
{
- path: '', // 空路径,匹配 /prod
- redirect: 'list', // 相对路径重定向
- },
- {
- name: '商品1',
- path: '/prod1/list',
- component: './prod/list/index',
- },
- {
- name: '类目管理',
- path: '/prod1/category',
- component: './prod/category/index',
+ name: 'ai样本',
+ path: '/ai1/tag',
+ component: './ai/sample-tag',
},
],
},
@@ -77,6 +68,26 @@ export default [
// },
// ],
// },
+ // {
+ // path: "/prod1",
+ // name: "商品管理2",
+ // routes: [
+ // // { index: true, component: "./prod/list/index" },
+ // {
+ // name: "商品管理",
+ // path: "list",
+ // component: "./prod/list/index",
+ // routes: [
+ // {
+ // name: "类目管理",
+ // path: "detail",
+ // component: "./prod/category/index",
+ // hideInMenu: true,
+ // },
+ // ],
+ // },
+ // ],
+ // },
{
component: '404',
layout: false,
diff --git a/mock/dict.ts b/mock/dict.ts
new file mode 100644
index 0000000..404b35d
--- /dev/null
+++ b/mock/dict.ts
@@ -0,0 +1,3128 @@
+import type { Request, Response } from "express";
+
+const getDict = (_req: Request, res: Response) => {
+ res.json({
+ code: 0,
+ data: [
+ {
+ dictType: "ai_generate_mode",
+ value: "1",
+ label: "歌词模式",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_generate_mode",
+ value: "2",
+ label: "描述模式",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_image_status",
+ value: "10",
+ label: "进行中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_image_status",
+ value: "20",
+ label: "已完成",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_image_status",
+ value: "30",
+ label: "已失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_music_status",
+ value: "10",
+ label: "进行中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_music_status",
+ value: "20",
+ label: "已完成",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_music_status",
+ value: "30",
+ label: "已失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "OpenAI",
+ label: "OpenAI",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "AzureOpenAI",
+ label: "OpenAI 微软",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "Ollama",
+ label: "Ollama",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "YiYan",
+ label: "文心一言",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "XingHuo",
+ label: "讯飞星火",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "TongYi",
+ label: "通义千问",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "StableDiffusion",
+ label: "StableDiffusion",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "Midjourney",
+ label: "Midjourney",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "Suno",
+ label: "Suno",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "DeepSeek",
+ label: "DeepSeek",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_platform",
+ value: "ZhiPu",
+ label: "智谱",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "1",
+ label: "自动",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "2",
+ label: "电子邮件",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "3",
+ label: "消息",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "4",
+ label: "评论",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "5",
+ label: "段落",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "5",
+ label: "段落",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "6",
+ label: "文章",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "7",
+ label: "博客文章",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "8",
+ label: "想法",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_format",
+ value: "9",
+ label: "大纲",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_language",
+ value: "1",
+ label: "自动",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_language",
+ value: "2",
+ label: "中文",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_language",
+ value: "3",
+ label: "英文",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_language",
+ value: "4",
+ label: "韩语",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_language",
+ value: "5",
+ label: "日语",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_length",
+ value: "1",
+ label: "自动",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_length",
+ value: "2",
+ label: "短",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_length",
+ value: "3",
+ label: "中等",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_length",
+ value: "4",
+ label: "长",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_length",
+ value: "4",
+ label: "长",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "1",
+ label: "自动",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "2",
+ label: "友善",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "3",
+ label: "随意",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "4",
+ label: "友好",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "5",
+ label: "专业",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "6",
+ label: "诙谐",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "7",
+ label: "有趣",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_tone",
+ value: "8",
+ label: "正式",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_type",
+ value: "1",
+ label: "撰写",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "ai_write_type",
+ value: "2",
+ label: "回复",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_model_form_type",
+ value: "10",
+ label: "流程表单",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_model_form_type",
+ value: "20",
+ label: "业务表单",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_model_type",
+ value: "10",
+ label: "BPMN 设计器",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_model_type",
+ value: "20",
+ label: "SIMPLE 设计器",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_oa_leave_type",
+ value: "1",
+ label: "病假",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_oa_leave_type",
+ value: "2",
+ label: "事假",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_oa_leave_type",
+ value: "3",
+ label: "婚假",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_instance_status",
+ value: "1",
+ label: "审批中",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_instance_status",
+ value: "2",
+ label: "审批通过",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_instance_status",
+ value: "3",
+ label: "审批不通过",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_instance_status",
+ value: "4",
+ label: "已取消",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_listener_type",
+ value: "execution",
+ label: "执行监听器",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_listener_type",
+ value: "task",
+ label: "任务监听器",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_listener_value_type",
+ value: "class",
+ label: "Java 类",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_listener_value_type",
+ value: "expression",
+ label: "表达式",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_process_listener_value_type",
+ value: "delegateExpression",
+ label: "代理表达式",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "10",
+ label: "角色",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "20",
+ label: "部门的成员",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "21",
+ label: "部门的负责人",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "22",
+ label: "岗位",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "30",
+ label: "用户",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "35",
+ label: "发起人自选",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "40",
+ label: "用户组",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_candidate_strategy",
+ value: "60",
+ label: "流程表达式",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "0",
+ label: "待审批",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "1",
+ label: "审批中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "2",
+ label: "审批通过",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "3",
+ label: "审批不通过",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "4",
+ label: "已取消",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "5",
+ label: "已退回",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "6",
+ label: "委派中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "bpm_task_status",
+ value: "7",
+ label: "审批通过中",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "0",
+ label: "工商银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "1",
+ label: "建设银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "2",
+ label: "农业银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "3",
+ label: "中国银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "4",
+ label: "交通银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bank_name",
+ value: "5",
+ label: "招商银行",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bind_mode",
+ value: "1",
+ label: "首次绑定",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bind_mode",
+ value: "2",
+ label: "注册绑定",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_bind_mode",
+ value: "3",
+ label: "覆盖绑定",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_enabled_condition",
+ value: "1",
+ label: "人人分销",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_enabled_condition",
+ value: "2",
+ label: "指定分销",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_biz_type",
+ value: "1",
+ label: "订单返佣",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_biz_type",
+ value: "2",
+ label: "申请提现",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_biz_type",
+ value: "3",
+ label: "申请提现驳回",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_status",
+ value: "0",
+ label: "待结算",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_status",
+ value: "1",
+ label: "已结算",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_record_status",
+ value: "2",
+ label: "已取消",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_status",
+ value: "0",
+ label: "审核中",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_status",
+ value: "10",
+ label: "审核通过",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_status",
+ value: "11",
+ label: "提现成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_status",
+ value: "20",
+ label: "审核不通过",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_status",
+ value: "21",
+ label: "提现失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_type",
+ value: "1",
+ label: "钱包",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_type",
+ value: "2",
+ label: "银行卡",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_type",
+ value: "3",
+ label: "微信",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_type",
+ value: "4",
+ label: "支付宝",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "brokerage_withdraw_type",
+ value: "5",
+ label: "微信零钱",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "common_status",
+ value: "0",
+ label: "开启",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "common_status",
+ value: "1",
+ label: "关闭",
+ colorType: "error",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_audit_status",
+ value: "0",
+ label: "未提交",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_audit_status",
+ value: "10",
+ label: "审批中",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_audit_status",
+ value: "20",
+ label: "审核通过",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_audit_status",
+ value: "30",
+ label: "审核不通过",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_audit_status",
+ value: "40",
+ label: "已取消",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_business_end_status_type",
+ value: "1",
+ label: "赢单",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_business_end_status_type",
+ value: "2",
+ label: "输单",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_business_end_status_type",
+ value: "3",
+ label: "无效",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "1",
+ label: "IT",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "2",
+ label: "金融业",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "3",
+ label: "房地产",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "4",
+ label: "商业服务",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "5",
+ label: "运输/物流",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "6",
+ label: "生产",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "7",
+ label: "政府",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_industry",
+ value: "8",
+ label: "文化传媒",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_level",
+ value: "1",
+ label: "A (重点客户)",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_level",
+ value: "2",
+ label: "B (普通客户)",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_level",
+ value: "3",
+ label: "C (非优先客户)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "1",
+ label: "促销",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "2",
+ label: "搜索引擎",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "3",
+ label: "广告",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "4",
+ label: "转介绍",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "5",
+ label: "线上注册",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "6",
+ label: "线上咨询",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "7",
+ label: "预约上门",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "8",
+ label: "陌拜",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "9",
+ label: "电话咨询",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_customer_source",
+ value: "10",
+ label: "邮件咨询",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_follow_up_type",
+ value: "1",
+ label: "打电话",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_follow_up_type",
+ value: "2",
+ label: "发短信",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_follow_up_type",
+ value: "3",
+ label: "上门拜访",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_follow_up_type",
+ value: "4",
+ label: "微信沟通",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_permission_level",
+ value: "1",
+ label: "负责人",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_permission_level",
+ value: "2",
+ label: "只读",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_permission_level",
+ value: "3",
+ label: "读写",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_status",
+ value: "0",
+ label: "下架",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_status",
+ value: "1",
+ label: "上架",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "1",
+ label: "个",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "2",
+ label: "块",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "3",
+ label: "只",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "4",
+ label: "把",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "5",
+ label: "枚",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "6",
+ label: "瓶",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "7",
+ label: "盒",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "8",
+ label: "台",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "9",
+ label: "吨",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "10",
+ label: "千克",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "11",
+ label: "米",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "12",
+ label: "箱",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_product_unit",
+ value: "13",
+ label: "套",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "1",
+ label: "支票",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "2",
+ label: "现金",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "3",
+ label: "邮政汇款",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "4",
+ label: "电汇",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "5",
+ label: "网上转账",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "6",
+ label: "支付宝",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "7",
+ label: "微信支付",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "crm_receivable_return_type",
+ value: "8",
+ label: "其他",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "date_interval",
+ value: "1",
+ label: "天",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "date_interval",
+ value: "2",
+ label: "周",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "date_interval",
+ value: "3",
+ label: "月",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "date_interval",
+ value: "4",
+ label: "季度",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "date_interval",
+ value: "5",
+ label: "年",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_audit_status",
+ value: "10",
+ label: "未审核",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_audit_status",
+ value: "20",
+ label: "已审核",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "10",
+ label: "其它入库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "11",
+ label: "其它入库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "20",
+ label: "其它出库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "21",
+ label: "其它出库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "30",
+ label: "调拨入库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "31",
+ label: "调拨入库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "32",
+ label: "调拨出库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "33",
+ label: "调拨出库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "40",
+ label: "盘盈入库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "41",
+ label: "盘盈入库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "42",
+ label: "盘亏出库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "43",
+ label: "盘亏出库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "50",
+ label: "销售出库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "51",
+ label: "销售出库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "60",
+ label: "销售退货入库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "61",
+ label: "销售退货入库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "70",
+ label: "采购入库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "71",
+ label: "采购入库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "80",
+ label: "采购退货出库",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "erp_stock_record_biz_type",
+ value: "81",
+ label: "采购退货出库(作废)",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_api_error_log_process_status",
+ value: "0",
+ label: "未处理",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_api_error_log_process_status",
+ value: "1",
+ label: "已处理",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_api_error_log_process_status",
+ value: "2",
+ label: "已忽略",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_boolean_string",
+ value: "true",
+ label: "是",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_boolean_string",
+ value: "false",
+ label: "否",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_front_type",
+ value: "10",
+ label: "Vue2 Element UI 标准模版",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_front_type",
+ value: "20",
+ label: "Vue3 Element Plus 标准模版",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_front_type",
+ value: "30",
+ label: "Vue3 vben 模版",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_scene",
+ value: "1",
+ label: "管理后台",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_scene",
+ value: "2",
+ label: "用户 APP",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "1",
+ label: "单表(增删改查)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "2",
+ label: "树表(增删改查)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "10",
+ label: "主表(标准模式)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "11",
+ label: "主表(ERP 模式)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "12",
+ label: "主表(内嵌模式)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_codegen_template_type",
+ value: "15",
+ label: "子表",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_config_type",
+ value: "1",
+ label: "系统内置",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_config_type",
+ value: "2",
+ label: "自定义",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_file_storage",
+ value: "1",
+ label: "数据库",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_file_storage",
+ value: "10",
+ label: "本地磁盘",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_file_storage",
+ value: "11",
+ label: "FTP 服务器",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_file_storage",
+ value: "12",
+ label: "SFTP 服务器",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_file_storage",
+ value: "20",
+ label: "S3 对象存储",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_log_status",
+ value: "0",
+ label: "运行中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_log_status",
+ value: "1",
+ label: "成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_log_status",
+ value: "2",
+ label: "失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_status",
+ value: "0",
+ label: "初始化中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_status",
+ value: "1",
+ label: "正常",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_job_status",
+ value: "2",
+ label: "暂停",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "0",
+ label: "其它",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "1",
+ label: "查询",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "2",
+ label: "新增",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "3",
+ label: "修改",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "4",
+ label: "删除",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "5",
+ label: "导出",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "infra_operate_type",
+ value: "6",
+ label: "导入",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_data_format",
+ value: "0",
+ label: "标准数据格式(JSON)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_data_format",
+ value: "1",
+ label: "透传/自定义",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_device_status",
+ value: "0",
+ label: "未激活",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_device_status",
+ value: "1",
+ label: "在线",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_device_status",
+ value: "2",
+ label: "离线",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_device_status",
+ value: "3",
+ label: "已禁用",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_net_type",
+ value: "0",
+ label: "Wi-Fi",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_net_type",
+ value: "1",
+ label: "蜂窝(2G / 3G / 4G / 5G)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_net_type",
+ value: "2",
+ label: "以太网",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_net_type",
+ value: "3",
+ label: "其他",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_device_type",
+ value: "0",
+ label: "直连设备",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_device_type",
+ value: "1",
+ label: "网关子设备",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_device_type",
+ value: "2",
+ label: "网关设备",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_function_type",
+ value: "1",
+ label: "属性",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_function_type",
+ value: "2",
+ label: "服务",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_function_type",
+ value: "3",
+ label: "事件",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_status",
+ value: "0",
+ label: "开发中",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_product_status",
+ value: "1",
+ label: "已发布",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_protocol_type",
+ value: "0",
+ label: "自定义",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_protocol_type",
+ value: "1",
+ label: "Modbus",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_protocol_type",
+ value: "2",
+ label: "OPC UA",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_protocol_type",
+ value: "3",
+ label: "ZigBee",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_protocol_type",
+ value: "4",
+ label: "BLE",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_validate_type",
+ value: "0",
+ label: "弱校验",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "iot_validate_type",
+ value: "1",
+ label: "免校验",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "0",
+ label: "管理员调整",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "1",
+ label: "邀新奖励",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "4",
+ label: "签到奖励",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "5",
+ label: "抽奖奖励",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "11",
+ label: "下单奖励",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "12",
+ label: "下单奖励(整单取消)",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "member_experience_biz_type",
+ value: "13",
+ label: "下单奖励(单个退款)",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "1",
+ label: "签到",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "2",
+ label: "管理员修改",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "11",
+ label: "订单积分抵扣",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "12",
+ label: "订单积分抵扣(整单取消)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "13",
+ label: "订单积分抵扣(单个退款)",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "21",
+ label: "订单积分奖励",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "22",
+ label: "订单积分奖励(整单取消)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "member_point_biz_type",
+ value: "23",
+ label: "订单积分奖励(单个退款)",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_auto_reply_request_match",
+ value: "1",
+ label: "完全匹配",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_auto_reply_request_match",
+ value: "2",
+ label: "半匹配",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "text",
+ label: "文本",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "image",
+ label: "图片",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "voice",
+ label: "语音",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "video",
+ label: "视频",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "shortvideo",
+ label: "小视频",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "news",
+ label: "图文",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "music",
+ label: "音乐",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "location",
+ label: "地理位置",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "link",
+ label: "链接",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "mp_message_type",
+ value: "event",
+ label: "事件",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_wap",
+ label: "微信 Wap 网站支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_pub",
+ label: "微信公众号支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_lite",
+ label: "微信小程序支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_app",
+ label: "微信 App 支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_native",
+ label: "微信扫码支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wx_bar",
+ label: "微信条码支付",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "alipay_pc",
+ label: "支付宝 PC 网站支付",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "alipay_wap",
+ label: "支付宝 Wap 网站支付",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "alipay_app",
+ label: "支付宝 App 支付",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "alipay_bar",
+ label: "支付宝条码支付",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "alipay_qr",
+ label: "支付宝扫码支付",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "mock",
+ label: "模拟支付",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_channel_code",
+ value: "wallet",
+ label: "钱包",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_status",
+ value: "0",
+ label: "等待通知",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_status",
+ value: "10",
+ label: "通知成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_status",
+ value: "20",
+ label: "通知失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_status",
+ value: "21",
+ label: "请求成功,但是结果失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_status",
+ value: "22",
+ label: "请求失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_type",
+ value: "1",
+ label: "支付单",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_notify_type",
+ value: "2",
+ label: "退款单",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_order_status",
+ value: "0",
+ label: "等待支付",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_order_status",
+ value: "10",
+ label: "支付成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_order_status",
+ value: "20",
+ label: "已退款",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_order_status",
+ value: "30",
+ label: "支付关闭",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_refund_status",
+ value: "0",
+ label: "等待退款",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_refund_status",
+ value: "10",
+ label: "退款成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_refund_status",
+ value: "20",
+ label: "退款失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_status",
+ value: "0",
+ label: "等待转账",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_status",
+ value: "10",
+ label: "转账进行中",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_status",
+ value: "20",
+ label: "转账成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_status",
+ value: "30",
+ label: "转账失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_type",
+ value: "1",
+ label: "支付宝余额",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_type",
+ value: "2",
+ label: "微信余额",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_type",
+ value: "3",
+ label: "银行卡",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "pay_transfer_type",
+ value: "4",
+ label: "钱包余额",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "product_spu_status",
+ value: "0",
+ label: "仓库中",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "product_spu_status",
+ value: "-1",
+ label: "回收站",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "product_spu_status",
+ value: "1",
+ label: "销售中",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_activity_status",
+ value: "10",
+ label: "未开始",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_activity_status",
+ value: "20",
+ label: "进行中",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_activity_status",
+ value: "30",
+ label: "已结束",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_activity_status",
+ value: "40",
+ label: "已关闭",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_banner_position",
+ value: "5",
+ label: "满减送页",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_banner_position",
+ value: "4",
+ label: "限时折扣页",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_banner_position",
+ value: "3",
+ label: "砍价活动页",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_banner_position",
+ value: "2",
+ label: "秒杀活动页",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_banner_position",
+ value: "1",
+ label: "首页",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_bargain_record_status",
+ value: "1",
+ label: "砍价中",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_bargain_record_status",
+ value: "2",
+ label: "砍价成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_bargain_record_status",
+ value: "3",
+ label: "砍价失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_combination_record_status",
+ value: "0",
+ label: "拼团中",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_combination_record_status",
+ value: "1",
+ label: "拼团成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_combination_record_status",
+ value: "2",
+ label: "拼团失败",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_condition_type",
+ value: "10",
+ label: "满 N 元",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_condition_type",
+ value: "20",
+ label: "满 N 件",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_status",
+ value: "1",
+ label: "未使用",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_status",
+ value: "2",
+ label: "已使用",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_status",
+ value: "3",
+ label: "已过期",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_take_type",
+ value: "1",
+ label: "直接领取",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_take_type",
+ value: "2",
+ label: "指定发放",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_take_type",
+ value: "3",
+ label: "新人券",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_template_validity_type",
+ value: "1",
+ label: "固定日期",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_coupon_template_validity_type",
+ value: "2",
+ label: "领取之后",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_discount_type",
+ value: "1",
+ label: "满减",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_discount_type",
+ value: "2",
+ label: "折扣",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_product_scope",
+ value: "1",
+ label: "通用劵",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_product_scope",
+ value: "2",
+ label: "商品劵",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "promotion_product_scope",
+ value: "3",
+ label: "品类劵",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "system_data_scope",
+ value: "1",
+ label: "全部数据权限",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_data_scope",
+ value: "2",
+ label: "指定部门数据权限",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_data_scope",
+ value: "3",
+ label: "本部门数据权限",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_data_scope",
+ value: "4",
+ label: "本部门及以下数据权限",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_data_scope",
+ value: "5",
+ label: "仅本人数据权限",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "0",
+ label: "成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "10",
+ label: "账号或密码不正确",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "20",
+ label: "用户被禁用",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "30",
+ label: "验证码不存在",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "31",
+ label: "验证码不正确",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_result",
+ value: "100",
+ label: "未知异常",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_type",
+ value: "100",
+ label: "账号登录",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_type",
+ value: "101",
+ label: "社交登录",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_type",
+ value: "103",
+ label: "短信登录",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_type",
+ value: "200",
+ label: "主动登出",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_login_type",
+ value: "202",
+ label: "强制登出",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_mail_send_status",
+ value: "0",
+ label: "初始化",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_mail_send_status",
+ value: "10",
+ label: "发送成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_mail_send_status",
+ value: "20",
+ label: "发送失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_mail_send_status",
+ value: "30",
+ label: "不发送",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_menu_type",
+ value: "1",
+ label: "目录",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_menu_type",
+ value: "2",
+ label: "菜单",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_menu_type",
+ value: "3",
+ label: "按钮",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_notice_type",
+ value: "1",
+ label: "通知",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_notice_type",
+ value: "2",
+ label: "公告",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_notify_template_type",
+ value: "1",
+ label: "通知公告",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_notify_template_type",
+ value: "2",
+ label: "系统消息",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_oauth2_grant_type",
+ value: "password",
+ label: "password",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "system_oauth2_grant_type",
+ value: "authorization_code",
+ label: "authorization_code",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_oauth2_grant_type",
+ value: "implicit",
+ label: "implicit",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_oauth2_grant_type",
+ value: "client_credentials",
+ label: "client_credentials",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "system_oauth2_grant_type",
+ value: "refresh_token",
+ label: "refresh_token",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_role_type",
+ value: "1",
+ label: "内置",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_role_type",
+ value: "2",
+ label: "自定义",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_channel_code",
+ value: "DEBUG_DING_TALK",
+ label: "调试(钉钉)",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_channel_code",
+ value: "ALIYUN",
+ label: "阿里云",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_channel_code",
+ value: "TENCENT",
+ label: "腾讯云",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_channel_code",
+ value: "HUAWEI",
+ label: "华为云",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_channel_code",
+ value: "QINIU",
+ label: "七牛云",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_receive_status",
+ value: "0",
+ label: "等待结果",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_receive_status",
+ value: "10",
+ label: "接收成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_receive_status",
+ value: "20",
+ label: "接收失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_send_status",
+ value: "0",
+ label: "初始化",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_send_status",
+ value: "10",
+ label: "发送成功",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_send_status",
+ value: "20",
+ label: "发送失败",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_send_status",
+ value: "30",
+ label: "不发送",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_template_type",
+ value: "3",
+ label: "营销",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_template_type",
+ value: "1",
+ label: "验证码",
+ colorType: "warning",
+ cssClass: "",
+ },
+ {
+ dictType: "system_sms_template_type",
+ value: "2",
+ label: "通知",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "10",
+ label: "Gitee",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "20",
+ label: "钉钉",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "30",
+ label: "企业微信",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "31",
+ label: "微信公众平台",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "32",
+ label: "微信开放平台",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_social_type",
+ value: "34",
+ label: "微信小程序",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "system_user_sex",
+ value: "1",
+ label: "男",
+ colorType: "default",
+ cssClass: "A",
+ },
+ {
+ dictType: "system_user_sex",
+ value: "2",
+ label: "女",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "terminal",
+ value: "10",
+ label: "微信小程序",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "terminal",
+ value: "11",
+ label: "微信公众号",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "terminal",
+ value: "20",
+ label: "H5 网页",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "terminal",
+ value: "31",
+ label: "苹果 App",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "terminal",
+ value: "32",
+ label: "安卓 App",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "10",
+ label: "申请售后",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "20",
+ label: "商品待退货",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "30",
+ label: "商家待收货",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "40",
+ label: "等待退款",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "50",
+ label: "退款成功",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "61",
+ label: "买家取消",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "62",
+ label: "商家拒绝",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_status",
+ value: "63",
+ label: "商家拒收货",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_type",
+ value: "10",
+ label: "售中退款",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_type",
+ value: "20",
+ label: "售后退款",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_way",
+ value: "10",
+ label: "仅退款",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_after_sale_way",
+ value: "20",
+ label: "退货退款",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_delivery_express_charge_mode",
+ value: "1",
+ label: "按件",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_delivery_express_charge_mode",
+ value: "2",
+ label: "按重量",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_delivery_express_charge_mode",
+ value: "3",
+ label: "按体积",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_delivery_type",
+ value: "1",
+ label: "快递发货",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_delivery_type",
+ value: "2",
+ label: "用户自提",
+ colorType: "",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_item_after_sale_status",
+ value: "0",
+ label: "未售后",
+ colorType: "info",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_item_after_sale_status",
+ value: "10",
+ label: "售后中",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_item_after_sale_status",
+ value: "20",
+ label: "已退款",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_status",
+ value: "0",
+ label: "待支付",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_status",
+ value: "10",
+ label: "待发货",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_status",
+ value: "20",
+ label: "已发货",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_status",
+ value: "30",
+ label: "已完成",
+ colorType: "success",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_status",
+ value: "40",
+ label: "已取消",
+ colorType: "danger",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_type",
+ value: "0",
+ label: "普通订单",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_type",
+ value: "1",
+ label: "秒杀订单",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_type",
+ value: "2",
+ label: "砍价订单",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "trade_order_type",
+ value: "3",
+ label: "拼团订单",
+ colorType: "default",
+ cssClass: "",
+ },
+ {
+ dictType: "user_type",
+ value: "1",
+ label: "会员",
+ colorType: "primary",
+ cssClass: "",
+ },
+ {
+ dictType: "user_type",
+ value: "2",
+ label: "管理员",
+ colorType: "success",
+ cssClass: "",
+ },
+ ],
+ });
+};
+
+export default {
+ "POST /admin-api/system/auth/logout": getDict,
+};
diff --git a/mock/order.ts b/mock/order.ts
index 744bdd5..bd41714 100644
--- a/mock/order.ts
+++ b/mock/order.ts
@@ -5,193 +5,223 @@ const getOrderPage = (_req: Request, res: Response) => {
list: [
{
id: 1,
- orderNum: "BZ000548787",
- createTime: "2025-10-1 14:00:00",
- orderCategoryName: "宠物殡葬", // 订单类目
- orderTerminal: 0, // 订单来源
- userId: 0, // 用户编号
- userName: "", // 用户姓名
- userNickName: "张宁清", // 用户昵称
- userAvatar: "", // 用户头像
- userMobile: "18634556151", // 用户手机号
- orderStatus: 10, // 订单状态
- picUrl: "", // 商品图片
- spuName:
- "商品主标题商品主标题商品主标题商品主标题商品主题商品主标题商品主标题商品主", // 商品名称
- skuName: "标准,单独火化,基础清洁", // 商品规格
- count: 1, // 购买商品数量
- price: 100, // 单价
- handedPrice: 80, // 到手价
- payPrice: "500", // 应付金额
- unit: "", // 单位
- subTime: 1760585499000, // 预约时间
- serveAddress: "张宁清,18659156151,福州 台江区 鳌峰路 万达中心甲",
- userRemark: "你好呀你好元", // 用户备注
- payType: "wx", // 微信
- financeStatus: "1", // 财务状态
- },
- {
- id: 2,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 20,
- picUrl: "",
- spuName: "",
- skuName: "",
- subTime: 1760585499000, // 预约时间
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
- },
- {
- id: 3,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- subTime: 1760585499000, // 预约时间
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 30,
- picUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
- },
- {
- id: 4,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- subTime: 1760585499000, // 预约时间
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 40,
- picUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
- },
- {
- id: 5,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- subTime: 1760585499000, // 预约时间
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 50,
- picUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
- },
- {
- id: 6,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- subTime: 1760585499000, // 预约时间
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 60,
- picUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
- },
- {
- id: 7,
- orderNum: "3214421412",
- createTime: "",
- orderCategoryName: "宠物殡葬",
- orderTerminal: 0,
- userId: 0,
- userName: "",
- subTime: 1760585499000, // 预约时间
- userNickName: "",
- userAvatar: "",
- userMobile: "",
- orderStatus: 70,
- picUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- handedPrice: 0,
- payPrice: 0,
- unit: "",
- orderTime: "",
- serveAddress: "",
- userRemark: "",
- payType: "",
- financeStatus: "",
+ orderNum: "123333333333",
+ orderType: 1,
+ orderTerminal: 1,
+ orderStatus: 10,
+ userId: 1,
+ userName: "李老师",
+ userNickName: null,
+ userAvatar: null,
+ userMobile: "17609087876",
+ userRemark: "测试用户备注",
+ createTime: "2025-10-16 11:31:39",
+ finishTime: "2025-10-16 11:28:55",
+ items: [
+ {
+ picUrl:
+ "https://inews.gtimg.com/news_bt/OBkbmPLeWLy4IM4oUDGvOIqSDSZ9lYOtW3qSXCYh78KXcAA/1000",
+ spuName: "测试商品名称",
+ skuName: "规格名称",
+ count: 1,
+ price: 1,
+ discountPrice: 1,
+ handedPrice: 0,
+ payPrice: 1,
+ unit: "件",
+ subTime: "2025-10-16 11:34:10",
+ serveAddress: "11232",
+ },
+ ],
+ shopName: null,
+ shopLogo: null,
+ payLastTime: null,
},
+ // {
+ // orderTerminal: 0, // 订单来源
+ // userId: 0, // 用户编号
+ // userName: "", // 用户姓名
+ // userNickName: "张宁清", // 用户昵称
+ // userAvatar: "", // 用户头像
+ // userMobile: "18634556151", // 用户手机号
+ // orderStatus: 10, // 订单状态
+ // picUrl: "", // 商品图片
+ // spuName:
+ // "商品主标题商品主标题商品主标题商品主标题商品主题商品主标题商品主标题商品主", // 商品名称
+ // skuName: "标准,单独火化,基础清洁", // 商品规格
+ // count: 1, // 购买商品数量
+ // price: 100, // 单价
+ // handedPrice: 80, // 到手价
+ // payPrice: "500", // 应付金额
+ // unit: "", // 单位
+ // subTime: 1760585499000, // 预约时间
+ // serveAddress: "张宁清,18659156151,福州 台江区 鳌峰路 万达中心甲",
+ // userRemark: "你好呀你好元", // 用户备注
+ // payType: "wx", // 微信
+ // financeStatus: "1", // 财务状态
+ // },
+ // {
+ // id: 2,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 20,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // subTime: 1760585499000, // 预约时间
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
+ // {
+ // id: 3,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // subTime: 1760585499000, // 预约时间
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 30,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
+ // {
+ // id: 4,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // subTime: 1760585499000, // 预约时间
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 40,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
+ // {
+ // id: 5,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // subTime: 1760585499000, // 预约时间
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 50,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
+ // {
+ // id: 6,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // subTime: 1760585499000, // 预约时间
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 60,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
+ // {
+ // id: 7,
+ // orderNum: "3214421412",
+ // createTime: "",
+ // orderCategoryName: "宠物殡葬",
+ // orderTerminal: 0,
+ // userId: 0,
+ // userName: "",
+ // subTime: 1760585499000, // 预约时间
+ // userNickName: "",
+ // userAvatar: "",
+ // userMobile: "",
+ // orderStatus: 70,
+ // picUrl: "",
+ // spuName: "",
+ // skuName: "",
+ // count: 0,
+ // price: 0,
+ // handedPrice: 0,
+ // payPrice: 0,
+ // unit: "",
+ // orderTime: "",
+ // serveAddress: "",
+ // userRemark: "",
+ // payType: "",
+ // financeStatus: "",
+ // },
],
total: 0,
},
@@ -202,70 +232,254 @@ const getOrderPage = (_req: Request, res: Response) => {
const getOrderDetail = (_req: Request, res: Response) => {
res.json({
data: {
- tradeOrderInfoBase: {
- id: "7655265",
- orderNo: "BZ000548787",
- orderStatus: "50",
- orderType: "1",
- orderCategoryName: "宠物殡葬", // 订单类目
- orderCategoryId: "3232321",
- orderTerminal: "微信小程序",
- userInfo: null,
- userAvatar: null,
- cancelTime: "2025-10-16T11:28:57",
- cancelReason: "非常",
- merchantRemark: "测试商家备注",
- refundTime: null,
- propertyTime: null,
- propertyStatus: null,
- price: null,
- discountPrice: null,
- payPrice: null,
- refundPrice: null,
- livePrice: null,
- payType: "1",
- payChannelCode: "1",
- payOrderId: "12323123123",
- payTime: 1760585391000,
- createTime: 1760585499000,
- finishTime: 1760585335000,
- },
- tradeProductInfo: {
- shopLogoUrl: "",
- shopName: "",
- spuId: 0,
- skuId: 0,
- skuPicUrl: "",
- spuName: "",
- skuName: "",
- count: 0,
- price: 0,
- unit: "",
- handedPrice: 0,
- expensePrice: 0,
- properties: [""],
- serveContent: "",
- totalPrice: 0,
- discountPrice: 0,
- payPrice: 0,
- refundPrice: 0,
- refundCount: 0,
- },
+ id: 1,
+ orderNum: "123333333333",
+ orderType: 1,
+ orderTerminal: 1,
+ orderStatus: 10,
+ userId: 1,
+ userName: "李老师",
+ userNickName: null,
+ userAvatar: null,
+ userMobile: "17609087876",
+ userRemark: "测试用户备注",
+ createTime: "2025-10-16 11:31:39",
+ finishTime: "2025-10-16 11:28:55",
+ orderCategoryId: 1,
+ orderCategoryName: "222",
+ cancelReason: "非常",
+ merchantRemark: "测试商家备注",
+ refundTime: null,
+ propertyTime: null,
+ propertyStatus: null,
+ price: null,
+ payPrice: null,
+ discountPrice: null,
+ refundPrice: null,
+ livePrice: null,
+ payType: 1,
+ payChannelCode: 1,
+ financeStatus: null,
+ payOrderId: "12323123123",
+ payTime: "2025-10-16 11:29:51",
+ cancelTime: "2025-10-16 11:28:57",
+ statusList: [
+ {
+ id: 1,
+ orderId: 1,
+ beforeStatus: 10,
+ afterStatus: 20,
+ operateType: 1,
+ content: "1",
+ createTime: 1760952084000,
+ },
+ {
+ id: 2,
+ orderId: 1,
+ beforeStatus: 20,
+ afterStatus: 30,
+ operateType: 1,
+ content: "测试内容",
+ createTime: null,
+ },
+ ],
+ items: [
+ {
+ id: 1,
+ shopName: "22",
+ shopLogo: null,
+ spuId: 1,
+ skuId: 1,
+ picUrl:
+ "https://inews.gtimg.com/news_bt/OBkbmPLeWLy4IM4oUDGvOIqSDSZ9lYOtW3qSXCYh78KXcAA/1000",
+ spuName: "测试商品名称",
+ skuName: "规格名称",
+ orderCategoryId: 1,
+ orderCategoryName: "222",
+ count: 1,
+ price: 1,
+ unit: "件",
+ totalPrice: 0,
+ discountPrice: 1,
+ payPrice: 1,
+ refundPrice: null,
+ refundCount: null,
+ handedPrice: 0,
+ expensePrice: 1,
+ properties: null,
+ serveContent: null,
+ },
+ ],
tradeServeInfo: {
- properties: {
- "": {},
- },
+ changeRule: "bbbb",
+ userRemark: "bbbb",
+ subOrder: "bbbb",
+ pickUpAddress: "bbbb",
+ subType: "bbbb",
+ merchantRemark: "bbbb",
+ sendAddress: "bbbb",
+ petName: "aaa",
+ boneUrl: "aaa",
+ petType: "aaa",
+ diedTime: "aaa",
+ weight: "aaa",
+ diedReason: "aaa",
},
- tradeExtendServeInfo: {
- properties: {
- "": {},
+ tradeExtendServeInfo: [
+ {
+ refundCount: "ccc",
+ totalPrice: "ccc",
+ payPrice: "ccc",
+ discountPrice: "ccc",
+ refundMoney: "ccc",
+ serve: {
+ serveName: "ccc",
+ serveUrl: "ccc",
+ price: "ccc",
+ serveDesc: "ccc",
+ handPrice: "ccc",
+ count: "ccc",
+ },
+ tempType: 1,
},
- },
- tradeExtendCostInfo: {
- properties: {
- "": {},
+ {
+ refundCount: "ccc",
+ totalPrice: "ccc",
+ payPrice: "ccc",
+ discountPrice: "ccc",
+ refundMoney: "ccc",
+ serve: [
+ {
+ serveName: "ccc",
+ serveUrl: "ccc",
+ price: "ccc",
+ serveDesc: "ccc",
+ handPrice: "ccc",
+ count: "ccc",
+ riteAddress: "ccc",
+ parentActive: "ccc",
+ },
+ ],
+ tempType: 2,
},
- },
+ {
+ refundCount: "ccc",
+ deliveryInfo: {
+ address: "收货地址",
+ userMobile: "手机号码",
+ deliveryType: "配送方式",
+ user: "收货人/提货人",
+ },
+ serveTitle: "骨灰处理",
+ totalPrice: "ccc",
+ payPrice: "ccc",
+ serveType: "处理方式",
+ discountPrice: "ccc",
+ refundMoney: "ccc",
+ serve: [
+ {
+ serveName: "ccc",
+ serveUrl: "ccc",
+ price: "ccc",
+ serveDesc: "ccc",
+ handPrice: "ccc",
+ count: "ccc",
+ },
+ {
+ serveName: "ccc",
+ serveUrl: "ccc",
+ price: "ccc",
+ serveDesc: "ccc",
+ handPrice: "ccc",
+ count: "ccc",
+ },
+ ],
+ tempType: 3,
+ },
+ {
+ refundCount: "ccc",
+ deliveryInfo: {
+ address: "收货地址",
+ userMobile: "手机号码",
+ deliveryType: "配送方式",
+ user: "收货人/提货人",
+ },
+ totalPrice: "ccc",
+ payPrice: "ccc",
+ discountPrice: "ccc",
+ refundMoney: "ccc",
+ serve: {
+ parentActivity: "ccc",
+ prodUrl: "ccc",
+ price: "ccc",
+ handPrice: "ccc",
+ count: "ccc",
+ prodName: "ccc",
+ prodType: "ccc",
+ prodDesc: "ccc",
+ },
+ tempType: 4,
+ },
+ ],
+ tradeExtendCostInfo: [
+ {
+ costDetail: {
+ costName: "超区域服务费",
+ targetArea: "目标区域",
+ chargeType: "收费方式",
+ serveArea: "可服务区域",
+ },
+ serveExtFee: "",
+ refundPrice: "11",
+ payInfo: {
+ totalPrice: "11",
+ payPrice: "333",
+ discountPrice: "222",
+ },
+ },
+ {
+ costDetail: {
+ respMode: "响应模式",
+ respTime: "响应时间",
+ chargeType: "收费方式",
+ },
+ serveExtFee: "",
+ refundPrice: "11",
+ payInfo: {
+ totalPrice: "11",
+ payPrice: "333",
+ discountPrice: "222",
+ },
+ },
+ {
+ costDetail: {
+ costName: "超区域服务费",
+ chargeType: "收费方式",
+ weight: "体型/体重",
+ },
+ serveExtFee: "",
+ refundPrice: "11",
+ payInfo: {
+ totalPrice: "11",
+ payPrice: "333",
+ discountPrice: "222",
+ },
+ },
+ {
+ costDetail: {
+ costName: "超区域服务费",
+ chargeTime: "收费时段",
+ chargeType: "收费方式",
+ },
+ serveExtFee: "",
+ refundPrice: "11",
+ payInfo: {
+ totalPrice: "11",
+ payPrice: "333",
+ discountPrice: "222",
+ },
+ },
+ ],
},
code: 0,
});
diff --git a/package.json b/package.json
index 7307a38..146d678 100644
--- a/package.json
+++ b/package.json
@@ -39,9 +39,13 @@
"@ant-design/icons": "^5.6.1",
"@ant-design/pro-components": "^2.8.9",
"@ant-design/v5-patch-for-react-19": "^1.0.3",
+ "@dnd-kit/core": "^6.3.1",
+ "@dnd-kit/sortable": "^10.0.0",
+ "@dnd-kit/utilities": "^3.2.2",
"@tinymce/tinymce-react": "^6.3.0",
- "antd": "^5.26.4",
+ "antd": "^5.27.3",
"antd-style": "^3.7.0",
+ "browser-id3-writer": "^6.3.1",
"classnames": "^2.5.1",
"dayjs": "^1.11.13",
"jsencrypt": "^3.5.4",
@@ -49,6 +53,7 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-infinite-scroll-component": "^6.1.0",
+ "react-video-thumbnail": "^0.1.3",
"tinymce": "^8.1.2",
"web-storage-cache": "^1.1.1"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3bd9a17..b27c85d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,15 +17,27 @@ importers:
'@ant-design/v5-patch-for-react-19':
specifier: ^1.0.3
version: 1.0.3(antd@5.27.3(date-fns@2.30.0)(moment@2.30.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
+ '@dnd-kit/core':
+ specifier: ^6.3.1
+ version: 6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
+ '@dnd-kit/sortable':
+ specifier: ^10.0.0
+ version: 10.0.0(@dnd-kit/core@6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)
+ '@dnd-kit/utilities':
+ specifier: ^3.2.2
+ version: 3.2.2(react@19.1.1)
'@tinymce/tinymce-react':
specifier: ^6.3.0
version: 6.3.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(tinymce@8.1.2)
antd:
- specifier: ^5.26.4
+ specifier: ^5.27.3
version: 5.27.3(date-fns@2.30.0)(moment@2.30.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
antd-style:
specifier: ^3.7.0
version: 3.7.1(@types/react@19.1.12)(antd@5.27.3(date-fns@2.30.0)(moment@2.30.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
+ browser-id3-writer:
+ specifier: ^6.3.1
+ version: 6.3.1
classnames:
specifier: ^2.5.1
version: 2.5.1
@@ -47,6 +59,9 @@ importers:
react-infinite-scroll-component:
specifier: ^6.1.0
version: 6.1.0(react@19.1.1)
+ react-video-thumbnail:
+ specifier: ^0.1.3
+ version: 0.1.3
tinymce:
specifier: ^8.1.2
version: 8.1.2
@@ -1410,6 +1425,12 @@ packages:
'@dnd-kit/core': ^6.0.6
react: '>=16.8.0'
+ '@dnd-kit/sortable@10.0.0':
+ resolution: {integrity: sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg==}
+ peerDependencies:
+ '@dnd-kit/core': ^6.3.0
+ react: '>=16.8.0'
+
'@dnd-kit/sortable@7.0.2':
resolution: {integrity: sha512-wDkBHHf9iCi1veM834Gbk1429bd4lHX4RpAwT0y2cHLf246GAvU2sVw/oxWNpPKQNQRQaeGXhAVgrOl1IT+iyA==}
peerDependencies:
@@ -3850,6 +3871,9 @@ packages:
brorand@1.1.0:
resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==}
+ browser-id3-writer@6.3.1:
+ resolution: {integrity: sha512-sRA4Uq9Q3NsmXiVpLvIDxzomtgCdbw6SY85A6fw7dUQGRVoOBg1/buFv6spPhYiSo6FlVtN5OJQTvvhbmfx9rQ==}
+
browserify-aes@1.2.0:
resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==}
@@ -9148,6 +9172,9 @@ packages:
react-tween-state@0.1.5:
resolution: {integrity: sha512-sJQpjsdn0wjlDIUpfpb7jQGnOG8hAEW2e8k0KPA+xmf5KFa6Xat2JldbmxBhaqP0S/uIXhVE5ymKyH/b9X8nYA==}
+ react-video-thumbnail@0.1.3:
+ resolution: {integrity: sha512-ZakEVv9RNFcziAnHHtwod5tf0yMVv4aLZ8/QsCxt1HTnKRHrlylvolPKv1hr63GCwnPu6tgPjUTDKRqfl30lOQ==}
+
react@18.3.1:
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
@@ -13394,6 +13421,13 @@ snapshots:
react: 19.1.1
tslib: 2.8.1
+ '@dnd-kit/sortable@10.0.0(@dnd-kit/core@6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)':
+ dependencies:
+ '@dnd-kit/core': 6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
+ '@dnd-kit/utilities': 3.2.2(react@19.1.1)
+ react: 19.1.1
+ tslib: 2.8.1
+
'@dnd-kit/sortable@7.0.2(@dnd-kit/core@6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)':
dependencies:
'@dnd-kit/core': 6.3.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
@@ -16921,6 +16955,8 @@ snapshots:
brorand@1.1.0: {}
+ browser-id3-writer@6.3.1: {}
+
browserify-aes@1.2.0:
dependencies:
buffer-xor: 1.0.3
@@ -23468,6 +23504,8 @@ snapshots:
raf: 3.4.1
tween-functions: 1.2.0
+ react-video-thumbnail@0.1.3: {}
+
react@18.3.1:
dependencies:
loose-envify: 1.4.0
diff --git a/src/app.tsx b/src/app.tsx
index 3813bf2..f49ce02 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -1,28 +1,28 @@
-import type { Settings as LayoutSettings } from "@ant-design/pro-components";
-import { SettingDrawer } from "@ant-design/pro-components";
-import type { RequestConfig, RunTimeLayoutConfig } from "@umijs/max";
-import { history } from "@umijs/max";
+import type { Settings as LayoutSettings } from '@ant-design/pro-components';
+import { SettingDrawer } from '@ant-design/pro-components';
+import type { RequestConfig, RunTimeLayoutConfig } from '@umijs/max';
+import { history } from '@umijs/max';
import {
AvatarDropdown,
AvatarName,
Footer,
Question,
SelectLang,
-} from "@/components";
-import { getInfo } from "@/services/login";
-import type { UserInfoVO } from "@/services/login/types";
-import defaultSettings from "../config/defaultSettings";
-import { errorConfig } from "./requestErrorConfig";
-import "@ant-design/v5-patch-for-react-19";
-import { useDictStore } from "@/hooks/stores/dict";
-import { getAccessToken, getTenantId } from "@/utils/auth";
-import { CACHE_KEY, useCache } from "./hooks/web/useCache";
-import type { MenuVO } from "./services/system/menu";
-import { loopMenuItem } from "./utils/menuUtils";
+} from '@/components';
+import { getInfo } from '@/services/login';
+import type { UserInfoVO } from '@/services/login/types';
+import defaultSettings from '../config/defaultSettings';
+import { errorConfig } from './requestErrorConfig';
+import '@ant-design/v5-patch-for-react-19';
+import { useDictStore } from '@/hooks/stores/dict';
+import { getAccessToken, getTenantId } from '@/utils/auth';
+import { CACHE_KEY, useCache } from './hooks/web/useCache';
+import type { MenuVO } from './services/system/menu';
+import { loopMenuItem } from './utils/menuUtils';
-const isDev = process.env.NODE_ENV === "development";
+const isDev = process.env.NODE_ENV === 'development';
const isDevOrTest = isDev || process.env.CI;
-const loginPath = "/user/login";
+const loginPath = '/user/login';
// 标记是否已添加动态路由
/**
@@ -42,7 +42,7 @@ export async function getInitialState(): Promise<{
try {
const token = getAccessToken();
if (!token) {
- throw new Error("No token found");
+ throw new Error('No token found');
}
const data = await getInfo();
wsCache.set(CACHE_KEY.USER, data);
@@ -64,8 +64,8 @@ export async function getInitialState(): Promise<{
const { location } = history;
if (
- ![loginPath, "/user/register", "/user/register-result"].includes(
- location.pathname
+ ![loginPath, '/user/register', '/user/register-result'].includes(
+ location.pathname,
)
) {
const currentUser = wsCache.get(CACHE_KEY.USER);
@@ -122,24 +122,29 @@ export const layout: RunTimeLayoutConfig = ({
},
bgLayoutImgList: [
{
- src: "https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/D2LWSqNny4sAAAAAAAAAAAAAFl94AQBr",
+ src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/D2LWSqNny4sAAAAAAAAAAAAAFl94AQBr',
left: 85,
bottom: 100,
- height: "303px",
+ height: '303px',
},
{
- src: "https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/C2TWRpJpiC0AAAAAAAAAAAAAFl94AQBr",
+ src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/C2TWRpJpiC0AAAAAAAAAAAAAFl94AQBr',
bottom: -68,
right: -45,
- height: "303px",
+ height: '303px',
},
{
- src: "https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/F6vSTbj8KpYAAAAAAAAAAAAAFl94AQBr",
+ src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/F6vSTbj8KpYAAAAAAAAAAAAAFl94AQBr',
bottom: 0,
left: 0,
- width: "331px",
+ width: '331px',
},
],
+ // 面包屑配置
+ breadcrumb: {
+ enable: true,
+ useRoutes: true,
+ },
menuHeaderRender: undefined,
// 自定义 403 页面
unAccessible:
unAccessible
,
@@ -175,57 +180,30 @@ export const layout: RunTimeLayoutConfig = ({
* @doc https://umijs.org/docs/max/request#配置
*/
export const request: RequestConfig = {
- baseURL: isDev ? "" : "https://proapi.azurewebsites.net",
+ baseURL: isDev ? '' : 'https://proapi.azurewebsites.net',
...errorConfig,
// 添加请求拦截器
requestInterceptors: [
(url, options) => {
// 为所有请求添加 API 前缀
- if (url && !url.startsWith(process.env.API_PREFIX || "/admin-api")) {
- url = (process.env.API_PREFIX || "/admin-api") + url;
+ if (url && !url.startsWith(process.env.API_PREFIX || '/admin-api')) {
+ url = (process.env.API_PREFIX || '/admin-api') + url;
}
// 获取存储在本地的 token 和 tenantId
const token = getAccessToken();
const tenantId = getTenantId(); // 默认租户ID为1
- const contentType: string = options.headers?.["Content-Type"] as string;
// 设置统一的请求头
const headers: Record = {
...options.headers,
- Accept: "*",
- "tenant-id": tenantId,
+ Accept: '*',
+ 'tenant-id': tenantId,
};
// 如果有token,则添加Authorization头
if (token) {
headers.Authorization = `Bearer ${getAccessToken()}`;
- headers["Content-Type"] = contentType || "application/json";
}
return { url, options: { ...options, headers } };
},
- // requestInterceptors: [
- // (url, options) => {
- // // 为所有请求添加 API 前缀
- // if (url && !url.startsWith(process.env.API_PREFIX || "/admin-api")) {
- // url = (process.env.API_PREFIX || "/admin-api") + url;
- // }
- // // 获取存储在本地的 token 和 tenantId
- // const token = getAccessToken();
- // const tenantId = getTenantId(); // 默认租户ID为1
- // console.log("request", options);
- // // 设置统一的请求头
- // const contentType: string = options.headers?.["Content-Type"] as string;
- // const headers: Record = {
- // ...options.headers,
- // Accept: "*",
- // "Content-Type": contentType || "application/json",
- // "tenant-id": tenantId,
- // };
- // // 如果有token,则添加Authorization头
- // if (token) {
- // headers.Authorization = `Bearer ${getAccessToken()}`;
- // }
- // console.log("headers", headers);
- // return { url, options: { ...options, ...headers } };
- // },
],
// 添加参数序列化配置
@@ -234,7 +212,7 @@ export const request: RequestConfig = {
const appendParams = (key: string, value: any) => {
if (Array.isArray(value)) {
// 特殊处理 createTime 数组,转换为 createTime[0] 和 createTime[1] 格式
- if (key === "createTime") {
+ if (key === 'createTime') {
value.forEach((val, index) => {
searchParams.append(`${key}[${index}]`, val);
});
@@ -272,7 +250,7 @@ export async function patchClientRoutes({ routes }: any) {
wsCache.set(CACHE_KEY.ROLE_ROUTERS, data.menus);
menus = data.menus;
} catch (error) {
- console.error("获取菜单失败:", error);
+ console.error('获取菜单失败:', error);
return;
}
}
@@ -280,7 +258,7 @@ export async function patchClientRoutes({ routes }: any) {
if (!menus || menus.length === 0) {
return;
}
- const routerIndex = routes.findIndex((item: any) => item.path === "/");
+ const routerIndex = routes.findIndex((item: any) => item.path === '/');
const parentId = routes[routerIndex].id;
if (menus) {
diff --git a/src/components/Draggable/DragOverlayTag/index.less b/src/components/Draggable/DragOverlayTag/index.less
new file mode 100644
index 0000000..b1e1d77
--- /dev/null
+++ b/src/components/Draggable/DragOverlayTag/index.less
@@ -0,0 +1,61 @@
+.drag-overlay-tag {
+ cursor: grabbing;
+
+ .overlay-tag {
+ display: inline-flex;
+ align-items: center;
+ padding: 8px 12px;
+ font-size: 14px;
+ user-select: none;
+ border-radius: 6px;
+ background: #fff;
+ border: 2px solid #1890ff;
+ box-shadow: 0 8px 24px rgba(24, 144, 255, 0.4);
+
+ .tag-content {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+
+ .drag-handle {
+ display: flex;
+ align-items: center;
+ color: #1890ff;
+ font-size: 16px;
+ }
+
+ .tag-label {
+ font-weight: 600;
+ color: #262626;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+
+ .sort-badge {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 20px;
+ height: 20px;
+ padding: 0 6px;
+ background: #1890ff;
+ color: #fff;
+ border-radius: 10px;
+ font-size: 12px;
+ font-weight: bold;
+ }
+ }
+ }
+ }
+}
+
+@keyframes float {
+ 0% {
+ transform: scale(1);
+ opacity: 0.8;
+ }
+ 100% {
+ transform: scale(1.1);
+ opacity: 1;
+ }
+}
diff --git a/src/components/Draggable/DragOverlayTag/index.tsx b/src/components/Draggable/DragOverlayTag/index.tsx
new file mode 100644
index 0000000..cceeae8
--- /dev/null
+++ b/src/components/Draggable/DragOverlayTag/index.tsx
@@ -0,0 +1,30 @@
+import { DragOutlined } from '@ant-design/icons';
+import { Tag } from 'antd';
+import React, { memo } from 'react';
+import type { TagItem } from '../types';
+import './index.less';
+
+interface DragOverlayTagProps {
+ tag: TagItem;
+}
+
+const DragOverlayTag: React.FC = memo(({ tag }) => {
+ return (
+
+
+
+
+
+
+
+ {tag.label}
+ {tag.sort}
+
+
+
+
+ );
+});
+
+DragOverlayTag.displayName = 'DragOverlayTag';
+export default DragOverlayTag;
diff --git a/src/components/Draggable/DraggableTagList/index.less b/src/components/Draggable/DraggableTagList/index.less
new file mode 100644
index 0000000..0a807af
--- /dev/null
+++ b/src/components/Draggable/DraggableTagList/index.less
@@ -0,0 +1,179 @@
+.draggable-tag-list {
+ padding: 24px;
+ background: #fff;
+ border-radius: 8px;
+
+ .tag-container {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+ padding: 20px;
+ background: #fafafa;
+ border-radius: 6px;
+ min-height: 120px;
+ border: 2px dashed #d9d9d9;
+ transition: border-color 0.3s;
+
+ &:hover {
+ border-color: #40a9ff;
+ }
+ }
+
+ .sortable-tag {
+ display: inline-block;
+ // 使用 will-change 优化动画性能
+ will-change: opacity, transform;
+
+ // 拖拽中的标签 - 原位置透明度降低
+ &.active {
+ opacity: 0.3;
+ transition: opacity 0.2s ease;
+
+ .custom-tag {
+ border-color: #1890ff;
+ background: #e6f7ff;
+ }
+ }
+
+ // 经过的目标标签 - 高亮显示
+ &.over {
+ .custom-tag {
+ border-color: #52c41a;
+ background: #f6ffed;
+ box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.2);
+ transform: scale(1.08);
+ // 使用 transform 而不是复杂动画
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ }
+ }
+
+ // 禁用状态
+ &.disabled {
+ .custom-tag {
+ background: #f5f5f5;
+ border-color: #d9d9d9;
+ color: rgba(0, 0, 0, 0.45);
+ cursor: not-allowed;
+
+ .drag-handle {
+ display: none;
+ }
+ }
+ }
+
+ .custom-tag {
+ display: inline-flex;
+ align-items: center;
+ padding: 8px 12px;
+ font-size: 14px;
+ user-select: none;
+ border-radius: 6px;
+ // 优化过渡效果
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
+ background: #fff;
+ border: 2px solid #d9d9d9;
+ // 使用 GPU 加速
+ transform: translateZ(0);
+
+ &:hover:not(.disabled) {
+ border-color: #40a9ff;
+ box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
+ }
+
+ .tag-content {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+
+ .drag-handle {
+ display: flex;
+ align-items: center;
+ cursor: grab;
+ color: #8c8c8c;
+ transition: color 0.2s;
+ font-size: 16px;
+
+ &:hover {
+ color: #1890ff;
+ }
+
+ &:active {
+ cursor: grabbing;
+ }
+ }
+
+ .tag-label {
+ flex: 1;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+
+ .sort-badge {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 20px;
+ height: 20px;
+ padding: 0 6px;
+ background: #1890ff;
+ color: #fff;
+ border-radius: 10px;
+ font-size: 12px;
+ font-weight: bold;
+ }
+ }
+
+ .edit-icon {
+ cursor: pointer;
+ color: #8c8c8c;
+ transition: color 0.2s;
+ font-size: 14px;
+
+ &:hover {
+ color: #1890ff;
+ }
+ }
+
+ .disabled-badge {
+ padding: 2px 8px;
+ background: #ff4d4f;
+ color: #fff;
+ border-radius: 4px;
+ font-size: 12px;
+ margin-left: 4px;
+ font-weight: normal;
+ }
+ }
+ }
+ }
+
+ .sort-info {
+ padding: 16px;
+ background: #f0f2f5;
+ border-radius: 6px;
+ border: 1px solid #d9d9d9;
+
+ h4 {
+ margin: 0 0 12px 0;
+ font-size: 14px;
+ font-weight: 600;
+ color: #262626;
+ }
+
+ .sort-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+
+ .sort-item {
+ padding: 4px 12px;
+ background: #fff;
+ border: 1px solid #d9d9d9;
+ border-radius: 4px;
+ font-size: 13px;
+ color: #595959;
+ }
+ }
+ }
+}
diff --git a/src/components/Draggable/DraggableTagList/index.tsx b/src/components/Draggable/DraggableTagList/index.tsx
new file mode 100644
index 0000000..ee2425e
--- /dev/null
+++ b/src/components/Draggable/DraggableTagList/index.tsx
@@ -0,0 +1,318 @@
+import { PlusOutlined } from '@ant-design/icons';
+import {
+ DndContext,
+ type DragEndEvent,
+ type DragOverEvent,
+ DragOverlay,
+ type DragStartEvent,
+ PointerSensor,
+ useSensor,
+ useSensors,
+} from '@dnd-kit/core';
+import { rectSortingStrategy, SortableContext } from '@dnd-kit/sortable';
+import { Button, Form, Input, Modal, message, Space, Switch } from 'antd';
+import React, { useCallback, useMemo, useState } from 'react';
+import DragOverlayTag from '../DragOverlayTag';
+import { SortableTag } from '../SortableTag';
+import type { TagItem } from '../types';
+import './index.less';
+
+const DraggableTagList: React.FC = () => {
+ const [tags, setTags] = useState([
+ { id: '1', label: '标签1', disabled: false, sort: 1 },
+ { id: '2', label: '标签2', disabled: false, sort: 2 },
+ { id: '3', label: '标签3', disabled: true, sort: 3 },
+ { id: '4', label: '标签4', disabled: false, sort: 4 },
+ { id: '5', label: '标签5', disabled: false, sort: 5 },
+ ]);
+
+ const [isModalVisible, setIsModalVisible] = useState(false);
+ const [editingTag, setEditingTag] = useState(null);
+ const [activeId, setActiveId] = useState(null);
+ const [overId, setOverId] = useState(null);
+ const [form] = Form.useForm();
+
+ // 优化传感器配置
+ const sensors = useSensors(
+ useSensor(PointerSensor, {
+ activationConstraint: {
+ distance: 8,
+ },
+ }),
+ );
+
+ // 创建标签映射,避免重复查找
+ const tagMap = useMemo(() => {
+ const map = new Map();
+ tags.forEach((tag) => {
+ map.set(tag.id, tag);
+ });
+ return map;
+ }, [tags]);
+
+ // 拖拽开始 - 使用 useCallback 避免重复创建
+ const handleDragStart = useCallback(
+ (event: DragStartEvent) => {
+ const { active } = event;
+ const activeTag = tagMap.get(active.id as string);
+
+ if (activeTag?.disabled) {
+ return;
+ }
+
+ setActiveId(active.id as string);
+ },
+ [tagMap],
+ );
+
+ // 拖拽取消
+ const handleDragCancel = useCallback(() => {
+ setActiveId(null);
+ setOverId(null);
+ }, []);
+
+ // 优化拖拽经过 - 减少不必要的状态更新
+ const handleDragOver = useCallback(
+ (event: DragOverEvent) => {
+ const { over, active } = event;
+
+ // 如果没有 over 或 active,清除 overId
+ if (!over || !active) {
+ if (overId !== null) {
+ setOverId(null);
+ }
+ return;
+ }
+
+ const newOverId = over.id as string;
+
+ // 如果 overId 没有变化,不更新状态
+ if (newOverId === overId) {
+ return;
+ }
+
+ const activeTag = tagMap.get(active.id as string);
+ const overTag = tagMap.get(newOverId);
+
+ // 检查是否可以高亮
+ if (
+ !activeTag ||
+ activeTag.disabled ||
+ !overTag ||
+ overTag.disabled ||
+ newOverId === active.id
+ ) {
+ if (overId !== null) {
+ setOverId(null);
+ }
+ return;
+ }
+
+ setOverId(newOverId);
+ },
+ [overId, tagMap],
+ );
+
+ // 拖拽结束 - 使用 useCallback
+ const handleDragEnd = useCallback((event: DragEndEvent) => {
+ const { active, over } = event;
+
+ setActiveId(null);
+ setOverId(null);
+
+ if (!over || active.id === over.id) {
+ return;
+ }
+
+ setTags((items) => {
+ const activeIndex = items.findIndex((item) => item.id === active.id);
+ const overIndex = items.findIndex((item) => item.id === over.id);
+
+ if (activeIndex === -1 || overIndex === -1) {
+ return items;
+ }
+
+ if (items[activeIndex].disabled) {
+ message.warning('禁用的标签不可拖拽');
+ return items;
+ }
+
+ if (items[overIndex].disabled) {
+ message.warning('不能与禁用的标签交换位置');
+ return items;
+ }
+
+ const newItems = [...items];
+
+ // 交换sort值
+ const tempSort = newItems[activeIndex].sort;
+ newItems[activeIndex] = {
+ ...newItems[activeIndex],
+ sort: newItems[overIndex].sort,
+ };
+ newItems[overIndex] = {
+ ...newItems[overIndex],
+ sort: tempSort,
+ };
+
+ // 交换位置
+ [newItems[activeIndex], newItems[overIndex]] = [
+ newItems[overIndex],
+ newItems[activeIndex],
+ ];
+
+ message.success('交换成功');
+ return newItems;
+ });
+ }, []);
+
+ // 添加标签
+ const handleAddTag = useCallback(() => {
+ setEditingTag(null);
+ form.resetFields();
+ setIsModalVisible(true);
+ }, [form]);
+
+ // 编辑标签
+ const handleEditTag = useCallback(
+ (tag: TagItem) => {
+ setEditingTag(tag);
+ form.setFieldsValue(tag);
+ setIsModalVisible(true);
+ },
+ [form],
+ );
+
+ // 删除标签
+ const handleDeleteTag = useCallback((id: string) => {
+ setTags((prevTags) => prevTags.filter((tag) => tag.id !== id));
+ message.success('删除成功');
+ }, []);
+
+ // 保存标签
+ const handleSaveTag = useCallback(async () => {
+ try {
+ const values = await form.validateFields();
+
+ if (editingTag) {
+ setTags((prevTags) =>
+ prevTags.map((tag) =>
+ tag.id === editingTag.id ? { ...tag, ...values } : tag,
+ ),
+ );
+ message.success('编辑成功');
+ } else {
+ setTags((prevTags) => {
+ const maxSort = Math.max(...prevTags.map((t) => t.sort), 0);
+ const newTag: TagItem = {
+ id: Date.now().toString(),
+ disabled: false,
+ sort: maxSort + 1,
+ ...values,
+ };
+ return [...prevTags, newTag];
+ });
+ message.success('添加成功');
+ }
+
+ setIsModalVisible(false);
+ form.resetFields();
+ } catch (error) {
+ console.error('验证失败:', error);
+ }
+ }, [editingTag, form]);
+
+ // 获取当前拖拽的标签
+ const activeTag = useMemo(
+ () => (activeId ? tagMap.get(activeId) : null),
+ [activeId, tagMap],
+ );
+
+ // 生成 sortable items
+ const sortableItems = useMemo(() => tags.map((tag) => tag.id), [tags]);
+
+ return (
+
+
+ } onClick={handleAddTag}>
+ 添加标签
+
+
+
+
+
+ {tags.map((tag) => (
+
+ ))}
+
+
+
+
+ {activeTag ? : null}
+
+
+
+
+
当前排序:
+
+ {tags.map((tag) => (
+
+ {tag.label} (sort: {tag.sort})
+
+ ))}
+
+
+
+
+
{
+ setIsModalVisible(false);
+ form.resetFields();
+ }}
+ okText="确定"
+ cancelText="取消"
+ >
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default DraggableTagList;
diff --git a/src/components/Draggable/SortableTag/index.tsx b/src/components/Draggable/SortableTag/index.tsx
new file mode 100644
index 0000000..0dddbb5
--- /dev/null
+++ b/src/components/Draggable/SortableTag/index.tsx
@@ -0,0 +1,86 @@
+import { DragOutlined, EditOutlined } from '@ant-design/icons';
+import { useSortable } from '@dnd-kit/sortable';
+import { Tag } from 'antd';
+import React, { memo } from 'react';
+import type { TagItem } from '../types';
+
+interface SortableTagProps {
+ tag: TagItem;
+ isActive: boolean;
+ isOver: boolean;
+ onEdit: (tag: TagItem) => void;
+ onDelete: (id: string) => void;
+}
+
+export const SortableTag: React.FC = memo(
+ ({ tag, isActive, isOver, onEdit, onDelete }) => {
+ const { attributes, listeners, setNodeRef } = useSortable({
+ id: tag.id,
+ disabled: tag.disabled,
+ });
+
+ // 计算样式类名
+ const className = [
+ 'sortable-tag',
+ tag.disabled && 'disabled',
+ isActive && 'active',
+ isOver && !tag.disabled && 'over',
+ ]
+ .filter(Boolean)
+ .join(' ');
+
+ // 处理删除
+ const handleDelete = (e: React.MouseEvent) => {
+ e.preventDefault();
+ if (!tag.disabled) {
+ onDelete(tag.id);
+ }
+ };
+
+ // 处理编辑
+ const handleEdit = (e: React.MouseEvent) => {
+ e.stopPropagation();
+ onEdit(tag);
+ };
+
+ return (
+
+
+
+ {!tag.disabled && (
+
+
+
+ )}
+
+
+ {tag.label}
+ {tag.sort}
+
+
+
+
+ {tag.disabled && 禁用}
+
+
+
+ );
+ },
+ // 自定义比较函数,只在必要时重新渲染
+ (prevProps, nextProps) => {
+ return (
+ prevProps.tag.id === nextProps.tag.id &&
+ prevProps.tag.label === nextProps.tag.label &&
+ prevProps.tag.disabled === nextProps.tag.disabled &&
+ prevProps.tag.sort === nextProps.tag.sort &&
+ prevProps.isActive === nextProps.isActive &&
+ prevProps.isOver === nextProps.isOver
+ );
+ },
+);
+
+SortableTag.displayName = 'SortableTag';
diff --git a/src/components/Draggable/types.ts b/src/components/Draggable/types.ts
new file mode 100644
index 0000000..67c308d
--- /dev/null
+++ b/src/components/Draggable/types.ts
@@ -0,0 +1,8 @@
+export interface TagItem {
+ id: string;
+ label: string;
+ disabled?: boolean;
+ sort: number; // 添加排序字段
+ isExpire?: number; // 是否失效是否失效0否1是
+ state?: number; // 状态 0正常1禁用
+}
diff --git a/src/components/DrawerForm/index.tsx b/src/components/DrawerForm/index.tsx
index 7a9d60e..c18348b 100644
--- a/src/components/DrawerForm/index.tsx
+++ b/src/components/DrawerForm/index.tsx
@@ -1,13 +1,13 @@
-import type { ProFormColumnsType } from "@ant-design/pro-components";
-import { BetaSchemaForm } from "@ant-design/pro-components";
-import { Button, type ColProps, Drawer, Space } from "antd";
-import type { FormInstance } from "antd/lib";
+import type { ProFormColumnsType } from '@ant-design/pro-components';
+import { BetaSchemaForm } from '@ant-design/pro-components';
+import { Button, type ColProps, Drawer, Space } from 'antd';
+import type { FormInstance } from 'antd/lib';
import React, {
Children,
cloneElement,
forwardRef,
useImperativeHandle,
-} from "react";
+} from 'react';
interface ConfigurableDrawerFormProps {
title?: string;
@@ -33,18 +33,18 @@ const ConfigurableDrawerForm = forwardRef<
>(
(
{
- title = "表单",
- labelCol = { span: 4 },
- wrapperCol = { span: 20 },
+ title = '表单',
+ labelCol = { span: 3 },
+ wrapperCol = { span: 21 },
columns,
onSubmit,
initialValues,
- width = 600,
+ width = 700,
footer,
children,
bodyStyle = {},
},
- ref
+ ref,
) => {
const [open, setOpen] = React.useState(false);
const [formData, setFormData] = React.useState(initialValues || {});
@@ -56,7 +56,7 @@ const ConfigurableDrawerForm = forwardRef<
if (data) {
setFormData(data);
}
- console.log("open");
+ console.log('open');
setOpen(true);
},
close: () => setOpen(false),
@@ -66,7 +66,8 @@ const ConfigurableDrawerForm = forwardRef<
if (React.isValidElement(child)) {
// 使用更安全的方式传递属性,避免 TypeScript 错误
return cloneElement(child, {
- ...formData,
+ data: formData,
+ formRef,
} as any);
}
return child;
@@ -96,12 +97,12 @@ const ConfigurableDrawerForm = forwardRef<
title={title}
styles={{
header: {
- textAlign: "left",
- position: "relative",
+ textAlign: 'left',
+ position: 'relative',
},
body: {
- background: "var(--ant-background-color)",
- padding: "var(--ant-padding-lg)",
+ background: 'var(--ant-background-color)',
+ padding: 'var(--ant-padding-lg)',
...bodyStyle,
},
}}
@@ -111,7 +112,7 @@ const ConfigurableDrawerForm = forwardRef<
onClose={() => setOpen(false)}
width={width}
footer={
-
+
{footer ? (
footer
) : (
@@ -142,7 +143,7 @@ const ConfigurableDrawerForm = forwardRef<
)}
);
- }
+ },
);
export default ConfigurableDrawerForm;
diff --git a/src/components/ModalCom/ConfirmModal.tsx b/src/components/ModalCom/ConfirmModal.tsx
new file mode 100644
index 0000000..c53a148
--- /dev/null
+++ b/src/components/ModalCom/ConfirmModal.tsx
@@ -0,0 +1,67 @@
+import { Button, Modal, Space } from 'antd';
+import React, { createContext } from 'react';
+
+const ReachableContext = createContext(null);
+const UnreachableContext = createContext(null);
+
+const config = {
+ title: 'Use Hook!',
+ content: (
+ <>
+
+ {(name) => `Reachable: ${name}!`}
+
+
+
+ {(name) => `Unreachable: ${name}!`}
+
+ >
+ ),
+};
+
+const ConfirmModal: React.FC = () => {
+ const [modal, contextHolder] = Modal.useModal();
+
+ return (
+
+
+
+
+
+
+
+ {/* `contextHolder` should always be placed under the context you want to access */}
+ {contextHolder}
+
+ {/* Can not access this context since `contextHolder` is not in it */}
+
+
+ );
+};
+
+export default ConfirmModal;
diff --git a/src/components/TagEditor/index.tsx b/src/components/TagEditor/index.tsx
index a8937be..ab16830 100644
--- a/src/components/TagEditor/index.tsx
+++ b/src/components/TagEditor/index.tsx
@@ -64,7 +64,7 @@ const TagEditor: React.FC = ({
const canAddMore = !maxCount || tags.length < maxCount;
return (
-
+
{tags.map((tag) => (
void;
@@ -22,7 +22,7 @@ export interface RichEditorProps {
console.log(VITE_BASE_URL);
const RichEditor: React.FC = ({
- value = "",
+ value = '',
onChange,
// height = 400,
// placeholder = "请输入内容...",
@@ -31,7 +31,7 @@ const RichEditor: React.FC = ({
// maxWords,
uploadConfig = {
maxSize: 5,
- acceptTypes: ["image/jpeg", "image/png", "image/gif", "image/webp"],
+ acceptTypes: ['image/jpeg', 'image/png', 'image/gif', 'image/webp'],
},
}) => {
const [uploading, setUploading] = useState(false);
@@ -39,13 +39,13 @@ const RichEditor: React.FC = ({
async (file: File): Promise => {
return new Promise((resolve, reject) => {
const formData = new FormData();
- formData.append("file", file);
+ formData.append('file', file);
try {
uploadImage(formData).then((res) => {
if (res) {
resolve(res);
} else {
- reject(new Error("上传失败:未返回有效的URL"));
+ reject(new Error('上传失败:未返回有效的URL'));
}
});
} catch (error) {
@@ -53,7 +53,7 @@ const RichEditor: React.FC = ({
}
});
},
- [uploadConfig]
+ [uploadConfig],
);
const handleImageUpload = useCallback(
(blobInfo: any, _: (percent: number) => void): Promise => {
@@ -65,23 +65,23 @@ const RichEditor: React.FC = ({
resolve(url);
});
- message.success("图片上传成功");
+ message.success('图片上传成功');
} catch (error) {
reject(error);
- message.error(typeof error === "string" ? error : "上传失败");
+ message.error(typeof error === 'string' ? error : '上传失败');
} finally {
setUploading(false);
}
});
},
- [uploadFile]
+ [uploadFile],
);
const handleCustomUpload = useCallback(
(editor: TinyMCEEditor) => {
- const input = document.createElement("input");
- input.type = "file";
- input.accept = uploadConfig.acceptTypes?.join(",") || "image/*";
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.accept = uploadConfig.acceptTypes?.join(',') || 'image/*';
input.multiple = true;
const handleFileChange = async (event: Event) => {
@@ -104,7 +104,7 @@ const RichEditor: React.FC = ({
file.size / 1024 / 1024 < (uploadConfig.maxSize || 5);
if (!isValidSize) {
message.error(
- `文件 ${file.name} 大小超过 ${uploadConfig.maxSize || 5}MB`
+ `文件 ${file.name} 大小超过 ${uploadConfig.maxSize || 5}MB`,
);
continue;
}
@@ -123,10 +123,10 @@ const RichEditor: React.FC = ({
}
};
- input.addEventListener("change", handleFileChange);
+ input.addEventListener('change', handleFileChange);
input.click();
},
- [uploadConfig, uploadFile]
+ [uploadConfig, uploadFile],
);
const handleEditorChange = (content: string) => {
@@ -143,18 +143,18 @@ const RichEditor: React.FC = ({
init={{
plugins: [
// Core editing features
- "anchor",
- "autolink",
- "charmap",
- "codesample",
- "emoticons",
- "link",
- "lists",
- "media",
- "searchreplace",
- "table",
- "visualblocks",
- "wordcount",
+ 'anchor',
+ 'autolink',
+ 'charmap',
+ 'codesample',
+ 'emoticons',
+ 'link',
+ 'lists',
+ 'media',
+ 'searchreplace',
+ 'table',
+ 'visualblocks',
+ 'wordcount',
// Your account includes a free trial of TinyMCE premium features
// Try the most popular premium features until Oct 8, 2025:
// "checklist",
@@ -187,44 +187,42 @@ const RichEditor: React.FC = ({
menubar: false,
toolbar:
- "undo redo | blocks | bold italic forecolor " +
- "alignleft aligncenter | " +
- "alignright alignjustify | bullist numlist outdent indent customupload | " +
- "removeformat ",
- tinycomments_mode: "embedded",
- tinycomments_author: "Author name",
- toolbar_mode: "wrap" as const, // 改为 wrap 模式,全部展开
+ 'undo redo | blocks | bold italic forecolor ' +
+ 'alignleft aligncenter | ' +
+ 'alignright alignjustify | bullist numlist outdent indent customupload | ' +
+ 'removeformat ',
+ tinycomments_mode: 'embedded',
+ tinycomments_author: 'Author name',
+ toolbar_mode: 'wrap' as const, // 改为 wrap 模式,全部展开
// toolbar_mode: "sliding",
mergetags_list: [
- { value: "First.Name", title: "First Name" },
- { value: "Email", title: "Email" },
+ { value: 'First.Name', title: 'First Name' },
+ { value: 'Email', title: 'Email' },
],
ai_request: (
_: any,
- respondWith: { string: (arg0: () => Promise) => any }
+ respondWith: { string: (arg0: () => Promise) => any },
) =>
respondWith.string(() =>
- Promise.reject("See docs to implement AI Assistant")
+ Promise.reject('See docs to implement AI Assistant'),
),
- language: "zh_CN",
-
+ language: 'zh_CN',
// 其他配置
table_class_list: [
- { title: "无样式", value: "" },
- { title: "简单表格", value: "simple-table" },
- { title: "条纹表格", value: "striped-table" },
- { title: "边框表格", value: "bordered-table" },
+ { title: '无样式', value: '' },
+ { title: '简单表格', value: 'simple-table' },
+ { title: '条纹表格', value: 'striped-table' },
+ { title: '边框表格', value: 'bordered-table' },
],
convert_urls: false,
remove_script_host: false,
- uploadcare_public_key: "0ad3671d77f59c5756dd",
-
+ uploadcare_public_key: '0ad3671d77f59c5756dd',
setup: (editor: TinyMCEEditor) => {
// 注册自定义上传按钮
- editor.ui.registry.addButton("customupload", {
- text: uploading ? "上传中..." : "上传",
- icon: "upload",
- tooltip: "上传图片(支持多选)",
+ editor.ui.registry.addButton('customupload', {
+ text: uploading ? '上传中...' : '上传',
+ icon: 'upload',
+ tooltip: '上传图片(支持多选)',
enabled: !disabled && !uploading,
onAction: () => {
handleCustomUpload(editor);
@@ -235,7 +233,9 @@ const RichEditor: React.FC = ({
images_upload_handler: handleImageUpload,
// 性能配置
browser_spellcheck: true,
- contextmenu: "link image table",
+ contextmenu: 'link image table',
+ promotion: false,
+ branding: false, // 去除品牌标识
}}
// onBlur={() =>onChange()}
diff --git a/src/components/Upload/UploadCard/index.tsx b/src/components/Upload/UploadCard/index.tsx
index 6f40b3f..a9843d1 100644
--- a/src/components/Upload/UploadCard/index.tsx
+++ b/src/components/Upload/UploadCard/index.tsx
@@ -61,7 +61,6 @@ const AudioUploader: React.FC = ({
return true;
};
-
// 实际的后端接口上传
const uploadToServer = async (file: File) => {
const formData = new FormData();
diff --git a/src/components/Upload/UploadImages/index.tsx b/src/components/Upload/UploadImages/index.tsx
new file mode 100644
index 0000000..a5dc845
--- /dev/null
+++ b/src/components/Upload/UploadImages/index.tsx
@@ -0,0 +1,147 @@
+import { PlusOutlined } from '@ant-design/icons';
+import type { GetProp, UploadFile, UploadProps } from 'antd';
+import { Image, message, Spin, Upload } from 'antd';
+import React, { useCallback, useEffect, useState } from 'react';
+import { uploadImage } from '@/services/infra/media';
+
+type FileType = Parameters>[0];
+
+const getBase64 = (file: FileType): Promise =>
+ new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onload = () => resolve(reader.result as string);
+ reader.onerror = (error) => reject(error);
+ });
+
+// accept: .doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document image/*,.pdf
+const UploadImages: React.FC<{
+ value?: string;
+ onChange?: (value: string | string[]) => void;
+ multiple?: boolean;
+ accept?: string;
+ maxCount?: number;
+}> = (props) => {
+ const {
+ value,
+ multiple = false,
+ maxCount = 1,
+ accept = 'image/png,image/jpeg',
+ onChange,
+ } = props;
+ const [previewOpen, setPreviewOpen] = useState(false);
+ const [previewImage, setPreviewImage] = useState('');
+ const [fileList, setFileList] = useState([]);
+ const [uploading, setUploading] = useState(false);
+ useEffect(() => {
+ if (value) {
+ setFileList([{ uid: '-1', url: value, status: 'done', name: value }]);
+ } else {
+ setFileList([]);
+ }
+ }, [value]);
+ const beforeUpload = (file: FileType) => {
+ const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+ if (!isJpgOrPng) {
+ message.error('仅支持.jpg .png 格式!');
+ }
+ // const isLt2M = file.size / 1024 / 1024 < 2;
+ // if (!isLt2M) {
+ // message.error('Image must smaller than 2MB!');
+ // }
+ return isJpgOrPng;
+ };
+ const handlePreview = async (file: UploadFile) => {
+ if (!file.url && !file.preview) {
+ file.preview = await getBase64(file.originFileObj as FileType);
+ }
+
+ setPreviewImage(file.url || (file.preview as string));
+ setPreviewOpen(true);
+ };
+
+ const handleRemove = (file: UploadFile): boolean => {
+ const newFileList = fileList.filter((item) => item.uid !== file.uid);
+ const newUrl = newFileList.map((item) => item.url) as string[];
+ onChange?.(newUrl[0]);
+ return true;
+ };
+
+ const uploadButton = (
+
+ );
+ const uploadFile = useCallback(async (file: File): Promise => {
+ return new Promise((resolve, reject) => {
+ const formData = new FormData();
+ formData.append('file', file);
+ try {
+ uploadImage(formData).then((res) => {
+ if (res) {
+ resolve(res);
+ } else {
+ reject(new Error('上传失败:未返回有效的URL'));
+ }
+ });
+ } catch (error) {
+ reject(error);
+ }
+ });
+ }, []);
+ const handleLoadImage: UploadProps['customRequest'] = async (option) => {
+ const { file, onSuccess, onError, onProgress } = option;
+
+ try {
+ setUploading(true);
+ // 模拟进度更新
+ onProgress?.({ percent: 10 });
+ // 调用后端接口
+ const url = await uploadFile(file as File);
+ onProgress?.({ percent: 100 });
+ if (url) {
+ onChange?.(url);
+ onSuccess?.({ url });
+ message.success('上传成功');
+ } else {
+ throw new Error('上传失败');
+ }
+ } catch (error) {
+ console.error('Upload error:', error);
+ onError?.(error as Error);
+ message.error(`上传失败: ${(error as Error).message}`);
+ } finally {
+ setUploading(false);
+ }
+ };
+ return (
+
+
+ {fileList.length >= maxCount ? null : uploadButton}
+
+ {previewImage && (
+ setPreviewOpen(visible),
+ afterOpenChange: (visible) => !visible && setPreviewImage(''),
+ }}
+ src={previewImage}
+ />
+ )}
+
+ );
+};
+
+export default UploadImages;
diff --git a/src/components/Upload/UploadVideo/index.tsx b/src/components/Upload/UploadVideo/index.tsx
new file mode 100644
index 0000000..86351e7
--- /dev/null
+++ b/src/components/Upload/UploadVideo/index.tsx
@@ -0,0 +1,192 @@
+import { PlusOutlined } from '@ant-design/icons';
+import type { GetProp, UploadFile, UploadProps } from 'antd';
+import { Modal, message, Spin, Upload } from 'antd';
+import React, { useCallback, useEffect, useState } from 'react';
+import VideoThumbnail from 'react-video-thumbnail';
+import { uploadImage } from '@/services/infra/media';
+
+type FileType = Parameters>[0];
+interface CustomUploadFile extends UploadFile {
+ thumbUrl?: string;
+ preview?: string;
+}
+const getBase64 = (file: FileType): Promise =>
+ new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onload = () => resolve(reader.result as string);
+ reader.onerror = (error) => reject(error);
+ });
+
+// accept: .doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document image/*,.pdf
+const UploadVideo: React.FC<{
+ value?: string;
+ onChange?: (value: string | string[]) => void;
+ multiple?: boolean;
+ accept?: string;
+ maxCount?: number;
+}> = (props) => {
+ const {
+ value,
+ multiple = false,
+ maxCount = 1,
+ accept = 'video/*',
+ onChange,
+ } = props;
+ const [previewOpen, setPreviewOpen] = useState(false);
+ const [previewVideo, setPreviewVideo] = useState('');
+ const [fileList, setFileList] = useState([]);
+ const [uploading, setUploading] = useState(false);
+ useEffect(() => {
+ if (value) {
+ setFileList([
+ { uid: '-1', url: value, thumbUrl: value, status: 'done', name: value },
+ ]);
+ } else {
+ setFileList([]);
+ }
+ }, [value]);
+ const beforeUpload = (file: FileType) => {
+ const isJpgOrPng = file.type === 'video/mp4' || file.type === 'video/mov';
+ if (!isJpgOrPng) {
+ message.error('仅支持.mp4 .mov 格式!');
+ }
+ // const isLt2M = file.size / 1024 / 1024 < 2;
+ // if (!isLt2M) {
+ // message.error('Image must smaller than 2MB!');
+ // }
+ return isJpgOrPng;
+ };
+
+ // // 生成缩略图组件
+ // const renderThumbnail = (videoUrl: string) => {
+ // return (
+ //
+ //
+ //
+ // );
+ // };
+ const handlePreview = async (file: CustomUploadFile) => {
+ if (!file.url && !file.preview && file.originFileObj) {
+ file.preview = await getBase64(file.originFileObj);
+ }
+ setPreviewVideo(file.url || file.preview || '');
+ setPreviewOpen(true);
+ };
+ // const customItemRender: UploadProps["itemRender"] = (
+ // _,
+ // file: CustomUploadFile
+ // ) => {
+ // return (
+ //
+ //
+ //
handlePreview(file)}>
+ // {file.thumbUrl ? (
+ // renderThumbnail("https://petshy.tashowz.com" + file.thumbUrl)
+ // ) : (
+ //
+ // )}
+ //
+ //
{file.name}
+ //
+ //
+ // );
+ // };
+ const handleRemove = (file: UploadFile): boolean => {
+ const newFileList = fileList.filter((item) => item.uid !== file.uid);
+ const newUrl = newFileList.map((item) => item.url) as string[];
+ onChange?.(newUrl[0]);
+ return true;
+ };
+
+ const uploadButton = (
+
+ );
+ const uploadFile = useCallback(async (file: File): Promise => {
+ return new Promise((resolve, reject) => {
+ const formData = new FormData();
+ formData.append('file', file);
+ try {
+ uploadImage(formData).then((res) => {
+ if (res) {
+ resolve(res);
+ } else {
+ reject(new Error('上传失败:未返回有效的URL'));
+ }
+ });
+ } catch (error) {
+ reject(error);
+ }
+ });
+ }, []);
+ const handleLoadImage: UploadProps['customRequest'] = async (option) => {
+ const { file, onSuccess, onError, onProgress } = option;
+
+ try {
+ setUploading(true);
+ // 模拟进度更新
+ onProgress?.({ percent: 10 });
+ // 调用后端接口
+ const url = await uploadFile(file as File);
+ onProgress?.({ percent: 100 });
+ if (url) {
+ onChange?.(url);
+ onSuccess?.({ url });
+ message.success('上传成功');
+ } else {
+ throw new Error('上传失败');
+ }
+ } catch (error) {
+ console.error('Upload error:', error);
+ onError?.(error as Error);
+ message.error(`上传失败: ${(error as Error).message}`);
+ } finally {
+ setUploading(false);
+ }
+ };
+
+ return (
+
+
+ {fileList.length >= maxCount ? null : uploadButton}
+
+ setPreviewOpen(false)}
+ width={800}
+ >
+
+
+
+ );
+};
+
+export default UploadVideo;
diff --git a/src/constants/antd/image.tsx b/src/constants/antd/image.tsx
new file mode 100644
index 0000000..e04913f
--- /dev/null
+++ b/src/constants/antd/image.tsx
@@ -0,0 +1,2 @@
+export const fallback =
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==';
diff --git a/src/constants/index.ts b/src/constants/index.ts
index 7befed3..890c099 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -3,6 +3,9 @@ export const formStatusType: { [key: string]: string } = {
update: '编辑',
test: '测试',
detail: '详情',
+ sku: 'sku管理',
+ 'extend-rule': '服务规则管理',
+ 'extend-service': '扩展服务管理',
};
export const tenantStatus = [
diff --git a/src/pages/prod/category/category-selecr.tsx b/src/pages/prod/category/category-selecr.tsx
new file mode 100644
index 0000000..04b4b54
--- /dev/null
+++ b/src/pages/prod/category/category-selecr.tsx
@@ -0,0 +1,5 @@
+const CateGorySelect = () => {
+ return ;
+};
+
+export default CateGorySelect;
diff --git a/src/pages/prod/category/config.tsx b/src/pages/prod/category/config.tsx
index e155fa7..a43deee 100644
--- a/src/pages/prod/category/config.tsx
+++ b/src/pages/prod/category/config.tsx
@@ -2,51 +2,54 @@ import type {
ProColumns,
ProCoreActionType,
ProFormColumnsType,
-} from "@ant-design/pro-components";
-import dayjs from "dayjs";
-import TagEditor from "@/components/TagEditor";
-import TinyMCEEditor from "@/components/Tinymce";
+} from '@ant-design/pro-components';
+import { Modal, message, Switch } from 'antd';
+import dayjs from 'dayjs';
+import TagEditor from '@/components/TagEditor';
+import TinyMCEEditor from '@/components/Tinymce';
+import UploadImages from '@/components/Upload/UploadImages';
+import { dateFormatS } from '@/constants';
import {
- getCategoryList,
- putCategoryUpdate,
-} from "@/services/prodApi/category";
-import { Input, message, Modal, Switch } from "antd";
-export const baseTenantColumns: ProColumns[] = [
+ type Category,
+ getProdCategoryPage,
+ updateProdCategory,
+} from '@/services/prod/category-manager';
+export const baseTenantColumns: ProColumns[] = [
{
- title: "类目名称",
- dataIndex: "categoryName",
+ title: '类目名称',
+ dataIndex: 'categoryName',
width: 100,
},
{
- title: "类目ID",
- dataIndex: "categoryId",
+ title: '类目ID',
+ dataIndex: 'categoryId',
},
{
- title: "类目层级",
- dataIndex: "grade",
+ title: '类目层级',
+ dataIndex: 'grade',
hideInSearch: true, // 在搜索表单中隐藏
},
{
- title: "父级类目",
- dataIndex: "parentName",
+ title: '父级类目',
+ dataIndex: 'parentName',
hideInSearch: true, // 在搜索表单中隐藏
},
{
- title: "排序权重",
- dataIndex: "sort",
+ title: '排序权重',
+ dataIndex: 'sort',
hideInSearch: true, // 在搜索表单中隐藏
},
{
- title: "状态",
- dataIndex: "status",
- valueType: "switch",
+ title: '状态',
+ dataIndex: 'status',
+ valueType: 'switch',
hideInSearch: true,
render: (
_,
- record: API.CategoryDO,
+ record: Category,
_index: number,
- action: ProCoreActionType | undefined
+ action: ProCoreActionType | undefined,
) => (
[] = [
unCheckedChildren="禁用"
onChange={(checked) => {
Modal.confirm({
- title: "确认操作",
- content: `确认要"${checked ? "启用" : "禁用"}${
+ title: '确认操作',
+ content: `确认要"${checked ? '启用' : '禁用'}${
record.categoryName
}"类目吗?`,
onOk: async () => {
console.log(checked);
- await putCategoryUpdate({
+ await updateProdCategory({
status: checked ? 1 : 0,
categoryId: record.categoryId,
});
- message.success("修改成功");
+ message.success('修改成功');
action?.reload();
},
});
@@ -73,145 +76,158 @@ export const baseTenantColumns: ProColumns[] = [
),
},
{
- title: "创建时间",
- dataIndex: "createTime",
- valueType: "dateRange",
+ title: '创建时间',
+ dataIndex: 'createTime',
+ valueType: 'dateRange',
hideInSearch: true, // 在搜索表单中隐藏
- render: (_, record: API.CategoryDO) =>
- dayjs(record.createTime).format("YYYY-MM-DD HH:mm:ss"),
+ render: (_, record: Category) =>
+ dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss'),
},
];
-export const formColumns = (data: {
- type: string;
- grade: number;
-}): ProFormColumnsType[] => [
- {
- title: "类目",
- dataIndex: "grade",
- valueType: "radio",
- fieldProps: {
- options: [
- { label: "一级类目", value: 1 },
- { label: "二级类目", value: 2 },
- { label: "三级类目", value: 3 },
- ],
- disabled: data.type === "update",
+export const formColumns = (data: { type: string }): ProFormColumnsType[] => {
+ console.log(data, 'data');
+ return [
+ {
+ title: '类目',
+ dataIndex: 'grade',
+ valueType: 'radio',
+ fieldProps: {
+ options: [
+ { label: '一级类目', value: 1 },
+ { label: '二级类目', value: 2 },
+ { label: '三级类目', value: 3 },
+ ],
+ disabled: data.type === 'update',
+ },
},
- },
- {
- title: "类目名称",
- dataIndex: "categoryName",
- formItemProps: {
- rules: [
- {
- required: true,
- message: "请输入用户名",
- },
- ],
+ {
+ title: '类目名称',
+ dataIndex: 'categoryName',
+ formItemProps: {
+ rules: [
+ {
+ required: true,
+ message: '请输入用户名',
+ },
+ ],
+ },
},
- },
- {
- title: "排序权重",
- dataIndex: "sort",
- valueType: "digit",
- },
- {
- title: "类目描述",
- dataIndex: "description",
- valueType: "textarea",
- renderFormItem: () => {
- return ;
+ {
+ title: '排序权重',
+ dataIndex: 'sort',
+ valueType: 'digit',
},
- },
- {
- title: "关联父级",
- dataIndex: "parentId",
- valueType: "select",
- hideInForm: data.grade - 1 <= 0,
- fieldProps: {
- fieldNames: { label: "categoryName", value: "categoryId" },
+ {
+ title: '类目描述',
+ dataIndex: 'description',
+ valueType: 'textarea',
+ renderFormItem: () => {
+ return ;
+ },
},
- request: async () => {
- const grade = data.grade ? data.grade - 1 : undefined;
- const res = await getCategoryList({ grade });
- return res;
+ {
+ title: '关联父级',
+ dataIndex: 'parentId',
+ valueType: 'select',
+ fieldProps: {
+ fieldNames: { label: 'categoryName', value: 'categoryId' },
+ },
+ dependencies: ['grade'],
+ request: async (params) => {
+ const res = await getProdCategoryPage({
+ grade: Number(params.grade) - 1,
+ });
+ return res;
+ },
+ renderFormItem: (schema, config, form) => {
+ const grade = form.getFieldValue('grade');
+ if (Number(grade) === 1) {
+ return null;
+ }
+ return config.defaultRender(schema);
+ },
},
- },
- {
- title: "类目icon",
- dataIndex: "icon",
- },
- {
- title: "类目标签",
- dataIndex: "tag",
- renderFormItem: () => {
- return (
-
- );
+ {
+ title: '类目icon',
+ dataIndex: 'icon',
+ renderFormItem: () => {
+ return ;
+ },
},
- },
- {
- title: "类目状态",
- dataIndex: "status",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '类目标签',
+ dataIndex: 'tag',
+ renderFormItem: () => {
+ return (
+
+ );
+ },
},
- renderFormItem: (_schema, _config, form) => {
- const status = form.getFieldValue("type");
- return ;
+ {
+ title: '类目状态',
+ dataIndex: 'status',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const status = form.getFieldValue('status');
+ return {status ? '启用' : '禁用'};
+ },
},
- },
- {
- title: "类目ID",
- dataIndex: "categoryId",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '类目ID',
+ dataIndex: 'categoryId',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const categoryId = form.getFieldValue('categoryId');
+ return {categoryId};
+ },
},
- },
- {
- title: "创建时间",
- dataIndex: "createTime",
- valueType: "dateTime",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '创建时间',
+ dataIndex: 'createTime',
+ valueType: 'dateTime',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const createTime = form.getFieldValue('createTime');
+ return {dayjs(createTime).format(dateFormatS)};
+ },
},
- },
- {
- title: "创建人",
- dataIndex: "creator",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '创建人',
+ dataIndex: 'creator',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const creator = form.getFieldValue('creator');
+ return {creator};
+ },
},
- },
- {
- title: "更新时间",
- dataIndex: "updateTime",
- valueType: "dateTime",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '更新时间',
+ dataIndex: 'updateTime',
+ valueType: 'dateTime',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const dateTime = form.getFieldValue('dateTime');
+ return {dayjs(dateTime).format(dateFormatS)};
+ },
},
- },
- {
- title: "更新人",
- dataIndex: "updator",
- hideInForm: data.type === "create",
- fieldProps: {
- disabled: data.type === "update",
+ {
+ title: '更新人',
+ dataIndex: 'updator',
+ hideInForm: data.type === 'create',
+ renderFormItem: (_schema, _config, form) => {
+ const updator = form.getFieldValue('updator');
+ return {updator};
+ },
},
- },
-];
+ ];
+};
// {
// title: "模板内容",
diff --git a/src/pages/prod/category/index.tsx b/src/pages/prod/category/index.tsx
index bab6183..cad981e 100644
--- a/src/pages/prod/category/index.tsx
+++ b/src/pages/prod/category/index.tsx
@@ -1,24 +1,26 @@
-import { PlusOutlined } from "@ant-design/icons";
-import type { ActionType, ProColumns } from "@ant-design/pro-components";
-import type { TabsProps } from "antd";
-import { Tabs } from "antd";
-import { useCallback, useRef, useState } from "react";
+import { PlusOutlined } from '@ant-design/icons';
+import type { ActionType, ProColumns } from '@ant-design/pro-components';
+import type { TabsProps } from 'antd';
+import { Tabs } from 'antd';
+import { useCallback, useRef, useState } from 'react';
import ConfigurableDrawerForm, {
type ConfigurableDrawerFormRef,
-} from "@/components/DrawerForm";
-import EnhancedProTable from "@/components/EnhancedProTable";
-import type { ToolbarAction } from "@/components/EnhancedProTable/types";
-import { formStatusType } from "@/constants";
+} from '@/components/DrawerForm';
+import EnhancedProTable from '@/components/EnhancedProTable';
+import type { ToolbarAction } from '@/components/EnhancedProTable/types';
+import { formStatusType } from '@/constants';
import {
- getCategoryList,
- postCategoryCreate,
- putCategoryUpdate,
-} from "@/services/prodApi/category";
-import { baseTenantColumns, formColumns } from "./config";
+ type Category,
+ type CategoryReq,
+ createProdCategory,
+ getProdCategoryPage,
+ updateProdCategory,
+} from '@/services/prod/category-manager';
+import { baseTenantColumns, formColumns } from './config';
const ProdCategory = () => {
const tableRef = useRef(null);
- const [type, setType] = useState<"create" | "update" | "test">("create");
+ const [type, setType] = useState<'create' | 'update' | 'test'>('create');
const [grade, setGrade] = useState();
const configurableDrawerRef = useRef(null);
const [id, setId] = useState(0);
@@ -26,11 +28,11 @@ const ProdCategory = () => {
(key: string) => {
setGrade(Number(key));
},
- [grade]
+ [grade],
);
- const onFetch = async (params: API.getProductCategoryCategoryListParams) => {
- const data = await getCategoryList({
+ const onFetch = async (params: CategoryReq) => {
+ const data = await getProdCategoryPage({
...params,
grade: grade ? Number(grade) : undefined,
});
@@ -41,48 +43,48 @@ const ProdCategory = () => {
};
const handleAdd = () => {
- setType("create");
- configurableDrawerRef.current?.open({ grade: grade ? grade : 1 });
+ setType('create');
+ configurableDrawerRef.current?.open({ grade: 1 });
};
const toolbarActions: ToolbarAction[] = [
{
- key: "add",
- label: "新建",
- type: "primary",
+ key: 'add',
+ label: '新建',
+ type: 'primary',
icon: ,
onClick: handleAdd,
},
];
- const handleEdit = async (row: API.CategoryDO) => {
- setType("update");
+ const handleEdit = async (row: Category) => {
+ setType('update');
row.categoryId && setId(row.categoryId);
configurableDrawerRef.current?.open(row);
};
const handleSubmit = useCallback(
- async (values: API.CategoryDO) => {
- if (type === "create") {
- await postCategoryCreate(values);
+ async (values: Category) => {
+ if (type === 'create') {
+ await createProdCategory(values);
} else {
- await putCategoryUpdate({
+ await updateProdCategory({
...values,
categoryId: id,
});
}
- tableRef.current?.reload();
+ tableRef.current?.reload(true);
return true;
},
- [id, type]
+ [id, type],
);
- const actionColumns: ProColumns = {
- title: "操作",
- dataIndex: "option",
- valueType: "option",
- fixed: "right",
+ const actionColumns: ProColumns = {
+ title: '操作',
+ dataIndex: 'option',
+ valueType: 'option',
+ fixed: 'right',
width: 120,
- render: (_text: React.ReactNode, record: API.CategoryDO, _: number) => [
+ render: (_text: React.ReactNode, record: Category, _: number) => [
handleEdit(record)}>
编辑
,
@@ -94,7 +96,7 @@ const ProdCategory = () => {
const renderChildren = () => {
return (
<>
-
+
ref={tableRef}
columns={columns}
rowKey="categoryId"
@@ -107,8 +109,8 @@ const ProdCategory = () => {
{
);
};
- const items: TabsProps["items"] = [
+ const items: TabsProps['items'] = [
{
- key: "",
- label: "全部分类",
+ key: '',
+ label: '全部分类',
children: renderChildren(),
},
{
- key: "3",
- label: "三级分类",
+ key: '3',
+ label: '三级分类',
children: renderChildren(),
},
{
- key: "2",
- label: "二级分类",
+ key: '2',
+ label: '二级分类',
children: renderChildren(),
},
{
- key: "1",
- label: "一级分类",
+ key: '1',
+ label: '一级分类',
children: renderChildren(),
},
];
@@ -143,6 +145,7 @@ const ProdCategory = () => {
);
diff --git a/src/pages/prod/list/components/extend-rule.tsx b/src/pages/prod/list/components/extend-rule.tsx
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/prod/list/components/prod-info.tsx b/src/pages/prod/list/components/prod-info.tsx
new file mode 100644
index 0000000..2f4b55c
--- /dev/null
+++ b/src/pages/prod/list/components/prod-info.tsx
@@ -0,0 +1,151 @@
+import {
+ ProForm,
+ ProFormGroup,
+ ProFormSelect,
+ ProFormText,
+ ProFormTextArea,
+} from '@ant-design/pro-components';
+import { Divider } from 'antd';
+import React from 'react';
+import TagEditor from '@/components/TagEditor';
+import TinymceEditor from '@/components/Tinymce';
+import UploadImages from '@/components/Upload/UploadImages';
+import UploadVideo from '@/components/Upload/UploadVideo';
+import type { Prod } from '@/services/prod/prod-manager';
+
+interface ProdInfoProps {
+ onRefresh?: (type?: string) => void;
+ data?: T;
+}
+
+const ProdInfo = >(props: ProdInfoProps) => {
+ console.log(props, 'ProdInfo');
+ return (
+ <>
+
+
+
+
+
+
+
+
+ e.fileList}
+ >
+
+
+
+
+ e.fileList}
+ >
+
+
+ e.fileList}
+ >
+
+
+ e.fileList}
+ >
+
+
+ e.fileList}
+ >
+
+
+ e.fileList}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+export default React.memo(ProdInfo) as <_T extends Record>(
+ props: ProdInfoProps,
+) => React.ReactElement;
diff --git a/src/pages/prod/list/components/service-rule/config.tsx b/src/pages/prod/list/components/service-rule/config.tsx
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/prod/list/components/service-rule/index.tsx b/src/pages/prod/list/components/service-rule/index.tsx
new file mode 100644
index 0000000..a88d177
--- /dev/null
+++ b/src/pages/prod/list/components/service-rule/index.tsx
@@ -0,0 +1,69 @@
+import { ProForm, ProFormText } from '@ant-design/pro-components';
+
+const ServiceRule: React.FC = () => {
+ return (
+
+ grid
+ onFinish={async (values) => {
+ // await waitTime(2000);
+ console.log(values);
+ // message.success('提交成功');
+ }}
+ initialValues={{
+ name: '蚂蚁设计有限公司',
+ useMode: 'chapter',
+ }}
+ >
+
+
+
+
+
+
+ {/*
+ rowKey="id"
+ toolBarRender={false}
+ columns={columns}
+ recordCreatorProps={{
+ newRecordType: 'dataSource',
+ position: 'top',
+ record: () => ({
+ id: Date.now(),
+ addonBefore: 'ccccccc',
+ decs: 'testdesc',
+ }),
+ }}
+ editable={{
+ type: 'multiple',
+ editableKeys,
+ onChange: setEditableRowKeys,
+ actionRender: (row, _, dom) => {
+ return [dom.delete];
+ },
+ }} */}
+ {/* /> */}
+
+
+ );
+};
+
+export default ServiceRule;
diff --git a/src/pages/prod/list/components/sku/index.tsx b/src/pages/prod/list/components/sku/index.tsx
new file mode 100644
index 0000000..b1b534e
--- /dev/null
+++ b/src/pages/prod/list/components/sku/index.tsx
@@ -0,0 +1,31 @@
+import { ProForm } from '@ant-design/pro-components';
+import React from 'react';
+import SkuConfig from './sku-confiig';
+import SkuList from './sku-list';
+
+const Sku: React.FC = () => {
+ return (
+ <>
+ e.fileList}
+ >
+
+
+ e.fileList}
+ >
+
+
+ >
+ );
+};
+
+export default React.memo(Sku);
diff --git a/src/pages/prod/list/components/sku/sku-confiig.tsx b/src/pages/prod/list/components/sku/sku-confiig.tsx
new file mode 100644
index 0000000..cebd3d5
--- /dev/null
+++ b/src/pages/prod/list/components/sku/sku-confiig.tsx
@@ -0,0 +1,23 @@
+import { Typography } from 'antd';
+import React from 'react';
+import DraggableTagList from '@/components/Draggable/DraggableTagList';
+
+const { Title, Text } = Typography;
+const SkuConfig: React.FC<{
+ value?: API.ProdPropSaveReqVO;
+ onChange?: (value: API.ProdPropSaveReqVO) => void;
+}> = () => {
+ // const { value, onChange } = props;
+ return (
+ <>
+ 规格设置
+
+ 你想区分商品的哪些属性?第一次使用?点此查看详情
+ 学习。商品创建成功后,规格属性不可增减,如需变更规格逻辑定义,请创建新的商品。
+
+
+ >
+ );
+};
+
+export default React.memo(SkuConfig);
diff --git a/src/pages/prod/list/components/sku/sku-list.tsx b/src/pages/prod/list/components/sku/sku-list.tsx
new file mode 100644
index 0000000..e3214bf
--- /dev/null
+++ b/src/pages/prod/list/components/sku/sku-list.tsx
@@ -0,0 +1,22 @@
+import { Typography } from 'antd';
+import React from 'react';
+import type { SkuConfig } from '@/services/prod/prod-manager';
+
+const { Title, Text } = Typography;
+const SkuList: React.FC<{
+ value?: SkuConfig;
+ onChange?: (value: SkuConfig) => void;
+}> = (props) => {
+ const { value } = props;
+ console.log('value', value);
+ return (
+ <>
+ SKU 列表
+
+ 请填写SKU价格与可售数量,高级设置可自定义更多内容。
+
+ >
+ );
+};
+
+export default React.memo(SkuList);
diff --git a/src/pages/prod/list/config.tsx b/src/pages/prod/list/config.tsx
new file mode 100644
index 0000000..2e7bdb2
--- /dev/null
+++ b/src/pages/prod/list/config.tsx
@@ -0,0 +1,90 @@
+import type { ProColumns } from '@ant-design/pro-components';
+import { Badge, Button, Image, Space, Typography } from 'antd';
+import dayjs from 'dayjs';
+import type { Prod } from '@/services/prod/prod-manager';
+
+const { Text } = Typography;
+export const baseTenantColumns: ProColumns[] = [
+ {
+ title: '商品',
+ dataIndex: 'prodName',
+ render: (_, record) => (
+
+
+
+
+ {record.categoryName}
+
+
+ ID:{record.categoryName}
+
+
+ 类目:{record.categoryName}
+
+
+
+ ),
+ },
+ {
+ title: '服务信息',
+ dataIndex: 'categoryId',
+ render: () => (
+
+
+ 服务区域:
+
+
+
+ 服务区域:
+
+
+
+ 紧急服务:
+
+
+
+ ),
+ },
+
+ {
+ title: '状态',
+ dataIndex: 'status',
+ valueType: 'switch',
+ width: 300,
+ hideInSearch: true,
+ render: () => (
+
+
+
+
+
+
+
+
+
+ ),
+ },
+ {
+ title: '时间信息',
+ dataIndex: 'createTime',
+ valueType: 'dateRange',
+ hideInSearch: true, // 在搜索表单中隐藏
+ render: (_, record) => (
+
+
+ 某某某某有限公司
+
+
+ 创建时间:
+ {dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss')}
+
+
+ 更新时间:
+ {dayjs(record.updateTime).format('YYYY-MM-DD HH:mm:ss')}
+
+
+ ),
+ },
+];
diff --git a/src/pages/prod/list/detail.tsx b/src/pages/prod/list/detail.tsx
new file mode 100644
index 0000000..1d09ab1
--- /dev/null
+++ b/src/pages/prod/list/detail.tsx
@@ -0,0 +1,84 @@
+import type { FormInstance } from '@ant-design/pro-components';
+import { ProCard, ProForm, StepsForm } from '@ant-design/pro-components';
+import { message } from 'antd';
+import { useEffect } from 'react';
+import ProdInfo from '@/pages/prod/list/components/prod-info';
+import Sku from '@/pages/prod/list/components/sku';
+import type { Prod, ProdDetail, SkuConfig } from '@/services/prod/prod-manager';
+
+const waitTime = (time: number = 100) => {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve(true);
+ }, time);
+ });
+};
+
+const ProdDetailPage: React.FC<{
+ data?: Prod;
+ formRef?: React.RefObject>;
+}> = (props) => {
+ const { data, formRef } = props;
+ console.log(data, 'ProdDetailPage');
+ useEffect(() => {
+ if (data) {
+ formRef?.current?.setFieldsValue(data);
+ }
+ }, [data]);
+ return (
+
+ {data?.prodId ? (
+
+
+
+ ) : (
+
+ current={0}
+ formRef={formRef}
+ submitter={false}
+ onFinish={async () => {
+ await waitTime(1000);
+ message.success('提交成功');
+ }}
+ formProps={{
+ validateMessages: {
+ required: '此项为必填项',
+ },
+ }}
+ >
+
+ grid={true}
+ layout="horizontal"
+ name="info"
+ title="填写商品信息"
+ onFinish={async () => {
+ try {
+ await formRef?.current?.validateFields();
+ console.log(formRef?.current?.getFieldsValue());
+ } catch (error: any) {
+ console.log(error);
+ message.error(error.msg);
+ }
+ return true;
+ }}
+ >
+
+
+ name="sku" title="设置商品规格">
+
+
+ name="prod" title="发布商品">
+ 提交
+
+
+ )}
+
+ );
+};
+
+export default ProdDetailPage;
diff --git a/src/pages/prod/list/index.tsx b/src/pages/prod/list/index.tsx
index 2d19c04..2a02a21 100644
--- a/src/pages/prod/list/index.tsx
+++ b/src/pages/prod/list/index.tsx
@@ -1,5 +1,250 @@
+import { EllipsisOutlined, PlusOutlined } from '@ant-design/icons';
+import type { ActionType, ProColumns } from '@ant-design/pro-components';
+import type { MenuProps, TabsProps } from 'antd';
+import { Button, Dropdown, Space, Tabs } from 'antd';
+import { useCallback, useRef, useState } from 'react';
+import ConfigurableDrawerForm, {
+ type ConfigurableDrawerFormRef,
+} from '@/components/DrawerForm';
+import EnhancedProTable from '@/components/EnhancedProTable';
+import type { ToolbarAction } from '@/components/EnhancedProTable/types';
+import { formStatusType } from '@/constants';
+import ProdDetail from '@/pages/prod/list/detail';
+import {
+ createProd,
+ getProdDetail,
+ getProdPage,
+ type Prod,
+ type ProdReq,
+ updateProd,
+} from '@/services/prod/prod-manager';
+import { baseTenantColumns } from './config';
+
const ProdList = () => {
- return ProdList
;
+ const tableRef = useRef(null);
+ const [type, setType] = useState<'create' | 'update' | 'test'>('create');
+ const [status, setStatus] = useState();
+ const detailRef = useRef(null);
+ // const editRef = useRef(null);
+ const [id, setId] = useState(0);
+ const onChange = useCallback(
+ (key: string) => {
+ setStatus(Number(key));
+ },
+ [status],
+ );
+
+ const onFetch = async (params: ProdReq) => {
+ const data = await getProdPage({
+ ...params,
+ status: status ? status : undefined,
+ });
+ return {
+ data: data.list,
+ success: true,
+ };
+ };
+
+ const handleAdd = () => {
+ setType('create');
+ detailRef.current?.open({});
+ };
+
+ const toolbarActions: ToolbarAction[] = [
+ {
+ key: 'add',
+ label: '新建',
+ type: 'primary',
+ icon: ,
+ onClick: handleAdd,
+ },
+ ];
+ const handleEdit = async (row: Prod) => {
+ setType('update');
+ const res = await getProdDetail({ id: row.prodId as number });
+ setId(row.prodId as number);
+ detailRef.current?.open(res);
+ };
+ // 商品更新
+ // const _handleEditSubmit = async (values: Prod) => {
+ // await updateProd(values);
+ // tableRef.current?.reload();
+ // message.success("编辑成功");
+ // return true;
+ // };
+ const handleSubmit = useCallback(
+ async (values: Prod) => {
+ if (type === 'create') {
+ await createProd(values);
+ } else {
+ await updateProd({
+ ...values,
+ categoryId: id,
+ });
+ }
+ tableRef.current?.reload();
+ return true;
+ },
+
+ [id, type],
+ );
+
+ // const renderDetailFooter = () => {
+ // if (type === "update") {
+ // return (
+ //
+ //
+ //
+ //
+ // );
+ // } else {
+ // return (
+ //
+ // );
+ // }
+ // };
+ const itemsMenu = (row: Prod): MenuProps['items'] => [
+ {
+ key: 'edit',
+ label: (
+
+ ),
+ },
+ {
+ key: 'sku',
+ label: ,
+ },
+ {
+ key: 'rules-service',
+ label: ,
+ },
+ {
+ key: 'extend-service',
+ label: ,
+ },
+ {
+ key: 'status',
+ label: ,
+ },
+ {
+ key: 'delete',
+ label: (
+
+ ),
+ },
+ ];
+ const actionColumns: ProColumns = {
+ title: '操作',
+ dataIndex: 'option',
+ valueType: 'option',
+ fixed: 'right',
+ align: 'center',
+
+ width: 200,
+ render: (_text: React.ReactNode, record: Prod, _: number) => [
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+ ],
+ };
+
+ const columns = [...baseTenantColumns, actionColumns];
+ const renderChildren = () => {
+ return (
+ <>
+
+ ref={tableRef}
+ columns={columns}
+ request={onFetch}
+ toolbarActions={toolbarActions}
+ headerTitle="短信渠道"
+ showIndex={false}
+ rowKey="prodId"
+ showSelection={false}
+ />
+
+
+
+
+ {/*
+
+ */}
+ >
+ );
+ };
+
+ const items: TabsProps['items'] = [
+ {
+ key: '',
+ label: '全部商品',
+ children: renderChildren(),
+ },
+ {
+ key: '1',
+ label: '出售中的商品',
+ children: renderChildren(),
+ },
+ {
+ key: '0',
+ label: '仓库中的商品',
+ children: renderChildren(),
+ },
+ {
+ key: '2',
+ label: '待审核的商品',
+ children: renderChildren(),
+ },
+ ];
+ return (
+
+ );
};
export default ProdList;
diff --git a/src/pages/system/menu/index.tsx b/src/pages/system/menu/index.tsx
index 9ea4eeb..00ff414 100644
--- a/src/pages/system/menu/index.tsx
+++ b/src/pages/system/menu/index.tsx
@@ -1,6 +1,10 @@
// src/pages/system/menu/index.tsx
-import { PlusOutlined, ReloadOutlined } from '@ant-design/icons';
+import {
+ ExclamationCircleOutlined,
+ PlusOutlined,
+ ReloadOutlined,
+} from '@ant-design/icons';
import type { ActionType, ProColumns } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import { Modal, Popconfirm } from 'antd';
@@ -11,8 +15,6 @@ import ConfigurableDrawerForm, {
import EnhancedProTable from '@/components/EnhancedProTable';
import type { ToolbarAction } from '@/components/EnhancedProTable/types';
import { formStatusType } from '@/constants';
-import { useMessage } from '@/hooks/antd/useMessage';
-import { CACHE_KEY, useCache } from '@/hooks/web/useCache';
import {
createMenu,
deleteMenu,
@@ -27,11 +29,10 @@ import { baseMenuColumns, formColumns } from './config';
const SystemMenu = () => {
const configurableDrawerRef = useRef(null);
const tableRef = useRef(null);
- const { wsCache } = useCache();
- const message = useMessage(); // 消息弹窗
+ const [modal, contextHolder] = Modal.useModal();
const [type, setType] = useState<'create' | 'update'>('create');
const [id, setId] = useState(0);
- const { initialState, setInitialState } = useModel('@@initialState');
+ const { initialState } = useModel('@@initialState');
const handleEdit = (record: MenuVO) => {
setType('update');
setId(record.id);
@@ -56,13 +57,18 @@ const SystemMenu = () => {
const handleReload = async () => {
try {
- await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存');
- // 清空,从而触发刷新
- // wsCache.delete(CACHE_KEY.USER);
- // wsCache.delete(CACHE_KEY.ROLE_ROUTERS);
- await initialState?.fetchUserInfo?.();
- // 刷新浏览器
- location.reload();
+ await modal.confirm({
+ title: '刷新菜单缓存',
+ icon: ,
+ content: '即将更新缓存刷新浏览器!',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: async () => {
+ await initialState?.fetchUserInfo?.();
+ // 刷新浏览器
+ location.reload();
+ },
+ });
} catch {}
};
@@ -126,6 +132,7 @@ const SystemMenu = () => {
const columns = [...baseMenuColumns, actionColumns];
return (
<>
+ {contextHolder}
ref={tableRef}
columns={columns}
diff --git a/src/pages/trade/order/config.tsx b/src/pages/trade/order/config.tsx
index ba5d31c..18b423d 100644
--- a/src/pages/trade/order/config.tsx
+++ b/src/pages/trade/order/config.tsx
@@ -1,43 +1,52 @@
import type { ProColumns } from '@ant-design/pro-components';
-import { Button, Space, Tag, Typography } from 'antd';
-import dayjs from 'dayjs';
-import { dateFormat, dateFormatS } from '@/constants';
+import { Image, Space, Tag, Typography } from 'antd';
import type { TradeOrderPageRespVO } from '@/services/trade/order';
const { Text, Paragraph } = Typography;
export const baseOrderColumns: ProColumns[] = [
{
title: '商品',
- dataIndex: 'spuName',
+ dataIndex: 'items',
hideInSearch: true,
width: '100%',
ellipsis: true,
- render: (_, record) => (
-
-
- {record.spuName}
-
- {record.skuName}
-
-
-
数量:
-
{record.count}
+ render: (_, record) => {
+ if (!record.items) {
+ return _;
+ }
+ return record.items.map((item) => (
+
+
+
+
+ {item.spuName}测试商品名称测试商品名称测试商品名称测试商品名称
+
+
{item.skuName}
+
+
+ 数量:
+ {item.count || 0}
+
+
+ 单价:
+
+ {item.price || 0}/{item.unit || '-'}
+
+
+
+ 到手价:
+
+ {item.handedPrice || 0}/{item.unit || '-'}
+
+
+
-
- 单价:
-
- {record.price}/{record.unit}
-
-
-
- 到手价:
-
- {record.handedPrice}/{record.unit}
-
-
-
-
- ),
+
+ ));
+ },
},
{
@@ -50,7 +59,7 @@ export const baseOrderColumns: ProColumns
[] = [
预约时间:
- {dayjs(record.subTime).format(dateFormatS)}
+ {record?.subTime || '-'}
预约
加急
@@ -58,14 +67,11 @@ export const baseOrderColumns: ProColumns[] = [
服务地址:
-
- {record.serveAddress}
- 服务地址:服务地址:服务地址:服务地址:服务地址:服务地址:
-
+ {record.serveAddress || '-'}
用户备注:
- {record.userRemark}
+ {record.userRemark || '-'}
),
@@ -74,20 +80,20 @@ export const baseOrderColumns: ProColumns[] = [
title: '财务',
dataIndex: 'price',
hideInSearch: true,
- width: '100',
+ width: '100%',
render: (_, record) => (
实付金额:
- {record.payPrice}
+ {record?.payPrice || '-'}
支付方式:
- {record.payType}
+ {record.payType || '-'}
财务状态:
- {record.financeStatus}
+ {record.financeStatus || '-'}
),
diff --git a/src/pages/trade/order/detail/component/info/basic-info.tsx b/src/pages/trade/order/detail/component/info/basic-info.tsx
index 0526171..a685d4c 100644
--- a/src/pages/trade/order/detail/component/info/basic-info.tsx
+++ b/src/pages/trade/order/detail/component/info/basic-info.tsx
@@ -1,23 +1,36 @@
import { ProCard } from '@ant-design/pro-components';
-import { Avatar, Button, Card, Empty, Space, Steps, Typography } from 'antd';
+import {
+ Avatar,
+ Button,
+ Card,
+ Divider,
+ Empty,
+ Space,
+ Steps,
+ Typography,
+} from 'antd';
import dayjs from 'dayjs';
import RcResizeObserver from 'rc-resize-observer';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { OrderStatus, OrderStatusLabels } from '@/constants/trade';
-import type { TradeOrderBaseInfo } from '@/services/trade/order';
+import type {
+ TradeOrderDetailRespVO,
+ TradeOrderStatusRespVo,
+} from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../order-info';
import { type BtnType, renderBaseInfoOrder } from './config';
import styles from './index.module.less';
-const { Title, Text } = Typography;
-const BasicInfo: React.FC<{ data?: TradeOrderBaseInfo; id: number }> = (
- props,
-) => {
- const { data } = props;
+const { Text } = Typography;
+const BasicInfo: React.FC> = (props) => {
+ const { data, loading } = props;
const [orderStatus, setOrderStatus] = useState(0);
+ const [statusList, setStatusList] = useState([]);
useEffect(() => {
if (data) {
setOrderStatus(Number(data.orderStatus));
+ setStatusList(data?.statusList || []);
}
}, [data]);
@@ -27,22 +40,24 @@ const BasicInfo: React.FC<{ data?: TradeOrderBaseInfo; id: number }> = (
订单编号:
- {data?.orderNo}
+ {data?.orderNum}
订单类目:
-
{data?.orderCategoryId}
+
{data?.orderCategoryName}
ID:
-
{data?.id}
+
+
{data?.orderCategoryId}
订单来源:
- {data?.orderCategoryName}
+ {data?.orderTerminal}
-
+ {data?.userName || data?.userNickName}
+ {data?.userMobile}
+
);
}, [data]);
@@ -65,128 +80,184 @@ const BasicInfo: React.FC<{ data?: TradeOrderBaseInfo; id: number }> = (
return (
-
- {data ? (
+
+
+ {data ? (
+
+
+
+ {renderOrderStatus}
+
+
+
+ {
+ setResponsive(offset.width < 460);
+ }}
+ >
+
+ {dayjs(data.createTime).format('YYYY-MM-DD')}
+ {dayjs(data.createTime).format('HH:mm:ss')}
+
+ ),
+ },
+ {
+ title: `${
+ OrderStatusLabels[OrderStatus.PendingPayment].label
+ } ${
+ orderStatus > OrderStatus.PendingPayment
+ ? '(已付款)'
+ : ''
+ }`,
+ description: (
+
+ {dayjs(data.createTime).format('YYYY-MM-DD')}
+ {dayjs(data.createTime).format('HH:mm:ss')}
+
+ ),
+ },
+ {
+ title: `${
+ OrderStatusLabels[OrderStatus.PendingConfirmation]
+ .label
+ } ${
+ orderStatus > OrderStatus.PendingConfirmation
+ ? '(已确定)'
+ : ''
+ }`,
+ description: (
+
+ {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
+ {dayjs(data.finishTime).format("HH:mm:ss")} */}
+
+ ),
+ },
+ {
+ title: `${
+ OrderStatusLabels[OrderStatus.PendingService].label
+ } ${
+ orderStatus > OrderStatus.PendingService
+ ? '(已开始)'
+ : ''
+ }`,
+ description: (
+
+ {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
+ {dayjs(data.finishTime).format("HH:mm:ss")} */}
+
+ ),
+ },
+ {
+ title: `${
+ OrderStatusLabels[OrderStatus.PendingAcceptance].label
+ } ${
+ orderStatus > OrderStatus.PendingAcceptance
+ ? '(已验收)'
+ : ''
+ }`,
+ description: (
+
+ {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
+ {dayjs(data.finishTime).format("HH:mm:ss")} */}
+
+ ),
+ },
+ {
+ title: '完成',
+ description: (
+
+ {dayjs(data.finishTime).format('YYYY-MM-DD')}
+ {dayjs(data.finishTime).format('HH:mm:ss')}
+
+ ),
+ },
+ ]}
+ />
+
+
+
+ ) : (
+
+ )}
财务状态:{data?.financeStatus}}
>
-
-
- {renderOrderStatus}
-
+
+
+
+ 订单总价:
+ {data?.price}
+
+
+ 优惠总额:
+ {data?.discountPrice}
+
+
+ 实付金额:
+ {data?.payPrice}
+
+
+ 累计退款金额:
+ {data?.refundPrice}
+
+
+ 最终实收金额:
+ {data?.livePrice}
+
+
-
- {
- setResponsive(offset.width < 460);
- }}
- >
-
- {dayjs(data.createTime).format('YYYY-MM-DD')}
- {dayjs(data.createTime).format('HH:mm:ss')}
-
- ),
- },
- {
- title: `${
- OrderStatusLabels[OrderStatus.PendingPayment].label
- } ${
- orderStatus > OrderStatus.PendingPayment
- ? '(已付款)'
- : ''
- }`,
- description: (
-
- {dayjs(data.createTime).format('YYYY-MM-DD')}
- {dayjs(data.createTime).format('HH:mm:ss')}
-
- ),
- },
- {
- title: `${
- OrderStatusLabels[OrderStatus.PendingConfirmation].label
- } ${
- orderStatus > OrderStatus.PendingConfirmation
- ? '(已确定)'
- : ''
- }`,
- description: (
-
- {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
- {dayjs(data.finishTime).format("HH:mm:ss")} */}
-
- ),
- },
- {
- title: `${
- OrderStatusLabels[OrderStatus.PendingService].label
- } ${
- orderStatus > OrderStatus.PendingService
- ? '(已开始)'
- : ''
- }`,
- description: (
-
- {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
- {dayjs(data.finishTime).format("HH:mm:ss")} */}
-
- ),
- },
- {
- title: `${
- OrderStatusLabels[OrderStatus.PendingAcceptance].label
- } ${
- orderStatus > OrderStatus.PendingAcceptance
- ? '(已验收)'
- : ''
- }`,
- description: (
-
- {/* {dayjs(data.finishTime).format("YYYY-MM-DD")}
- {dayjs(data.finishTime).format("HH:mm:ss")} */}
-
- ),
- },
- {
- title: '完成',
- description: (
-
- {dayjs(data.finishTime).format('YYYY-MM-DD')}
- {dayjs(data.finishTime).format('HH:mm:ss')}
-
- ),
- },
- ]}
- />
-
+
+
+
+ 支付方式:
+ {data?.payType}
+
+
+ 支付渠道:
+ {data?.payChannelCode}
+
+
+ 支付时间:
+ {data?.payTime}
+
+
+ 交易流水:
+ {data?.payOrderId}
+
+
- ) : (
-
- )}
+
);
diff --git a/src/pages/trade/order/detail/component/info/config.tsx b/src/pages/trade/order/detail/component/info/config.tsx
index f492534..12950c0 100644
--- a/src/pages/trade/order/detail/component/info/config.tsx
+++ b/src/pages/trade/order/detail/component/info/config.tsx
@@ -9,30 +9,10 @@ import {
OrderStatusLabels,
} from '@/constants/trade';
import type { DeptVO } from '@/services/system/dept';
-import type { TradeOrderBaseInfo } from '@/services/trade/order';
+import type { TradeOrderDetailRespVO } from '@/services/trade/order';
const { Title, Text, Paragraph } = Typography;
-export const baseOrderColumns: ProColumns[] = [
- {
- title: '商品',
- dataIndex: 'name',
- width: '33.33%',
- render: (_, record) => (
- {record.name}
- ),
- },
- {
- title: '服务',
- dataIndex: 'leaderUserId',
- hideInSearch: true,
- },
- {
- title: '财务',
- dataIndex: 'sort',
- hideInSearch: true,
- },
-];
const sharedOnCell = (_: DeptVO, index?: number) => {
if (index === 3) {
return { colSpan: 0 };
@@ -77,17 +57,17 @@ export const surchargeInfoColumns: ProColumns[] = [
export type BtnType = 'sales' | 'confirm';
export const renderBaseInfoOrder = (
- data: TradeOrderBaseInfo,
+ data: TradeOrderDetailRespVO,
handleClick: (type: BtnType) => void,
): React.ReactNode => {
- const orderStatusObj =
- OrderStatusLabels[data.orderStatus as unknown as OrderStatus];
+ const orderStatusObj = data.orderStatus
+ ? OrderStatusLabels[data.orderStatus as unknown as OrderStatus]
+ : { color: 'default', label: '未知' };
- console.log(orderStatusObj, data);
return (
<>
@@ -101,7 +81,7 @@ export const renderBaseInfoOrder = (
Number(data.orderStatus) === OrderStatus.Refunded && (
退款时间:
- 退款时间
+ {data.refundTime}
)}
{data.orderStatus &&
diff --git a/src/pages/trade/order/detail/component/info/extend-cost.tsx b/src/pages/trade/order/detail/component/info/extend-cost.tsx
new file mode 100644
index 0000000..4507539
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/extend-cost.tsx
@@ -0,0 +1,20 @@
+import { Card } from 'antd';
+import React from 'react';
+import type { TradeExtendCostInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../order-info';
+import styles from './index.module.less';
+import ExtendCost from './uis/pets/extend-cost';
+
+const EntendCostInfo: React.FC> = (props) => {
+ const { data = [], orderCategoryId } = props;
+
+ return (
+
+
+ {orderCategoryId === 1 && }
+
+
+ );
+};
+
+export default React.memo(EntendCostInfo);
diff --git a/src/pages/trade/order/detail/component/info/extend-service.tsx b/src/pages/trade/order/detail/component/info/extend-service.tsx
new file mode 100644
index 0000000..6e644bc
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/extend-service.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import type { TradeExtendServeInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../order-info';
+import styles from './index.module.less';
+import ExtendServicePets from './uis/pets/extend-service';
+
+const ExtendService: React.FC> = (
+ props,
+) => {
+ const { data = [], orderCategoryId } = props;
+ return (
+
+ {orderCategoryId === 1 && }
+
+ );
+};
+
+export default React.memo(ExtendService);
diff --git a/src/pages/trade/order/detail/component/info/index.module.less b/src/pages/trade/order/detail/component/info/index.module.less
index 593e576..31669f6 100644
--- a/src/pages/trade/order/detail/component/info/index.module.less
+++ b/src/pages/trade/order/detail/component/info/index.module.less
@@ -2,6 +2,7 @@
:global {
.ant-pro-card-header {
background: rgba(0, 0, 0, 0.02);
+ min-height: 41px;
}
.ant-pro-card-col {
flex: 1 auto;
@@ -21,10 +22,13 @@
.ant-pro-card-body {
padding: 0px;
}
- .ant-steps-item-icon {
- height: 8px !important;
- line-height: 8px !important;
+ .ant-steps-dot {
+ .ant-steps-item-icon {
+ height: 8px !important;
+ line-height: 8px !important;
+ }
}
+
.ant-steps-item-active {
.ant-steps-icon-dot {
height: 10px !important;
diff --git a/src/pages/trade/order/detail/component/info/prod-info.tsx b/src/pages/trade/order/detail/component/info/prod-info.tsx
index a4cb876..8fbecf0 100644
--- a/src/pages/trade/order/detail/component/info/prod-info.tsx
+++ b/src/pages/trade/order/detail/component/info/prod-info.tsx
@@ -1,24 +1,25 @@
import { ProCard } from '@ant-design/pro-components';
import { Button, Card, Image, Space, Tag, Typography } from 'antd';
import React, { useCallback } from 'react';
-import type { TradeProductInfo } from '@/services/trade/order';
-
+import { fallback } from '@/constants/antd/image';
+import type { Item } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../order-info';
import styles from './index.module.less';
const { Text, Paragraph } = Typography;
-const ProdInfo: React.FC<{ data?: TradeProductInfo; id: number }> = (props) => {
- const { data = {}, id } = props;
- const renderTitle = useCallback(() => {
+const ProdInfo: React.FC> = (props) => {
+ const { data = [] } = props;
+ const renderTitle = useCallback((item: Item) => {
return (
- 百业到家
+ {item.shopName}
商品 ID:
- 8877777
+ {item.spuId}
SKU ID:
- 8877777
+ {item.skuId}
);
@@ -26,109 +27,119 @@ const ProdInfo: React.FC<{ data?: TradeProductInfo; id: number }> = (props) => {
return (
- 交易快照}
- >
+ {data?.map((item) => (
交易快照}
>
-
-
-
-
商品名称
-
- 规格:
- 标准,单独火化,基础清洁
-
-
-
- 数量:
- 1
-
-
- 单价:
- ¥100 件
-
-
- 到手价:
- ¥80 件
-
+
+
+
+
+
{item.shopName}
- 成本价:
- ¥50 件/-
+ 规格:
+ {item.skuName}
-
-
-
-
- 标签
- 标签
- 标签
- 标签
- 标签
-
-
- 商品描述:
-
- 商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品
+
+
+ 数量:
+ {item.count}
+
+
+ 单价:
+
+ ¥{item.price}
+ {item.unit}
+
+
+
+ 到手价:
+
+ {' '}
+ ¥{item.handedPrice} {item.unit}
+
+
+
+ 成本价:
+
+ {' '}
+ ¥{item.expensePrice} {item.unit}/-
+
+
+
+
+
+
+ {item.properties}
+ 标签
+ 标签
+ 标签
+ 标签
+ 标签
-
+
+ 商品描述:
+
+ {item.serveContent}
+
+
+
+
+
+ 付款信息
+
+ 商品总价:
+ ¥500
+
+
+ 商品总价:
+ ¥500
+
+
+ 商品总价:
+ ¥500
+
+
+
+
+
+ 退款信息
+
+ 累计退款金额:
+ ¥{item.refundPrice}
+
+
+ 累计退款数量:
+ {item.refundCount}
+
+
+
-
-
- 付款信息
-
- 商品总价:
- ¥500
-
-
- 商品总价:
- ¥500
-
-
- 商品总价:
- ¥500
-
-
-
-
-
- 退款信息
-
- 累计退款金额:
- ¥500
-
-
- 累计退款数量:
- 1
-
-
-
-
+ ))}
);
diff --git a/src/pages/trade/order/detail/component/info/select-info.tsx b/src/pages/trade/order/detail/component/info/select-info.tsx
deleted file mode 100644
index 350381d..0000000
--- a/src/pages/trade/order/detail/component/info/select-info.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import { ProCard } from '@ant-design/pro-components';
-import { Card, Space } from 'antd';
-import React from 'react';
-import EnhancedProTable from '@/components/EnhancedProTable';
-import {
- type DeptReqVO,
- type DeptVO,
- getDeptPage,
-} from '@/services/system/dept';
-import type { TradeExtendCostInfo } from '@/services/trade/order';
-import { baseOrderColumns } from '../../../config';
-import styles from './index.module.less';
-
-const SelectInfo: React.FC<{ data?: TradeExtendCostInfo; id: number }> = (
- props,
-) => {
- const { data = {}, id } = props;
- const onFetch = async (
- params: DeptReqVO & {
- pageSize?: number;
- current?: number;
- },
- ) => {
- const data = await getDeptPage({
- ...params,
- pageNo: params.current,
- pageSize: params.pageSize,
- });
- return {
- data: data,
- success: true,
- total: data.total,
- };
- };
- return (
-
-
-
-
-
- 1111
-
-
- 1111
-
-
- 1111
-
-
-
-
- columns={baseOrderColumns}
- request={onFetch}
- showIndex={false}
- size="small"
- search={false}
- showActions={false}
- showSelection={false}
- bordered
- pagination={false}
- />
-
-
-
- 1111
-
-
- 1111
-
-
- 1111
-
-
-
-
-
- );
-};
-
-export default React.memo(SelectInfo);
diff --git a/src/pages/trade/order/detail/component/info/service-info.tsx b/src/pages/trade/order/detail/component/info/service-info.tsx
index e68d9a7..03708d8 100644
--- a/src/pages/trade/order/detail/component/info/service-info.tsx
+++ b/src/pages/trade/order/detail/component/info/service-info.tsx
@@ -1,102 +1,11 @@
-import { ProCard } from '@ant-design/pro-components';
-import { Button, Card, Image, Space, Typography } from 'antd';
import React from 'react';
-import type { TradeServeInfo } from '@/services/trade/order';
-import styles from './index.module.less';
+import type { TradeServeInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../order-info';
+import ServicePetUI from './uis/pets/service';
-const { Text, Paragraph } = Typography;
-const ServiceInfo: React.FC<{ data?: TradeServeInfo; id: number }> = (
- props,
-) => {
- const { data = {}, id } = props;
- return (
-
-
-
- 修改记录}
- size="small"
- colSpan="30%"
- headerBordered
- >
-
- 姓名:
- 钱多多
-
-
- 宠物品种:
- 钱多多
-
-
- 体型/体重:
- 钱多多
-
-
- 离世时间:
- 钱多多
-
-
- 离世原因:
- 钱多多
-
-
- 遗体照片:
-
-
-
-
-
-
-
-
-
- 修改记录}
- >
-
- 离世时间:
- 钱多多
-
-
- 更改规则:
- 钱多多
-
-
- 预约时间:
- 钱多多
-
-
- 用户备注:
- 钱多多
-
-
- 客服备注:
- 钱多多
-
-
-
-
-
- );
+const ServiceInfo: React.FC> = (props) => {
+ const { data = {}, orderCategoryId } = props;
+ return <>{orderCategoryId === 1 && }>; //宠物服务ui
};
export default React.memo(ServiceInfo);
diff --git a/src/pages/trade/order/detail/component/info/surcharge-info.tsx b/src/pages/trade/order/detail/component/info/surcharge-info.tsx
deleted file mode 100644
index 9e9a341..0000000
--- a/src/pages/trade/order/detail/component/info/surcharge-info.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Card } from 'antd';
-import React from 'react';
-import EnhancedProTable from '@/components/EnhancedProTable';
-import {
- type DeptReqVO,
- type DeptVO,
- getDeptPage,
-} from '@/services/system/dept';
-import type { TradeExtendServeInfo } from '@/services/trade/order';
-import { surchargeInfoColumns } from './config';
-import styles from './index.module.less';
-
-const SurchargeInfo: React.FC<{ data?: TradeExtendServeInfo; id: number }> = (
- props,
-) => {
- const { data, id } = props;
- const onFetch = async (
- params: DeptReqVO & {
- pageSize?: number;
- current?: number;
- },
- ) => {
- const data = await getDeptPage({
- ...params,
- pageNo: params.current,
- pageSize: params.pageSize,
- });
- return {
- data: data,
- success: true,
- total: data.total,
- };
- };
- return (
-
-
-
- columns={surchargeInfoColumns}
- request={onFetch}
- showIndex={false}
- size="small"
- search={false}
- showActions={false}
- showSelection={false}
- bordered
- pagination={false}
- />
-
-
- );
-};
-
-export default React.memo(SurchargeInfo);
diff --git a/src/pages/trade/order/detail/component/info/uis/pets/config.tsx b/src/pages/trade/order/detail/component/info/uis/pets/config.tsx
new file mode 100644
index 0000000..4b02a6e
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/uis/pets/config.tsx
@@ -0,0 +1,233 @@
+import type { ProColumns } from '@ant-design/pro-components';
+import { Image, Space, Typography } from 'antd';
+import { fallback } from '@/constants/antd/image';
+import type {
+ TradeExtendCostInfo,
+ TradeExtendServeInfo,
+} from '@/services/trade/order/detail';
+
+const { Text } = Typography;
+const sharedOnCell = (record: TradeExtendServeInfo) => {
+ if (record.deliveryType) {
+ return { colSpan: 0 };
+ }
+
+ return {};
+};
+export const baseOrderColumns: ProColumns[] = [
+ {
+ title: '服务',
+ dataIndex: 'serve',
+ width: '33.33%',
+ onCell: (record) => {
+ if (record.deliveryType) {
+ return {
+ colSpan: 3,
+ };
+ }
+ return {};
+ },
+ render: (_, record) => {
+ if (record.deliveryType) {
+ return (
+
+
+ 配送方式:
+ {record.deliveryType}
+
+ {record.receiveUser && (
+
+ 收货人:
+ {record.receiveUser}
+
+ )}
+ {record.sendUser && (
+
+ 提货人:
+ {record.sendUser}
+
+ )}
+
+ 手机号码:
+ {record?.userMobile}
+
+
+ 地址信息:
+ {record.address}
+
+
+ );
+ } else if (record.tempType === 3) {
+ return (
+
+ {record.serveTitle}:
+ {record.serveType}
+
+ );
+ } else {
+ return (
+
+ {record.serve?.map((serve, index) => (
+
+
+
+
{serve.serveName}
+
{serve.serveDesc}
+
+ 数量:
+ {serve.count}
+ 单价:
+ {serve.price}
+ 到手价:
+ {serve.handPrice}
+
+
+
+ ))}
+
+ );
+ }
+ },
+ },
+ {
+ title: '付款信息',
+ dataIndex: 'payPrice',
+ hideInSearch: true,
+ onCell: sharedOnCell,
+ render: (_, record) => (
+
+
+ 商品总价:
+ {record.totalPrice}
+
+
+ 优惠金额:
+ {record.discountPrice}
+
+
+ 实付金额:
+ {record.payPrice}
+
+
+ ),
+ },
+ {
+ title: '退款信息',
+ dataIndex: 'refundMoney',
+ hideInSearch: true,
+ onCell: sharedOnCell,
+ render: (_, record) => (
+
+
+ 累计退款金额:
+ {record.refundMoney}
+
+
+ 累计退款数量:
+ {record.refundCount}
+
+
+ ),
+ },
+];
+
+export const extendCost: ProColumns[] = [
+ {
+ title: '服务附加费',
+ dataIndex: 'serveExtFee',
+ },
+ {
+ title: '费用详情',
+ dataIndex: 'leaderUserId',
+ render: (_, record) => (
+
+
+ 费用名称:
+ {record.costName}
+
+ {record.serveArea && (
+
+ 可服务区域:
+ {record.serveArea}
+
+ )}
+
+ {record.targetArea && (
+
+ 目标区域:
+ {record.targetArea}
+
+ )}
+
+ {record.weight && (
+
+ 体型/体重:
+ {record.weight}
+
+ )}
+
+ {record.respTime && (
+
+ 响应时间:
+ {record.respTime}
+
+ )}
+ {record.respMode && (
+
+ 响应模式:
+ {record.respMode || '-'}
+
+ )}
+ {record.chargeTime && (
+
+ 收费时段:
+ {record.chargeTime}
+
+ )}
+
+
+ 收费方式:
+ {record.chargeType || '-'}
+
+
+ ),
+ },
+ {
+ title: '付款信息',
+ dataIndex: 'payInfo',
+ render: (_, record) => (
+
+
+ 服务总价:
+ ¥{record.payInfo?.totalPrice || 0}
+
+
+ 优惠金额:
+ ¥{record.payInfo?.discountPrice || 0}
+
+
+
+ 实付金额:
+ ¥{record.payInfo?.payPrice || 0}
+
+
+ ),
+ },
+ {
+ title: '退款信息',
+ dataIndex: 'refundPrice',
+ render: (_, record) => (
+
+
+ 累计退款金额:
+ ¥{record.refundPrice || 0}
+
+
+ ),
+ },
+];
diff --git a/src/pages/trade/order/detail/component/info/uis/pets/extend-cost.tsx b/src/pages/trade/order/detail/component/info/uis/pets/extend-cost.tsx
new file mode 100644
index 0000000..873e55b
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/uis/pets/extend-cost.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import EnhancedProTable from '@/components/EnhancedProTable';
+import type { TradeExtendCostInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../../../order-info';
+import { extendCost } from './config';
+
+const ExtendCost: React.FC> = (props) => {
+ const { data } = props;
+ return (
+
+ columns={extendCost}
+ dataSource={data}
+ showIndex={false}
+ size="small"
+ search={false}
+ showActions={false}
+ showSelection={false}
+ bordered
+ pagination={false}
+ />
+ );
+};
+
+export default React.memo(ExtendCost);
diff --git a/src/pages/trade/order/detail/component/info/uis/pets/extend-service.tsx b/src/pages/trade/order/detail/component/info/uis/pets/extend-service.tsx
new file mode 100644
index 0000000..cf75a53
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/uis/pets/extend-service.tsx
@@ -0,0 +1,34 @@
+import { Card } from 'antd';
+import React from 'react';
+import EnhancedProTable from '@/components/EnhancedProTable';
+import type { TradeExtendServeInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../../../order-info';
+import { baseOrderColumns } from './config';
+
+const ExtendServicePet: React.FC> = (
+ props,
+) => {
+ const { data = [] } = props;
+ return (
+
+
+ {data.map((item, index) => (
+
+ key={`${index}-${Math.random()}`}
+ columns={baseOrderColumns}
+ dataSource={item}
+ showIndex={false}
+ size="small"
+ search={false}
+ showActions={false}
+ showSelection={false}
+ bordered
+ pagination={false}
+ />
+ ))}
+
+
+ );
+};
+
+export default React.memo(ExtendServicePet);
diff --git a/src/pages/trade/order/detail/component/info/uis/pets/service.tsx b/src/pages/trade/order/detail/component/info/uis/pets/service.tsx
new file mode 100644
index 0000000..38cd7e9
--- /dev/null
+++ b/src/pages/trade/order/detail/component/info/uis/pets/service.tsx
@@ -0,0 +1,106 @@
+import { ClockCircleOutlined, EnvironmentOutlined } from '@ant-design/icons';
+import { ProCard } from '@ant-design/pro-components';
+import { Button, Card, Image, Space, Timeline, Typography } from 'antd';
+import React from 'react';
+import { fallback } from '@/constants/antd/image';
+import type { TradeServeInfo } from '@/services/trade/order/detail';
+import type { ItemConfig } from '../../../../order-info';
+import styles from '../../index.module.less';
+
+const { Text, Paragraph } = Typography;
+const ServicePetUI: React.FC> = (props) => {
+ const { data = {} } = props;
+ const { boneInfo, subInfo } = data;
+ return (
+
+
+
+
+
+ 姓名:
+ {boneInfo?.petName}
+
+
+ 宠物品种:
+ {boneInfo?.petType}
+
+
+ 体型/体重:
+ {boneInfo?.weight}
+
+
+ 离世时间:
+ {boneInfo?.diedTime}
+
+
+ 离世原因:
+ {boneInfo?.diedReason}
+
+
+ 遗体照片:
+
+ {data.boneInfo?.boneUrl?.map((item: string, index: number) => (
+
+ ))}
+
+
+
+ 修改记录}
+ >
+
+
+
+ 预约类型:
+ {subInfo?.subType}
+
+
+ 更改规则:
+ {subInfo?.changeRule}
+
+
+ 预约时间:
+ {subInfo?.subOrder}
+
+
+ 用户备注:
+ {subInfo?.userRemark}
+
+
+ 客服备注:
+ {subInfo?.merchantRemark}
+
+
+
+ ),
+ color: 'green',
+ children: subInfo?.pickUpAddress,
+ },
+ {
+ dot: ,
+ children: subInfo?.pickUpAddress,
+ color: 'red',
+ },
+ ]}
+ />
+
+
+
+
+
+ );
+};
+
+export default React.memo(ServicePetUI);
diff --git a/src/pages/trade/order/detail/order-info.tsx b/src/pages/trade/order/detail/order-info.tsx
index 2333b1f..64a4be5 100644
--- a/src/pages/trade/order/detail/order-info.tsx
+++ b/src/pages/trade/order/detail/order-info.tsx
@@ -3,34 +3,60 @@ import React, { useCallback, useEffect, useState } from 'react';
import {
getTradeOrderDetail,
type TradeOrderDetailRespVO,
+ type TradeOrderPageRespVO,
} from '@/services/trade/order';
import BasicInfo from './component/info/basic-info'; //基本信息(通版)
+import ExtendCostInfo from './component/info/extend-cost'; //服务附加费(殡葬专属字段)
+import ExtendService from './component/info/extend-service'; //可选服务(殡葬专属字段)
import ProdInfo from './component/info/prod-info'; //商品信息(通版)
-import SelectInfo from './component/info/select-info'; //可选服务(殡葬专属字段)
import ServiceInfo from './component/info/service-info';
-import SurchargeInfo from './component/info/surcharge-info'; //服务附加费(殡葬专属字段)
-const OrderDetail: React.FC<{ data?: TradeOrderDetailRespVO }> = (props) => {
+export interface ItemConfig {
+ data?: T;
+ loading?: boolean;
+ orderCategoryId?: number;
+}
+const OrderDetail: React.FC<{ data?: TradeOrderPageRespVO }> = (props) => {
const { data } = props;
const [detais, setDetails] = useState();
-
+ const [loading, setLoading] = useState(false);
const fetch = useCallback(async () => {
- if (data?.id) {
- const res = await getTradeOrderDetail(data.id);
- setDetails(res);
+ try {
+ setLoading(true);
+ if (data?.id) {
+ const res = await getTradeOrderDetail(data.id);
+ setDetails(res);
+ }
+ } finally {
+ setLoading(false);
}
- }, [data]);
+ }, [data?.id]);
useEffect(() => {
fetch();
- }, [data]);
+ }, [data?.id]);
return (
-
-
-
-
-
+
+
+ {detais?.tradeServeInfo && (
+
+ )}
+ {detais?.tradeExtendServeInfo && (
+
+ )}
+ {detais?.tradeExtendCostInfo && (
+
+ )}
);
};
diff --git a/src/pages/trade/order/list.tsx b/src/pages/trade/order/list.tsx
index b310482..0f96c16 100644
--- a/src/pages/trade/order/list.tsx
+++ b/src/pages/trade/order/list.tsx
@@ -23,8 +23,6 @@ import { baseOrderColumns } from './config';
const { Search } = Input;
-const { Text } = Typography;
-
import { DownOutlined, UpOutlined, UserOutlined } from '@ant-design/icons';
import PopconfirmForm, {
type PopconfirmFormRef,
@@ -50,8 +48,8 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
const popconfirmFormRef = useRef(null);
const onFetch = async (
params: TradeReq & {
- pageSize?: number;
- current?: number;
+ pageSize: number;
+ current: number;
},
) => {
const data = await getTradeOrderPage({
@@ -68,10 +66,13 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
};
};
- const handleDetail = useCallback((record: TradeOrderPageRespVO) => {
- setModalData(record);
- configurableDrawerRef.current?.open();
- }, []);
+ const handleDetail = useCallback(
+ (record: TradeOrderPageRespVO) => {
+ setModalData(record);
+ configurableDrawerRef.current?.open(record);
+ },
+ [modalData],
+ );
const handleOrder = useCallback((id?: number) => {
console.log(id, '取消订单');
@@ -107,10 +108,10 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
handleOrder(record.id)}>
取消订单
- handleOrder(record.id)}>
+ handleOrder(record.id)}>
开始服务
- handleOrder(record.id)}>
+ handleOrder(record.id)}>
新建售后
handleDetail(record)}>
@@ -186,9 +187,9 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
{record.orderNum}
{record.payType}
- } />
+ } src={record.shopLogo} />
{/* */}
- 百业到家旗舰店
+ {record.shopName || '-'}
{record.userAvatar ? (
@@ -211,7 +212,6 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
header: {
cell: (props: any) => {
const { children, ...restProps } = props;
- console.log(restProps, children);
return {children} | ;
},
},
diff --git a/src/requestErrorConfig.ts b/src/requestErrorConfig.ts
index a3ac315..42abe9e 100644
--- a/src/requestErrorConfig.ts
+++ b/src/requestErrorConfig.ts
@@ -1,8 +1,8 @@
-import type { RequestOptions } from "@@/plugin-request/request";
-import type { RequestConfig } from "@umijs/max";
-import { request } from "@umijs/max";
-import { message } from "antd";
-import { getAccessToken, getRefreshToken, setToken } from "./utils/auth";
+import type { RequestOptions } from '@@/plugin-request/request';
+import type { RequestConfig } from '@umijs/max';
+import { request } from '@umijs/max';
+import { message } from 'antd';
+import { getAccessToken, getRefreshToken, setToken } from './utils/auth';
// const tenantEnable = process.env.VITE_APP_TENANT_ENABLE;
// const { result_code, base_url, request_timeout } = config;
@@ -49,8 +49,8 @@ interface ResponseStructure {
*/
const refreshToken = async () => {
- return await request("/system/auth/refresh-token", {
- method: "POST",
+ return await request('/system/auth/refresh-token', {
+ method: 'POST',
params: { refreshToken: getRefreshToken() },
});
};
@@ -93,7 +93,7 @@ export const errorConfig: RequestConfig = {
const { success, data, code, msg } = res as unknown as ResponseStructure;
if (!success) {
const error: any = new Error(msg);
- error.name = "BizError";
+ error.name = 'BizError';
error.info = { code, msg, data };
throw error; // 抛出自制的错误
}
@@ -102,9 +102,9 @@ export const errorConfig: RequestConfig = {
errorHandler: async (error: any, opts: any) => {
if (opts?.skipErrorHandler) throw error;
// 我们的 errorThrower 抛出的错误。
- console.log("errorHandler", error);
+ console.log('errorHandler', error);
const errorInfo: ResponseStructure | undefined = error.info;
- if (error.name === "BizError") {
+ if (error.name === 'BizError') {
if (errorInfo) {
const { msg } = errorInfo;
message.error(msg);
@@ -114,7 +114,7 @@ export const errorConfig: RequestConfig = {
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
message.error(`Response status:${error.response.status}`);
} else if (error.request) {
- message.error("None response! Please retry.");
+ message.error('None response! Please retry.');
} else {
message.error(`发送请求时出了点问题:${error.msg}`);
}
@@ -125,7 +125,7 @@ export const errorConfig: RequestConfig = {
requestInterceptors: [
(config: RequestOptions) => {
// 拦截请求配置,进行个性化处理。
- console.log("requestInterceptors", config);
+ console.log('requestInterceptors', config);
return { ...config };
},
],
@@ -133,25 +133,25 @@ export const errorConfig: RequestConfig = {
// 响应拦截器
responseInterceptors: [
async (response) => {
- let { data } = response as unknown as ResponseStructure;
+ const { data } = response as unknown as ResponseStructure;
const config = response.config;
const { code } = data;
- if (!data) {
- // 返回“[HTTP]请求没有返回值”;
- throw new Error();
- }
+ // if (!data) {
+ // // 返回“[HTTP]请求没有返回值”;
+ // throw new Error();
+ // }
// 未设置状态码则默认成功状态
// 二进制数据则直接返回,例如说 Excel 导出
- if (
- response.request.responseType === "blob" ||
- response.request.responseType === "arraybuffer"
- ) {
- // 注意:如果导出的响应为 json,说明可能失败了,不直接返回进行下载
- // if (response.data.type !== "application/json") {
- // return response.data;
- // }
- data = await new Response(data).json();
- }
+ // if (
+ // response.request.responseType === "blob" ||
+ // response.request.responseType === "arraybuffer"
+ // ) {
+ // // 注意:如果导出的响应为 json,说明可能失败了,不直接返回进行下载
+ // // if (response.data.type !== "application/json") {
+ // // return response.data;
+ // // }
+ // data = await new Response(data).json();
+ // }
// // 获取错误信息
// const msg = data.msg || errorCode[code] || errorCode["default"];
// if (ignoreMsgs.indexOf(msg) !== -1) {
@@ -159,7 +159,7 @@ export const errorConfig: RequestConfig = {
// return Promise.reject(msg);
// }
if (!config.url) {
- throw new Error("请求URL不能为空");
+ throw new Error('请求URL不能为空');
}
// 发送请求时出了点问题
if (code === 401) {
@@ -172,28 +172,21 @@ export const errorConfig: RequestConfig = {
// 2. 进行刷新访问令牌
try {
const refreshTokenRes = await refreshToken();
- console.log("刷新成功", refreshTokenRes);
- // 2.1 刷新成功,则回放队列的请求 + 当前请求
setToken(refreshTokenRes);
- // 发出 token 刷新事件
- // 刷新当前路由
- // window.location.reload();
- // requestEventBus.emit('token-refreshed');
+ location.reload();
} catch (_) {
- // 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。
- // 提示是否要登出。即不回放当前请求!不然会形成递归
return handleAuthorized();
} finally {
isRefreshToken = false;
}
return request(config.url, config);
} else {
- console.log("刷新令牌失败");
+ console.log('刷新令牌失败');
//添加到队列,等待刷新获取到新的令牌
return new Promise((resolve) => {
requestList.push(() => {
if (!config.url) {
- throw new Error("请求URL不能为空");
+ throw new Error('请求URL不能为空');
}
if (config.headers)
config.headers.Authorization = `Bearer ${getAccessToken()}`; // 让每个请求携带自定义token 请根据实际情况自行修改
@@ -206,7 +199,7 @@ export const errorConfig: RequestConfig = {
return Promise.reject(data);
}
if (data?.success === false) {
- message.error("请求失败!");
+ message.error('请求失败!');
return Promise.reject(data);
}
diff --git a/src/services/prod/category-manager/index.ts b/src/services/prod/category-manager/index.ts
new file mode 100644
index 0000000..9ad3adf
--- /dev/null
+++ b/src/services/prod/category-manager/index.ts
@@ -0,0 +1,43 @@
+import { request } from "@umijs/max";
+
+export interface Category extends PageParam {
+ parentId?: number;
+ categoryName?: string; //类目名称
+ categoryId?: number; //类目ID
+ grade?: number; //类目层级
+ parentName?: string; //父级类目
+ sort?: number; //排序权重
+ status?: number; // 1为开启 0 为禁用;
+ createTime?: Date;
+ description?: string; //描述
+ tag?: string[] | string;
+}
+
+export interface CategoryReq extends PageParam {
+ parentName?: string;
+ categoryName?: string;
+ status?: number;
+ grade?: number; //父级类目
+}
+
+// 查询分类列表
+export const getProdCategoryPage = async (params: CategoryReq) => {
+ return request("/product/category/categoryList", {
+ method: "GET",
+ params,
+ });
+};
+// 新增分类
+export const createProdCategory = async (data: Category) => {
+ return request("/product/category/create", {
+ method: "GET",
+ data,
+ });
+};
+//编辑分类
+export const updateProdCategory = async (data: Category) => {
+ return request>("/product/category/create", {
+ method: "PUT",
+ data,
+ });
+};
diff --git a/src/services/prod/prod-manager/index.ts b/src/services/prod/prod-manager/index.ts
index e5c8ee7..202c851 100644
--- a/src/services/prod/prod-manager/index.ts
+++ b/src/services/prod/prod-manager/index.ts
@@ -1,3 +1,4 @@
+import { request } from "@umijs/max";
export interface Prod extends PageParam {
/**
* 商品简称
@@ -176,10 +177,10 @@ export interface SkuPropValues {
id?: number;
propValue: string;
valueId: number;
- state: 0 | 1; // 0禁用1启用
- isExist: 0 | 1; //是否新增 0否1是
+ state: number; // 0禁用1启用
+ isExist: number; //是否新增 0否1是
sort: number;
- isExpire: 0 | 1 /**是否失效0否1是**/;
+ isExpire: number /**是否失效0否1是**/;
}
export interface SkuConfig {
propName: string; //规格名字
@@ -204,7 +205,209 @@ export interface ProdDetail {
export interface ProdReq extends PageParam {
name?: string;
- status?: 0 | 1 | 2; //状态 1,正常状态(出售中), 0:下架(仓库中) 2:待审核
+ status?: number; //状态 1,正常状态(出售中), 0:下架(仓库中) 2:待审核
prodName?: string; // 商品名称
createTime?: Date; //创建时间
}
+
+// 查询商品管理列表
+export const getProdPage = async (params: ProdReq) => {
+ return request("/product/prod/page", {
+ method: "GET",
+ params,
+ });
+};
+
+// 查询商品回收站
+export const getProdRecycleBinPageList = async (params: ProdReq) => {
+ return request("/product/prod/getProdRecycleBinPageList", {
+ method: "GET",
+ params,
+ });
+};
+
+// 恢复商品
+export const restoreProdList = async (params: { ids: number[] }) => {
+ return request("/product/prod/restoreProdList", {
+ method: "POST",
+ params,
+ });
+};
+
+// 删除商品
+export const deleteProd = async (params: { id: number }) => {
+ return request>("/product/prod/delete", {
+ method: "DELETE",
+ params,
+ });
+};
+
+// 批量删除商品
+export const deleteSkuList = async (params: { ids: number[] }) => {
+ return request>("/product/prod/deleteSkuList", {
+ method: "DELETE",
+ params,
+ });
+};
+
+// 批量上下架商品
+export const updateSkuShelfList = async (params: {
+ status: number;
+ ids: number[];
+}) => {
+ return request>("/product/prod/updateSkuShelfList", {
+ method: "DELETE",
+ params,
+ });
+};
+
+// 查询商品管理详情
+
+export const getProdDetail = async (params: { id: number }) => {
+ return request>("/product/prod/getProdInfo", {
+ method: "GET",
+ params,
+ });
+};
+
+// 创建商品
+export const createProd = async (data: Prod) => {
+ return request>("/product/prod/create", {
+ method: "POST",
+ data,
+ });
+};
+// 更新商品详情
+export const updateProd = async (data: Prod) => {
+ return request>>("/product/prod/update", {
+ method: "PUT",
+ data,
+ });
+};
+
+// 获取sku规格
+
+export const getSKuPropList = async (params: Prod) => {
+ return request("/product/sku/getSKuPropList", {
+ method: "GET",
+ params,
+ });
+};
+
+// 更新sku
+
+export const updateProp = async (data: Prod) => {
+ return request("/product/sku/updateProp", {
+ method: "PUT",
+ data,
+ });
+};
+//更新单品SKU
+export const updateSKu = async (data: Prod) => {
+ return request("/product/sku/update", {
+ method: "PUT",
+ data,
+ });
+};
+//更新单品SKU上下架
+
+export const updateSkuShelf = async (params: {
+ id?: number;
+ isShelf?: number;
+}) => {
+ return request("/product/sku/updateSkuShelf", {
+ method: "PUT",
+ params,
+ });
+};
+
+//删除规格值
+
+export const deletePropSku = async (params: { id?: number }) => {
+ return request("/product/sku/deleteProp", {
+ method: "PUT",
+ params,
+ });
+};
+//禁用规格值
+
+export const disablePropSku = async (params: Prod) => {
+ return request("/product/sku/disableProp", {
+ method: "PUT",
+ params,
+ });
+};
+//获得SKU分页列表
+
+export const getSkuPageList = async (params: Prod) => {
+ return request("/product/sku/getSkuPageList", {
+ method: "GET",
+ params,
+ });
+};
+//删除SKU
+export const deleteSku = async (id: number) => {
+ return request("/product/sku/delete", {
+ method: "DELETE",
+ params: { id },
+ });
+};
+//获得SKU回收站列表
+export const getSkuRecycleBinPageList = async (params: Prod) => {
+ return request("/product/sku/getSkuRecycleBinPageList", {
+ method: "GET",
+ params,
+ });
+};
+
+//获得规格回收站
+
+export const getPropRecycleBinList = async (params: Prod) => {
+ return request("/product/sku/getPropRecycleBinList", {
+ method: "GET",
+ params,
+ });
+};
+//恢复规格值
+
+export const restorePropList = async (ids: number[]) => {
+ return request("/product/sku/restorePropList", {
+ method: "POST",
+ params: { ids },
+ });
+};
+//SKU回收站恢复
+export const restoreSkuList = async (ids: number[]) => {
+ return request("/product/sku/restoreSkuList", {
+ method: "POST",
+ params: { ids },
+ });
+};
+
+// 规格属性修改
+export const updateProdProp = async (params: {
+ id: number;
+ propName: string;
+}) => {
+ return request("/product/sku/updateProdProp", {
+ method: "PUT",
+ params,
+ });
+};
+// 规格值修改
+export const updatePropValue = async (params: {
+ id: number;
+ propValue: string;
+}) => {
+ return request("/product/sku/updatePropValue", {
+ method: "PUT",
+ params,
+ });
+};
+// /tz/sku/update
+
+// //修改服务配置
+// export const getSKuPropList = async (data: Prod) => {
+// return await request.post({ url: "/tz/sku/getSKuPropList", data: data });
+// };
+// /product/prod/uptateProdService
diff --git a/src/services/prod/prod-manager/rule.ts b/src/services/prod/prod-manager/rule.ts
new file mode 100644
index 0000000..9b5885e
--- /dev/null
+++ b/src/services/prod/prod-manager/rule.ts
@@ -0,0 +1,565 @@
+import { request } from "@umijs/max";
+import type { Prod } from ".";
+
+/**
+ * ProdServiceVO
+ */
+export interface ProdServiceVO {
+ /**
+ * 是否特殊日期(节假日周末什么的)0关1开
+ */
+ additionalFeeSwitch?: number;
+ /**
+ * 是否特殊时段0关1开
+ */
+ additionalSwitch?: number;
+ /**
+ * 分类名称
+ */
+ categoryName?: string;
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 新建人
+ */
+ creator?: string;
+ /**
+ * 是否紧急响应服务0关1开
+ */
+ emergencySwitch?: number;
+ /**
+ * 是否接单上线0关1开
+ */
+ orderLimitSwitch?: number;
+ /**
+ * 特殊时段规则配置
+ */
+ prodAdditionalFeeDatesList?: ProdAdditionalFeeDatesDO[];
+ /**
+ * 特殊日期规则配置
+ */
+ prodAdditionalFeePeriodsList?: ProdAdditionalFeePeriodsDO[];
+ /**
+ * 急响应服务配置
+ */
+ prodEmergencyInfoVO?: ProdEmergencyInfoVO;
+ /**
+ * 产品ID
+ */
+ prodId?: number;
+ /**
+ * 预约配置
+ */
+ prodReservationConfig?: ProdReservationInfoVO;
+ /**
+ * 服务区域配置
+ */
+ prodServiceAreasInfo?: ProdServiceAreasInfoVO;
+ /**
+ * 接单上线配置
+ */
+ productOrderLimitVO?: ProductOrderLimitDO;
+ /**
+ * 体重配置
+ */
+ prodWeightConfig?: ProdWeightRangePricesSaveInfoVO;
+ /**
+ * 是否开启服务区域配置0关1开
+ */
+ regionSwitch?: number;
+ /**
+ * 是否预约0关1开
+ */
+ reservationSwitch?: number;
+ /**
+ * 修改人
+ */
+ updater?: string;
+ /**
+ * 修改时间
+ */
+ updateTime?: string;
+ /**
+ * 是否开启体重配置0关1开
+ */
+ weightSwitch?: number;
+}
+
+/**
+ * 特殊日期附加费用规则 DO
+ *
+ * ProdAdditionalFeeDatesDO
+ */
+export interface ProdAdditionalFeeDatesDO {
+ /**
+ * 收费方式
+ */
+ chargeMode?: number;
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 创建者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ creator?: string;
+ /**
+ * 自定义日期时间段(JSON格式存储)
+ */
+ customTimeSlots?: string[];
+ /**
+ * 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'
+ */
+ dateType?: number;
+ /**
+ * 是否删除
+ */
+ deleted?: number;
+ /**
+ * 特殊日期规则的唯一标识符
+ */
+ id?: number;
+ /**
+ * 是否启用该规则
+ */
+ isEnabled?: number;
+ /**
+ * 名称
+ */
+ name?: string;
+ /**
+ * 价格或上浮百分比
+ */
+ price?: number;
+ /**
+ * 商品id
+ */
+ prodId?: number;
+ /**
+ * 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期
+ */
+ type?: number;
+ /**
+ * 更新者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ updater?: string;
+ /**
+ * 最后更新时间
+ */
+ updateTime?: string;
+}
+
+/**
+ * 特殊时段附加费用规则 DO
+ *
+ * ProdAdditionalFeePeriodsDO
+ */
+export interface ProdAdditionalFeePeriodsDO {
+ /**
+ * 收费方式0:'固定金额',1:'基准价上浮'
+ */
+ chargeMode?: number;
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 创建者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ creator?: string;
+ /**
+ * 是否删除
+ */
+ deleted?: number;
+ /**
+ * 浮动百分比
+ */
+ floatingPercentage?: number;
+ /**
+ * 特殊时段规则的唯一标识符
+ */
+ id?: number;
+ /**
+ * 名称
+ */
+ name?: string;
+ /**
+ * 价格或上浮百分比
+ */
+ price?: number;
+ /**
+ * 商品ID
+ */
+ prodId?: number;
+ /**
+ * 特殊时段设置(JSON格式存储)
+ */
+ specialTimeSlots?: string[];
+ /**
+ * 更新者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ updater?: string;
+ /**
+ * 最后更新时间
+ */
+ updateTime?: string;
+}
+
+/**
+ * 急响应服务配置
+ *
+ * ProdEmergencyInfoVO
+ */
+export interface ProdEmergencyInfoVO {
+ /**
+ * 紧急响应服务配置的唯一标识符
+ */
+ id?: number;
+ /**
+ * 紧急响应黑名单日期设置
+ */
+ prodEmergencyResponseBlackList?: ProdAdditionalFeeBlackVO[];
+ /**
+ * 紧急响应时间区间设置
+ */
+ prodEmergencyResponseIntervalsList?: ProdEmergencyResponseIntervalsDO[];
+ /**
+ * 关联的商品ID
+ */
+ prodId?: number;
+ /**
+ * 可响应时间段(JSON格式存储)
+ */
+ responseTimeSlots?: string[];
+}
+
+/**
+ *
+ * com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO
+ *
+ * ProdAdditionalFeeBlackVO
+ */
+export interface ProdAdditionalFeeBlackVO {
+ /**
+ * 黑名单日期设置
+ */
+ customTimeSlots?: string[];
+ /**
+ * 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'
+ */
+ dateType?: number;
+ /**
+ * 特殊日期规则的唯一标识符
+ */
+ id?: number;
+ /**
+ * 是否启用该规则是否启用该规则0关1开
+ */
+ isEnabled?: number;
+ /**
+ * 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期
+ */
+ type?: number;
+}
+
+/**
+ * 紧急响应时间区间设置 DO
+ *
+ * ProdEmergencyResponseIntervalsDO
+ */
+export interface ProdEmergencyResponseIntervalsDO {
+ /**
+ * 收费模式0:固定收费 1:浮动收费
+ */
+ chargeMode?: number;
+ /**
+ * 关联的紧急响应服务配置ID
+ */
+ configId?: number;
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 创建者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ creator?: string;
+ /**
+ * 是否删除
+ */
+ deleted?: number;
+ /**
+ * 浮动百分比
+ */
+ floatingPercentage?: number;
+ /**
+ * 响应时间区间的唯一标识符
+ */
+ id?: number;
+ /**
+ * 响应模式名称
+ */
+ modeName?: string;
+ name?: string;
+ /**
+ * 价格或上浮百分比
+ */
+ price?: number;
+ /**
+ * 商品ID
+ */
+ prodId?: number;
+ /**
+ * 响应时间(小时)
+ */
+ responseHours?: number;
+ /**
+ * 更新者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ updater?: string;
+ /**
+ * 最后更新时间
+ */
+ updateTime?: string;
+}
+
+/**
+ * 预约配置
+ *
+ * ProdReservationInfoVO
+ */
+export interface ProdReservationInfoVO {
+ /**
+ * 需提前多少小时预约
+ */
+ advanceHours?: number;
+ /**
+ * 是否允许更改预约时间 1可以 0不可以
+ */
+ allowChange?: number;
+ /**
+ * 更改预约时间的时间规则(如服务开始前1小时可更改)
+ */
+ changeTimeRule?: number;
+ /**
+ * 预约配置的唯一标识符
+ */
+ id?: number;
+ /**
+ * 允许更改预约时间的最大次数
+ */
+ maxChangeTimes?: number;
+ /**
+ * 关联的商品ID
+ */
+ prodId?: number;
+ /**
+ * 预约黑名单日期设置
+ */
+ prodReservationBlackList?: ProdAdditionalFeeBlackVO[];
+ /**
+ * 预约日期范围 7天 10天 15天 30天
+ */
+ reservationDateRange?: number;
+ /**
+ * 预约时段设置
+ */
+ reservationTimeSlots?: string[];
+ /**
+ * 预约时间区间设置
+ */
+ timeBook?: TimeBookVO;
+ /**
+ * 时间段
+ */
+ timeSlot?: number;
+}
+
+/**
+ * 预约时间区间设置
+ *
+ * TimeBookVO
+ */
+export interface TimeBookVO {
+ /**
+ * 预约时段设置
+ */
+ reservationTimeSlots?: string[];
+ /**
+ * 时间段
+ */
+ timeSlot?: number;
+}
+
+/**
+ * 服务区域配置
+ *
+ * ProdServiceAreasInfoVO
+ */
+export interface ProdServiceAreasInfoVO {
+ /**
+ * 服务区域地址名称
+ */
+ areaNameList?: string[];
+ /**
+ * 超区费用(仅在rule_type为accept_with_fee时有效)
+ */
+ fee?: number;
+ /**
+ * 超区规则的唯一标识符
+ */
+ id?: number;
+ /**
+ * 关联的商品ID
+ */
+ prodId?: number;
+ /**
+ * 超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)
+ */
+ ruleType?: number;
+ [property: string]: any;
+}
+
+/**
+ * 体重配置
+ *
+ * ProdWeightRangePricesSaveInfoVO
+ */
+export interface ProdWeightRangePricesSaveInfoVO {
+ /**
+ * 体重是否收费0否1是
+ */
+ isWeightCharge?: number;
+ /**
+ * 体重配置
+ */
+ prodWeightConfigList?: ProdWeightRangePricesDO[];
+}
+
+/**
+ * 体重区间价格 DO
+ *
+ * ProdWeightRangePricesDO
+ */
+export interface ProdWeightRangePricesDO {
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 创建者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ creator?: string;
+ /**
+ * 是否删除
+ */
+ deleted?: number;
+ /**
+ * 体重区间价格的唯一标识符
+ */
+ id?: number;
+ /**
+ * 是否启用该规则0否1是
+ */
+ isEnabled?: number;
+ /**
+ * 价格
+ */
+ price?: number;
+ /**
+ * 关联的体重配置ID
+ */
+ prodId?: number;
+ /**
+ * 更新者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ updater?: string;
+ /**
+ * 最后更新时间
+ */
+ updateTime?: string;
+ /**
+ * 体重区间
+ */
+ weightRange?: string;
+}
+
+/**
+ * 接单上线配置
+ *
+ * ProductOrderLimitDO
+ */
+export interface ProductOrderLimitDO {
+ /**
+ * 创建时间
+ */
+ createTime?: string;
+ /**
+ * 创建者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ creator?: string;
+ /**
+ * 是否删除
+ */
+ deleted?: number;
+ /**
+ * 接单上限配置的唯一标识符
+ */
+ id?: number;
+ /**
+ * 限制单位'0:按自然天',1:'按自然周',2:'按自然月'
+ */
+ limitUnit?: number;
+ /**
+ * 上限阈值
+ */
+ maxOrders?: number;
+ /**
+ * 关联的商品ID
+ */
+ prodId?: number;
+ /**
+ * 更新者,目前使用 SysUser 的 id 编号
+ *
+ * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
+ */
+ updater?: string;
+ /**
+ * 最后更新时间
+ */
+ updateTime?: string;
+}
+
+export const getProdServiceRule = async (params: Prod) => {
+ return request("/product/prod/getProdService", {
+ method: "GET",
+ params,
+ });
+};
+
+export const uptateProdServiceRule = async (data: ProdServiceVO) => {
+ return request("/product/prod/uptateProdService", {
+ method: "POST",
+ data,
+ });
+};
diff --git a/src/services/prodApi/category.ts b/src/services/prodApi/category.ts
deleted file mode 100644
index 5ccd2c6..0000000
--- a/src/services/prodApi/category.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-// @ts-ignore
-///
-import { request } from "@umijs/max";
-
-/** 获取菜单页面的表 GET /product/category/categoryList */
-export async function getCategoryList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductCategoryCategoryListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/category/categoryList", {
- method: "GET",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 创建产品类目 创建产品类目 POST /product/category/create */
-export async function postCategoryCreate(
- body: API.CategorySaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/product/category/create", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 更新产品类目 更新产品类目 PUT /product/category/update */
-export async function putCategoryUpdate(
- body: API.CategorySaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/product/category/update", {
- method: "PUT",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
diff --git a/src/services/prodApi/index.ts b/src/services/prodApi/index.ts
deleted file mode 100644
index 4174d59..0000000
--- a/src/services/prodApi/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-// API 更新时间:
-// API 唯一标识:
-import * as product from "./product";
-import * as category from "./category";
-export default {
- product,
- category,
-};
diff --git a/src/services/prodApi/product.ts b/src/services/prodApi/product.ts
deleted file mode 100644
index d3b1452..0000000
--- a/src/services/prodApi/product.ts
+++ /dev/null
@@ -1,586 +0,0 @@
-// @ts-ignore
-///
-import { request } from "@umijs/max";
-
-/** 创建商品 创建商品 POST /prod/create */
-export async function postProdCreate(
- body: API.ProdSaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/prod/create", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 创建商品 创建商品 POST /product/prod/create */
-export async function postProductProdCreate(
- body: API.ProdSaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/create", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 创建商品服务配置 创建商品服务配置 POST /product/prod/createProdService */
-export async function postProductProdCreateProdService(
- body: API.ProdServiceVO,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/createProdService", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 删除商品 删除商品 DELETE /product/prod/delete */
-export async function deleteProductProdOpenApiDelete(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteProductProd_openAPI_deleteParams,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/delete", {
- method: "DELETE",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 批量删除商品 批量删除商品 DELETE /product/prod/deleteSkuList */
-export async function deleteProductProdDeleteSkuList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteProductProdDeleteSkuListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/deleteSkuList", {
- method: "DELETE",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 获得商品回收站分页列表 获得商品回收站分页列表 GET /product/prod/getProdRecycleBinPageList */
-export async function getProductProdGetProdRecycleBinPageList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductProdGetProdRecycleBinPageListParams,
- options?: { [key: string]: any }
-) {
- return request(
- "/product/prod/getProdRecycleBinPageList",
- {
- method: "GET",
- params: {
- ...params,
- pageNo: params.pageNo ?? "1",
- pageSize: params.pageSize ?? "10",
- },
- ...(options || {}),
- }
- );
-}
-
-/** 获得商品服务信息 获得商品服务信息 GET /product/prod/getProdService */
-export async function getProductProdGetProdService(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductProdGetProdServiceParams,
- options?: { [key: string]: any }
-) {
- return request(
- "/product/prod/getProdService",
- {
- method: "GET",
- params: {
- ...params,
- },
- ...(options || {}),
- }
- );
-}
-
-/** 获得商品分页 获得商品分页 GET /product/prod/page */
-export async function getProductProdPage(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductProdPageParams,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/page", {
- method: "GET",
- params: {
- ...params,
- pageNo: params.pageNo ?? "1",
- pageSize: params.pageSize ?? "10",
- },
- ...(options || {}),
- });
-}
-
-/** 恢复商品 恢复商品 POST /product/prod/restoreProdList */
-export async function postProductProdRestoreProdList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductProdRestoreProdListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/restoreProdList", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 更新商品 更新商品 PUT /product/prod/update */
-export async function putProductProdUpdate(
- body: API.ProdSaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/update", {
- method: "PUT",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 批量上下架 批量上下架 DELETE /product/prod/updateSkuShelfList */
-export async function deleteProductProdUpdateSkuShelfList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteProductProdUpdateSkuShelfListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/updateSkuShelfList", {
- method: "DELETE",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 修改商品服务配置 修改商品服务配置 POST /product/prod/uptateProdService */
-export async function postProductProdUptateProdService(
- body: API.ProdServiceInfoVO,
- options?: { [key: string]: any }
-) {
- return request("/product/prod/uptateProdService", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 创建sku扩展服务配置 创建sku扩展服务配置 POST /product/sku/createSkuExtend */
-export async function postProductSkuCreateSkuExtend(
- body: API.SkuExtendVO,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/createSkuExtend", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 删除单品SKU 删除单品SKU DELETE /product/sku/delete */
-export async function deleteProductSkuOpenApiDelete(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteProductSku_openAPI_deleteParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/delete", {
- method: "DELETE",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 删除规格值 删除规格值 PUT /product/sku/deleteProp */
-export async function putProductSkuDeleteProp(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuDeletePropParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/deleteProp", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 批量删除SKU 批量删除SKU DELETE /product/sku/deleteSkuList */
-export async function deleteProductSkuDeleteSkuList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteProductSkuDeleteSkuListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/deleteSkuList", {
- method: "DELETE",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 禁用或者启用规格值 禁用规格值 PUT /product/sku/disableProp */
-export async function putProductSkuDisableProp(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuDisablePropParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/disableProp", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 获得单品SKU 获得单品SKU GET /product/sku/get */
-export async function getProductSkuGet(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductSkuGetParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/get", {
- method: "GET",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 获取规格回收站 获取规格回收站 GET /product/sku/getPropRecycleBinList */
-export async function getProductSkuGetPropRecycleBinList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductSkuGetPropRecycleBinListParams,
- options?: { [key: string]: any }
-) {
- return request(
- "/product/sku/getPropRecycleBinList",
- {
- method: "GET",
- params: {
- ...params,
- pageNo: params.pageNo ?? "1",
- pageSize: params.pageSize ?? "10",
- },
- ...(options || {}),
- }
- );
-}
-
-/** 获取sku扩展服务配置信息 获取sku扩展服务配置信息 POST /product/sku/getSkuExtend */
-export async function postProductSkuGetSkuExtend(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductSkuGetSkuExtendParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/getSkuExtend", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 获得SKU分页列表 获得SKU分页列表 GET /product/sku/getSkuPageList */
-export async function getProductSkuGetSkuPageList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductSkuGetSkuPageListParams,
- options?: { [key: string]: any }
-) {
- return request(
- "/product/sku/getSkuPageList",
- {
- method: "GET",
- params: {
- ...params,
- pageNo: params.pageNo ?? "1",
- pageSize: params.pageSize ?? "10",
- },
- ...(options || {}),
- }
- );
-}
-
-/** 获取sku规格 获取sku规格 GET /product/sku/getSKuPropList */
-export async function getProductSkuGetSKuPropList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductSkuGetSKuPropListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/getSKuPropList", {
- method: "GET",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 获得SKU回收站分页列表 获得SKU回收站分页列表 GET /product/sku/getSkuRecycleBinPageList */
-export async function getProductSkuGetSkuRecycleBinPageList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getProductSkuGetSkuRecycleBinPageListParams,
- options?: { [key: string]: any }
-) {
- return request(
- "/product/sku/getSkuRecycleBinPageList",
- {
- method: "GET",
- params: {
- ...params,
- pageNo: params.pageNo ?? "1",
- pageSize: params.pageSize ?? "10",
- },
- ...(options || {}),
- }
- );
-}
-
-/** 恢复规格 恢复规格 POST /product/sku/restorePropList */
-export async function postProductSkuRestorePropList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductSkuRestorePropListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/restorePropList", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 恢复SKU 恢复SKU POST /product/sku/restoreSkuList */
-export async function postProductSkuRestoreSkuList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductSkuRestoreSkuListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/restoreSkuList", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 更新单品SKU 更新单品SKU PUT /product/sku/update */
-export async function putProductSkuUpdate(
- body: API.SkuSaveReqVO,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/update", {
- method: "PUT",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 修改配送方式 修改配送方式 POST /product/sku/updateDeliver */
-export async function postProductSkuUpdateDeliver(
- body: API.SkuServiceDeliverDO[],
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateDeliver", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 修物料配置 修物料配置 POST /product/sku/updateMaterial */
-export async function postProductSkuUpdateMaterial(
- body: API.SkuServiceMaterialDO[],
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateMaterial", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 修改属性规格值 修改属性规格值 PUT /product/sku/updateProdProp */
-export async function putProductSkuUpdateProdProp(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuUpdateProdPropParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateProdProp", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 新增统一保存sku规格 更新sku规格 PUT /product/sku/updateProp */
-export async function putProductSkuUpdateProp(
- body: API.SkuPropVO,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateProp", {
- method: "PUT",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 修改属性下面规格值 修改属性下面规格值 PUT /product/sku/updatePropValue */
-export async function putProductSkuUpdatePropValue(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuUpdatePropValueParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updatePropValue", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 修改扩展服务信息配置(遗体接运扩展服务,遗体清洁配置,追思告别配置,骨灰处理配置......) 修改扩展服务信息配置(遗体接运扩展服务,遗体清洁配置,追思告别配置,骨灰处理配置......) POST /product/sku/updateServiceDetails */
-export async function postProductSkuUpdateServiceDetails(
- body: API.SkuServiceDetailsDO[],
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateServiceDetails", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 修改单品上下架 修改单品上下架 PUT /product/sku/updateSkuShelf */
-export async function putProductSkuUpdateSkuShelf(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuUpdateSkuShelfParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateSkuShelf", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 修改单品上下架 修改单品上下架 POST /product/sku/updateSkuShelf */
-export async function postProductSkuUpdateSkuShelf(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductSkuUpdateSkuShelfParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateSkuShelf", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 批量上下架 批量上下架 PUT /product/sku/updateSkuShelfList */
-export async function putProductSkuUpdateSkuShelfList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.putProductSkuUpdateSkuShelfListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateSkuShelfList", {
- method: "PUT",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 批量上下架 批量上下架 POST /product/sku/updateSkuShelfList */
-export async function postProductSkuUpdateSkuShelfList(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.postProductSkuUpdateSkuShelfListParams,
- options?: { [key: string]: any }
-) {
- return request("/product/sku/updateSkuShelfList", {
- method: "POST",
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 修改接运地址配置 修改接运地址配置 POST /product/sku/updateTransportAdress */
-export async function postProductSkuUpdateTransportAdress(
- body: API.SkuServiceTransportDO[],
- options?: { [key: string]: any }
-) {
- return request(
- "/product/sku/updateTransportAdress",
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- data: body,
- ...(options || {}),
- }
- );
-}
diff --git a/src/services/prodApi/typings.d.ts b/src/services/prodApi/typings.d.ts
deleted file mode 100644
index 679d70b..0000000
--- a/src/services/prodApi/typings.d.ts
+++ /dev/null
@@ -1,2139 +0,0 @@
-declare namespace API {
- type CategoryDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 类目ID */
- categoryId?: number;
- /** 店铺ID */
- shopId?: number;
- /** 父节点 */
- parentId?: number;
- /** 父节名称 */
- parentName?: string;
- /** 产品类目名称 */
- categoryName?: string;
- /** 类目图标 */
- icon?: string;
- /** 类目的显示图片 */
- pic?: string;
- /** 类目描述 */
- description?: string;
- /** 标签 */
- tag?: string[];
- /** 排序 */
- sort?: number;
- /** 默认是1,表示正常状态,0为下线状态 */
- status?: number;
- /** 分类层级 1、2、3级 */
- grade?: number;
- };
-
- type CategoryDto = {
- /** 类目ID */
- categoryId?: number;
- /** 店铺ID */
- shopId?: number;
- /** 父节点 */
- parentId?: number;
- /** 父节名称 */
- parentName?: string;
- /** 产品类目名称 */
- categoryName?: string;
- /** 类目图标 */
- icon?: string;
- /** 类目的显示图片 */
- pic?: string;
- /** 类目描述 */
- description?: string;
- /** 标签 */
- tag?: string;
- /** 排序 */
- sort?: number;
- /** 默认是1,表示正常状态,0为下线状态 */
- status?: number;
- /** 分类层级 1、2、3级 */
- grade?: number;
- };
-
- type CategorySaveReqVO = {
- /** 类目ID */
- categoryId?: number;
- /** 店铺ID */
- shopId?: number;
- /** 父节点 */
- parentId?: number;
- /** 父节名称 */
- parentName?: string;
- /** 产品类目名称 */
- categoryName?: string;
- /** 类目图标 */
- icon?: string;
- /** 类目的显示图片 */
- pic?: string;
- /** 类目描述 */
- description?: string;
- /** 标签 */
- tag?: string[];
- /** 排序 */
- sort?: number;
- /** 默认是1,表示正常状态,0为下线状态 */
- status?: number;
- /** 分类层级 1级 2级 3级 */
- grade?: number;
- };
-
- type CommonResultBoolean = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: boolean;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultList = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: Record[];
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultListCategoryDO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: CategoryDO[];
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultListCategoryDto = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: CategoryDto[];
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultListProdPropDO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: ProdPropDO[];
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultLong = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: number;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultProdDO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultProdDO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultProdListVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultProdListVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultProdRestoreListVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultProdRestoreListVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultProPropRecycleBinVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultProPropRecycleBinVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultSkuDO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultSkuDO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultSkuRecycleBinVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultSkuRecycleBinVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultPageResultTradeOrderPageItemRespVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: PageResultTradeOrderPageItemRespVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultProdServiceVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: ProdServiceVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultSkuExtendVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: SkuExtendVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultSkuPropInfoVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: SkuPropInfoVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultSkuRespVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: SkuRespVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultTradeOrderDetailRespVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: TradeOrderDetailRespVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type CommonResultTradeOrderSummaryRespVO = {
- /** 错误码 */
- code?: number;
- /** 返回数据 */
- data?: TradeOrderSummaryRespVO;
- /** 错误提示,用户可阅读 */
- msg?: string;
- };
-
- type deleteProductProd_openAPI_deleteParams = {
- /** 编号 */
- id: number;
- };
-
- type deleteProductProdDeleteSkuListParams = {
- /** 商品id */
- ids: number[];
- };
-
- type deleteProductProdUpdateSkuShelfListParams = {
- /** 商品id */
- ids: number[];
- status: number;
- };
-
- type deleteProductSku_openAPI_deleteParams = {
- /** 编号 */
- id: number;
- };
-
- type deleteProductSkuDeleteSkuListParams = {
- /** 编号 */
- ids: number[];
- };
-
- type getProductCategoryCategoryListParams = {
- grade?: number;
- categoryId?: number;
- categoryName?: string;
- status?: number;
- };
-
- type getProductProdGetProdRecycleBinPageListParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 商品名称 */
- prodName?: string;
- /** 删除时间 */
- deleteTime?: string[];
- };
-
- type getProductProdGetProdServiceParams = {
- /** 商品id */
- prodId: number;
- };
-
- type getProductProdPageParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 商品名称 */
- prodName?: string;
- /** 店铺id */
- shopId?: number;
- /** 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核 */
- status?: number;
- /** 商品分类 */
- categoryId?: number;
- /** 商品分类名称 */
- categoryName?: string;
- /** 创建时间 */
- createTime?: string[];
- };
-
- type getProductSkuGetParams = {
- /** 编号 */
- id: number;
- };
-
- type getProductSkuGetPropRecycleBinListParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 属性规格名称 */
- propValue?: string;
- /** 商品id */
- prodId?: number;
- };
-
- type getProductSkuGetSkuPageListParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 商品ID */
- prodId?: number;
- /** 销售属性组合字符串 */
- properties?: string;
- /** skuID */
- skuId?: number;
- };
-
- type getProductSkuGetSKuPropListParams = {
- /** 商品id */
- prodId: number;
- };
-
- type getProductSkuGetSkuRecycleBinPageListParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 商品ID */
- prodId?: number;
- /** 销售属性组合字符串 */
- properties?: string;
- /** skuID */
- skuId?: number;
- };
-
- type getTradeOrderGetDetailParams = {
- id: number;
- };
-
- type getTradeOrderPageParams = {
- /** 页码,从 1 开始", example = "1 */
- pageNo: number;
- /** 每页条数,最大值为 100" */
- pageSize: number;
- /** 订单号,示例:88888888 */
- orderNum?: string;
- /** 用户编号,示例:1024 */
- userId?: number;
- /** 用户昵称,示例:小王 */
- userNickname?: string;
- /** 用户手机号,示例:小王 */
- userMobile?: string;
- /** 配送方式,示例:1 */
- deliveryType?: number;
- /** 发货物流公司编号,示例:1 */
- logisticsId?: number;
- /** 自提门店编号,示例:[1,2] */
- pickUpStoreIds?: string;
- /** 自提核销码,示例:12345678 */
- pickUpVerifyCode?: string;
- /** 订单类型,示例:1 */
- type?: number;
- /** 订单状态,示例:1 */
- status?: number;
- /** 支付渠道,示例:wx_lite */
- payChannelCode?: string;
- /** 创建时间 */
- createTime?: string[];
- /** 订单来源,示例:10 */
- terminal?: number;
- };
-
- type Item = {
- /** 编号 - 必填,示例:1 */
- id?: number;
- /** 用户编号 - 必填,示例:1 */
- userId?: number;
- /** 订单编号 - 必填,示例:1 */
- orderId?: number;
- /** 商品 SPU 编号 - 必填,示例:1 */
- spuId?: number;
- /** 商品 SPU 名称 - 必填,示例:芋道源码 */
- spuName?: string;
- /** 商品 SKU 编号 - 必填,示例:1 */
- skuId?: number;
- /** 商品图片 - 必填,示例:https://www.iocoder.cn/1.png */
- picUrl?: string;
- /** 购买数量 - 必填,示例:1 */
- count?: number;
- /** 商品原价(单) - 必填,示例:100 */
- price?: number;
- /** 商品优惠(总) - 必填,示例:100 */
- discountPrice?: number;
- /** 商品实付金额(总) - 必填,示例:100 */
- payPrice?: number;
- /** 子订单分摊金额(总) - 必填,示例:100 */
- orderPartPrice?: number;
- /** 分摊后子订单实付金额(总) - 必填,示例:100 */
- orderDividePrice?: number;
- /** 售后状态 - 必填,示例:1 */
- afterSaleStatus?: number;
- /** 属性列表 - 必填 */
- properties?: ProductPropertyValueDetailRespVO[];
- };
-
- type Item1 = {
- /** 编号 - 必填,示例:1 */
- id?: number;
- /** 用户编号 - 必填,示例:1 */
- userId?: number;
- /** 订单编号 - 必填,示例:1 */
- orderId?: number;
- /** 商品 SPU 编号 - 必填,示例:1 */
- spuId?: number;
- /** 商品 SPU 名称 - 必填,示例:芋道源码 */
- spuName?: string;
- /** 商品 SKU 编号 - 必填,示例:1 */
- skuId?: number;
- /** 商品图片 - 必填,示例:https://www.iocoder.cn/1.png */
- picUrl?: string;
- /** 购买数量 - 必填,示例:1 */
- count?: number;
- /** 商品原价(单) - 必填,示例:100 */
- price?: number;
- /** 商品优惠(总) - 必填,示例:100 */
- discountPrice?: number;
- /** 商品实付金额(总) - 必填,示例:100 */
- payPrice?: number;
- /** 子订单分摊金额(总) - 必填,示例:100 */
- orderPartPrice?: number;
- /** 分摊后子订单实付金额(总) - 必填,示例:100 */
- orderDividePrice?: number;
- /** 售后状态 - 必填,示例:1 */
- afterSaleStatus?: number;
- /** 属性数组 */
- properties?: ProductPropertyValueDetailRespVO[];
- };
-
- type MemberUserRespVO = {
- /** 用户 ID - 必填 - 示例: 1 */
- id?: number;
- /** 用户昵称 - 必填 - 示例: 芋道源码 */
- nickname?: string;
- /** 用户头像 - 示例: https://www.iocoder.cn/xxx.png */
- avatar?: string;
- };
-
- type OrderLog = {
- /** 操作详情 - 必填,示例:订单发货 */
- content?: string;
- /** 创建时间 - 必填,示例:2023-06-01 10:50:20 */
- createTime?: string;
- /** 用户类型 - 必填,示例:1 */
- userType?: number;
- };
-
- type PageResultProdDO = {
- /** 数据 */
- list?: ProdDO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultProdListVO = {
- /** 数据 */
- list?: ProdListVO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultProdRestoreListVO = {
- /** 数据 */
- list?: ProdRestoreListVO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultProPropRecycleBinVO = {
- /** 数据 */
- list?: ProPropRecycleBinVO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultSkuDO = {
- /** 数据 */
- list?: SkuDO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultSkuRecycleBinVO = {
- /** 数据 */
- list?: SkuRecycleBinVO[];
- /** 总量 */
- total?: number;
- };
-
- type PageResultTradeOrderPageItemRespVO = {
- /** 数据 */
- list?: TradeOrderPageItemRespVO[];
- /** 总量 */
- total?: number;
- };
-
- type postProductProdRestoreProdListParams = {
- /** 商品id集合 */
- ids: number[];
- };
-
- type postProductSkuGetSkuExtendParams = {
- /** 表单id */
- formId: number;
- };
-
- type postProductSkuRestorePropListParams = {
- /** skuids */
- ids: number[];
- };
-
- type postProductSkuRestoreSkuListParams = {
- /** skuids */
- ids: number[];
- };
-
- type postProductSkuUpdateSkuShelfListParams = {
- /** 编号 */
- ids: number[];
- isShelf: number;
- };
-
- type postProductSkuUpdateSkuShelfParams = {
- id: number;
- isShelf: number;
- };
-
- type ProdAdditionalFeeBlackVO = {
- /** 特殊日期规则的唯一标识符 */
- id?: number;
- /** 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日' */
- dateType?: number;
- /** 黑名单日期设置 */
- customTimeSlots?: string[];
- /** 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期 */
- type?: number;
- /** 是否启用该规则是否启用该规则0关1开 */
- isEnabled?: number;
- };
-
- type ProdAdditionalFeeDatesDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 特殊日期规则的唯一标识符 */
- id?: number;
- /** 商品id */
- prodId?: number;
- /** 名称 */
- name?: string;
- /** 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日' */
- dateType?: number;
- /** 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期 */
- type?: number;
- /** 自定义日期时间段(JSON格式存储) */
- customTimeSlots?: string[];
- /** 收费方式 */
- chargeMode?: number;
- /** 价格或上浮百分比 */
- price?: number;
- /** 是否启用该规则 */
- isEnabled?: number;
- };
-
- type ProdAdditionalFeePeriodsDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 特殊时段规则的唯一标识符 */
- id?: number;
- /** 商品ID */
- prodId?: number;
- /** 名称 */
- name?: string;
- /** 特殊时段设置(JSON格式存储) */
- specialTimeSlots?: string[];
- /** 收费方式0:'固定金额',1:'基准价上浮' */
- chargeMode?: number;
- /** 价格或上浮百分比 */
- price?: number;
- /** 浮动百分比 */
- floatingPercentage?: number;
- };
-
- type ProdDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 产品ID */
- prodId?: number;
- /** 商品名称 */
- prodName?: string;
- /** 商品简称 */
- abbreviation?: string;
- /** seo标题 */
- seoShortName?: string;
- /** seo搜索 */
- seoSearch?: string;
- /** 关键词 */
- keyword?: string;
- /** 店铺id */
- shopId?: number;
- /** 简要描述,卖点等 */
- brief?: string;
- /** 品牌 */
- brand?: string;
- /** 是否置灰0否1是 */
- isProhibit?: number;
- /** 审核备注 */
- processNotes?: string;
- /** 详细描述 */
- content?: string;
- /** 商品编号 */
- prodNumber?: string;
- /** 商品主图 */
- pic?: string;
- /** 商品轮播图片,以,分割 */
- imgs?: string;
- /** 视频 */
- video?: string;
- /** 商品轮播图片,以,分割 */
- whiteImg?: string;
- /** 标签 */
- tag?: string[];
- /** 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核 */
- status?: number;
- /** 商品分类 */
- categoryId?: number;
- /** 商品分类名称 */
- categoryName?: string;
- /** 销量 */
- soldNum?: number;
- /** 分享图 */
- shareImage?: string;
- /** 分享话术 */
- shareContent?: string;
- /** 是否开启区域0关1开 */
- regionSwitch?: number;
- /** 是否特殊时段0关1开 */
- additionalSwitch?: number;
- /** 是否特殊日期(节假日周末什么的)0关1开 */
- additionalFeeSwitch?: number;
- /** 是否紧急响应服务0关1开 */
- emergencySwitch?: number;
- /** 是否预约0关1开 */
- reservationSwitch?: number;
- /** 是否接单上线0关1开 */
- orderLimitSwitch?: number;
- /** 是否开启体重配置0关1开 */
- weightSwitch?: number;
- /** 版本 乐观锁 */
- version?: number;
- /** 展示的权重 */
- top?: number;
- /** 删除时间 */
- deleteTime?: string;
- };
-
- type ProdEmergencyInfoReqVO = {
- /** 紧急响应服务配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 可响应时间段 */
- responseTimeSlots?: string[];
- /** 紧急响应时间区间设置 */
- prodEmergencyResponseIntervalsList?: ProdEmergencyResponseIntervalsDO[];
- /** 紧急响应黑名单日期设置 */
- prodEmergencyResponseBlackList?: ProdAdditionalFeeBlackVO[];
- };
-
- type ProdEmergencyInfoVO = {
- /** 紧急响应服务配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 可响应时间段(JSON格式存储) */
- responseTimeSlots?: string[];
- /** 紧急响应时间区间设置 */
- prodEmergencyResponseIntervalsList?: ProdEmergencyResponseIntervalsDO[];
- /** 紧急响应黑名单日期设置 */
- prodEmergencyResponseBlackList?: ProdAdditionalFeeBlackVO[];
- };
-
- type ProdEmergencyResponseDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: boolean;
- /** 紧急响应服务配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 可响应时间段(JSON格式存储) */
- responseTimeSlots?: string;
- /** 黑名自定义日期(JSON格式存储) */
- blacklistedDates?: string;
- /** 黑名单指定日期(JSON格式存储) */
- blackAppointDates?: string;
- /** 法定节假日是否开启0:关闭1开启 */
- blackHappy?: boolean;
- /** 固定休息日周末是否开启0关闭1开启 */
- blackWeekend?: boolean;
- };
-
- type ProdEmergencyResponseIntervalsDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 响应时间区间的唯一标识符 */
- id?: number;
- /** 关联的紧急响应服务配置ID */
- configId?: number;
- /** 商品ID */
- prodId?: number;
- /** 响应模式名称modeName */
- name?: string;
- /** 响应时间(小时) */
- responseHours?: number;
- /** 收费模式0:固定收费 1:浮动收费 */
- chargeMode?: number;
- /** 浮动百分比 */
- floatingPercentage?: number;
- /** 价格或上浮百分比 */
- price?: number;
- };
-
- type ProdListVO = {
- /** 产品ID */
- prodId?: number;
- /** 商品名称 */
- prodName?: string;
- /** 分类名称 */
- categoryName?: string;
- /** 店铺id */
- shopId?: number;
- /** 店铺id */
- shopName?: string;
- /** 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核 */
- status?: number;
- /** 是否置灰0否1是 */
- isProhibit?: number;
- /** 服务区域地址名称集合 */
- areaNameList?: string[];
- /** 紧急服务最快响应时间(小时) */
- responseHours?: number;
- /** 服务时段 */
- reservationTimeSlots?: string[];
- /** 还剩多少天 */
- remainingDays?: number;
- /** 审核备注 */
- processNotes?: string;
- /** 删除时间 */
- deleteTime?: string;
- /** 创建时间 */
- createTime?: string;
- /** 更新时间 */
- updateTime?: string;
- };
-
- type ProdPropDO = {
- /** 属性id */
- id?: number;
- /** 属性id */
- propId?: number;
- /** 属性名称 */
- propName?: string;
- /** ProdPropRule 1:销售属性(规格); 2:参数属性; */
- rule?: number;
- /** 店铺id */
- shopId?: number;
- /** 商品id */
- prodId?: number;
- /** 排序 */
- sort?: number;
- /** 是否删除0否1是 */
- deleted?: number;
- /** isExist 是否新增 0否1是 */
- isExist?: number;
- /** 状态0禁用1启用 */
- state?: number;
- /** 属性值 */
- prodPropValues?: ProdPropValueDO[];
- };
-
- type ProdPropSaveReqVO = {
- id?: number;
- /** 属性id */
- propId?: number;
- /** 属性名称 */
- propName?: string;
- /** ProdPropRule 1:销售属性(规格); 2:参数属性; */
- rule?: number;
- /** 店铺id */
- shopId?: number;
- /** 商品id(添加的时候不传) */
- prodId?: number;
- /** 是否删除0否1是 */
- deleted?: number;
- /** 扩展服务表单id */
- isExist?: number;
- /** 属性值 */
- prodPropValues: ProdPropValueDO[];
- };
-
- type ProdPropValueDO = {
- /** id */
- id?: number;
- /** 属性值ID */
- valueId?: number;
- /** 属性值名称 */
- propValue?: string;
- /** 属性ID */
- propId?: number;
- /** 是否删除0否1是 */
- deleted?: number;
- /** 状态0禁用1启用 */
- state?: number;
- /** 是否失效0否1是 */
- isExpire?: number;
- /** 排序 */
- sort?: number;
- /** 扩展服务表单id */
- isExist?: number;
- /** 删除时间 */
- deleteTime?: string;
- };
-
- type ProdReservationConfigDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 预约配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 预约时段设置(JSON格式存储) */
- reservationTimeSlots?: string[];
- /** 需提前多少小时预约 */
- advanceHours?: number;
- /** 预约日期范围 7天 10天 15天 30天 */
- reservationDateRange?: number;
- /** 是否允许更改预约时间 1可以 0不可以 */
- allowChange?: number;
- /** 时间段 */
- timeSlot?: number;
- /** 更改预约时间的时间规则(如服务开始前1小时可更改) */
- changeTimeRule?: number;
- /** 允许更改预约时间的最大次数 */
- maxChangeTimes?: number;
- /** 黑名自定义日期(JSON格式存储) */
- blacklistedDates?: string[];
- /** '是否开启黑名单自定义0关1开' */
- isBlacklisted?: number;
- /** '是否开启黑名单指定日期0关1开' */
- isBlackAppoint?: number;
- /** 黑名单指定日期(JSON格式存储) */
- blackAppointDates?: string[];
- /** 法定节假日是否开启0:关闭1开启 */
- blackHappy?: number;
- /** 固定休息日周末是否开启0关闭1开启 */
- blackWeekend?: number;
- timeBook?: TimeBookVO;
- };
-
- type ProdReservationInfoReqVO = {
- /** 预约配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 预约时段设置 */
- reservationTimeSlots?: string[];
- /** 需提前多少小时预约 */
- advanceHours?: number;
- /** 预约日期范围 7天 10天 15天 30天 */
- reservationDateRange?: number;
- /** 是否允许更改预约时间 1可以 0不可以 */
- allowChange?: number;
- /** 时间段 */
- timeSlot?: number;
- /** 更改预约时间的时间规则(如服务开始前1小时可更改) */
- changeTimeRule?: number;
- /** 允许更改预约时间的最大次数 */
- maxChangeTimes?: number;
- /** 预约时间区间设置 */
- timeBook?: TimeBookVO;
- /** 预约黑名单日期设置 */
- prodReservationBlackList?: ProdAdditionalFeeBlackVO[];
- };
-
- type ProdReservationInfoVO = {
- /** 预约配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 预约时段设置 */
- reservationTimeSlots?: string[];
- /** 需提前多少小时预约 */
- advanceHours?: number;
- /** 预约日期范围 7天 10天 15天 30天 */
- reservationDateRange?: number;
- /** 是否允许更改预约时间 1可以 0不可以 */
- allowChange?: number;
- /** 时间段 */
- timeSlot?: number;
- /** 更改预约时间的时间规则(如服务开始前1小时可更改) */
- changeTimeRule?: number;
- /** 允许更改预约时间的最大次数 */
- maxChangeTimes?: number;
- /** 预约时间区间设置 */
- timeBook?: TimeBookVO;
- /** 预约黑名单日期设置 */
- prodReservationBlackList?: ProdAdditionalFeeBlackVO[];
- };
-
- type ProdRestoreListVO = {
- /** 产品ID */
- prodId?: number;
- /** 商品名称 */
- prodName?: string;
- /** 分类名称 */
- categoryName?: string;
- /** 店铺id */
- shopId?: number;
- /** 店铺id */
- shopName?: string;
- /** 服务区域地址名称集合 */
- areaNameList?: string[];
- /** 紧急服务最快响应时间(小时) */
- responseHours?: number;
- /** 服务时段 */
- reservationTimeSlots?: string[];
- /** 还剩多少天 */
- remainingDays?: number;
- /** 删除时间 */
- deleteTime?: string;
- /** 创建时间 */
- createTime?: string;
- };
-
- type ProdSaveReqVO = {
- /** 产品ID */
- prodId?: number;
- /** 商品名称 */
- prodName?: string;
- /** 商品简称 */
- abbreviation?: string;
- /** seo标题 */
- seoShortName?: string;
- /** seo搜索 */
- seoSearch?: string;
- /** 关键词 */
- keyword?: string;
- /** 商品分类名称 */
- categoryName?: string;
- /** 店铺id */
- shopId?: number;
- /** 简要描述,卖点等 */
- brief?: string;
- /** 品牌 */
- brand?: string;
- /** 详细描述 */
- content?: string;
- /** 视频 */
- video?: string;
- /** 商品轮播图片,以,分割 */
- whiteImg?: string;
- /** 商品编号 */
- prodNumber?: string;
- /** 商品主图 */
- pic?: string;
- /** 商品轮播图片,以,分割 */
- imgs?: string;
- /** 默认是1,表示正常状态, -1表示删除, 0下架 */
- status?: number;
- /** '是否置灰0否1是' */
- isProhibit?: number;
- /** 审核备注 */
- processNotes?: string;
- /** 商品分类 */
- categoryId?: number;
- /** 销量 */
- soldNum?: number;
- /** 分享图 */
- shareImage?: string;
- /** 标签 */
- tag?: string[];
- /** 分享话术 */
- shareContent?: string;
- /** 是否开启区域0关1开 */
- regionSwitch?: number;
- /** 是否特殊时段0关1开 */
- additionalSwitch?: number;
- /** 是否特殊日期(节假日周末什么的)0关1开 */
- additionalFeeSwitch?: number;
- /** 是否紧急响应服务0关1开 */
- emergencySwitch?: number;
- /** 是否预约0关1开 */
- reservationSwitch?: number;
- /** 是否接单上线0关1开 */
- orderLimitSwitch?: number;
- /** 是否开启体重配置0关1开 */
- weightSwitch?: number;
- /** 创建人 */
- createBy?: string;
- /** 修改人 */
- updateBy?: string;
- /** 版本 乐观锁 */
- version?: number;
- /** 展示的权重 */
- top?: number;
- /** sku列表 */
- skuList?: SkuDO[];
- /** 规格 */
- prodPropSaveReqVO?: ProdPropSaveReqVO[];
- };
-
- type ProdServiceAreasInfoVO = {
- /** 超区规则的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费) */
- ruleType?: number;
- /** 超区费用(仅在rule_type为accept_with_fee时有效) */
- fee?: number;
- /** 服务区域地址名称 */
- areaNameList?: string[];
- };
-
- type ProdServiceInfoVO = {
- /** 产品ID */
- prodId?: number;
- /** 创建时间 */
- createTime?: string;
- /** 修改时间 */
- updateTime?: string;
- /** 新建人 */
- creator?: string;
- /** 修改人 */
- updater?: string;
- /** 分类名称 */
- categoryName?: string;
- /** 是否开启服务区域配置0关1开 */
- regionSwitch?: number;
- /** 服务区域配置 */
- prodServiceAreasInfo?: ProdServiceAreasInfoVO;
- /** 是否预约0关1开 */
- reservationSwitch?: number;
- /** 预约配置 */
- prodReservationConfig?: ProdReservationInfoReqVO;
- /** 是否紧急响应服务0关1开 */
- emergencySwitch?: number;
- /** 急响应服务配置 */
- prodEmergencyInfoVO?: ProdEmergencyInfoReqVO;
- /** 是否接单上线0关1开 */
- orderLimitSwitch?: number;
- /** 接单上线配置 */
- productOrderLimitVO?: ProductOrderLimitDO;
- /** 是否特殊时段0关1开 */
- additionalSwitch?: number;
- /** 特殊时段规则配置 */
- prodAdditionalFeeDatesList?: ProdAdditionalFeeDatesDO[];
- /** 是否特殊日期(节假日周末什么的)0关1开 */
- additionalFeeSwitch?: number;
- /** 特殊日期规则配置 */
- prodAdditionalFeePeriodsList?: ProdAdditionalFeePeriodsDO[];
- /** 是否开启体重配置0关1开 */
- weightSwitch?: number;
- /** 体重配置 */
- prodWeightConfig?: ProdWeightRangePricesSaveInfoVO;
- };
-
- type ProdServiceOverAreaRulesDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: boolean;
- /** 超区规则的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费) */
- ruleType?: boolean;
- /** 超区费用(仅在rule_type为accept_with_fee时有效) */
- fee?: number;
- };
-
- type ProdServiceVO = {
- /** 产品ID */
- prodId?: number;
- /** 创建时间 */
- createTime?: string;
- /** 修改时间 */
- updateTime?: string;
- /** 新建人 */
- creator?: string;
- /** 修改人 */
- updater?: string;
- /** 分类名称 */
- categoryName?: string;
- /** 是否开启服务区域配置0关1开 */
- regionSwitch?: number;
- /** 服务区域配置 */
- prodServiceAreasInfo?: ProdServiceAreasInfoVO;
- /** 是否预约0关1开 */
- reservationSwitch?: number;
- /** 预约配置 */
- prodReservationConfig?: ProdReservationInfoVO;
- /** 是否紧急响应服务0关1开 */
- emergencySwitch?: number;
- /** 急响应服务配置 */
- prodEmergencyInfoVO?: ProdEmergencyInfoVO;
- /** 是否接单上线0关1开 */
- orderLimitSwitch?: number;
- /** 接单上线配置 */
- productOrderLimitVO?: ProductOrderLimitDO;
- /** 是否特殊时段0关1开 */
- additionalSwitch?: number;
- /** 特殊时段规则配置 */
- prodAdditionalFeeDatesList?: ProdAdditionalFeeDatesDO[];
- /** 是否特殊日期(节假日周末什么的)0关1开 */
- additionalFeeSwitch?: number;
- /** 特殊日期规则配置 */
- prodAdditionalFeePeriodsList?: ProdAdditionalFeePeriodsDO[];
- /** 是否开启体重配置0关1开 */
- weightSwitch?: number;
- /** 体重配置 */
- prodWeightConfig?: ProdWeightRangePricesSaveInfoVO;
- };
-
- type ProductOrderLimitDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 接单上限配置的唯一标识符 */
- id?: number;
- /** 关联的商品ID */
- prodId?: number;
- /** 限制单位'0:按自然天',1:'按自然周',2:'按自然月' */
- limitUnit?: number;
- /** 上限阈值 */
- maxOrders?: number;
- };
-
- type ProductPropertyValueDetailRespVO = {
- /** 属性的编号 - 必填 - 示例: 1 */
- propertyId?: number;
- /** 属性的名称 - 必填 - 示例: 颜色 */
- propertyName?: string;
- /** 属性值的编号 - 必填 - 示例: 1024 */
- valueId?: number;
- /** 属性值的名称 - 必填 - 示例: 红色 */
- valueName?: string;
- };
-
- type ProdWeightRangePricesDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 体重区间价格的唯一标识符 */
- id?: number;
- /** 关联的体重配置ID */
- prodId?: number;
- /** 体重区间 */
- weightRange?: string;
- /** 价格 */
- price?: number;
- /** 是否启用该规则0否1是 */
- isEnabled?: number;
- };
-
- type ProdWeightRangePricesSaveInfoVO = {
- /** 体重是否收费0否1是 */
- isWeightCharge?: number;
- /** 体重配置 */
- prodWeightConfigList?: ProdWeightRangePricesDO[];
- };
-
- type ProPropRecycleBinVO = {
- /** 规格值id */
- id?: number;
- /** 属性规格名称 */
- propValue?: string;
- /** 关联规格属性id */
- propId?: number;
- /** 还剩多少天 */
- remainingDays?: number;
- /** 删除时间 */
- deleteTime?: string;
- };
-
- type putProductSkuDeletePropParams = {
- id: number;
- };
-
- type putProductSkuDisablePropParams = {
- id?: number;
- state: number;
- };
-
- type putProductSkuUpdateProdPropParams = {
- id: number;
- propName: string;
- };
-
- type putProductSkuUpdatePropValueParams = {
- id: number;
- propValue: string;
- };
-
- type putProductSkuUpdateSkuShelfListParams = {
- /** 编号 */
- ids: number[];
- isShelf: number;
- };
-
- type putProductSkuUpdateSkuShelfParams = {
- /** 编号 */
- id: number;
- isShelf: number;
- };
-
- type SkuDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 单品ID */
- skuId?: number;
- /** 商品ID */
- prodId?: number;
- /** 销售属性组合字符串 格式是p1:v1;p2:v2 */
- properties?: string;
- /** 别名 */
- alias?: string;
- /** 价格 */
- price?: number;
- /** 基准价 */
- basePrice?: number;
- /** 最低价格 */
- minPrice?: number;
- /** 最高价格 */
- maxPrice?: number;
- /** 成本价 */
- originalPrice?: number;
- /** 市场价 */
- marketPrice?: number;
- /** 服务内容 */
- serviceContent?: string;
- /** 规格id 多个用逗号分隔(1,2,3) */
- propIds?: string;
- /** 单位 */
- unit?: string;
- /** 0:主服务1:待定 */
- type?: number;
- /** 概述 */
- overview?: string;
- /** 库存 */
- stocks?: number;
- /** 总库存是0 无线库存是1 */
- stocksFlg?: number;
- /** 锁定库存数 */
- stocksLockNum?: number;
- /** 预警库存 */
- warnStocks?: number;
- /** 库存扣款时机0:付款扣1:下单扣 */
- stocksType?: number;
- /** sku编码 */
- skuCode?: string;
- /** 商品条形码 */
- modelId?: string;
- /** sku图片 */
- pic?: string;
- /** sku名称 */
- skuName?: string;
- /** 商品名称 */
- prodName?: string;
- /** 版本号 */
- version?: number;
- /** 商品重量 */
- weight?: number;
- /** 商品体积 */
- volume?: number;
- /** 0 禁用 1 启用 */
- status?: number;
- /** 最小购买数量 */
- moq?: number;
- /** 是否上下架0下架1上架 */
- isShelf?: number;
- /** 是否默认规则0否1是 */
- isSpecs?: number;
- /** 扩展服务表单id */
- formId?: number;
- /** 扩展服务表单id */
- isExist?: number;
- /** 删除时间 */
- deleteTime?: string;
- };
-
- type SkuExtendVO = {
- /** 表单名称 */
- skuFormName?: string;
- /** 遗体接运车辆配置0关1开 */
- transportCarSwitch?: number;
- /** 遗体接运扩展服务配置 */
- transportCarList?: SkuServiceDetailsDO[];
- /** 遗体接运服务物料 */
- transportCarMaterialList?: SkuServiceMaterialDO[];
- /** 遗体运输目的地配置0关1开 */
- trafficSwitch?: number;
- /** 遗体运输目的地配置 */
- trafficList?: SkuServiceTransportDO[];
- /** 遗体运输目的地物料 */
- trafficMaterialList?: SkuServiceMaterialDO[];
- /** 遗体清洁配置0关1开 */
- cleanSwitch?: number;
- /** 遗体清洁配置 */
- cleanList?: SkuServiceDetailsDO[];
- /** 遗体清洁物料 */
- cleanMaterialList?: SkuServiceMaterialDO[];
- /** 追思告别配置0关1开 */
- reflectionSwitch?: number;
- /** 追思告别配置 */
- reflectionList?: SkuServiceDetailsDO[];
- /** 追思告别物料 */
- reflectionMaterialList?: SkuServiceMaterialDO[];
- /** 遗体火化配置0关1开 */
- cremationSwitch?: number;
- /** 遗体火化配置 */
- cremationList?: SkuServiceDetailsDO[];
- /** 遗体火化物料 */
- cremationMaterialList?: SkuServiceMaterialDO[];
- /** 骨灰处理配置0关1开 */
- ashProcessingSwitch?: number;
- /** 骨灰处理配置 */
- ashProcessingList?: SkuServiceDetailsDO[];
- /** 骨灰处理配送方式配置 */
- ashProcessingDeliverList?: SkuServiceDeliverDO[];
- /** 骨灰处理物料 */
- ashProcessingMaterialList?: SkuServiceMaterialDO[];
- /** 骨灰装殓配置0关1开 */
- boneashSwitch?: number;
- /** 骨灰装殓配置 */
- boneashList?: SkuServiceDetailsDO[];
- /** 纪念品配置0关1开 */
- souvenirSwitch?: number;
- /** 纪念品配置 */
- souvenirList?: SkuServiceDetailsDO[];
- /** 纪念品配送方式配置 */
- souvenirDeliverList?: SkuServiceDeliverDO[];
- };
-
- type SkuPropInfoVO = {
- /** 产品id */
- prodId?: number;
- /** 是否显示失效规格值 0否1是 */
- isExpire?: number;
- /** 是否显示禁用规格值 0否1是 */
- isDisable?: number;
- /** 规格 */
- prodPropSaveReqVO?: ProdPropDO[];
- };
-
- type SkuPropVO = {
- /** 产品id */
- prodId?: number;
- /** 是否显示失效规格值 0否1是 */
- isExpire?: number;
- /** 是否显示禁用规格值 0否1是 */
- isDisable?: number;
- /** sku列表 */
- skuList?: SkuDO[];
- /** 规格 */
- prodPropSaveReqVO?: ProdPropSaveReqVO[];
- };
-
- type SkuRecycleBinVO = {
- /** 单品ID */
- skuId?: number;
- /** 是否显示失效规格值 0否1是 */
- properties?: string;
- /** 是否显示失效规格值 0否1是 */
- skuName?: string;
- /** 还剩多少天 */
- remainingDays?: number;
- /** 删除时间 */
- deleteTime?: string;
- /** 商品ID */
- prodId?: number;
- /** 别名 */
- alias?: string;
- /** 当前价格 */
- price?: number;
- /** 基准价 */
- basePrice?: number;
- /** 最低价格 */
- minPrice?: number;
- /** 最高价格 */
- maxPrice?: number;
- /** 成本价 */
- originalPrice?: number;
- /** 市场价 */
- marketPrice?: number;
- /** 单位 */
- unit?: string;
- /** 0:主服务1:待定 */
- type?: number;
- /** 概述 */
- overview?: string;
- /** 库存 */
- stocks?: number;
- /** 总库存是0 无线库存是1 */
- stocksFlg?: number;
- /** 锁定库存数 */
- stocksLockNum?: number;
- /** 预警库存 */
- warnStocks?: number;
- /** 库存扣款时机0:付款扣1:下单扣 */
- stocksType?: boolean;
- /** sku编码 */
- skuCode?: string;
- /** 商品条形码 */
- modelId?: string;
- /** sku图片 */
- pic?: string;
- /** 商品名称 */
- prodName?: string;
- /** 版本号 */
- version?: number;
- /** 商品重量 */
- weight?: number;
- /** 商品体积 */
- volume?: number;
- /** 0 禁用 1 启用 */
- status?: number;
- /** 0 正常 1 已被删除 */
- isDelete?: number;
- /** 最小购买数量 */
- moq?: number;
- /** 创建时间 */
- createTime?: string;
- /** 是否上下架0下架1上架 */
- isShelf?: number;
- /** 是否默认规则0否1是 */
- isSpecs?: number;
- /** 服务内容 */
- serviceContent?: string;
- /** 规格id 多个用逗号分隔(1,2,3) */
- propIds?: string;
- };
-
- type SkuRespVO = {
- /** 单品ID */
- skuId?: number;
- /** 商品ID */
- prodId?: number;
- /** 销售属性组合字符串 格式是p1:v1;p2:v2 */
- properties?: string;
- /** 别名 */
- alias?: string;
- /** 价格 */
- price?: number;
- /** 基准价 */
- basePrice?: number;
- /** 最低价格 */
- minPrice?: number;
- /** 最高价格 */
- maxPrice?: number;
- /** 成本价 */
- originalPrice?: number;
- /** 市场价 */
- marketPrice?: number;
- /** 单位 */
- unit?: string;
- /** 0:主服务1:待定 */
- type?: number;
- /** 概述 */
- overview?: string;
- /** 库存 */
- stocks?: number;
- /** 总库存是0 无线库存是1 */
- stocksFlg?: number;
- /** 锁定库存数 */
- stocksLockNum?: number;
- /** 预警库存 */
- warnStocks?: number;
- /** 库存扣款时机0:付款扣1:下单扣 */
- stocksType?: boolean;
- /** sku编码 */
- skuCode?: string;
- /** 商品条形码 */
- modelId?: string;
- /** sku图片 */
- pic?: string;
- /** sku名称 */
- skuName?: string;
- /** 商品名称 */
- prodName?: string;
- /** 版本号 */
- version?: number;
- /** 商品重量 */
- weight?: number;
- /** 商品体积 */
- volume?: number;
- /** 0 禁用 1 启用 */
- status?: number;
- /** 0 正常 1 已被删除 */
- isDelete?: number;
- /** 最小购买数量 */
- moq?: number;
- /** 创建时间 */
- createTime?: string;
- /** 是否上下架0下架1上架 */
- isShelf?: number;
- /** 是否默认规则0否1是 */
- isSpecs?: number;
- /** 服务内容 */
- serviceContent?: string;
- /** 规格id 多个用逗号分隔(1,2,3) */
- propIds?: string;
- };
-
- type SkuSaveReqVO = {
- /** 单品ID */
- skuId?: number;
- /** 商品ID */
- prodId?: number;
- /** 销售属性组合字符串 格式是p1:v1;p2:v2 */
- properties?: string;
- /** 别名 */
- alias?: string;
- /** 价格 */
- price?: number;
- /** 基准价 */
- basePrice?: number;
- /** 最低价格 */
- minPrice?: number;
- /** 最高价格 */
- maxPrice?: number;
- /** 成本价 */
- originalPrice?: number;
- /** 市场价 */
- marketPrice?: number;
- /** 单位 */
- unit?: string;
- /** 0:主服务1:待定 */
- type?: number;
- /** 概述 */
- overview?: string;
- /** 库存 */
- stocks?: number;
- /** 总库存是0 无线库存是1 */
- stocksFlg?: number;
- /** 锁定库存数 */
- stocksLockNum?: number;
- /** 预警库存 */
- warnStocks?: number;
- /** 库存扣款时机0:付款扣1:下单扣 */
- stocksType?: boolean;
- /** sku编码 */
- skuCode?: string;
- /** 商品条形码 */
- modelId?: string;
- /** sku图片 */
- pic?: string;
- /** sku名称 */
- skuName?: string;
- /** 商品名称 */
- prodName?: string;
- /** 版本号 */
- version?: number;
- /** 商品重量 */
- weight?: number;
- /** 商品体积 */
- volume?: number;
- /** 0 禁用 1 启用 */
- status?: number;
- /** 0 正常 1 已被删除 */
- isDelete?: number;
- /** 最小购买数量 */
- moq?: number;
- /** 是否默认规则0否1是 */
- isSpecs?: number;
- /** 扩展服务表单id */
- formId?: number;
- /** 服务内容 */
- serviceContent?: string;
- /** 规格id 多个用逗号分隔(1,2,3) */
- propIds?: string;
- };
-
- type SkuServiceDeliverDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 服务遗体运输唯一标识符 */
- id?: number;
- /** 关联的扩展服务ID */
- serviceId?: number;
- /** 交互方式0:快递物流 1:到店自提 2:商家自送 */
- type?: number;
- /** 价格 */
- price?: number;
- /** 是否收费0:免费1收费 */
- isCharge?: number;
- /** 详细地址 */
- address?: string;
- /** 省 */
- province?: string;
- /** 市 */
- city?: string;
- /** 区 */
- area?: string;
- /** 电话号码 */
- tel?: string;
- };
-
- type SkuServiceDetailsDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 服务详情的唯一标识符 */
- id?: number;
- /** 关联的扩展服务ID */
- serviceId?: number;
- /** 图片 */
- pic?: string;
- /** 名称 */
- name?: string;
- /** 价格 */
- price?: number;
- /** 是否收费0:免费1收费 */
- isCharge?: number;
- /** 是否默认值0否1是 */
- isDefault?: number;
- /** 类型:0:配置信息1:交付方式 */
- type?: number;
- /** 地点 */
- adress?: string;
- /** 触发节点名称 */
- triggerName?: string;
- /** 触发节点id(或关联节点) */
- triggerId?: number;
- /** 是否并行0串行1并行 */
- isParallel?: number;
- /** 描述 */
- describeContent?: string;
- };
-
- type SkuServiceMaterialDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 服务物料的唯一标识符 */
- id?: number;
- /** 关联的扩展服务ID */
- serviceId?: number;
- /** 名称 */
- name?: string;
- /** 描述 */
- describeContent?: string;
- };
-
- type SkuServiceTransportDO = {
- /** 创建时间 */
- createTime?: string;
- /** 最后更新时间 */
- updateTime?: string;
- /** 创建者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- creator?: string;
- /** 更新者,目前使用 SysUser 的 id 编号
-
-使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。 */
- updater?: string;
- /** 是否删除 */
- deleted?: number;
- /** 服务遗体运输唯一标识符 */
- id?: number;
- /** 关联的扩展服务ID */
- serviceId?: number;
- /** 联系人 */
- contacts?: string;
- /** 详细地址 */
- address?: string;
- /** 省 */
- province?: string;
- /** 市 */
- city?: string;
- /** 区 */
- area?: string;
- /** 电话号码 */
- tel?: string;
- };
-
- type TimeBookVO = {
- /** 预约时段设置 */
- reservationTimeSlots?: string[];
- /** 时间段 */
- timeSlot?: number;
- };
-
- type TradeOrderDeliveryReqVO = {
- /** 订单编号 - 必填,示例:1024 */
- id: number;
- /** 发货物流公司编号,示例:1 */
- logisticsId: number;
- /** 发货物流单号,示例:SF123456789 */
- logisticsNo?: string;
- };
-
- type TradeOrderDetailRespVO = {
- /** 订单编号 - 必填,示例:1024 */
- id?: number;
- /** 订单流水号 - 必填,示例:1146347329394184195 */
- orderNum?: string;
- /** 下单时间 - 必填 */
- createTime?: string;
- /** 订单类型 - 必填,示例:1 */
- type?: number;
- /** 订单来源 - 必填,示例:1 */
- terminal?: number;
- /** 用户编号 - 必填,示例:2048 */
- userId?: number;
- /** 用户 IP - 必填,示例:127.0.0.1 */
- userIp?: string;
- /** 用户备注 - 必填,示例:你猜 */
- userRemark?: string;
- /** 订单状态 - 必填,示例:1 */
- status?: number;
- /** 购买的商品数量 - 必填,示例:10 */
- productCount?: number;
- /** 订单完成时间 */
- finishTime?: string;
- /** 订单取消时间 */
- cancelTime?: string;
- /** 取消类型,示例:10 */
- cancelType?: number;
- /** 商家备注,示例:你猜一下 */
- remark?: string;
- /** 支付订单编号 - 必填,示例:1024 */
- payOrderId?: number;
- /** 是否已支付 - 必填,示例:true */
- payStatus?: boolean;
- /** 付款时间 */
- payTime?: string;
- /** 支付渠道 - 必填,示例:wx_lite */
- payChannelCode?: string;
- /** 商品原价(总) - 必填,示例:1000 */
- totalPrice?: number;
- /** 订单优惠(总) - 必填,示例:100 */
- discountPrice?: number;
- /** 运费金额 - 必填,示例:100 */
- deliveryPrice?: number;
- /** 订单调价(总) - 必填,示例:100 */
- adjustPrice?: number;
- /** 应付金额(总) - 必填,示例:1000 */
- payPrice?: number;
- /** 配送方式,示例:10 */
- deliveryType?: number;
- /** 自提门店,示例:10 */
- pickUpStoreId?: number;
- /** 自提核销码,示例:10 */
- pickUpVerifyCode?: number;
- /** 配送模板编号,示例:1024 */
- deliveryTemplateId?: number;
- /** 发货物流公司编号,示例:1024 */
- logisticsId?: number;
- /** 发货物流单号,示例:1024 */
- logisticsNo?: string;
- /** 发货时间 */
- deliveryTime?: string;
- /** 收货时间 */
- receiveTime?: string;
- /** 收件人名称 - 必填,示例:张三 */
- receiverName?: string;
- /** 收件人手机 - 必填,示例:13800138000 */
- receiverMobile?: string;
- /** 收件人地区编号 - 必填,示例:110000 */
- receiverAreaId?: number;
- /** 收件人详细地址 - 必填,示例:中关村大街 1 号 */
- receiverDetailAddress?: string;
- /** 售后状态,示例:1 */
- afterSaleStatus?: number;
- /** 退款金额 - 必填,示例:100 */
- refundPrice?: number;
- /** 优惠劵编号,示例:1024 */
- couponId?: number;
- /** 优惠劵减免金额 - 必填,示例:100 */
- couponPrice?: number;
- /** 积分抵扣的金额 - 必填,示例:100 */
- pointPrice?: number;
- /** VIP 减免金额 - 必填,示例:888 */
- vipPrice?: number;
- /** 推广人编号,示例:1 */
- brokerageUserId?: number;
- /** 订单项列表 */
- items?: Item1[];
- /** 下单用户信息 */
- user?: MemberUserRespVO;
- /** 推广用户信息 */
- brokerageUser?: MemberUserRespVO;
- /** 操作日志列表 */
- logs?: OrderLog[];
- /** 收件人地区名字 - 必填,示例:上海 上海市 普陀区 */
- receiverAreaName?: string;
- };
-
- type TradeOrderPageItemRespVO = {
- /** 订单编号 - 必填,示例:1024 */
- id?: number;
- /** 订单流水号 - 必填,示例:1146347329394184195 */
- orderNum?: string;
- /** 下单时间 - 必填 */
- createTime?: string;
- /** 订单类型 - 必填,示例:1 */
- type?: number;
- /** 订单来源 - 必填,示例:1 */
- terminal?: number;
- /** 用户编号 - 必填,示例:2048 */
- userId?: number;
- /** 用户 IP - 必填,示例:127.0.0.1 */
- userIp?: string;
- /** 用户备注 - 必填,示例:你猜 */
- userRemark?: string;
- /** 订单状态 - 必填,示例:1 */
- status?: number;
- /** 购买的商品数量 - 必填,示例:10 */
- productCount?: number;
- /** 订单完成时间 */
- finishTime?: string;
- /** 订单取消时间 */
- cancelTime?: string;
- /** 取消类型,示例:10 */
- cancelType?: number;
- /** 商家备注,示例:你猜一下 */
- remark?: string;
- /** 支付订单编号 - 必填,示例:1024 */
- payOrderId?: number;
- /** 是否已支付 - 必填,示例:true */
- payStatus?: boolean;
- /** 付款时间 */
- payTime?: string;
- /** 支付渠道 - 必填,示例:wx_lite */
- payChannelCode?: string;
- /** 商品原价(总) - 必填,示例:1000 */
- totalPrice?: number;
- /** 订单优惠(总) - 必填,示例:100 */
- discountPrice?: number;
- /** 运费金额 - 必填,示例:100 */
- deliveryPrice?: number;
- /** 订单调价(总) - 必填,示例:100 */
- adjustPrice?: number;
- /** 应付金额(总) - 必填,示例:1000 */
- payPrice?: number;
- /** 配送方式,示例:10 */
- deliveryType?: number;
- /** 自提门店,示例:10 */
- pickUpStoreId?: number;
- /** 自提核销码,示例:10 */
- pickUpVerifyCode?: number;
- /** 配送模板编号,示例:1024 */
- deliveryTemplateId?: number;
- /** 发货物流公司编号,示例:1024 */
- logisticsId?: number;
- /** 发货物流单号,示例:1024 */
- logisticsNo?: string;
- /** 发货时间 */
- deliveryTime?: string;
- /** 收货时间 */
- receiveTime?: string;
- /** 收件人名称 - 必填,示例:张三 */
- receiverName?: string;
- /** 收件人手机 - 必填,示例:13800138000 */
- receiverMobile?: string;
- /** 收件人地区编号 - 必填,示例:110000 */
- receiverAreaId?: number;
- /** 收件人详细地址 - 必填,示例:中关村大街 1 号 */
- receiverDetailAddress?: string;
- /** 售后状态,示例:1 */
- afterSaleStatus?: number;
- /** 退款金额 - 必填,示例:100 */
- refundPrice?: number;
- /** 优惠劵编号,示例:1024 */
- couponId?: number;
- /** 优惠劵减免金额 - 必填,示例:100 */
- couponPrice?: number;
- /** 积分抵扣的金额 - 必填,示例:100 */
- pointPrice?: number;
- /** VIP 减免金额 - 必填,示例:888 */
- vipPrice?: number;
- /** 推广人编号,示例:1 */
- brokerageUserId?: number;
- /** 收件人地区名字 - 必填,示例:上海 上海市 普陀区 */
- receiverAreaName?: string;
- /** 订单项列表 - 必填 */
- items?: Item[];
- /** 用户信息 - 必填 */
- user?: MemberUserRespVO;
- /** 推广人信息 */
- brokerageUser?: MemberUserRespVO;
- };
-
- type TradeOrderRemarkReqVO = {
- /** 订单编号 - 必填,示例:1024 */
- id: number;
- /** 商家备注,示例:你猜一下 */
- remark: string;
- };
-
- type TradeOrderSummaryRespVO = {
- /** 订单数量 - 必填,示例:1024 */
- orderCount?: number;
- /** 订单金额 - 必填,示例:1024 */
- orderPayPrice?: number;
- /** 退款单数 - 必填,示例:1024 */
- afterSaleCount?: number;
- /** 退款金额 - 必填,示例:1024 */
- afterSalePrice?: number;
- };
-
- type TradeOrderUpdateAddressReqVO = {
- /** 订单编号 - 必填,示例:1 */
- id: number;
- /** 收件人名称 - 必填,示例:z张三 */
- receiverName: string;
- /** 收件人手机 - 必填,示例:19988188888 */
- receiverMobile: string;
- /** 收件人地区编号 - 必填,示例:7310 */
- receiverAreaId: number;
- /** 收件人详细地址 - 必填,示例:昆明市五华区xxx小区xxx */
- receiverDetailAddress: string;
- };
-
- type TradeOrderUpdatePriceReqVO = {
- /** 订单编号 - 必填,示例:1024 */
- id: number;
- /** 订单调价,单位:分。正数,加价;负数,减价 - 必填,示例:-100 */
- adjustPrice: number;
- };
-}
diff --git a/src/services/trade/order/detail.ts b/src/services/trade/order/detail.ts
new file mode 100644
index 0000000..fd8afaf
--- /dev/null
+++ b/src/services/trade/order/detail.ts
@@ -0,0 +1,348 @@
+export interface TradeServeInfo {
+ boneInfo?: {
+ boneUrl?: string[];
+ diedReason?: string;
+ diedTime?: string;
+ petName?: string;
+ petType?: string;
+ weight?: string;
+ };
+ subInfo?: {
+ changeRule?: string;
+ merchantRemark?: string;
+ pickUpAddress?: string;
+ sendAddress?: string;
+ subOrder?: string;
+ subType?: string;
+ userRemark?: string;
+ };
+ userId?: number;
+ userMobile?: number;
+ userName?: string;
+ userNickName?: string;
+ userRemark?: string;
+}
+export interface TradeExtendCostInfo {
+ chargeType?: string; //收费方式
+ costName?: string; //超区域服务费
+ serveArea?: string; //可服务区域
+ targetArea?: string; //目标区域
+ weight?: string; //体型/体重
+ respTime?: string; //响应时间
+ respMode?: string; //响应模式
+ chargeTime?: string; //收费时段
+ payInfo?: {
+ payPrice?: string;
+ totalPrice?: string;
+ discountPrice?: string;
+ };
+ refundPrice?: string;
+ serveExtFee?: string; //服务附加费
+}
+export interface Serve {
+ count?: string;
+ handPrice?: number;
+ price?: string;
+ serveDesc?: string;
+ serveName?: string;
+ serveUrl?: string;
+}
+export interface TradeExtendServeInfo {
+ discountPrice?: string;
+ payPrice?: number;
+ refundCount?: string;
+ refundMoney?: string;
+ serve?: Serve[];
+ tempType?: number;
+ totalPrice?: string;
+ serveType?: string; //"处理方式"
+ serveTitle?: string;
+ address?: string;
+ deliveryType?: string;
+ sendUser?: string;
+ userMobile?: string;
+ receiveUser?: string;
+}
+
+export interface TradeOrderDetailRespVO {
+ /**
+ * 取消原因
+ */
+ cancelReason?: string;
+ /**
+ * 取消时间
+ */
+ cancelTime?: string;
+ /**
+ * 下单时间
+ */
+ createTime?: string;
+ /**
+ * 优惠金额
+ */
+ discountPrice?: number;
+ /**
+ * 财务状态
+ */
+ financeStatus?: number;
+ /**
+ * 订单完成时间
+ */
+ finishTime?: string;
+ /**
+ * 订单编号
+ */
+ id?: number;
+ /**
+ * 商品列表
+ */
+ items?: Item[];
+ /**
+ * 实收金额
+ */
+ livePrice?: number;
+ /**
+ * 商家备注
+ */
+ merchantRemark?: string;
+ /**
+ * 订单类目id
+ */
+ orderCategoryId?: number;
+ /**
+ * 订单类目名称
+ */
+ orderCategoryName?: string;
+ /**
+ * 订单编号
+ */
+ orderNum?: string;
+ /**
+ * 订单状态
+ * {@link TradeOrderStatusEnum#getStatus()}
+ */
+ orderStatus?: number;
+ /**
+ * 订单来源
+ * {@link TerminalEnum#getTerminal()}
+ */
+ orderTerminal?: number;
+ /**
+ * 订单类型
+ * {@link TradeOrderTypeEnum#getType()}
+ */
+ orderType?: number;
+ /**
+ * 支付渠道 (线上线下)
+ */
+ payChannelCode?: number;
+ /**
+ * 交易流水号
+ */
+ payOrderId?: string;
+ /**
+ * 实付金额
+ */
+ payPrice?: number;
+ /**
+ * 支付时间
+ */
+ payTime?: string;
+ /**
+ * 支付方式
+ */
+ payType?: number;
+ /**
+ * 订单金额
+ */
+ price?: number;
+ /**
+ * 保障状态
+ */
+ propertyStatus?: number;
+ /**
+ * 保障时间
+ */
+ propertyTime?: string;
+ /**
+ * 退款金额
+ */
+ refundPrice?: number;
+ /**
+ * 退款时间
+ */
+ refundTime?: string;
+ /**
+ * 订单状态流转记录
+ */
+ statusList?: TradeOrderStatusRespVo[];
+ /**
+ * 附加费信息(order_serve_info配置)
+ */
+ tradeExtendCostInfo?: TradeExtendCostInfo[];
+ /**
+ * 扩展服务信息(order_serve_info配置)
+ */
+ tradeExtendServeInfo?: TradeExtendServeInfo[][];
+ /**
+ * 服务信息(order_serve_info配置)
+ */
+ tradeServeInfo?: TradeServeInfo;
+ /**
+ * 用户头像
+ */
+ userAvatar?: string;
+ /**
+ * 用户编号
+ */
+ userId?: number;
+ /**
+ * 用户手机号
+ */
+ userMobile?: string;
+ /**
+ * 用户姓名
+ */
+ userName?: string;
+ /**
+ * 用户昵称
+ */
+ userNickName?: string;
+ /**
+ * 用户备注 - 必填,示例:你猜
+ */
+ userRemark?: string;
+}
+
+/**
+ * com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderDetailRespVO.Item
+ *
+ * Item
+ */
+export interface Item {
+ /**
+ * 购买数量 - 必填,示例:1
+ */
+ count?: number;
+ /**
+ * 商品优惠(总) - 必填,示例:100
+ */
+ discountPrice?: number;
+ /**
+ * 成本价
+ */
+ expensePrice?: number;
+ /**
+ * 到手价
+ */
+ handedPrice?: number;
+ /**
+ * 店铺名称
+ */
+ id?: number;
+ /**
+ * 订单类目id
+ */
+ orderCategoryId?: number;
+ /**
+ * 订单类目名称
+ */
+ orderCategoryName?: string;
+ /**
+ * 商品实付金额(总) - 必填,示例:100
+ */
+ payPrice?: number;
+ /**
+ * 商品图片 - 必填,示例:https://www.iocoder.cn/1.png
+ */
+ picUrl?: string;
+ /**
+ * 商品原价(单) - 必填,示例:100
+ */
+ price?: number;
+ /**
+ * 属性数组
+ */
+ properties?: string;
+ /**
+ * 累计退款数量
+ */
+ refundCount?: number;
+ /**
+ * 累计退款金额
+ */
+ refundPrice?: number;
+ /**
+ * 服务内容
+ */
+ serveContent?: string;
+ /**
+ * 店铺logo
+ */
+ shopLogo?: string;
+ /**
+ * 店铺名称
+ */
+ shopName?: string;
+ /**
+ * 商品 SKU 编号 - 必填,示例:1
+ */
+ skuId?: number;
+ /**
+ * 商品规格
+ */
+ skuName?: string;
+ /**
+ * 商品 SPU 编号 - 必填,示例:1
+ */
+ spuId?: number;
+ /**
+ * 商品 SPU 名称 - 必填,示例:芋道源码
+ */
+ spuName?: string;
+ /**
+ * 商品总价
+ */
+ totalPrice?: number;
+ /**
+ * 单位
+ */
+ unit?: string;
+}
+
+/**
+ * com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderStatusRespVo
+ *
+ * TradeOrderStatusRespVo
+ */
+export interface TradeOrderStatusRespVo {
+ /**
+ * 操作后状态
+ */
+ afterStatus?: number;
+ /**
+ * 操作前状态
+ */
+ beforeStatus?: number;
+ /**
+ * 订单日志信息
+ */
+ content?: string;
+ /**
+ * 订单日志信息
+ */
+ createTime?: string;
+ id?: number;
+ /**
+ * 操作类型
+ *
+ * {@link TradeOrderOperateTypeEnum}
+ */
+ operateType?: number;
+ /**
+ * 订单号
+ *
+ * 关联{@link TradeOrderDO#getId()}
+ */
+ orderId?: number;
+}
diff --git a/src/services/trade/order/index.ts b/src/services/trade/order/index.ts
index d5a3bc2..6768c55 100644
--- a/src/services/trade/order/index.ts
+++ b/src/services/trade/order/index.ts
@@ -1,425 +1,6 @@
import { request } from "@umijs/max";
-export interface TradeReq {
- /**
- * 售后状态,示例:1
- */
- afterSaleStatus?: number;
- /**
- * 创建时间
- */
- createTime?: string[];
- /**
- * 财务状态,示例:1
- */
- financeStatus?: number;
- /**
- * 卖家名称
- */
- merchantName?: string;
- /**
- * 订单类目id,示例:1
- */
- orderCategoryId?: number;
- /**
- * 订单状态,示例:1
- */
- orderStatus?: number;
- /**
- * 订单来源,示例:1
- */
- orderTerminal?: number;
- /**
- * 页码,从 1 开始", example = "1
- */
- pageNo?: number;
- /**
- * 每页条数,最大值为 100"
- */
- pageSize?: number;
- /**
- * 聚合检索字段(商品名称,商品id,订单号)
- */
- prodSearch?: string;
- /**
- * 创建时间
- */
- subTime?: string[];
- /**
- * 预约类型,示例:1
- */
- subType?: number;
- /**
- * 聚合检索字段 买家昵称/手机号
- */
- userSearch?: string;
-}
-export interface TradeOrderPageRespVO {
- /**
- * 购买的商品数量
- */
- count?: number;
- /**
- * 下单时间
- */
- createTime?: string;
- /**
- * 财务状态
- */
- financeStatus?: string;
- /**
- * 到手价
- */
- handedPrice?: number;
- /**
- * 订单编号
- */
- id?: number;
- /**
- * 订单类目
- */
- orderCategoryName?: string;
- /**
- * 订单流水号
- */
- orderNum?: string;
- /**
- * 订单状态
- */
- orderStatus?: number;
- /**
- * 订单来源
- */
- orderTerminal?: number;
- /**
- * 预约时间
- */
- subTime?: string;
- /**
- * 到手价
- */
- payPrice?: number;
- /**
- * 支付方式
- */
- payType?: string;
- /**
- * 商品图片
- */
- picUrl?: string;
- /**
- * 单价
- */
- price?: number;
- /**
- * 服务地址
- */
- serveAddress?: string;
- /**
- * 商品规格
- */
- skuName?: string;
- /**
- * 商品名称
- */
- spuName?: string;
- /**
- * 单位
- */
- unit?: string;
- /**
- * 用户头像
- */
- userAvatar?: string;
- /**
- * 用户编号
- */
- userId?: number;
- /**
- * 用户手机号
- */
- userMobile?: string;
- /**
- * 用户姓名
- */
- userName?: string;
- /**
- * 用户昵称
- */
- userNickName?: string;
- /**
- * 用户备注 - 必填,示例:你猜
- */
- userRemark?: string;
-}
-
-/**
- * 返回数据
- *
- * TradeOrderDetailRespVO
- */
-export interface TradeOrderDetailRespVO {
- /**
- * 附加费信息
- */
- tradeExtendCostInfo?: TradeExtendCostInfo;
- /**
- * 扩展服务信息
- */
- tradeExtendServeInfo?: TradeExtendServeInfo;
- /**
- * 基本信息
- */
- tradeOrderInfoBase?: TradeOrderBaseInfo;
- /**
- * 商品信息
- */
- tradeProductInfo?: TradeProductInfo;
- /**
- * 服务信息
- */
- tradeServeInfo?: TradeServeInfo;
- [property: string]: any;
-}
-
-/**
- * 附加费信息
- *
- * TradeExtendCostInfo
- */
-export interface TradeExtendCostInfo {
- /**
- * 内部存储动态属性的 Map,键为属性名称,值为属性值
- */
- properties?: MapObject;
- [property: string]: any;
-}
-
-/**
- * 内部存储动态属性的 Map,键为属性名称,值为属性值
- *
- * MapObject
- */
-export interface MapObject {
- key?: { [key: string]: any };
- [property: string]: any;
-}
-
-/**
- * 扩展服务信息
- *
- * TradeExtendServeInfo
- */
-export interface TradeExtendServeInfo {
- /**
- * 内部存储动态属性的 Map,键为属性名称,值为属性值
- */
- properties?: MapObject;
- [property: string]: any;
-}
-
-/**
- * 基本信息
- *
- * TradeOrderBaseInfo
- */
-export interface TradeOrderBaseInfo {
- /**
- * 取消原因
- */
- cancelReason?: string;
- /**
- * 取消时间
- */
- cancelTime?: string;
- /**
- * 创建时间
- */
- createTime?: string;
- /**
- * 优惠金额
- */
- discountPrice?: string;
- /**
- * 完成时间
- */
- finishTime?: string;
- /**
- * 订单id
- */
- id?: string;
- /**
- * 实收金额
- */
- livePrice?: string;
- /**
- * 商家备注
- */
- merchantRemark?: string;
- /**
- * 订单类目
- */
- orderCategoryId?: string;
- orderCategoryName?: string;
- /**
- * 订单编号
- */
- orderNo?: string;
- /**
- * 订单状态
- */
- orderStatus?: string;
- /**
- * 订单来源
- */
- orderTerminal?: string;
- /**
- * 订单类型
- */
- orderType?: string;
- /**
- * 支付渠道 (线上线下)
- */
- payChannelCode?: string;
- /**
- * 交易流水号
- */
- payOrderId?: string;
- /**
- * 订单金额
- */
- payPrice?: number;
- /**
- * 支付时间
- */
- payTime?: string;
- /**
- * 支付方式(支付宝微信)
- */
- payType?: string;
- /**
- * 订单总价
- */
- price?: string;
- /**
- * 保障状态
- */
- propertyStatus?: string;
- /**
- * 保障时间
- */
- propertyTime?: string;
- /**
- * 退款金额
- */
- refundPrice?: string;
- /**
- * 退款时间
- */
- refundTime?: string;
- /**
- * 用户信息
- */
- userInfo?: string;
- userAvatar?: string;
-}
-
-/**
- * 商品信息
- *
- * TradeProductInfo
- */
-export interface TradeProductInfo {
- /**
- * 购买数量
- */
- count?: number;
- /**
- * 优惠金额
- */
- discountPrice?: number;
- /**
- * 成本价
- */
- expensePrice?: number;
- /**
- * 到手价(单价 - 优惠)
- */
- handedPrice?: number;
- /**
- * 实付金额
- */
- payPrice?: number;
- /**
- * 商品单价
- */
- price?: number;
- /**
- * 保障
- */
- properties?: string[];
- /**
- * 累计退款数量
- */
- refundCount?: number;
- /**
- * 累计退款金额
- */
- refundPrice?: number;
- /**
- * 服务内容
- */
- serveContent?: string;
- /**
- * 店铺log
- */
- shopLogoUrl?: string;
- /**
- * 店铺名称
- */
- shopName?: string;
- /**
- * skuid
- */
- skuId?: number;
- /**
- * 商品规格
- */
- skuName?: string;
- /**
- * 商品规格图
- */
- skuPicUrl?: string;
- /**
- * 商品id
- */
- spuId?: number;
- /**
- * 商品名称
- */
- spuName?: string;
- /**
- * 商品总价
- */
- totalPrice?: number;
- /**
- * 商品单位
- */
- unit?: string;
- [property: string]: any;
-}
-
-/**
- * 服务信息
- *
- * TradeServeInfo
- */
-export interface TradeServeInfo {
- /**
- * 内部存储动态属性的 Map,键为属性名称,值为属性值
- */
- properties?: MapObject;
- [property: string]: any;
-}
+import { TradeOrderPageRespVO, TradeReq } from "./list";
+import { TradeOrderDetailRespVO } from "./detail";
export const getTradeOrderPage = async (params: TradeReq) => {
return request>("/trade/order/page", {
@@ -429,8 +10,10 @@ export const getTradeOrderPage = async (params: TradeReq) => {
};
export const getTradeOrderDetail = async (id: number) => {
- return request>("/trade/order/get-detail", {
+ return request("/trade/order/get-detail", {
method: "GET",
params: { id },
});
};
+
+export { TradeOrderPageRespVO, TradeOrderDetailRespVO, TradeReq };
diff --git a/src/services/trade/order/list.ts b/src/services/trade/order/list.ts
new file mode 100644
index 0000000..997eb09
--- /dev/null
+++ b/src/services/trade/order/list.ts
@@ -0,0 +1,194 @@
+/**
+ * CommonResultPageResultTradeOrderPageRespVO
+ */
+
+/**
+ * com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderPageRespVO
+ *
+ * TradeOrderPageRespVO
+ */
+export interface TradeOrderPageRespVO {
+ serveAddress?: string;
+ subTime?: string;
+ payPrice?: string;
+ payType?: string;
+ financeStatus?: string;
+ /**
+ * 下单时间
+ */
+ createTime?: string;
+ /**
+ * 订单完成时间
+ */
+ finishTime?: string;
+ /**
+ * 订单编号
+ */
+ id?: number;
+ /**
+ * 订单项列表
+ */
+ items?: Item[];
+ /**
+ * 订单流水号
+ */
+ orderNum?: string;
+ /**
+ * 订单状态
+ */
+ orderStatus?: number;
+ /**
+ * 订单来源
+ */
+ orderTerminal?: number;
+ /**
+ * 订单类型
+ * {@link TradeOrderTypeEnum#getType()}
+ */
+ orderType?: number;
+ /**
+ * 支付剩余时间
+ */
+ payLastTime?: string;
+ /**
+ * 店铺log
+ */
+ shopLogo?: string;
+ /**
+ * 店铺名称
+ */
+ shopName?: string;
+ /**
+ * 用户头像
+ */
+ userAvatar?: string;
+ /**
+ * 用户编号
+ */
+ userId?: number;
+ /**
+ * 用户手机号
+ */
+ userMobile?: string;
+ /**
+ * 用户姓名
+ */
+ userName?: string;
+ /**
+ * 用户昵称
+ */
+ userNickName?: string;
+ /**
+ * 用户备注 - 必填,示例:你猜
+ */
+ userRemark?: string;
+}
+
+/**
+ * com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderPageRespVO.Item
+ *
+ * Item
+ */
+export interface Item {
+ id?: number;
+ /**
+ *
+ * 购买数量 - 必填,示例:1
+ */
+ count?: number;
+ /**
+ * 商品优惠(总) - 必填,示例:100
+ */
+ discountPrice?: number;
+ /**
+ * 到手价
+ */
+ handedPrice?: number;
+ /**
+ * 商品实付金额(总) - 必填,示例:100
+ */
+ payPrice?: number;
+ /**
+ * 商品图片 - 必填,示例:https://www.iocoder.cn/1.png
+ */
+ picUrl?: string;
+ /**
+ * 商品原价(单) - 必填,示例:100
+ */
+ price?: number;
+ /**
+ * 服务地址
+ */
+ serveAddress?: string;
+ /**
+ * 商品规格
+ */
+ skuName?: string;
+ /**
+ * 商品 SPU 名称 - 必填,示例:芋道源码
+ */
+ spuName?: string;
+ /**
+ * 预约时间
+ */
+ subTime?: string;
+ /**
+ * 单位
+ */
+ unit?: string;
+}
+
+export interface TradeReq {
+ /**
+ * 售后状态,示例:1
+ */
+ afterSaleStatus?: number;
+ /**
+ * 创建时间
+ */
+ createTime?: string[];
+ /**
+ * 财务状态,示例:1
+ */
+ financeStatus?: number;
+ /**
+ * 卖家名称
+ */
+ merchantName?: string;
+ /**
+ * 订单类目id,示例:1
+ */
+ orderCategoryId?: number;
+ /**
+ * 订单状态,示例:1
+ */
+ orderStatus?: number;
+ /**
+ * 订单来源,示例:1
+ */
+ orderTerminal?: number;
+ /**
+ * 页码,从 1 开始", example = "1
+ */
+ pageNo: number;
+ /**
+ * 每页条数,最大值为 100"
+ */
+ pageSize: number;
+ /**
+ * 聚合检索字段(商品名称,商品id,订单号)
+ */
+ prodSearch?: string;
+ /**
+ * 创建时间
+ */
+ subTime?: string[];
+ /**
+ * 预约类型,示例:1
+ */
+ subType?: number;
+ /**
+ * 聚合检索字段 买家昵称/手机号
+ */
+ userSearch?: string;
+}
diff --git a/src/typings.d.ts b/src/typings.d.ts
index 80b3c8f..e1c2a79 100644
--- a/src/typings.d.ts
+++ b/src/typings.d.ts
@@ -14,3 +14,4 @@ declare module 'omit.js';
declare module 'numeral';
declare module 'mockjs';
declare module 'react-fittext';
+declare module 'react-video-thumbnail';
diff --git a/src/utils/menuUtils.tsx b/src/utils/menuUtils.tsx
index b76ecd6..a1745ee 100644
--- a/src/utils/menuUtils.tsx
+++ b/src/utils/menuUtils.tsx
@@ -1,12 +1,11 @@
-import { Navigate } from '@umijs/max';
import { Spin } from 'antd';
import React from 'react';
+import type { MenuVO } from '@/services/system/menu';
-export const loopMenuItem = (menus: any[], pId: number | string): any[] => {
- // console.log(menus, "menus");
- return menus.flatMap((item) => {
+export const loopMenuItem = (menus: MenuVO[], pId: number | string): any[] => {
+ return menus.map((item) => {
let Component: React.ComponentType | null = null;
- if (item.component && item.component.length > 0) {
+ if (item.component && item.component.trim().length > 0) {
// 防止配置了路由,但本地暂未添加对应的页面,产生的错误
Component = React.lazy(() => {
const importComponent = () => import(`@/pages/${item.component}`);
@@ -14,56 +13,106 @@ export const loopMenuItem = (menus: any[], pId: number | string): any[] => {
return importComponent().catch(import404);
});
}
- if (item.children && item.children.length > 0) {
- return [
- {
- path: item.path,
- name: item.name,
- // icon: item.icon,
- id: item.id,
- parentId: pId,
- children: [
- {
- path: item.path,
- element: (
-
- ),
- },
- ...loopMenuItem(item.children, item.menuID),
- ],
- },
- ];
- } else {
- return [
- {
- path: item.path,
- name: item.name,
- // icon: item.icon,
- id: item.menuID,
- parentId: pId,
- element: (
- }
- >
- {Component && }
-
- ),
- children: [], // 添加缺失的 children 属性
- },
- ];
+
+ const routeItem: any = {
+ path: item.path,
+ name: item.name,
+ icon: '',
+ id: item.id,
+ parentId: pId,
+ hideInMenu: !item.visible,
+ children: [],
+ };
+
+ // 只有当 Component 存在时才添加 element 属性
+ if (Component) {
+ routeItem.element = (
+ }
+ >
+
+
+ );
+ } else if (item.children && item.children.length > 0) {
+ // routeItem.redirect = "/prod/list";
+ // // 只有当没有 Component 但有子菜单时,才添加重定向
+ // const firstLeafPath = getFirstLeafPath(item.children);
+ // // 确保 firstLeafPath 存在,且不是一个会导致循环的路径
+ // if (
+ // firstLeafPath &&
+ // firstLeafPath !== item.path &&
+ // firstLeafPath.length > 0
+ // ) {
+ // // 在 UmiJS 中,路径是相对的,不需要构建完整路径
+ // const separator =
+ // item.path.endsWith("/") || firstLeafPath.startsWith("/") ? "" : "/";
+ // const fullPath = `${item.path}${separator}${firstLeafPath}`;
+ // console.log(`Redirecting from ${item.path} to ${fullPath}`);
+ // routeItem.element = ;
+ // }
}
+ // 处理子菜单
+ if (item.children && item.children.length > 0) {
+ routeItem.children = loopMenuItem(item.children, item.id);
+ }
+
+ return routeItem;
});
};
-function getFirstLeafPath(menus: any[], parentPath: string): string {
- const firstMenu = menus[0];
- const currentPath = `${parentPath}/${firstMenu.path}`;
- if (firstMenu.children && firstMenu.children.length > 0) {
- return getFirstLeafPath(firstMenu.children, currentPath);
- } else {
- return currentPath;
- }
-}
+// return menus.flatMap((item) => {
+// let Component: React.ComponentType | null = null;
+// if (item.component && item.component.length > 0) {
+// // 防止配置了路由,但本地暂未添加对应的页面,产生的错误
+// Component = React.lazy(() => {
+// const importComponent = () => import(`@/pages/${item.component}`);
+// const import404 = () => import("@/pages/404");
+// return importComponent().catch(import404);
+// });
+// }
+// if (item.children && item.children.length > 0) {
+// return [
+// {
+// path: item.path,
+// hideInMenu: false,
+// parentId: pId,
+// id: item.id,
+// children: [...loopMenuItem(item.children, item.id)], // 添加缺失的 children 属性
+// },
+// ];
+// } else {
+// return [
+// {
+// path: item.path,
+// name: item.name,
+// // icon: item.icon,
+// id: item.id,
+// parentId: pId,
+// hideInMenu: !item.visible,
+// element: (
+// }
+// >
+// {Component && }
+//
+// ),
+// },
+// ];
+// }
+// });
+// return [];
+// };
+
+// function getFirstLeafPath(menus: any[], parentPath: string): string {
+// const firstMenu = menus[0];
+// const currentPath = `${parentPath}/${firstMenu.path}`;
+// if (firstMenu.children && firstMenu.children.length > 0) {
+// if (!firstMenu.hideInMenu) {
+// return getFirstLeafPath(firstMenu.children, currentPath);
+// } else {
+// return getFirstLeafPath(firstMenu.children, parentPath);
+// }
+// } else {
+// return currentPath;
+// }
+// }