Repair / Rework
| Layer | Where |
|---|---|
| Standard flow | flow-fine-chemical-system.vercel.app/en/mes/repair-rework (flow v0.6, shared with Defect Records) |
| BRD (official basis) | FC_BRD_RepairRework_v0.2_20261013_EN.docx — repo clt-fine-chemical, folder 20_MES/BRD/RepairRework/ |
| UI prototype | ui-fine-chemical-final — menu Repair / Rework (prototype v0.91) |
1. Purpose & scope
Section titled “1. Purpose & scope”For each size that has Pending repair (PR) goods in the processes after Injection, the system opens an RW record that carries the LOT, WO, SO and pair quantity. The repair team reworks the goods and QC records Repaired OK, Downgrade to A- and Scrap with the Root Cause. The system sets the record status, moves repaired goods to the Repair Inv List of the next process, books A- goods to Common Stock, books Scrap as Loss and creates a make-up production demand when QC ticks Re-plan.
In scope: RW records opened from the PR quantity of Trimming Result, Process Worklist, Outsourcing Result, Packing Result Logo, Packing Result Spray · recording the repair result · setting the status, viewing closed records · moving goods to Repair Inv List / Common Stock / Loss / make-up demand.
Out of scope: the Defect Records screen (own BRD) · grade C goods (scrap, Defect Records only) · where repaired goods of Stitching · Pending repair and Packing Logo · Pending repair go (not yet defined) · manual records, editing/reversing closed records, Supervisor approval · planning at Step 2 (belongs to the Planning BRDs).
2. Roles
Section titled “2. Roles”| Role | Work |
|---|---|
| QC | Filters and opens PENDING records, enters Repaired OK / Downgrade to A- / Scrap / Repaired By / Repair Time (min), chooses the Root Cause, ticks Re-plan when a make-up is needed, clicks Save Result. Views closed records with View. |
| Operator (Repair team) | Repairs goods in the repair area and hands them back to QC. No screen action. |
| System | Opens records from PR, checks the total and Root Cause, sets the status, books Repair Inv List / Common Stock / Loss / make-up demand. |
| Planner | Picks repaired goods at Step 2 of Outsourcing Planning, Packing Planning Logo, Packing Planning Spray. No action on the Repair / Rework screen. |
3. Main flow
Section titled “3. Main flow”| # | Step |
|---|---|
| 1 | A user enters PR at a process after Injection. The system opens one RW record for each size with PR > 0, status PENDING, Source <Process> · Pending repair. Grade C goods of the same entry go to Defect Records only. |
| 2 | The repair team takes and repairs the goods (outside the system). |
| 3 | QC opens a PENDING record with Record. The Repair Result box pre-fills Repaired OK = Qty, A- = 0, Scrap = 0. |
| 4 | QC enters the quantities and chooses the Root Cause; ticks Re-plan when Scrap needs making up. |
| 5 | QC clicks Save Result. Wrong total or missing Root Cause → error, record stays PENDING. |
| 6 | The system sets REPAIRED / DOWNGRADED / SCRAPPED, locks the record, and Record becomes View. |
| 7 | The system routes each part of the goods onward (see section 7 — data created). |
4. Status lifecycle
Section titled “4. Status lifecycle”| From | To | Condition | Done by |
|---|---|---|---|
| PENDING | REPAIRED | Save Result passes and Repaired OK > 0 | System |
| PENDING | DOWNGRADED | Save Result passes, Repaired OK = 0 and Scrap < Qty | System |
| PENDING | SCRAPPED | Save Result passes and Scrap = Qty | System |
There is no way back to PENDING.
| Status | Allowed | Blocked |
|---|---|---|
| PENDING | Record, enter numbers, choose Root Cause, tick Re-plan, Save Result, Close | — |
| REPAIRED / DOWNGRADED / SCRAPPED | View, Close | Record, editing numbers, Save Result |
5. Business rules
Section titled “5. Business rules”| Code | Rule |
|---|---|
| BR-RW-01 | The system opens RW records only from the PR (Pending repair) quantity of the processes after Injection. Grade C goods are scrap on every screen, written to Defect Records only, and open no record. Daily Injection has no PR grade. |
| BR-RW-02 | Each size with PR > 0 in one entry opens exactly one record. Record Qty = PR of the size. |
| BR-RW-03 | Source has exactly five values: Trimming · Pending repair, Stitching · Pending repair, Spray Out · Pending repair, Packing Logo · Pending repair, Packing Spray · Pending repair. |
| BR-RW-04 | RW records are opened by the system only. The Sources Manual · QC and QC hold · Packing do not exist. PR goods are not written to Defect Records. |
| BR-RW-05 | Repaired OK + Downgrade to A- + Scrap = record Qty. |
| BR-RW-06 | Root Cause is required before a record is closed. |
| BR-RW-07 | Status on save: Scrap = Qty → SCRAPPED; Repaired OK > 0 → REPAIRED; otherwise → DOWNGRADED. |
| BR-RW-08 | A closed record is locked; nobody edits or saves it again. |
| BR-RW-09 | Repaired OK goods enter the Repair Inv List carrying the next process; only that process’s Plan sees the row. |
| BR-RW-10 | Repaired OK goods of Spray Out · Pending repair and Packing Spray · Pending repair go to Packing Planning Spray and do not return to Step 2 of Outsourcing Planning. |
| BR-RW-11 | Downgrade to A- goods are split from the SO and go to Common Stock. |
| BR-RW-12 | The Scrap quantity is booked as Loss. |
| BR-RW-13 | Re-plan can be ticked only while the record is PENDING, when QC saves. A save with Re-plan creates a make-up production demand for the record’s WO. |
| BR-RW-14 | The PENDING card = total Qty of PENDING records (independent of filters). |
6. Fields, validation & messages
Section titled “6. Fields, validation & messages”Repair Result box (MH-02)
| Label on screen | Type | Rule |
|---|---|---|
| REPAIRED OK (A/A-) | Input | Pre-filled = Qty |
| DOWNGRADE TO A- | Input | Default 0 |
| SCRAP | Input | Default 0 |
| REPAIRED BY | Input | Person/team who repaired |
| REPAIR TIME (MIN) | Input | Minutes |
| ROOT CAUSE | Dropdown | Required. Mold wear, Machine setting, Material lot, Operator handling, Tooling / blade, Color batch, Other |
| Re-plan <WO> for the scrapped quantity (creates a make-up demand on the master plan) | Checkbox | Tick when Scrap needs making up |
List filters (MH-01): STATUS (All, Pending, Repaired, Downgraded, Scrapped) · SOURCE (All + the 5 values in BR-RW-03) · SEARCH (“WO, SO, PO, item or reason”).
Messages (verbatim)
| Situation | Message |
|---|---|
| Total of the three quantities differs from Qty | Repaired + scrap + downgrade must equal <Qty> pairs. |
| No Root Cause chosen | Enter the root cause before closing this record. |
| Save succeeded | RW-nnnn closed — n repaired, n downgraded A-, n scrapped |
| Save succeeded with Re-plan | adds · re-plan requested for <WO> |
7. Dev notes
Section titled “7. Dev notes”Data created after Save Result
| Condition | What the system books |
|---|---|
Repaired OK > 0, Source Spray Out / Packing Spray · Pending repair |
Repair Inv List row at “Step 2 · Select Repair Inventory” of Packing Planning Spray |
Repaired OK > 0, Source Trimming · Pending repair |
Row in the shared Repair Inv List, shown at Step 2 of Outsourcing Planning or Packing Planning Logo by plan type |
| Downgrade to A- > 0 | A- goods to Common Stock, split from the SO |
| Scrap > 0 | Loss of the process |
| Re-plan ticked | Make-up demand = Scrap, sent to Master Plan, tied to the WO |
Observed on prototype v0.91 (Playwright, 13/10/2026) — the prototype is a mockup and does not prove real-system behaviour
- The prototype does not have Common Stock, Loss or make-up demand yet:
rwSaveonly stores the result and shows a toast. Re-plan only shows “Re-plan requested”. Design pending OQ-RW-04. - Records created from Trimming Result use the real WO (
WO-20260806) and show “—” for SO No. / Customer PO; sample records use an alias WO (WO-2608-01). Pending OQ-RW-06. - The “Enter the root cause…” error does not clear when QC picks a Root Cause; it clears only on the next Save Result. The BRD does not specify when the error hides.
- Repaired By pre-fills “Repair team A” and Repair Time 45, not required. Pending OQ-RW-10.
8. Test notes
Section titled “8. Test notes”Acceptance scenarios (BRD section 13) — the last column is the prototype v0.91 run status according to the BRD note.
| Code | Precondition | Action | Expected result | FR / BR | Prototype |
|---|---|---|---|---|---|
| AC-01 | LOT-20260807-CD at Trimming Result | Record A 200 in W7, W8; C 20 in W5 reason “Burr / flash”; PR 30 in W7, 10 in W8; confirm | RW-1001 (W7, 30) and RW-1002 (W8, 10), PENDING, Source Trimming · Pending repair. PENDING +40. No record for C 20 |
FR-RW-01, BR-RW-01..03 | Run |
| AC-02 | Same as AC-01, or a WI at Daily Injection | Open Defect Records at Trimming Result; at Daily Injection record C 12 “Air bubble / porosity”, confirm the shift | Defect Records has the C 20 row and no PR row. Daily Injection has no PR, no new RW record | FR-RW-01, BR-RW-01 | Trimming part run; Daily Injection part per CHANGELOG |
| AC-03 | Spray Out and Trimming · Pending repair records exist |
Choose SOURCE Spray Out · Pending repair |
Only Spray Out records remain | FR-RW-02 | By logic, not run separately |
| AC-04 | RW-1001 PENDING, Qty 30 | Enter 10 / 0 / 0, Root Cause, Save | Shows Repaired + scrap + downgrade must equal 30 pairs., stays PENDING |
FR-RW-04, BR-RW-05 | Run |
| AC-05 | RW-1001 PENDING | Enter 25 / 3 / 2, no Root Cause, Save | Shows Enter the root cause before closing this record., stays PENDING |
FR-RW-04, BR-RW-06 | Run |
| AC-06 | RW-1001 PENDING, Qty 30 | Enter 25 / 3 / 2, “Mold wear”, Save | REPAIRED, columns 25 / 3 / 2, View button, PENDING −30 | FR-RW-05, BR-RW-07, BR-RW-08 | Run |
| AC-07 | Record Qty 5 PENDING | Scrap 5, OK 0, A- 0, Root Cause, Save | SCRAPPED | FR-RW-05, BR-RW-07 | By logic, not run separately |
| AC-08 | Record Qty 5 PENDING | OK 0, A- 3, Scrap 2, Root Cause, Save | DOWNGRADED | FR-RW-05, BR-RW-07 | By logic, not run separately |
| AC-09 | RW-1001 closed 25 / 3 / 2 | Click View | Shows 25 / 3 / 2, “Mold wear”, all fields locked, no Save Result | FR-RW-06, BR-RW-08 | Run |
| AC-10 | Spray Out · Pending repair record W5, Qty 10 |
Save OK 10, open Packing Planning Spray Step 2 | One row of 10 pairs; not in Outsourcing Planning Step 2 | FR-RW-07, BR-RW-09, BR-RW-10 | Per CHANGELOG |
| AC-11 | Trimming · Pending repair record W7, Qty 20 |
Save OK 20, open Outsourcing Planning Step 2 | W7 row = 20 | FR-RW-07, BR-RW-09 | Per CHANGELOG |
| AC-12 | RW-1001 PENDING | Save 25 / 3 / 2 | Common Stock +3 pairs A-, split from SO | FR-RW-08, BR-RW-11 | Not on prototype |
| AC-13 | RW-1001 PENDING | Save 25 / 3 / 2 | Loss +2 pairs | FR-RW-09, BR-RW-12 | Not on prototype |
| AC-14 | Record Qty 5 PENDING, WO-20260806 | Scrap 3, A- 2, OK 0, Re-plan ticked | Row shows “Re-plan requested”; Master Plan gets a make-up demand of 3 pairs for WO-20260806 | FR-RW-10, BR-RW-13 | Not on prototype |
| AC-15 | Record Qty 5 PENDING | Scrap 3, A- 2, no Re-plan | No make-up demand | FR-RW-10, BR-RW-13 | Not on prototype |
Edge cases worth adding when writing test cases: a single-size record with Qty 1 · one entry with several sizes (each closed separately) · PR = 0 for a size (no record) · filters + PENDING card (the card ignores filters, BR-RW-14).
9. Settled decisions
Section titled “9. Settled decisions”Source: decisions/FLOW_QA_LOG.md in repo flow-fine-chemical-system.
| Code | Decision | Status |
|---|---|---|
| Q-20261013-01 | Rollback: RW records come from the PR of screens after Injection; grade C is scrap, Defect Records only, no record. User’s words (VI): “Khi nhập số lượng vào ô PR, thì nó sẽ sinh phiếu RW tại chức năng Repair/Rework” | In force (BRD v0.2) |
| Q-20261012-04 | C goes to Defect Records and also opens RW; PR removed | Cancelled by Q-20261013-01, except “Scrap after repair in Repair / Rework still → Loss” |
| Q-20261012-03 item 4 | Remove the Manual · QC source |
In force |
| Q-20260918-29 | Repair Inventory rows carry the next process; A- → split from SO → Common Stock A-; NG → Scrap / Loss | In force |
10. Open questions
Section titled “10. Open questions”Blocking level: High = Dev cannot settle the design or data · Medium = one branch/one rule · Low = label, display.
| Question | Ask whom | Blocking level |
|---|---|---|
OQ-RW-03 Repaired Spray Out · Pending repair goes straight to Packing Planning Spray Step 2 (prototype), but Q-20261001-11 says “go to repair, then into the Repair warehouse, then make a new Spray Out plan”. Which one applies? |
User | High |
| OQ-RW-04 Where are Common Stock, Loss and the make-up demand booked, through which screen/record? Is the make-up demand a new plan or a higher Plan qty of the WO? | User, Dev | High |
OQ-RW-01 What is the process after Stitching; which Repair Inv List does repaired Stitching · Pending repair return to? |
User | Medium |
OQ-RW-02 Where does repaired Packing Logo · Pending repair go? |
User | Medium |
| OQ-RW-07 How does QC fix a wrongly saved result once the record is locked (Reopen / reversing entry)? | User | Medium |
| OQ-RW-08 Must A- goods in Common Stock go through FG Receipt to WMS; does the SO shortage caused by A- trigger a re-plan? | User | Medium |
| OQ-RW-09 Is Supervisor approval and a Rework WI (BRD MES v1.0 sections 6.5, 7) needed? | User | Medium |
| OQ-RW-11 May Re-plan be ticked when Scrap = 0; who decides Re-plan (QC or Planner)? | User | Medium |
| OQ-RW-14 Packing Result: is PR counted as Packed or as remaining goods waiting for repair? | User | Medium |
| OQ-RW-06 Use the real WO code and fill SO / Customer PO when PR is entered? | User, Dev | Low |
| OQ-RW-10 Are Repaired By and Repair Time (min) required? | User | Low |
| OQ-RW-12 Current state: where does QC record defective goods after Injection today (notebook, Excel)? | Customer | Low |
| OQ-RW-13 After MES period closing, may a saved repair result still change Loss / Common Stock? | User | Low |
| OQ-RW-15 Is the grade C defect reason list at Packing Result shared with Outsourcing Result? | User, key user | Low |