diff --git a/App.jsx b/App.jsx index 4f45ba9..477875c 100644 --- a/App.jsx +++ b/App.jsx @@ -624,7 +624,48 @@ function insertExtraSpecs(list, extraSpecs, labelProp) { function productExportRows(p, categories) { const cat = (categories || []).find(c => c.id === p.category); const rows = []; - if (isInverterCategory(cat)) { + if (isBatteryCategory(cat) && p.type === '家庭储能系统') { + // 电池+逆变器一体机:电池模块字段和逆变器字段都要展示,不是二选一 + if (p.moduleCapacity) rows.push({ labelKey: '额定容量', value: p.moduleCapacity }); + if (p.moduleVoltage) rows.push({ labelKey: '额定电压', value: p.moduleVoltage }); + if (p.cellType) rows.push({ labelKey: '电芯类型', value: p.cellType }); + if (p.moduleMaxEnergy) rows.push({ labelKey: '模块最大能量(kWh)', value: p.moduleMaxEnergy }); + if (p.moduleOutputPower) rows.push({ labelKey: '模块输出功率(kW)', value: p.moduleOutputPower }); + if (p.moduleDimensions) rows.push({ labelKey: '模块尺寸(mm)', value: p.moduleDimensions }); + if (p.moduleWeight) rows.push({ labelKey: '模块重量(kg)', value: p.moduleWeight }); + if (p.cycleLife) rows.push({ labelKey: '循环寿命', value: p.cycleLife }); + if (p.selfDischargeRate) rows.push({ labelKey: '自放电率', value: p.selfDischargeRate }); + if (p.maxChargingVoltage) rows.push({ labelKey: '最大充电电压', value: p.maxChargingVoltage }); + if (p.maxChargeDischargeCurrent) rows.push({ labelKey: '最大充放电电流', value: p.maxChargeDischargeCurrent }); + if (p.maxDcInputPower) rows.push({ labelKey: '最大直流输入功率', value: p.maxDcInputPower }); + if (p.maxDcInputVoltage) rows.push({ labelKey: '最大直流输入电压', value: p.maxDcInputVoltage }); + if (p.mpptVoltageRange) rows.push({ labelKey: 'MPPT工作电压范围', value: p.mpptVoltageRange }); + if (p.startingVoltage) rows.push({ labelKey: '启动电压', value: p.startingVoltage }); + if (p.maxInputCurrent) rows.push({ labelKey: '最大输入电流', value: p.maxInputCurrent }); + if (p.mpptNumber) rows.push({ labelKey: 'MPPT路数', value: p.mpptNumber }); + if (p.outputVoltage) rows.push({ labelKey: '输出电压', value: p.outputVoltage }); + if (p.ratedOutputFrequency) rows.push({ labelKey: '额定输出频率', value: p.ratedOutputFrequency }); + if (p.outputPowerFactor) rows.push({ labelKey: '输出功率因数', value: p.outputPowerFactor }); + if (p.offGridRatedApparentPower) rows.push({ labelKey: '离网额定输出视在功率', value: p.offGridRatedApparentPower }); + if (p.offGridMaxApparentPower) rows.push({ labelKey: '离网最大输出视在功率', value: p.offGridMaxApparentPower }); + if (p.offGridMaxOutputCurrent) rows.push({ labelKey: '离网最大输出电流', value: p.offGridMaxOutputCurrent }); + if (p.efficiencyMppt) rows.push({ labelKey: '最大效率(MPPT)', value: p.efficiencyMppt }); + if (p.efficiencyMax) rows.push({ labelKey: '最大效率', value: p.efficiencyMax }); + if (p.commInterface) rows.push({ labelKey: '通信接口', value: p.commInterface }); + if (p.protectionFunctions) rows.push({ labelKey: '保护功能', value: p.protectionFunctions }); + if (p.cooling) rows.push({ labelKey: '散热方式', value: p.cooling }); + if (p.operatingTemp) rows.push({ labelKey: '运行温度', value: p.operatingTemp }); + if (p.storageTemp) rows.push({ labelKey: '存储温度', value: p.storageTemp }); + if (p.humidity) rows.push({ labelKey: '湿度', value: p.humidity }); + if (p.noiseLevel) rows.push({ labelKey: '噪音', value: p.noiseLevel }); + if (p.altitude) rows.push({ labelKey: '海拔(m)', value: p.altitude }); + if (p.color) rows.push({ labelKey: '颜色', value: p.color }); + if (p.protectionClass) rows.push({ labelKey: '防护等级', value: p.protectionClass }); + if (p.topology) rows.push({ labelKey: '拓扑结构', value: p.topology }); + if (p.safetyStandard) rows.push({ labelKey: '安规/EMC标准', value: p.safetyStandard }); + if (p.gridStandard) rows.push({ labelKey: '并网标准', value: p.gridStandard }); + if (p.otherStandard) rows.push({ labelKey: '其他标准', value: p.otherStandard }); + } else if (isInverterCategory(cat)) { if (p.batteryType) rows.push({ labelKey: '电池类型', value: p.batteryType }); if (p.batteryVoltage) rows.push({ labelKey: '电池电压', value: p.batteryVoltage }); if (p.maxChargingVoltage) rows.push({ labelKey: '最大充电电压', value: p.maxChargingVoltage }); @@ -683,6 +724,19 @@ function productExportRows(p, categories) { if (p.cabinetWeight) rows.push({ labelKey: '系统柜重量(kg)', value: p.cabinetWeight }); if (p.altitude) rows.push({ labelKey: '海拔(m)', value: p.altitude }); if (p.selfDischargeRate) rows.push({ labelKey: '自放电率', value: p.selfDischargeRate }); + if (p.cellConfiguration) rows.push({ labelKey: '电芯串并联组合', value: p.cellConfiguration }); + if (p.chargingEfficiency) rows.push({ labelKey: '充电效率', value: p.chargingEfficiency }); + if (p.dischargingEfficiency) rows.push({ labelKey: '放电效率', value: p.dischargingEfficiency }); + if (p.recommendedChargingVoltage) rows.push({ labelKey: '推荐充电电压', value: p.recommendedChargingVoltage }); + if (p.maxChargingCurrent) rows.push({ labelKey: '最大充电电流', value: p.maxChargingCurrent }); + if (p.recommendedDischargeCurrent) rows.push({ labelKey: '推荐放电电流', value: p.recommendedDischargeCurrent }); + if (p.maxDischargeCurrent) rows.push({ labelKey: '最大放电电流', value: p.maxDischargeCurrent }); + if (p.dischargeCutoffVoltage) rows.push({ labelKey: '放电截止电压', value: p.dischargeCutoffVoltage }); + if (p.packageDimensions) rows.push({ labelKey: '包装尺寸(mm)', value: p.packageDimensions }); + if (p.grossWeight) rows.push({ labelKey: '毛重(kg)', value: p.grossWeight }); + if (p.shellMaterial) rows.push({ labelKey: '外壳材质', value: p.shellMaterial }); + if (p.optionalFunctions) rows.push({ labelKey: '可选功能', value: p.optionalFunctions }); + if (p.chargingTempRange) rows.push({ labelKey: '充电温度范围', value: p.chargingTempRange }); } else if (isUpsCategory(cat) && (p.type === '离线式UPS' || p.type === '在线互动式UPS')) { if (p.powerOrCapacity) rows.push({ labelKey: '容量', value: p.powerOrCapacity }); if (p.inputVoltage) rows.push({ labelKey: '输入电压', value: p.inputVoltage }); @@ -919,6 +973,19 @@ const blankProduct = () => ({ cabinetWeight: '', // 系统柜重量(kg),如 "544±10(8模组配置)" altitude: '', // 海拔(m),如 "≤4000(>2000降额使用)" selfDischargeRate: '', // 自放电率,如 "<5%(环境温度0~30℃/30天)" + cellConfiguration: '', // 电芯串并联组合,如 "16S1P" + chargingEfficiency: '', // 充电效率,如 "≥97%" + dischargingEfficiency: '', // 放电效率,如 "≥98%" + recommendedChargingVoltage: '', // 推荐充电电压,如 "57.6V" + maxChargingCurrent: '', // 最大充电电流(A),如 "200A" + recommendedDischargeCurrent: '', // 推荐放电电流(A),如 "100A" + maxDischargeCurrent: '', // 最大放电电流(A),如 "200A" + dischargeCutoffVoltage: '', // 放电截止电压,如 "43.2V" + packageDimensions: '', // 包装尺寸(mm),如 "1025×545×320" + grossWeight: '', // 毛重(kg),如 "95±2" + shellMaterial: '', // 外壳材质,如 "Metal" + optionalFunctions: '', // 可选功能,如 "防盗、LCD显示" + chargingTempRange: '', // 充电温度范围,如 "0°C~45°C" // 太阳能混网逆变器专属字段(光伏逆变器大类)——电池输入、PV输入、AC输出(并网/离网)、效率、标准 batteryType: '', // 电池类型,如 "Lithium or lead acid battery" maxChargingVoltage: '', // 最大充电电压,如 "≤60 (Configurable)" @@ -978,6 +1045,51 @@ function computeMaxPowerKW(ratedPower, ratedPowerUnit, powerFactor) { } function powerInfoItems(p, categories) { const cat = (categories || []).find(c => c.id === p.category); + if (isBatteryCategory(cat) && p.type === '家庭储能系统') { + // 电池+逆变器一体机:电池模块字段和逆变器字段都要展示,不是二选一 + const items = []; + if (p.moduleCapacity) items.push({ key: 'modulecap', label: '额定容量', value: p.moduleCapacity }); + if (p.moduleVoltage) items.push({ key: 'modulevoltage', label: '额定电压', value: p.moduleVoltage }); + if (p.cellType) items.push({ key: 'celltype', label: '电芯类型', value: p.cellType }); + if (p.moduleMaxEnergy) items.push({ key: 'modulemaxenergy', label: '模块最大能量(kWh)', value: p.moduleMaxEnergy }); + if (p.moduleOutputPower) items.push({ key: 'moduleoutputpower', label: '模块输出功率(kW)', value: p.moduleOutputPower }); + if (p.moduleDimensions) items.push({ key: 'moduledim', label: '模块尺寸(mm)', value: p.moduleDimensions }); + if (p.moduleWeight) items.push({ key: 'moduleweight', label: '模块重量(kg)', value: p.moduleWeight }); + if (p.cycleLife) items.push({ key: 'cyclelife', label: '循环寿命', value: p.cycleLife }); + if (p.selfDischargeRate) items.push({ key: 'selfdischarge', label: '自放电率', value: p.selfDischargeRate }); + if (p.maxChargingVoltage) items.push({ key: 'maxchargingvoltage', label: '最大充电电压', value: p.maxChargingVoltage }); + if (p.maxChargeDischargeCurrent) items.push({ key: 'maxchargedischarge', label: '最大充放电电流', value: p.maxChargeDischargeCurrent }); + if (p.maxDcInputPower) items.push({ key: 'maxdcpower', label: '最大直流输入功率', value: p.maxDcInputPower }); + if (p.maxDcInputVoltage) items.push({ key: 'maxdcvoltage', label: '最大直流输入电压', value: p.maxDcInputVoltage }); + if (p.mpptVoltageRange) items.push({ key: 'mpptrange', label: 'MPPT工作电压范围', value: p.mpptVoltageRange }); + if (p.startingVoltage) items.push({ key: 'startvoltage', label: '启动电压', value: p.startingVoltage }); + if (p.maxInputCurrent) items.push({ key: 'maxinputcurrent', label: '最大输入电流', value: p.maxInputCurrent }); + if (p.mpptNumber) items.push({ key: 'mpptnum', label: 'MPPT路数', value: p.mpptNumber }); + if (p.outputVoltage) items.push({ key: 'outputvoltage', label: '输出电压', value: p.outputVoltage }); + if (p.ratedOutputFrequency) items.push({ key: 'outputfreq', label: '额定输出频率', value: p.ratedOutputFrequency }); + if (p.outputPowerFactor) items.push({ key: 'outputpf', label: '输出功率因数', value: p.outputPowerFactor }); + if (p.offGridRatedApparentPower) items.push({ key: 'offgridrated', label: '离网额定输出视在功率', value: p.offGridRatedApparentPower }); + if (p.offGridMaxApparentPower) items.push({ key: 'offgridmax', label: '离网最大输出视在功率', value: p.offGridMaxApparentPower }); + if (p.offGridMaxOutputCurrent) items.push({ key: 'offgridcurrent', label: '离网最大输出电流', value: p.offGridMaxOutputCurrent }); + if (p.efficiencyMppt) items.push({ key: 'effmppt', label: '最大效率(MPPT)', value: p.efficiencyMppt }); + if (p.efficiencyMax) items.push({ key: 'effmax', label: '最大效率', value: p.efficiencyMax }); + if (p.commInterface) items.push({ key: 'comminterface', label: '通信接口', value: p.commInterface }); + if (p.protectionFunctions) items.push({ key: 'protectionfunc', label: '保护功能', value: p.protectionFunctions }); + if (p.cooling) items.push({ key: 'cooling', label: '散热方式', value: p.cooling }); + if (p.operatingTemp) items.push({ key: 'operatingtemp', label: '运行温度', value: p.operatingTemp }); + if (p.storageTemp) items.push({ key: 'storagetemp', label: '存储温度', value: p.storageTemp }); + if (p.humidity) items.push({ key: 'humidity', label: '湿度', value: p.humidity }); + if (p.noiseLevel) items.push({ key: 'noiselevel', label: '噪音', value: p.noiseLevel }); + if (p.altitude) items.push({ key: 'altitude', label: '海拔(m)', value: p.altitude }); + if (p.color) items.push({ key: 'color', label: '颜色', value: p.color }); + if (p.protectionClass) items.push({ key: 'protectionclass', label: '防护等级', value: p.protectionClass }); + if (p.topology) items.push({ key: 'topology', label: '拓扑结构', value: p.topology }); + if (p.safetyStandard) items.push({ key: 'safetystd', label: '安规/EMC标准', value: p.safetyStandard }); + if (p.gridStandard) items.push({ key: 'gridstd', label: '并网标准', value: p.gridStandard }); + if (p.otherStandard) items.push({ key: 'otherstd', label: '其他标准', value: p.otherStandard }); + insertExtraSpecs(items, p.extraSpecs, 'label'); + return items; + } if (isInverterCategory(cat)) { const items = []; if (p.batteryType) items.push({ key: 'batterytype', label: '电池类型', value: p.batteryType }); @@ -1042,6 +1154,19 @@ function powerInfoItems(p, categories) { if (p.cabinetWeight) items.push({ key: 'cabinetweight', label: '系统柜重量(kg)', value: p.cabinetWeight }); if (p.altitude) items.push({ key: 'altitude', label: '海拔(m)', value: p.altitude }); if (p.selfDischargeRate) items.push({ key: 'selfdischarge', label: '自放电率', value: p.selfDischargeRate }); + if (p.cellConfiguration) items.push({ key: 'cellconfig', label: '电芯串并联组合', value: p.cellConfiguration }); + if (p.chargingEfficiency) items.push({ key: 'chargeeff', label: '充电效率', value: p.chargingEfficiency }); + if (p.dischargingEfficiency) items.push({ key: 'dischargeeff', label: '放电效率', value: p.dischargingEfficiency }); + if (p.recommendedChargingVoltage) items.push({ key: 'recchargevoltage', label: '推荐充电电压', value: p.recommendedChargingVoltage }); + if (p.maxChargingCurrent) items.push({ key: 'maxchargecurrent', label: '最大充电电流', value: p.maxChargingCurrent }); + if (p.recommendedDischargeCurrent) items.push({ key: 'recdischargecurrent', label: '推荐放电电流', value: p.recommendedDischargeCurrent }); + if (p.maxDischargeCurrent) items.push({ key: 'maxdischargecurrent', label: '最大放电电流', value: p.maxDischargeCurrent }); + if (p.dischargeCutoffVoltage) items.push({ key: 'dischargecutoff', label: '放电截止电压', value: p.dischargeCutoffVoltage }); + if (p.packageDimensions) items.push({ key: 'packagedim', label: '包装尺寸(mm)', value: p.packageDimensions }); + if (p.grossWeight) items.push({ key: 'grossweight', label: '毛重(kg)', value: p.grossWeight }); + if (p.shellMaterial) items.push({ key: 'shellmaterial', label: '外壳材质', value: p.shellMaterial }); + if (p.optionalFunctions) items.push({ key: 'optionalfunc', label: '可选功能', value: p.optionalFunctions }); + if (p.chargingTempRange) items.push({ key: 'chargetemprange', label: '充电温度范围', value: p.chargingTempRange }); insertExtraSpecs(items, p.extraSpecs, 'label'); return items; } @@ -2815,6 +2940,13 @@ function MainApp({ username, onLogout }) { operatingTemp: p.operatingTemp || '', color: p.color || '', cabinetDimensions: p.cabinetDimensions || '', cabinetWeight: p.cabinetWeight || '', altitude: p.altitude || '', selfDischargeRate: p.selfDischargeRate || '', + cellConfiguration: p.cellConfiguration || '', chargingEfficiency: p.chargingEfficiency || '', + dischargingEfficiency: p.dischargingEfficiency || '', recommendedChargingVoltage: p.recommendedChargingVoltage || '', + maxChargingCurrent: p.maxChargingCurrent || '', recommendedDischargeCurrent: p.recommendedDischargeCurrent || '', + maxDischargeCurrent: p.maxDischargeCurrent || '', dischargeCutoffVoltage: p.dischargeCutoffVoltage || '', + packageDimensions: p.packageDimensions || '', grossWeight: p.grossWeight || '', + shellMaterial: p.shellMaterial || '', optionalFunctions: p.optionalFunctions || '', + chargingTempRange: p.chargingTempRange || '', batteryType: p.batteryType || '', maxChargingVoltage: p.maxChargingVoltage || '', maxChargeDischargeCurrent: p.maxChargeDischargeCurrent || '', maxDcInputPower: p.maxDcInputPower || '', maxDcInputVoltage: p.maxDcInputVoltage || '', mpptVoltageRange: p.mpptVoltageRange || '', @@ -2895,6 +3027,13 @@ function MainApp({ username, onLogout }) { operatingTemp: d.operatingTemp || '', color: d.color || '', cabinetDimensions: d.cabinetDimensions || '', cabinetWeight: d.cabinetWeight || '', altitude: d.altitude || '', selfDischargeRate: d.selfDischargeRate || '', + cellConfiguration: d.cellConfiguration || '', chargingEfficiency: d.chargingEfficiency || '', + dischargingEfficiency: d.dischargingEfficiency || '', recommendedChargingVoltage: d.recommendedChargingVoltage || '', + maxChargingCurrent: d.maxChargingCurrent || '', recommendedDischargeCurrent: d.recommendedDischargeCurrent || '', + maxDischargeCurrent: d.maxDischargeCurrent || '', dischargeCutoffVoltage: d.dischargeCutoffVoltage || '', + packageDimensions: d.packageDimensions || '', grossWeight: d.grossWeight || '', + shellMaterial: d.shellMaterial || '', optionalFunctions: d.optionalFunctions || '', + chargingTempRange: d.chargingTempRange || '', batteryType: d.batteryType || '', maxChargingVoltage: d.maxChargingVoltage || '', maxChargeDischargeCurrent: d.maxChargeDischargeCurrent || '', maxDcInputPower: d.maxDcInputPower || '', maxDcInputVoltage: d.maxDcInputVoltage || '', mpptVoltageRange: d.mpptVoltageRange || '', @@ -5294,6 +5433,9 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage, // 任何自定义细分品类)都自动落入这套完整的大功率UPS字段集,不用每次新增分类都要改代码。 const isRackLikeUps = isUps && !isMiniUps && !isOfflineOrLI; const isBatterySystem = isBatteryCategory(cat); + // "家庭储能系统"是电池+逆变器一体机,编辑/展示时电池模块字段和逆变器字段都要给, + // 所以单独拎出来,不能简单归进isBatterySystem(那样会漏掉逆变器那一半字段) + const isHybridBatteryInverter = isBatteryCategory(cat) && draft.type === '家庭储能系统'; // 光伏逆变器大类下只有这一套字段集,所以整个大类直接通用,同样不管以后新增什么细分品类名字 const isSolarHybridInverter = isInverterCategory(cat); const maxKW = computeMaxPowerKW(draft.ratedPower, draft.ratedPowerUnit, draft.powerFactor); @@ -5476,7 +5618,79 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage, )} - {isSolarHybridInverter ? ( + {isHybridBatteryInverter ? ( + <> +