diff --git a/frontend/src/pages/admin/CreateProductDialog.tsx b/frontend/src/pages/admin/CreateProductDialog.tsx index a55a027..c31e9b5 100644 --- a/frontend/src/pages/admin/CreateProductDialog.tsx +++ b/frontend/src/pages/admin/CreateProductDialog.tsx @@ -291,7 +291,10 @@ export default function CreateProductDialog({ open, onClose, onCreated }: Props) function printCurrentQRCode() { if (!createdSn) return; const qrUrl = `/api/v1/products/qrcode/${createdSn}`; - const printWindow = window.open("", "_blank", "width=600,height=600"); + const productName = selected?.material_name ?? ""; + const spec = selected?.spec_model ?? ""; + const orderNo2 = orderNo || "—"; + const printWindow = window.open("", "_blank", "width=420,height=480"); if (!printWindow) return; printWindow.document.write(` @@ -299,17 +302,40 @@ export default function CreateProductDialog({ open, onClose, onCreated }: Props) 打印标签 - ${createdSn} - - -
${createdSn}
+ + `); @@ -331,23 +357,35 @@ export default function CreateProductDialog({ open, onClose, onCreated }: Props) > {createdSn ? ( /* ---- 成功页 ---- */ -
- {`QR-${createdSn}`} -

- {createdSn} -

-

产品创建成功!

- - - +
+
+ {`QR-${createdSn}`} +
+
+ 名:{selected?.material_name ?? ""} +
+
规:{selected?.spec_model ?? ""}
+
单:{orderNo || "—"}
+
+
+
+ 码:{createdSn} +
+

产品创建成功!

+ + +
) : (