ソースを参照

update

reset-do-picking-order
CANCERYS\kw093 2週間前
コミット
dff5000125
2個のファイルの変更51行の追加17行の削除
  1. +21
    -0
      src/app/api/bom/index.ts
  2. +30
    -17
      src/components/Qc/QcStockInModal.tsx

+ 21
- 0
src/app/api/bom/index.ts ファイルの表示

@@ -11,6 +11,27 @@ export interface BomCombo {
description: string;
}

export interface BomFormatFileGroup {
fileName: string;
problems: string[];
}

/** Format-check 回傳:正確檔名列表 + 失敗列表 */
export interface BomFormatCheckResponse {
correctFileNames: string[];
failList: BomFormatFileGroup[];
}

export interface BomUploadResponse {
batchId: string;
fileNames: string[];
}

export interface ImportBomItemPayload {
fileName: string;
isAlsoWip: boolean;
}

export const preloadBomCombo = (() => {
fetchBomCombo()
})


+ 30
- 17
src/components/Qc/QcStockInModal.tsx ファイルの表示

@@ -48,15 +48,13 @@ const style = {
left: "50%",
transform: "translate(-50%, -50%)",
bgcolor: "background.paper",
// pt: 5,
// px: 5,
// pb: 10,
display: "block",
width: { xs: "90%", sm: "90%", md: "90%" },
height: { xs: "90%", sm: "90%", md: "90%" },
width: "min(1280px, calc(100vw - 48px))",
maxWidth: "1280px",
height: "min(900px, calc(100vh - 48px))",
maxHeight: "calc(100vh - 48px)",
};
interface CommonProps extends Omit<ModalProps, "children"> {
// itemDetail: StockInLine & { qcResult?: PurchaseQcResult[] } & { escResult?: EscalationResult[] } | undefined;
inputDetail: StockInLineInput | undefined;
session: SessionWithTokens | null;
warehouse?: any[];
@@ -64,6 +62,7 @@ interface CommonProps extends Omit<ModalProps, "children"> {
onClose: () => void;
skipQc?: Boolean;
printSource?: "stockIn" | "productionProcess";
uiMode?: "default" | "dashboard" | "productionProcess";
}
interface Props extends CommonProps {
// itemDetail: StockInLine & { qcResult?: PurchaseQcResult[] } & { escResult?: EscalationResult[] };
@@ -79,12 +78,19 @@ const QcStockInModal: React.FC<Props> = ({
printerCombo,
skipQc = false,
printSource = "stockIn",
uiMode = "default",
}) => {
const {
t,
i18n: { language },
} = useTranslation("purchaseOrder");

const useCompactFields = useMemo(() => {
return uiMode === "dashboard" || uiMode === "productionProcess";
}, [uiMode]);
const useDenseQcLayout = useMemo(() => {
return uiMode === "productionProcess";
}, [uiMode]);
const [stockInLineInfo, setStockInLineInfo] = useState<StockInLine>();
const [isLoading, setIsLoading] = useState<boolean>(false);
const [isSubmitting, setIsSubmitting] = useState<boolean>(false);
@@ -710,18 +716,25 @@ const printQrcode = useCallback(
</Typography>
</Grid>
{stockInLineInfo.jobOrderId ? (
<FgStockInForm itemDetail={stockInLineInfo} disabled={viewOnly || showPutaway} compactFields />
) : (
<StockInForm itemDetail={stockInLineInfo} disabled={viewOnly || showPutaway} compactFields />
)
}
{skipQc === false && (
<QcComponent
<FgStockInForm
itemDetail={stockInLineInfo}
disabled={viewOnly || showPutaway}
compactLayout
denseLayout={printSource === "productionProcess"}
/>)
compactFields={useCompactFields}
/>
) : (
<StockInForm
itemDetail={stockInLineInfo}
disabled={viewOnly || showPutaway}
compactFields={useCompactFields}
/>
)}
{skipQc === false && (
<QcComponent
itemDetail={stockInLineInfo}
disabled={viewOnly || showPutaway}
compactLayout={uiMode === "dashboard" || uiMode === "productionProcess"}
denseLayout={useDenseQcLayout}
/>)
}
<Stack direction="row" justifyContent="flex-end" gap={1} sx={{pt:2}}>
{(!viewOnly && !showPutaway) && (<Button


読み込み中…
キャンセル
保存