**Goal:** Redirect successful low-price submissions to `confirmOrder` and route pending-follow-up list items to the low-price create-order flow.
**Architecture:** Remove the low-price-only branch from `SubmitContext.doSubmit` and use the same post-submit navigation statement as the business-assistant reference project. Restore the reference list template's status-based target so `status == 1` uses the existing `jump` create-order pathway while other statuses remain on details.
**Architecture:** Remove the low-price-only branch from `SubmitContext.doSubmit` and use the same post-submit navigation statement as the business-assistant reference project. Restore the reference list template's status-based target and reduce `jump` to a direct router dispatch with no permission or business-gate branching.
**Tech Stack:** JavaScript ES modules, WeChat Mini Program page/router APIs, Node.js built-in test runner, npm work-order test scripts.
...
...
@@ -14,7 +14,7 @@
- Preserve `wx.$util.refreshPageData()` and the correction-order `isErrorOrder` marker.
- Pass the API response data unchanged to `confirmOrder`.
- Do not modify request payload construction, approval rules, scene defaults, or list filtering.
-Preserve the existing list `jump` access checks and pass the complete list item to the create-order route.
-Remove list `jump` access checks and pass the complete list item directly to the selected route.
- Work inline because the current repository contains related uncommitted create-order changes and delegation was not requested.
---
...
...
@@ -134,31 +134,57 @@ Do not commit the dirty integration or production files automatically because th
---
### Task 2: Route pending-follow-up list items to create order
### Task 2: Route list items directly by their status target
- Consumes: a list item `li` with numeric or string-compatible `status` and the existing `jump` event handler.
- Produces: `data-name="createOrder"` for `status == 1`; `data-name="orderDetail"` for all other statuses.
- Consumes: a list item `li` with numeric or string-compatible `status` and a `jump` event containing `dataset.name` and `dataset.item`.
- Produces: `createOrder` for `status == 1`, `confirmOrder` for `status == 3`, and `orderDetail` for other statuses; `jump` dispatches directly to `tabWorkOrder.${name}`.
-[]**Step 1: Add the failing template regression assertion**
-[]**Step 1: Add the failing navigation regression test**
Add a test that reads the list template and asserts the card target preserves the status route:
Extend `loadListPage` with a router-call capture:
```js
it('routes pending-follow-up cards to the low-price create-order page',async()=>{
@@ -167,20 +193,29 @@ it('routes pending-follow-up cards to the low-price create-order page', async ()
Run:
```powershell
node --test --test-name-pattern "routes pending-follow-up cards to the low-price create-order page" tests/work-order-migration/work-order-list-page.test.mjs
node --test --test-name-pattern "routes list cards directly by order status without permission gates" tests/work-order-migration/work-order-list-page.test.mjs
```
Expected: FAIL because the current card target is the literal `data-name="orderDetail"`.
Expected: FAIL because the current card target is the literal `data-name="orderDetail"`. The old `jump` path also cannot directly dispatch without permission state and business gates.
-[]**Step 3: Restore the status-based list target**
-[]**Step 3: Restore the status-based target and simplify `jump`**
@@ -20,17 +20,18 @@ The migrated low-price list also hard-codes every card's `data-name` to `orderDe
- For every successful non-draft submission, including low-price orders, call `wx.$router.redirectTo('confirmOrder', resData)`.
- Remove the now-unused low-price-list navigation import, helper module, and helper tests.
- Update the low-price submit integration test to assert one API call, no list back-navigation, and a `confirmOrder` redirect carrying the returned order data.
- Change the low-price list card target to `createOrder` when `li.status == 1`; keep `orderDetail` for other states.
- Continue using the existing `jump` method so its access checks and complete list item parameters remain intact.
- Add a list-template regression assertion for the pending-follow-up route mapping.
- Restore the reference card target mapping: `status == 1` uses `createOrder`, `status == 3` uses `confirmOrder`, and other states use `orderDetail`.
- Simplify `jump` to dispatch directly to `tabWorkOrder.${name}` with the complete list item.
- Remove all permission, daily-report, study-task, lock, prohibition, role, payment-type, construction, and entry-selection branching from `jump`; the card target is the sole navigation decision.
- Add list-page regression coverage for both the target mapping and direct `jump` dispatch.
## Verification
- First run the updated low-price submit test against the current implementation and verify it fails because the route remains empty and list back-navigation occurs.
- Apply the production change and verify the focused test passes.
- Run the list-page test before and after the template change to prove that a pending-follow-up item no longer targets `orderDetail`.
- Run the list-page test before and after the template and `jump` changes to prove that a pending-follow-up item no longer targets `orderDetail` and dispatch does not invoke permission gates.
- Run the complete create-order and work-order regression suites plus `git diff --check`.
## Scope
This change does not alter request payloads, approval rules, scene defaults, list filtering, draft-save behavior, API response handling, or non-pending list-item routing.
This change does not alter request payloads, approval rules, scene defaults, list filtering, draft-save behavior, or API response handling. List item navigation is intentionally reduced to its status-derived destination without legacy permission gates.