diff --git a/.workbuddy/memory/2026-07-28.md b/.workbuddy/memory/2026-07-28.md new file mode 100644 index 0000000..4b83cf5 --- /dev/null +++ b/.workbuddy/memory/2026-07-28.md @@ -0,0 +1,6 @@ +# 2026-07-28 + +## 订单列表操作列分隔线对齐 shopGoods +- 文件:`src/views/shop/shopOrder/index.vue` 的 `column.key === 'action'` 操作列模板。 +- 改动:原本操作列按钮只用 `` 包裹、无分隔线;现按 `shop/shopGoods` 的写法,在「详情」与各条件块之间、以及块内多个按钮之间加入 ``。 +- 分隔线放在各 ` @@ -400,16 +431,6 @@ } from 'ele-admin-pro/es/ele-pro-table/types'; import { ExclamationCircleOutlined, - EyeOutlined, - EditOutlined, - CloseOutlined, - SendOutlined, - UndoOutlined, - CheckOutlined, - CheckCircleOutlined, - CloseCircleOutlined, - RedoOutlined, - DeleteOutlined, InfoCircleOutlined } from '@ant-design/icons-vue'; import Search from './components/search.vue'; @@ -457,6 +478,24 @@ validTabs.includes(tabFromQuery) ? tabFromQuery : 'all' ); + // 商品明细展开状态:记录已展开商品明细的订单 orderId + const expandedOrderIds = ref>(new Set()); + // 商品明细默认折叠时显示的条数 + const collapsedGoodsCount = 2; + // 当前订单的商品明细是否已展开 + const isOrderGoodsExpanded = (record: ShopOrder) => + expandedOrderIds.value.has(String(record.orderId)); + // 切换订单商品明细的展开/收起 + const toggleOrderGoodsExpanded = (record: ShopOrder) => { + const next = new Set(expandedOrderIds.value); + if (next.has(String(record.orderId))) { + next.delete(String(record.orderId)); + } else { + next.add(String(record.orderId)); + } + expandedOrderIds.value = next; + }; + // ============ 新订单提醒 ============ const { enabled: notifyEnabled, toggle: onNotifyToggle, testNotify: onTestNotify, clearBadge } = useOrderNotify({ onNewOrder: () => reload() @@ -575,9 +614,8 @@ { title: '操作', key: 'action', - width: 240, + width: 220, fixed: 'right', - align: 'center', hideInSetting: true } ]);