Kaynağa Gözat

stockissue

MergeProblem1
CANCERYS\kw093 2 hafta önce
ebeveyn
işleme
b24ae5dfea
2 değiştirilmiş dosya ile 6 ekleme ve 12 silme
  1. +2
    -2
      src/components/StockIssue/SearchPage.tsx
  2. +4
    -10
      src/components/StockRecord/SearchPage.tsx

+ 2
- 2
src/components/StockIssue/SearchPage.tsx Dosyayı Görüntüle

@@ -150,7 +150,7 @@ const SearchPage: React.FC<Props> = ({ dataList }) => {
{ name: "itemDescription", label: t("Item") },
{ name: "lotNo", label: t("Lot No.") },
{ name: "storeLocation", label: t("Location") },
{ name: "missQty", label: t("Miss Qty") },
{ name: "issueQty", label: t("Miss Qty") },
{
name: "id",
label: t("Action"),
@@ -176,7 +176,7 @@ const SearchPage: React.FC<Props> = ({ dataList }) => {
{ name: "itemDescription", label: t("Item") },
{ name: "lotNo", label: t("Lot No.") },
{ name: "storeLocation", label: t("Location") },
{ name: "badItemQty", label: t("Defective Qty") },
{ name: "issueQty", label: t("Defective Qty") },
{
name: "id",
label: t("Action"),


+ 4
- 10
src/components/StockRecord/SearchPage.tsx Dosyayı Görüntüle

@@ -77,16 +77,10 @@ const SearchPage: React.FC<Props> = ({ dataList: initialDataList }) => {
sorted.forEach((item) => {
const currentBalance = balanceMap.get(item.itemId) || 0;
let newBalance = currentBalance;
// 根据类型计算余额
if (item.transactionType === "IN") {
newBalance = currentBalance + item.qty;
} else if (item.transactionType === "OUT") {
newBalance = currentBalance - item.qty;
}
balanceMap.set(item.itemId, newBalance);
// 格式化日期 - 优先使用 date 字段
let formattedDate = "";
@@ -128,7 +122,7 @@ const SearchPage: React.FC<Props> = ({ dataList: initialDataList }) => {
formattedDate,
inQty: item.transactionType === "IN" ? item.qty : 0,
outQty: item.transactionType === "OUT" ? item.qty : 0,
balanceQty: item.balanceQty ? item.balanceQty : newBalance,
balanceQty: item.balanceQty ?? 0,
});
});


Yükleniyor…
İptal
Kaydet