+
+
}
+ onClick={() => {
+ setScanModalVisible(false);
+ setScanInput('');
+ }}
+ style={{
+ color: '#fff',
+ width: 36,
+ height: 36,
+ borderRadius: 8,
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center'
+ }}
+ onMouseEnter={(e) => e.currentTarget.style.background = 'rgba(0,0,0,0.1)'}
+ onMouseLeave={(e) => e.currentTarget.style.background = 'transparent'}
+ />
+
+
+
+
+
+
+
+
setScanInput(e.target.value)}
+ onKeyDown={handleScanKeyPress}
+ variant="outlined"
+ style={{
+ fontSize: 16,
+ textAlign: 'center',
+ height: 40,
+ borderRadius: 8,
+ boxShadow: '0 2px 8px rgba(24, 144, 255, 0.1)'
+ }}
+ suffix={
+
}
+ >
+ 盘点
+
+ }
+ autoFocus
+ />
+
+ 扫码枪扫描或手动输入序列号后按回车 / 点击盘点
+
+
+
+ {scanResult && (
+
+
+ {scanResult.success ? (
+
+
+
+ ) : (
+
+
+
+ )}
+
+
+ {scanResult.message}
+
+ {scanResult.record && (
+
+
+
+
+ 设备ID
+ {scanResult.record.deviceId}
+
+
+ 设备名称
+ {scanResult.record.deviceName}
+
+
+
+
+ 序列号
+ {scanResult.record.serialNumber}
+
+
+ 当前位置
+ {scanResult.record.displayLocation || `${scanResult.record.rackId} - U${scanResult.record.position}`}
+
+
+
+
+ )}
+
+ )}
+
+ {scanResult && (
+
+
+
+
+ )}
+
+ {!scanResult && (
+
+
r.status !== 'pending').length}
+ suffix={`/ ${records.length}`}
+ valueStyle={{ color: '#52c41a', fontWeight: 'bold' }}
+ />
+
+ )}
+
+
+