diff --git a/App.jsx b/App.jsx index bfc2851..53463d0 100644 --- a/App.jsx +++ b/App.jsx @@ -857,6 +857,7 @@ function upsertProductByName(list, product) { webDetailImages: existing.webDetailImages, webDetailTemplateIds: existing.webDetailTemplateIds, webSockets: existing.webSockets, + webPack: existing.webPack, youtubeUrl: product.youtubeUrl ?? existing.youtubeUrl, webDescription: product.webDescription ?? existing.webDescription, webSale: product.webSale ?? existing.webSale, @@ -1043,6 +1044,7 @@ const blankProduct = () => ({ webImages: [], // 网站主图文件名,最多6张,第一张为封面;为空时网站用 productImageFileName webDetailImages: [], // 网站产品详情图,最多20张,显示在规格表下方 webSockets: [], // 离线式/在线互动式UPS:网站展示的默认插座 [{ type, count }] + webPack: { per: '', nw: '', gw: '', l: '', w: '', h: '' }, // 箱规:每箱数量、每箱净重/毛重(kg)、外箱长宽高(mm),网站按数量自动生成箱单 webDetailTemplateIds: [], // 引用的详情模板id,按顺序显示在详情图下方(模板改了,所有引用它的产品下次更新网站时一起变) youtubeUrl: '', // 网站产品视频(YouTube链接) webDescription: { en: '', es: '', ru: '' }, // 网站产品介绍:只需填英文,其他语言在网站构建时用DeepSeek自动翻译;es/ru填了就用手动译文 @@ -6368,6 +6370,39 @@ function HtmlTemplateEditor({ tpl, update, products, onNotify }) { ); } +// 箱规(所有品类通用):填了每箱数量、每箱毛重和外箱尺寸,网站产品页就按客户选的数量自动生成箱单 +function WebPackEditor({ value, onChange }) { + const v = { per: '', nw: '', gw: '', l: '', w: '', h: '', ...(value || {}) }; + const set = (patch) => onChange({ ...v, ...patch }); + const n = (x) => parseFloat(String(x).replace(',', '.')) || 0; + const per = n(v.per), nw = n(v.nw), gw = n(v.gw), box = n(v.l) * n(v.w) * n(v.h) / 1e9; + const ready = per > 0 && gw > 0 && box > 0; + const num = (k, label, ph) => ( + + ); + return ( +