|  |  | 
 |  |  |     const refresh = useRefresh(); | 
 |  |  |     const translate = useTranslate(); | 
 |  |  |     const notify = useNotify(); | 
 |  |  |     const contentRef = useRef(null); | 
 |  |  |     const reactToPrintFn = useReactToPrint({ contentRef }); | 
 |  |  |     const contentRef = useRef(); | 
 |  |  |     const reactToPrintFn = useReactToPrint({ | 
 |  |  |         content: () => { | 
 |  |  |             return contentRef.current | 
 |  |  |         }, | 
 |  |  |         documentTitle: `物料信息`, | 
 |  |  |         pageStyle: ` | 
 |  |  |         @page { | 
 |  |  |              | 
 |  |  |             margin: 10mm; | 
 |  |  |         } | 
 |  |  |         @media print { | 
 |  |  |              html, body { | 
 |  |  |                 width: 70mm;     // A4横向宽度 | 
 |  |  |                 height: 40mm;    // A4横向高度 | 
 |  |  |             } | 
 |  |  |         }` | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     const handleClose = (event, reason) => { | 
 |  |  |         if (reason !== "backdropClick") { | 
 |  |  | 
 |  |  |                         overflow: 'hidden', | 
 |  |  |                         fontSize: 'small', | 
 |  |  |                         tableLayout: 'fixed', | 
 |  |  |                         width: '280px', | 
 |  |  |                         width: '520px', | 
 |  |  |                         borderCollapse: 'collapse', | 
 |  |  |                         borderSpacing: 0, | 
 |  |  |                         margin: '0 auto', | 
 |  |  | 
 |  |  |                                 colSpan={9} | 
 |  |  |                                 style={{ border: '1px solid black' }} | 
 |  |  |                             > | 
 |  |  |                                 <img id={"barcode" + item.code} style={{ width: '70%', verticalAlign: 'middle' }} /> | 
 |  |  |                                 {/* <img className="template-code" src={item.barcode} style={{ width: '90%', verticalAlign: 'middle' }} alt="Barcode" /> */} | 
 |  |  |                                 {/* <div style={{ letterSpacing: '2px', marginTop: '1px', textAlign: 'center' }}> | 
 |  |  |                                 {/* <img id={"barcode" + item.code} style={{ width: '70%', verticalAlign: 'middle' }} /> */} | 
 |  |  |                                 <img className="template-code" src={item.barcode} style={{ width: '90%', verticalAlign: 'middle' }} alt="Barcode" /> | 
 |  |  |                                 <div style={{ letterSpacing: '2px', marginTop: '1px', textAlign: 'center' }}> | 
 |  |  |                                     <span>{item.code}</span> | 
 |  |  |                                 </div> */} | 
 |  |  |                                 </div> | 
 |  |  |                             </td> | 
 |  |  |                         </tr> | 
 |  |  |                         <tr style={{ height: '74px' }}> |