Browse Source

補貨 search fix

production
CANCERYS\kw093 10 hours ago
parent
commit
ebd39a09d4
4 changed files with 13 additions and 4 deletions
  1. +1
    -0
      src/app/api/do/replenishmentTypes.ts
  2. +10
    -4
      src/components/DoSearch/DoReplenishmentTab.tsx
  3. +1
    -0
      src/i18n/en/do.json
  4. +1
    -0
      src/i18n/zh/do.json

+ 1
- 0
src/app/api/do/replenishmentTypes.ts View File

@@ -29,6 +29,7 @@ export interface DoReplenishmentRecord {
targetDoEstimatedArrivalDate?: string;
pickOrderLineId?: number;
deliveryOrderPickOrderId?: number;
relateTicketNo?: string;
status: string;
reason?: string;
created?: string;


+ 10
- 4
src/components/DoSearch/DoReplenishmentTab.tsx View File

@@ -113,6 +113,7 @@ export type ReplenishmentRecord = ReplenishmentDraftRow & {
targetDoEstimatedArrivalDate?: string;
pickOrderLineId?: number;
actualPickQty?: number;
relateTicketNo?: string;
status: ReplenishmentStatus;
created: string;
};
@@ -209,6 +210,7 @@ function mapApiRecord(record: DoReplenishmentRecord): ReplenishmentRecord {
record.actualPickQty != null && Number.isFinite(Number(record.actualPickQty))
? Number(record.actualPickQty)
: undefined,
relateTicketNo: record.relateTicketNo,
status: record.status as ReplenishmentStatus,
reason: record.reason,
created: record.created ?? "",
@@ -515,7 +517,7 @@ const DoReplenishmentTab: React.FC = () => {
try {
const searchRes = await fetchDoSearch(
suffix,
"",
shop,
"completed",
"",
"",
@@ -1569,9 +1571,6 @@ const DoReplenishmentTab: React.FC = () => {
<TrackingInlineLine label={t("Replenish Qty")}>
{formatQtyWithUom(row.replenishQty, row.shortUom)}
</TrackingInlineLine>
<TrackingInlineLine label={t("replenishmentActualPickQty")}>
{formatQtyWithUom(row.actualPickQty, row.shortUom)}
</TrackingInlineLine>
<TrackingInlineLine label={t("Remark")}>
{formatReplenishmentReason(row.reason, t)}
</TrackingInlineLine>
@@ -1590,6 +1589,13 @@ const DoReplenishmentTab: React.FC = () => {
: "—"
}
/>
<TrackingFieldBlock
label={t("replenishmentRelateTicketNo")}
value={row.relateTicketNo ?? "—"}
/>
<TrackingInlineLine label={t("replenishmentActualPickQty")}>
{formatQtyWithUom(row.actualPickQty, row.shortUom)}
</TrackingInlineLine>
<TrackingFieldBlock
label={t("replenishmentStatusLabel")}
value={t(row.status)}


+ 1
- 0
src/i18n/en/do.json View File

@@ -103,6 +103,7 @@
"Replenish Qty": "Replenish Qty",
"Replenish Qty short": "Replenish",
"replenishmentActualPickQty": "Actual Picked Qty",
"replenishmentRelateTicketNo": "Related Ticket No.",
"Replenish qty must be greater than zero": "Replenish qty must be greater than zero",
"Replenishment": "Replenishment",
"Delivery date is required": "Delivery date is required",


+ 1
- 0
src/i18n/zh/do.json View File

@@ -48,6 +48,7 @@
"Replenish Qty": "補貨數量",
"Replenish Qty short": "補貨",
"replenishmentActualPickQty": "實際提料數量",
"replenishmentRelateTicketNo": "關聯提票號碼",
"Replenish qty must be greater than zero": "補貨數量必須大於零",
"Replenishment": "補貨",
"Delivery date is required": "請選擇送貨日期",


Loading…
Cancel
Save