feat(admin): redesign order list and detail workspace
Replace the type/method tab rows with status views backed by one GROUP BY count, move filters into a single toolbar card, show gateway names, keep list context across detail and actions, and split the detail page into a summary/timeline column and an actions/buyer/note sidebar. Confirmations move to admin-orders.js; PayOrders splits into flat List/Detail traits. Remove dead code: unused Order AJAX endpoints and init(), get_orders_count(), shipping flash codes, and the legacy raw-note fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c553c7221
commit
b32b56f8bc
11 files changed
+962
-537
No files matched your search
@@ -39,7 +39,7 @@ const chargeCards = [
|
||||
'src/Admin/Native/PayChargeCardsForms.php',
|
||||
].map(read).join('\n');
|
||||
const pages = {
|
||||
orders: read('src/Admin/Native/PayOrders.php'),
|
||||
orders: ['PayOrders', 'PayOrdersList', 'PayOrdersDetail'].map((f) => read(`src/Admin/Native/${f}.php`)).join('\n'),
|
||||
products: read('src/Admin/Native/PayProducts.php'),
|
||||
coupons: read('src/Admin/Native/PayCoupons.php'),
|
||||
income: read('src/Admin/Native/PayIncome.php'),
|
||||
@@ -127,8 +127,15 @@ test('每页都在查询前夹取页码,越界时重查一次', () => {
|
||||
'卡密管理缺少越界回退'
|
||||
);
|
||||
|
||||
// 订单明细先用状态计数得出总数、夹取页码,再只查一次列表——不需要越界重查。
|
||||
assert.equal(count(pages.orders, /\$items\s*=\s*\$repo->get_orders_admin\(/g), 1, '订单明细只应查询一次列表');
|
||||
assert.ok(
|
||||
pages.orders.indexOf('get_orders_status_counts(') < pages.orders.indexOf('if ($page_num > $pages) {')
|
||||
&& pages.orders.indexOf('if ($page_num > $pages) {') < pages.orders.indexOf('$repo->get_orders_admin('),
|
||||
'订单明细必须在查询列表前完成计数与页码夹取'
|
||||
);
|
||||
|
||||
const requeries = {
|
||||
orders: [/\$items\s*=\s*\$repo->get_orders_admin\(/g],
|
||||
products: [/\$query\s*=\s*\$this->query_paid_posts\(/g],
|
||||
coupons: [/\$svc->get_list\(/g],
|
||||
income: [/\$svc->get_list\(/g],
|
||||
|
||||
Reference in new issue
Block a user