,
placeholder = "",
+ options: { onBlur?: () => void } = {},
) => {
const isSkuBackedField = skuBackedFactoryKeys.has(key);
@@ -19519,6 +19948,7 @@ export default function NonIntegratedDetailClient({
mode="singleLineResizable"
tone={isSkuBackedField ? "default" : "manual"}
onChange={(value) => updateProductFactoryRow(row.skuId, key, value)}
+ onBlur={options.onBlur}
/>
);
};
@@ -19621,7 +20051,10 @@ export default function NonIntegratedDetailClient({
{renderFactoryInput(row, "skuCode", "请输入规格码")}
|
- {renderFactoryInput(row, "setCount", "请输入套件量")}
+ {renderFactoryInput(row, "setCount", "请输入套件量", {
+ onBlur: () =>
+ handleProductFactorySetCountCommit(row.skuId),
+ })}
|
{renderFactoryInput(row, "barcode", "请输入条码")}
@@ -19671,7 +20104,17 @@ export default function NonIntegratedDetailClient({
)}
|
- {renderFactoryInput(row, "leadTime", "请输入交期")}
+
+ updateProductFactoryRow(
+ row.skuId,
+ "leadTime",
+ value,
+ )
+ }
+ />
|
updateProductFactoryRow(
row.skuId,
@@ -19797,8 +20240,17 @@ export default function NonIntegratedDetailClient({
}
function renderSampleMeasurementWorkspace() {
- const renderReadOnlyCell = (value: string) => (
-
+ const renderReadOnlyCell = (
+ value: string,
+ minWidth = "112px",
+ testId?: string,
+ ) => (
+
{value || "-"}
);
@@ -19884,10 +20336,14 @@ export default function NonIntegratedDetailClient({
{renderReadOnlyCell(row.supplierName)}
|
- {renderReadOnlyCell(row.barcode)}
+ {renderReadOnlyCell(row.barcode, "160px")}
|
- {renderReadOnlyCell(row.specName)}
+ {renderReadOnlyCell(
+ row.specName,
+ "180px",
+ `sample-measurement-readonly-specName-${row.skuId}`,
+ )}
|
{renderMeasurementInput(row, "lengthCm", "请输入长")}
@@ -19919,6 +20375,238 @@ export default function NonIntegratedDetailClient({
);
}
+ function renderFinishedSampleShipmentWorkspace() {
+ const renderReadOnlyCell = (
+ value: string,
+ column: FinishedSampleShipmentColumnWidthKey,
+ ) => (
+
+ handleFinishedSampleShipmentColumnResize(column, width)
+ }
+ onChange={() => undefined}
+ />
+ );
+ const renderImageCell = (
+ row: ProductFinishedSampleShipmentDisplayRow,
+ index: number,
+ ) => {
+ if (!row.image) {
+ return (
+
+ 无图
+
+ );
+ }
+
+ return (
+
+ );
+ };
+ const renderShipmentInput = (
+ row: ProductFinishedSampleShipmentDisplayRow,
+ key: Extract<
+ FinishedSampleShipmentEditableKey,
+ "sampleQuantity" | "trackingNumber"
+ >,
+ placeholder: string,
+ readOnly: boolean,
+ column: Extract<
+ FinishedSampleShipmentColumnWidthKey,
+ "sampleQuantity" | "trackingNumber"
+ >,
+ ) => (
+
+ handleFinishedSampleShipmentColumnResize(column, width)
+ }
+ testId={`finished-sample-shipment-${key}-${row.skuId}`}
+ onChange={(value) =>
+ updateFinishedSampleShipmentRow(row.skuId, key, value)
+ }
+ />
+ );
+
+ return (
+
+
+
+ {renderInheritedSkuBatchTabs()}
+
+
+
+
+ {productFinishedSampleShipmentRows.length === 0 ? (
+
+ 当前还没有 SKU 信息,先维护 SKU 后再进行成品寄样。
+
+ ) : displayedFinishedSampleShipmentRows.length === 0 ? (
+
+ 当前批次还没有 SKU 信息。
+
+ ) : (
+
+
+
+
+ {[
+ "寄样",
+ "序号",
+ "图片",
+ "型号",
+ "规格码",
+ "套件量",
+ "供应商名称",
+ "条码",
+ "条码规格名称",
+ "安装方式",
+ "寄样数量",
+ "是否寄出",
+ "快递单号",
+ ].map((label) => (
+ |
+ {label}
+ |
+ ))}
+
+
+
+ {displayedFinishedSampleShipmentRows.map((row, index) => (
+
+ |
+
+ {displayedFinishedSampleShipmentIsConfirmed
+ ? "已确认"
+ : "待确认"}
+
+ |
+
+ {index + 1}
+ |
+ {renderImageCell(row, index)} |
+
+ {renderReadOnlyCell(row.model, "model")}
+ |
+
+ {renderReadOnlyCell(row.skuCode, "skuCode")}
+ |
+
+ {renderReadOnlyCell(row.setCount, "setCount")}
+ |
+
+ {renderReadOnlyCell(row.supplierName, "supplierName")}
+ |
+
+ {renderReadOnlyCell(row.barcode, "barcode")}
+ |
+
+ {renderReadOnlyCell(row.specName, "specName")}
+ |
+
+ {renderReadOnlyCell(row.installMethod, "installMethod")}
+ |
+
+ {renderShipmentInput(
+ row,
+ "sampleQuantity",
+ "请输入数量",
+ !canEditFinishedSampleShipmentQuantity,
+ "sampleQuantity",
+ )}
+ |
+
+
+ handleFinishedSampleShipmentColumnResize(
+ "shipped",
+ width,
+ )
+ }
+ >
+
+ updateFinishedSampleShipmentRow(
+ row.skuId,
+ "shipped",
+ value,
+ )
+ }
+ buttonClassName="h-8 w-full min-w-0 rounded border border-apple-separator bg-apple-bg-secondary px-2 text-xs text-apple-label-primary outline-none disabled:cursor-not-allowed disabled:bg-apple-bg-primary disabled:text-apple-label-secondary"
+ />
+
+ |
+
+ {renderShipmentInput(
+ row,
+ "trackingNumber",
+ "请输入快递单号",
+ !canEditFinishedSampleShipmentShipping,
+ "trackingNumber",
+ )}
+ |
+
+ ))}
+
+
+
+ )}
+
+
+ );
+ }
+
function renderPlanningLayoutWorkspace() {
const renderReadOnlyCell = (value: string, minWidth = "112px") => (
{derivedSkuItems.length === 0
? "当前还没有 SKU 信息,先维护 SKU 后再查看空间布局。"
- : "当前没有销售状态为“销售”的 SKU。"}
+ : "当前还没有可带出的 SKU 信息。"}
) : displayedPlanningLayoutSkuRows.length === 0 ? (
@@ -24449,7 +25137,7 @@ function renderFactoryQualityWorkspace() {
{!isSkuContentReadOnly &&
activeSkuBatchNo &&
- !isActiveSkuBatchConfirmed ? (
+ !isActiveSkuBatchFactoryConfirmed ? (
<>
>
) : null}
- {isSkuContentReadOnly ? null : (
+ {isSkuContentReadOnly ||
+ isActiveSkuBatchFactoryConfirmed ? null : (
<>
>
)}
-
- {canShowSkuReconfirmationAction ? (
-
- ) : null}
- {activeSkuTab === "skuInfo" ? (
- isActiveSkuBatchConfirmed ? (
-
- 已确认SKU信息
-
- ) : !isSkuContentReadOnly &&
- activeSkuBatchNo ? (
-
- ) : !isSkuContentReadOnly ? (
-
- ) : null
- ) : null}
-
+ {activeSkuTab === "skuInfo" &&
+ isStockProductRecord ? (
+
+
+ 已确认SKU信息
+
+
+ ) : null}
- {activeSkuTab === "skuInfo" &&
- skuConfirmationPrompt ? (
-
- {skuConfirmationPrompt.message}
-
- ) : null}
{activeSkuTab === "componentSkuInfo" ? (
@@ -24944,7 +25560,9 @@ function renderFactoryQualityWorkspace() {
placeholder="请选择"
readOnly={
isSkuContentReadOnly ||
- isSkuBatchConfirmed(activeSkuBatch)
+ isSkuBatchFactoryConfirmed(
+ activeSkuBatch,
+ )
}
onChange={(value) =>
handleUpdateSkuBatchChangeType(
@@ -24966,7 +25584,9 @@ function renderFactoryQualityWorkspace() {
}
readOnly={
isSkuContentReadOnly ||
- isSkuBatchConfirmed(activeSkuBatch)
+ isSkuBatchFactoryConfirmed(
+ activeSkuBatch,
+ )
}
onChange={(event) =>
handleUpdateSkuBatchFlowNo(
@@ -25068,13 +25688,12 @@ function renderFactoryQualityWorkspace() {
: derivedItem.drawingId;
const skuRowReadOnly =
isSkuContentReadOnly ||
- isSkuBatchConfirmed(
- derivedItem.batchNo || 1,
- ) ||
+ isSkuItemFactoryConfirmed(item) ||
isImportedSkuContentLocked(item);
const skuImageReadOnly =
isReadOnly ||
isStockProductRecord ||
+ isSkuItemFactoryConfirmed(item) ||
isImportedSkuContentLocked(item);
return (
@@ -26796,6 +27415,7 @@ function renderFactoryQualityWorkspace() {
isProductPhotoWorkspace ||
isProductFactoryWorkspace ||
isSampleMeasurementWorkspace ||
+ isFinishedSampleShipmentWorkspace ||
isProductPricingWorkspace ||
isProductLimitWorkspace ||
isPlanningLayoutWorkspace
@@ -26814,17 +27434,25 @@ function renderFactoryQualityWorkspace() {
) : isProductFactoryWorkspace ? (
- {isCurrentUserAdmin &&
- displayedProductFactoryRows.length > 0 &&
- !displayedProductFactoryHasPendingRows ? (
+ {isCurrentUserAdmin ? (
+ ) : isFinishedSampleShipmentWorkspace ? (
+
+
+
) : isProductPricingWorkspace ? (
|