From f77fccd4bafda02bde42f9e81a0534ffa83d2d54 Mon Sep 17 00:00:00 2001 From: HHY Date: Sun, 20 Sep 2026 13:47:24 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20page=5Fsize=20=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 样板库接口 page_size 上限 le=200 → le=1000 (订单新建对话框与 AI 炫图请求 254 条触发校验失败) - el-select 清空后 status 空串归一化 (订单/合同/量尺/售后筛选不再发送 status=) - 复测 page_size=254 返回 254 条完整数据 --- CHANGELOG | 1 + frontend/src/views/AfterSaleView.vue | 2 +- frontend/src/views/ContractsView.vue | 2 +- frontend/src/views/MeasureView.vue | 2 +- frontend/src/views/OrdersView.vue | 4 +++- src/huamenchuang/api/windoor.py | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 74ac3b7..d44ed9a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ # CHANGELOG +- [2026-09-20 23:45] FIX: 修复多页面"参数错误: page_size"——样板库接口 page_size 上限 le=200 但订单新建/AI炫图请求 254 条触发校验失败, 上限放宽至 le=1000; 同步修复 el-select 清空后 status 空串导致的参数错误(订单/合同/量尺/售后筛选归一化) (Files: src/huamenchuang/api/windoor.py, frontend/src/views/OrdersView.vue, frontend/src/views/ContractsView.vue, frontend/src/views/MeasureView.vue, frontend/src/views/AfterSaleView.vue) - [2026-09-20 23:15] FEAT: v1.1 Element Plus 组件全面升级——①布局: 面包屑+用户头像下拉+公告气泡(el-badge/popover+点击外部关闭)+菜单滚动条+路由切换动效; ②工作台: el-statistic 彩色统计卡+el-skeleton 骨架屏+公告 el-carousel+快捷入口网格; ③订单: 日期范围筛选(el-date-picker daterange)+列排序+详情抽屉 el-descriptions+el-tabs(图纸/进度/日志)+el-timeline 操作日志; ④样板库: el-tree-select 分类树+el-image 大图预览+el-badge 引用徽标; ⑤客户表单校验规则; ⑥优化下料利用率 dashboard 进度环+明细 descriptions; ⑦商城去支付改功能总览(前轮); 全接口回归 13/13+SPA 路由通过 (Files: frontend/src/views/*, frontend/src/App.vue) - [2026-09-20 22:30] FEAT: v1.0 AI炫图上线+业务做实+按需裁剪+主题精致化。①AI炫图工作台(/ai_render): 自研程序化场景合成引擎(风格×时间×场景, 家具/绿植/光束/暗角, seed构图微差), 阶段化生成动画+四方案画廊+PNG下载, 渲染引擎抽为共享模块 variantRenderer; ②业务做实: 报价接入产品价格本(use_price_book按材料类别均价), 注册支持邀请码且邀请返利真实计数(User.invited_by), 报价单转订单携带图纸; ③按需裁剪: 下线短信验证码登录/支付收银接口与相关界面, 商城改为功能总览; ④主题精致化: 品牌色设计变量+Element Plus主题覆盖+卡片/登录页/滚动条视觉升级; 全接口回归通过(移除项405确认) (Files: src/huamenchuang/api/platform.py, src/huamenchuang/api/quote.py, src/huamenchuang/api/auth.py, src/huamenchuang/models/user.py, frontend/src/components/AIRenderCanvas.vue, frontend/src/components/variantRenderer.ts, frontend/src/views/AIRenderView.vue, frontend/src/views/LoginView.vue, frontend/src/views/MarketView.vue, frontend/src/views/QuotationsView.vue, frontend/src/App.vue, doc/API.md) - [2026-09-20 21:00] FIX+FEAT: v0.9 样板数据完整性验证与解析加固——①双源确认样板库完整性: search接口254条 = 画图编辑器for_ht目录内嵌254条, 0遗漏; ②全量体检发现6套样板含7个畸形段(缺ps/pe)导致解析报错, 前后端重放/算料均加固过滤(0异常/1046窗格); ③新增报表统计模块(/chart: 近N天订单数金额按日+8项总量+状态分布, 自绘SVG柱图); ④样板库官方/我的样板双Tab(is_default过滤); ⑤使用指南接入帮助文章接口(种子8篇自撰文章); ⑥seed脚本分类树幂等修复; 全接口回归18/18通过 (Files: src/huamenchuang/core/drawing.py, src/huamenchuang/api/reports.py, src/huamenchuang/api/windoor.py, src/huamenchuang/scripts/*, frontend/src/types/drawing.ts, frontend/src/views/ReportView.vue, frontend/src/views/TemplatesView.vue, frontend/src/views/GuideView.vue) diff --git a/frontend/src/views/AfterSaleView.vue b/frontend/src/views/AfterSaleView.vue index faab292..9d34b03 100644 --- a/frontend/src/views/AfterSaleView.vue +++ b/frontend/src/views/AfterSaleView.vue @@ -61,7 +61,7 @@ const form = reactive({ title: '', description: '', order_no: '' }) async function load() { loading.value = true try { - const qs = `page=${page.value}&page_size=${page_size}${status.value !== undefined ? `&status=${status.value}` : ''}` + const qs = `page=${page.value}&page_size=${page_size}${status.value !== undefined && status.value !== '' ? `&status=${status.value}` : ''}` const d = await api('get', `/api/after_sales?${qs}`) rows.value = d.data total.value = d.total diff --git a/frontend/src/views/ContractsView.vue b/frontend/src/views/ContractsView.vue index 6419b34..2f3cfae 100644 --- a/frontend/src/views/ContractsView.vue +++ b/frontend/src/views/ContractsView.vue @@ -79,7 +79,7 @@ const form = reactive({ customer_id: undefined as number | undefined, customer_n async function load() { loading.value = true try { - const d = await api('get', `/api/contracts?page=${page.value}&page_size=${page_size}&keyword=${keyword.value}${status.value !== undefined ? `&status=${status.value}` : ''}`) + const d = await api('get', `/api/contracts?page=${page.value}&page_size=${page_size}&keyword=${keyword.value}${status.value !== undefined && status.value !== '' ? `&status=${status.value}` : ''}`) rows.value = d.contracts.data total.value = d.contracts.total } finally { loading.value = false } diff --git a/frontend/src/views/MeasureView.vue b/frontend/src/views/MeasureView.vue index 6964c0a..4758477 100644 --- a/frontend/src/views/MeasureView.vue +++ b/frontend/src/views/MeasureView.vue @@ -92,7 +92,7 @@ const form = reactive({ customer_name: '', phone: '', address: '', measure_ async function load() { loading.value = true try { - const qs = `page=${page.value}&page_size=${page_size}${status.value !== undefined ? `&status=${status.value}` : ''}` + const qs = `page=${page.value}&page_size=${page_size}${status.value !== undefined && status.value !== '' ? `&status=${status.value}` : ''}` const d = await api('get', `/api/measures?${qs}`) rows.value = d.data total.value = d.total diff --git a/frontend/src/views/OrdersView.vue b/frontend/src/views/OrdersView.vue index d0ec19c..f3e03df 100644 --- a/frontend/src/views/OrdersView.vue +++ b/frontend/src/views/OrdersView.vue @@ -165,7 +165,9 @@ const loading = ref(false) async function load() { loading.value = true try { - const d = await api('post', '/api/orders/search', query) + // el-select 清空后会得到 '',归一化为 undefined 避免参数错误 + const payload = { ...query, status: query.status === '' ? undefined : query.status } + const d = await api('post', '/api/orders/search', payload) rows.value = d.data total.value = d.total } finally { loading.value = false } diff --git a/src/huamenchuang/api/windoor.py b/src/huamenchuang/api/windoor.py index d96d9e7..2c04cb6 100644 --- a/src/huamenchuang/api/windoor.py +++ b/src/huamenchuang/api/windoor.py @@ -34,7 +34,7 @@ async def search_templates( catelog_id: int | None = None, is_default: int | None = Query(default=None, description="1官方样板 0我的样板"), page: int = Query(default=1, ge=1), - page_size: int = Query(default=50, ge=1, le=200), + page_size: int = Query(default=50, ge=1, le=1000), ): """模板搜索(列表不含大字段,含平面图地址)。""" conds = [WindoorTemplate.company_id == user.company_id]