CANCERYS\kw093 3 недель назад
Родитель
Сommit
42ee4a6d92
13 измененных файлов: 70 добавлений и 15 удалений
  1. +3
    -0
      src/app/api/stockIssue/actions.ts
  2. +1
    -1
      src/components/General/LoadingComponent.tsx
  3. +1
    -1
      src/components/InputDataGrid/InputDataGrid.tsx
  4. +2
    -0
      src/components/Jodetail/FInishedJobOrderRecord.tsx
  5. +3
    -4
      src/components/Jodetail/JobPickExecutionForm.tsx
  6. +1
    -1
      src/components/Jodetail/newJobPickExecution.tsx
  7. +1
    -1
      src/components/ProductionProcess/ProductionProcessList.tsx
  8. +1
    -1
      src/components/Qc/QcForm.tsx
  9. +13
    -0
      src/components/StockIssue/SearchPage.tsx
  10. +35
    -4
      src/components/StockIssue/SubmitIssueForm.tsx
  11. +1
    -1
      src/i18n/zh/common.json
  12. +7
    -0
      src/i18n/zh/inventory.json
  13. +1
    -1
      src/i18n/zh/jo.json

+ 3
- 0
src/app/api/stockIssue/actions.ts Просмотреть файл

@@ -25,6 +25,7 @@ export interface StockIssueResult {
handleStatus: string;
handleDate: string | null;
handledBy: number | null;
uomDesc: string | null;
}
export interface ExpiryItemResult {
id: number;
@@ -178,6 +179,8 @@ export async function submitMissItem(issueId: number, handler: number) {
itemDescription: string | null;
storeLocation: string | null;
issues: IssueDetailItem[];
bookQty: number;
uomDesc: string | null;
}
export interface IssueDetailItem {


+ 1
- 1
src/components/General/LoadingComponent.tsx Просмотреть файл

@@ -8,7 +8,7 @@ export const LoadingComponent: React.FC = () => {
display="flex"
justifyContent="center"
alignItems="center"
// autoheight="true"
>
<CircularProgress />
</Box>


+ 1
- 1
src/components/InputDataGrid/InputDataGrid.tsx Просмотреть файл

@@ -370,7 +370,7 @@ function InputDataGrid<T, V, E>({
// columns={!checkboxSelection ? _columns : columns}
columns={needActions ? _columns : columns}
editMode="row"
// autoHeight
sx={{
height: "30vh",
"--DataGrid-overlayHeight": "100px",


+ 2
- 0
src/components/Jodetail/FInishedJobOrderRecord.tsx Просмотреть файл

@@ -509,9 +509,11 @@ const FInishedJobOrderRecord: React.FC<Props> = ({ filterArgs }) => {
size="small"
sx={{ mb: 1 }}
/>
{/*
<Typography variant="body2" color="text.secondary">
{jobOrderPickOrder.completedItems}/{jobOrderPickOrder.totalItems} {t("items completed")}
</Typography>
*/}
<Chip
label={jobOrderPickOrder.secondScanCompleted ? t("Second Scan Completed") : t("Second Scan Pending")}
color={jobOrderPickOrder.secondScanCompleted ? 'success' : 'warning'}


+ 3
- 4
src/components/Jodetail/JobPickExecutionForm.tsx Просмотреть файл

@@ -247,10 +247,9 @@ useEffect(() => {
// 增加 badPackageQty 判断,确保有坏包装会走 issue 流程
const badPackageQty = Number((formData as any).badPackageQty) || 0;
const isNormalPick = verifiedQty > 0
&& formData.missQty == 0
&& formData.badItemQty == 0
&& badPackageQty == 0;
const isNormalPick = (formData.missQty == null || formData.missQty === 0)
&& (formData.badItemQty == null || formData.badItemQty === 0)
&& (badPackageQty === 0);
if (isNormalPick) {
if (onNormalPickSubmit) {


+ 1
- 1
src/components/Jodetail/newJobPickExecution.tsx Просмотреть файл

@@ -1822,7 +1822,7 @@ const JobPickExecution: React.FC<Props> = ({ filterArgs, onBackToList }) => {
}, [handleSubmitPickQtyWithQty]);
const handleSubmitAllScanned = useCallback(async () => {
const scannedLots = combinedLotData.filter(lot =>
lot.stockOutLineStatus === 'checked'
lot.stockOutLineStatus === 'checked' || lot.stockOutLineStatus === 'partially_completed'
);
if (scannedLots.length === 0) {


+ 1
- 1
src/components/ProductionProcess/ProductionProcessList.tsx Просмотреть файл

@@ -306,7 +306,7 @@ const ProductProcessList: React.FC<ProductProcessListProps> = ({ onSelectProcess
</Button>
)}
{statusLower === "completed" && (
<Button onClick={() => handleViewStockIn(process)}>
<Button variant="contained" size="small" onClick={() => handleViewStockIn(process)}>
{t("view stockin")}
</Button>
)}


+ 1
- 1
src/components/Qc/QcForm.tsx Просмотреть файл

@@ -232,7 +232,7 @@ const QcForm: React.FC<Props> = ({ rows, disabled = false }) => {

return (
<>
// autoHeight
<StyledDataGrid
columns={qcColumns}
rows={rows}


+ 13
- 0
src/components/StockIssue/SearchPage.tsx Просмотреть файл

@@ -169,7 +169,17 @@ const SearchPage: React.FC<Props> = ({ dataList }) => {
{ name: "itemDescription", label: t("Item") },
{ name: "lotNo", label: t("Lot No.") },
{ name: "storeLocation", label: t("Location") },
{
name: "bookQty",
label: t("Book Qty"),
renderCell: (item) => (
<>{item.bookQty?.toFixed(2) ?? "0"} {item.uomDesc ?? ""}</>
),
},
{ name: "issueQty", label: t("Miss Qty") },
{ name: "uomDesc", label: t("UoM"), renderCell: (item) => (
<>{item.uomDesc ?? ""}</>
) },
{
name: "id",
label: t("Action"),
@@ -196,6 +206,9 @@ const SearchPage: React.FC<Props> = ({ dataList }) => {
{ name: "lotNo", label: t("Lot No.") },
{ name: "storeLocation", label: t("Location") },
{ name: "issueQty", label: t("Defective Qty") },
{ name: "uomDesc", label: t("UoM"), renderCell: (item) => (
<>{item.uomDesc ?? ""}</>
) },
{
name: "id",
label: t("Action"),


+ 35
- 4
src/components/StockIssue/SubmitIssueForm.tsx Просмотреть файл

@@ -49,7 +49,10 @@ const SubmitIssueForm: React.FC<Props> = ({
const [submitting, setSubmitting] = useState(false);
const [details, setDetails] = useState<LotIssueDetailResponse | null>(null);
const [submitQty, setSubmitQty] = useState<string>("");

const bookQty = details?.bookQty ?? 0;
const submitQtyNum = parseFloat(submitQty);
const submitQtyValid = !Number.isNaN(submitQtyNum) && submitQtyNum >= 0;
const remainAvailable = submitQtyValid ? Math.max(0, bookQty - submitQtyNum) : bookQty;
useEffect(() => {
if (open && lotId) {
loadDetails();
@@ -121,9 +124,17 @@ const SubmitIssueForm: React.FC<Props> = ({
<Typography variant="body2" sx={{ mb: 1 }}>
<strong>{t("Lot No.")}:</strong> {details.lotNo}
</Typography>
<Typography variant="body2" sx={{ mb: 2 }}>
<Typography variant="body2" sx={{ mb: 1 }}>
<strong>{t("Location")}:</strong> {details.storeLocation}
</Typography>
<Typography variant="body2" sx={{ mb: 1 }}>
<strong>{t("Book Qty")}:</strong>{" "}
{details.bookQty}
</Typography>
<Typography variant="body2" sx={{ mb: 1 }}>
<strong>{t("UoM")}:</strong>{" "}
{details.uomDesc ?? ""}
</Typography>
</Box>

<TableContainer component={Paper} sx={{ mb: 2 }}>
@@ -146,8 +157,8 @@ const SubmitIssueForm: React.FC<Props> = ({
<TableCell>{issue.pickerName || "-"}</TableCell>
<TableCell align="right">
{issueType === "miss"
? issue.missQty?.toFixed(2) || "0"
: issue.issueQty?.toFixed(2) || "0"}
? issue.missQty?.toFixed(0) || "0"
: issue.issueQty?.toFixed(0) || "0"}
</TableCell>
<TableCell>{issue.pickOrderCode}</TableCell>
<TableCell>{issue.doOrderCode || "-"}</TableCell>
@@ -168,6 +179,26 @@ const SubmitIssueForm: React.FC<Props> = ({
inputProps={{ min: 0, step: 0.01 }}
sx={{ mt: 2 }}
/>
<TextField
fullWidth
label={t("Remain available Quantity")}
type="number"
value={remainAvailable}
onChange={(e) => {
const raw = e.target.value;
if (raw === "") {
setSubmitQty("");
return;
}
const remain = parseFloat(raw);
if (!Number.isNaN(remain) && remain >= 0) {
const newSubmit = Math.max(0, bookQty - remain);
setSubmitQty(newSubmit.toFixed(0));
}
}}
inputProps={{ min: 0, step: 0.01, readOnly: false }}
sx={{ mt: 2 }}
/>
</DialogContent>
<DialogActions>
<Button onClick={onClose} disabled={submitting}>


+ 1
- 1
src/i18n/zh/common.json Просмотреть файл

@@ -13,7 +13,7 @@
"Overall Time Remaining": "總剩餘時間",
"Reset": "重置",
"Search": "搜索",
"This lot is rejected, please scan another lot.": "此批次已封存,請掃描另一個批號。",
"This lot is rejected, please scan another lot.": "此批次發現問題,請掃描另一個批號。",
"Process Start Time": "工序開始時間",
"Stock Req. Qty": "需求數",
"Staff No Required": "員工編號必填",


+ 7
- 0
src/i18n/zh/inventory.json Просмотреть файл

@@ -12,9 +12,16 @@
"Record Status": "記錄狀態",
"Stock take record status updated to not match": "盤點記錄狀態更新為數值不符",
"available": "可用",
"Issue Qty": "問題數量",
"Submit Bad Item": "提交不良品",
"Remain available Quantity": "剩餘可用數量",
"Submitting...": "提交中...",
"Item-lotNo-ExpiryDate": "貨品-批號-到期日",
"Submit Miss Item": "提交缺貨",
"Item-lotNo-ExpiryDate": "貨品-批號-到期日",
"not available": "不可用",
"Book Qty": "帳面庫存",
"Submit Quantity": "提交數量",
"Batch Submit All": "批量提交所有",
"Batch Save All": "批量保存所有",
"Batch Submit All": "批量提交所有",


+ 1
- 1
src/i18n/zh/jo.json Просмотреть файл

@@ -120,7 +120,7 @@
"Pick Order Detail": "提料單細節",
"Finished Job Order Record": "已完成工單記錄",
"No. of Items to be Picked": "需提料數量",
"No. of Items with Issue During Pick": "提料過程中出現問題數量",
"No. of Items with Issue During Pick": "問題數量",
"Pick Start Time": "提料開始時間",
"Pick End Time": "提料結束時間",
"FG / WIP Item": "成品/半成品",


Загрузка…
Отмена
Сохранить