From f4ff4b5ecb2b2de6202ebb39c11eb671c41bcffa Mon Sep 17 00:00:00 2001 From: duxingchen Date: Thu, 6 Aug 2026 10:44:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0=E9=98=B2?= =?UTF-8?q?=E5=BE=A1=E6=80=A7=E5=B8=83=E5=B1=80:=20Flex=E5=88=86=E6=A0=8F+?= =?UTF-8?q?line-clamp=E6=88=AA=E6=96=AD+=E5=88=86=E5=89=B2=E7=BA=BF+?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=90=8C=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/admin/CreateProductDialog.tsx | 90 +++++++++++++------ 1 file changed, 64 insertions(+), 26 deletions(-) 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} +
+

产品创建成功!

+ + +
) : (