From 2685cbcebfc807cff7b7370458c7db8f4c5b18f5 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 26 三月 2025 08:04:39 +0800
Subject: [PATCH] fix:ip修改
---
rsf-admin/src/page/asnOrder/AsnOrderList.jsx | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/rsf-admin/src/page/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/asnOrder/AsnOrderList.jsx
index 96dbf12..095bde5 100644
--- a/rsf-admin/src/page/asnOrder/AsnOrderList.jsx
+++ b/rsf-admin/src/page/asnOrder/AsnOrderList.jsx
@@ -109,7 +109,32 @@
const inspection = () => { };
- const print = () => { };
+
+ const print = () => {
+ const imageUrls = ['https://www.baidu.com/img/flexible/logo/pc/result@2.png',]
+ const iframe = document.createElement('iframe');
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+
+ const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
+ iframeDoc.open();
+ iframeDoc.write('<html><head><title>Print Images</title></head><body>');
+
+ // 灏嗗浘鐗囨彃鍏ュ埌 iframe 涓�
+ imageUrls.forEach((imageUrl) => {
+ iframeDoc.write(`<img src="${imageUrl}" style="margin: 10px;">`);
+ });
+
+ iframeDoc.write('</body></html>');
+ iframeDoc.close();
+
+ // 绛夊緟鍥剧墖鍔犺浇瀹屾垚鍚庤Е鍙戞墦鍗�
+ iframe.contentWindow.onload = () => {
+ iframe.contentWindow.print();
+ // 鎵撳嵃瀹屾垚鍚庣Щ闄� iframe
+ document.body.removeChild(iframe);
+ };
+ };
return (
@@ -151,14 +176,7 @@
omit={['id', 'createTime', 'createBy', 'memo']}
>
<NumberField source="id" />
- <MyField
- source="code"
- label="table.field.asnOrder.code"
- onClick={(event, record, val) => {
- event.stopPropagation();
- assign(record);
- }}
- />
+ <TextField source="code" label="table.field.asnOrder.code" />
<TextField source="poCode" label="table.field.asnOrder.poCode" />
<NumberField source="poId" label="table.field.asnOrder.poId" />
<TextField source="type" label="table.field.asnOrder.type" />
--
Gitblit v1.9.1