From 14a80cb167da2f89ccdd8b87197e05ebef637814 Mon Sep 17 00:00:00 2001 From: fengpu <18691763612@163.com> Date: Thu, 18 Jun 2026 09:54:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=90=A5=E5=85=BB?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=87=80=E8=8F=9C=E8=81=94=E5=8A=A8=E4=B8=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +- .../mini-program/nutrition/ask-home.html | 2 +- .../mini-program/nutrition/doc/CHANGELOG.md | 9 + .../mini-program/nutrition/eat-home.html | 2 +- .../mini-program/nutrition/eat-nutrition.html | 2 +- .../nutrition/eat-recipe-today.html | 2 +- .../mini-program/nutrition/eat-recipe.html | 2 +- .../mini-program/nutrition/make-home.html | 2 +- .../mini-program/nutrition/make-popular.html | 2 +- .../mini-program/nutrition/make-ranking.html | 2 +- .../mini-program/nutrition/me-home.html | 4 +- .../mini-program/nutrition/me-login.html | 651 ++++++++++++++++++ web-admin/nutrition/din-dish-add.html | 113 +-- web-admin/nutrition/din-dish-all.html | 18 +- web-admin/nutrition/din-ingredient-add.html | 55 +- web-admin/nutrition/din-ingredient.html | 22 +- web-admin/nutrition/doc/CHANGELOG.md | 367 +++++----- web-admin/nutrition/prod-clean-order.html | 192 +++++- web-admin/nutrition/prod-proc-cabinet.html | 11 +- web-admin/nutrition/prod-proc-combo.html | 17 +- web-admin/nutrition/prod-proc-cook.html | 17 +- web-admin/nutrition/sup-clean-external.html | 202 ++++-- web-admin/nutrition/sup-clean-internal.html | 162 ++++- web-admin/nutrition/sup-in-clean.html | 64 +- web-admin/nutrition/sup-in-cleanin.html | 53 +- web-admin/nutrition/sup-pkg-label.html | 135 +++- 26 files changed, 1643 insertions(+), 468 deletions(-) create mode 100644 other-module/mini-program/nutrition/me-login.html diff --git a/index.html b/index.html index 7b11321..14838b5 100644 --- a/index.html +++ b/index.html @@ -831,6 +831,7 @@ const SITE_MAP = [ {label:'分享赚钱', file:'make-share.html'}, {label:'热门创作', file:'make-popular.html'}, {label:'我的创作', file:'make-my-recipes.html'}, + {label:'微信授权登录', file:'me-login.html'}, {label:'个人中心', file:'me-home.html'}, {label:'健康档案', file:'me-health.html'}, {label:'我的订单', file:'me-orders.html'}, @@ -1072,4 +1073,4 @@ function openMdPreview(filePath, title) { } - \ No newline at end of file + diff --git a/other-module/mini-program/nutrition/ask-home.html b/other-module/mini-program/nutrition/ask-home.html index 3302b3e..91a3cc7 100644 --- a/other-module/mini-program/nutrition/ask-home.html +++ b/other-module/mini-program/nutrition/ask-home.html @@ -112,7 +112,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/doc/CHANGELOG.md b/other-module/mini-program/nutrition/doc/CHANGELOG.md index 258b4cd..38994af 100644 --- a/other-module/mini-program/nutrition/doc/CHANGELOG.md +++ b/other-module/mini-program/nutrition/doc/CHANGELOG.md @@ -1,5 +1,14 @@ # 营养管理小程序 CHANGELOG +## [1.2.1] - 2026-06-17 + +### 变更 + +**我模块** +- `me-login.html` — 新增独立微信授权登录页,按“微信登录 → 手机号授权 → 进入个人中心”的主流小程序流程承接“我”入口 +- `me-home.html` — 恢复个人中心原有样式与内容,仅保留登录成功后的目标页面职责 +- `ask-home.html`、`eat-home.html`、`eat-nutrition.html`、`eat-recipe.html`、`eat-recipe-today.html`、`make-home.html`、`make-popular.html`、`make-ranking.html`、`index.html` — 将“我”入口与导航页条目切换为先进入 `me-login.html` + ## [1.0.0] - 2026-05-13 ### 新增 diff --git a/other-module/mini-program/nutrition/eat-home.html b/other-module/mini-program/nutrition/eat-home.html index 6659b97..3811df1 100644 --- a/other-module/mini-program/nutrition/eat-home.html +++ b/other-module/mini-program/nutrition/eat-home.html @@ -149,7 +149,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-nutrition.html b/other-module/mini-program/nutrition/eat-nutrition.html index d5803c8..f0e0bca 100644 --- a/other-module/mini-program/nutrition/eat-nutrition.html +++ b/other-module/mini-program/nutrition/eat-nutrition.html @@ -327,7 +327,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-recipe-today.html b/other-module/mini-program/nutrition/eat-recipe-today.html index 1249fc9..6282b4d 100644 --- a/other-module/mini-program/nutrition/eat-recipe-today.html +++ b/other-module/mini-program/nutrition/eat-recipe-today.html @@ -402,7 +402,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-recipe.html b/other-module/mini-program/nutrition/eat-recipe.html index 2a5a281..6cdf851 100644 --- a/other-module/mini-program/nutrition/eat-recipe.html +++ b/other-module/mini-program/nutrition/eat-recipe.html @@ -190,7 +190,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-home.html b/other-module/mini-program/nutrition/make-home.html index 8bbc489..62e26b9 100644 --- a/other-module/mini-program/nutrition/make-home.html +++ b/other-module/mini-program/nutrition/make-home.html @@ -192,7 +192,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-popular.html b/other-module/mini-program/nutrition/make-popular.html index 6215e61..cb57146 100644 --- a/other-module/mini-program/nutrition/make-popular.html +++ b/other-module/mini-program/nutrition/make-popular.html @@ -235,7 +235,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-ranking.html b/other-module/mini-program/nutrition/make-ranking.html index d1d9769..ea788b5 100644 --- a/other-module/mini-program/nutrition/make-ranking.html +++ b/other-module/mini-program/nutrition/make-ranking.html @@ -224,7 +224,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/me-home.html b/other-module/mini-program/nutrition/me-home.html index 9f8b67e..71e7d7c 100644 --- a/other-module/mini-program/nutrition/me-home.html +++ b/other-module/mini-program/nutrition/me-home.html @@ -138,9 +138,9 @@ 🍽️ 💬 🍳 - 👤 + 👤
- \ No newline at end of file + diff --git a/other-module/mini-program/nutrition/me-login.html b/other-module/mini-program/nutrition/me-login.html new file mode 100644 index 0000000..64107a2 --- /dev/null +++ b/other-module/mini-program/nutrition/me-login.html @@ -0,0 +1,651 @@ + + + + + + 登录 | 智能营养小程序 + + + +
+
+ 09:41 +
+ + + +
+
+ + +
+
请先勾选协议后再继续
+ + + +
+
+
微信手机号授权
+
+
+
营养管理服务
+
+

申请获取你微信绑定的手机号:

+

131****8827

+
+
+ + + +
+
+
+
+ +
+
+ + + + diff --git a/web-admin/nutrition/din-dish-add.html b/web-admin/nutrition/din-dish-add.html index 72227ab..023b4e3 100644 --- a/web-admin/nutrition/din-dish-add.html +++ b/web-admin/nutrition/din-dish-add.html @@ -268,11 +268,11 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
-
-
- -
+
+
+
+
@@ -286,7 +286,11 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei - \ No newline at end of file + diff --git a/web-admin/nutrition/din-ingredient-add.html b/web-admin/nutrition/din-ingredient-add.html index 3ad61da..94e0e48 100644 --- a/web-admin/nutrition/din-ingredient-add.html +++ b/web-admin/nutrition/din-ingredient-add.html @@ -234,11 +234,8 @@ var STEP_HTML = [
-
-
- - -
+
+
@@ -371,6 +368,7 @@ function saveCurrentStep(){ inputs.forEach(function(el){if(el.id) formData[el.id]=el.value;}); // 保存动态行数据 if(currentStep===0){ + saveVegTypes(); var rows = document.querySelectorAll('#crowdRows .dynamic-row'); crowdList = []; rows.forEach(function(row){ @@ -450,30 +448,41 @@ function submitForm(){ window.location.href='din-ingredient.html'; } -/* === 净菜类型 === */ +/* === 净菜类型动态行 === */ function renderVegTypes(){ - var group = document.getElementById('vegTypeGroup'); - if(!group) return; + var container = document.getElementById('vegTypeRows'); + if(!container) return; + if(vegTypes.length===0) vegTypes.push({name:'',yieldRate:''}); var html = ''; - vegTypes.forEach(function(t,i){ - html += ''+t+'×'; + vegTypes.forEach(function(item,i){ + html += '
'; + html += ''; + html += ''; + html += ''; + html += '
'; }); - group.innerHTML = html; + container.innerHTML = html; } function addVegType(){ - var input = document.getElementById('vegTypeInput'); - if(!input) return; - var val = input.value.trim(); - if(val){ - vegTypes.push(val); - input.value = ''; - renderVegTypes(); - } + saveVegTypes(); + vegTypes.push({name:'',yieldRate:''}); + renderVegTypes(); } function removeVegType(idx){ + saveVegTypes(); vegTypes.splice(idx,1); + if(vegTypes.length===0) vegTypes.push({name:'',yieldRate:''}); renderVegTypes(); } +function saveVegTypes(){ + var rows = document.querySelectorAll('#vegTypeRows .dynamic-row'); + vegTypes = []; + rows.forEach(function(row){ + var name = row.querySelector('.veg-name'); + var yieldRate = row.querySelector('.veg-yield'); + if(name && yieldRate) vegTypes.push({name:name.value,yieldRate:yieldRate.value}); + }); +} /* === 食物分类级联选择器 === */ var ADD_CATEGORIES={'谷薯类':['稻米','小麦','玉米','薯类','杂粮'],'畜禽肉类':['猪肉','牛肉','羊肉','鸡肉','鸭肉'],'水产类':['淡水鱼','海水鱼','虾蟹','贝类'],'蛋类':['鸡蛋','鸭蛋','鹅蛋','鹌鹑蛋'],'奶及奶制品':['牛奶','酸奶','奶酪','奶粉'],'豆及豆制品':['大豆','豆制品','杂豆'],'蔬菜类':['叶菜类','根茎类','瓜果类','菌菇类','豆荚类'],'水果类':['仁果类','浆果类','柑橘类','瓜果类','热带水果'],'坚果种子类':['坚果','种子'],'油脂类':['植物油','动物油'],'调味品类':['酱料','香辛料','调味汁']}; @@ -618,7 +627,7 @@ if(initTab >= 0 && initTab < totalSteps) currentStep = initTab; /* 编辑模式 mock 数据(与 din-ingredient.html 的 FOODS 结构一致) */ var EDIT_FOODS = { - '0101001':{name:'粳米(生)',code:'0101001',alias:'大米',firstClass:'谷薯类',secondClass:'稻米',edible:'97',waterRate:'13.3',dataSource:'0',vegTypes:['洗净米','免淘米'], + '0101001':{name:'粳米(生)',code:'0101001',alias:'大米',firstClass:'谷薯类',secondClass:'稻米',edible:'97',waterRate:'13.3',dataSource:'0',vegTypes:[{name:'洗净米',yieldRate:'97'},{name:'免淘米',yieldRate:'95'}], crowd:[{name:'全人群',level:'推荐'},{name:'糖尿病人群',level:'适量'}], nutri:{calorie:346,protein:7.4,fat:0.6,carbohydrate:77.2,dietary_fiber:0.7, vitamin_a:0,vitamin_b1:0.11,vitamin_b2:0.02,vitamin_b6:0.12,vitamin_b12:0,vitamin_c:0,vitamin_d:0,vitamin_e:1.01,vitamin_k:0,niacin:1.6,folic_acid:3.8,biotin:0,pantothenic_acid:0.6,total_choline:0, @@ -629,7 +638,7 @@ var EDIT_FOODS = { color:{main:'乳白色',grade:'优',desc:'色泽洁白,半透明,颗粒饱满',cause:'碾磨去皮后淀粉体暴露'}, taste:{main:'淡味',sub:'微涩',intensity:'弱',desc:'生米无明显味道,煮熟后清香'}, texture:{main:'软糯',chew:'易',digest:'中',desc:'米粒饱满,质地坚硬,煮后软糯',cook:'水米比1:1.2,浸泡30分钟口感更佳'}}, - '0301001':{name:'猪里脊(生)',code:'0301001',alias:'里脊肉',firstClass:'畜禽肉类',secondClass:'猪肉',edible:'100',waterRate:'73.3',dataSource:'0',vegTypes:['去筋膜','切丁'], + '0301001':{name:'猪里脊(生)',code:'0301001',alias:'里脊肉',firstClass:'畜禽肉类',secondClass:'猪肉',edible:'100',waterRate:'73.3',dataSource:'0',vegTypes:[{name:'去筋膜',yieldRate:'92'},{name:'切丁',yieldRate:'88'}], crowd:[{name:'成人',level:'推荐'},{name:'儿童',level:'推荐'},{name:'高血脂人群',level:'适量'}], nutri:{calorie:143,protein:20.2,fat:7.1,carbohydrate:0.7,dietary_fiber:0, vitamin_a:6,vitamin_b1:0.54,vitamin_b2:0.1,vitamin_b6:0.27,vitamin_b12:0.6,vitamin_c:0,vitamin_d:0.2,vitamin_e:0.34,vitamin_k:0,niacin:5.3,folic_acid:5,biotin:0,pantothenic_acid:0.5,total_choline:0, @@ -651,7 +660,7 @@ var EDIT_FOODS = { color:{main:'金黄色',grade:'优',desc:'蛋壳浅褐,蛋黄金黄饱满',cause:'蛋黄富含叶黄素和类胡萝卜素'}, taste:{main:'鲜味',sub:'蛋香',intensity:'中',desc:'蛋白柔和,蛋黄浓郁'}, texture:{main:'嫩滑',chew:'易',digest:'易',desc:'水煮蛋弹嫩,炒蛋软嫩,蒸蛋细腻',cook:'蒸蛋口感最软,适合各年龄段'}}, - '0201001':{name:'菠菜(生)',code:'0201001',alias:'波斯菜',firstClass:'蔬菜类',secondClass:'叶菜类',edible:'89',waterRate:'91.2',dataSource:'0',vegTypes:['去根','切段'], + '0201001':{name:'菠菜(生)',code:'0201001',alias:'波斯菜',firstClass:'蔬菜类',secondClass:'叶菜类',edible:'89',waterRate:'91.2',dataSource:'0',vegTypes:[{name:'去根',yieldRate:'90'},{name:'切段',yieldRate:'88'}], crowd:[{name:'全人群',level:'推荐'},{name:'肾结石人群',level:'慎食'}], nutri:{calorie:28,protein:2.6,fat:0.3,carbohydrate:4.5,dietary_fiber:1.7, vitamin_a:487,vitamin_b1:0.04,vitamin_b2:0.11,vitamin_b6:0.1,vitamin_b12:0,vitamin_c:32,vitamin_d:0,vitamin_e:1.74,vitamin_k:0,niacin:0.6,folic_acid:110,biotin:0,pantothenic_acid:0.2,total_choline:0, @@ -662,7 +671,7 @@ var EDIT_FOODS = { color:{main:'深绿色',grade:'优',desc:'叶片翠绿有光泽,根部紫红',cause:'叶绿素含量高'}, taste:{main:'清甜',sub:'微涩',intensity:'弱',desc:'清爽微甜带涩'}, texture:{main:'嫩脆',chew:'易',digest:'易',desc:'叶片嫩滑,茎部脆嫩',cook:'焯水去草酸后口感最佳'}}, - '0601001':{name:'豆腐(北)',code:'0601001',alias:'北豆腐',firstClass:'豆及豆制品',secondClass:'豆制品',edible:'100',waterRate:'82.8',dataSource:'1',vegTypes:['切块','切丁'], + '0601001':{name:'豆腐(北)',code:'0601001',alias:'北豆腐',firstClass:'豆及豆制品',secondClass:'豆制品',edible:'100',waterRate:'82.8',dataSource:'1',vegTypes:[{name:'切块',yieldRate:'96'},{name:'切丁',yieldRate:'94'}], crowd:[{name:'全人群',level:'推荐'},{name:'高血压人群',level:'推荐'},{name:'痛风人群',level:'适量'},{name:'老年人',level:'推荐'},{name:'术后恢复',level:'推荐'}], nutri:{calorie:98,protein:12.2,fat:4.8,carbohydrate:1.5,dietary_fiber:0.4, vitamin_a:0,vitamin_b1:0.07,vitamin_b2:0.04,vitamin_b6:0.05,vitamin_b12:0,vitamin_c:0,vitamin_d:0,vitamin_e:2.71,vitamin_k:0,niacin:0.1,folic_acid:37,biotin:0,pantothenic_acid:0.1,total_choline:0, diff --git a/web-admin/nutrition/din-ingredient.html b/web-admin/nutrition/din-ingredient.html index 4dd4fbe..b423f0b 100644 --- a/web-admin/nutrition/din-ingredient.html +++ b/web-admin/nutrition/din-ingredient.html @@ -119,6 +119,12 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .profile-field__label{font-size:var(--font-xs);color:var(--text-placeholder);} .profile-field__value{font-size:var(--font-sm);color:var(--text-primary);line-height:1.5;} .profile-field--full{grid-column:1/-1;} +/* 净菜类型小表格 */ +.veg-type-table{width:100%;border-collapse:collapse;border:1px solid #F0F0F0;border-radius:var(--radius-sm);overflow:hidden;margin-top:4px;} +.veg-type-table th{background:#FAFAFA;font-size:var(--font-xs);color:var(--text-secondary);font-weight:500;text-align:left;padding:8px 12px;border-bottom:1px solid #F0F0F0;} +.veg-type-table td{font-size:var(--font-sm);color:var(--text-primary);padding:8px 12px;border-bottom:1px solid #F5F5F5;} +.veg-type-table tr:last-child td{border-bottom:none;} +.veg-type-table th+th,.veg-type-table td+td{border-left:1px solid #F0F0F0;} /* 级联选择器 */ .cascade-picker{position:relative;flex:1;} .cascade-trigger{height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 28px 0 10px;font-size:var(--font-xs);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 8px center;cursor:pointer;display:flex;align-items:center;white-space:nowrap;color:var(--text-placeholder);width:100%;} @@ -297,7 +303,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei - \ No newline at end of file + diff --git a/web-admin/nutrition/prod-proc-cook.html b/web-admin/nutrition/prod-proc-cook.html index b92a958..579383e 100644 --- a/web-admin/nutrition/prod-proc-cook.html +++ b/web-admin/nutrition/prod-proc-cook.html @@ -393,6 +393,13 @@ var recipeData={ ] }; var tagCls={'主材':'tag-blue','辅料':'tag-green','调料':'tag-orange'}; +var cleanTypeMap={ + '鸡胸肉':'鸡胸肉丁','花生米':'去皮花生仁','干辣椒':'干辣椒段','黄瓜丁':'黄瓜丁','葱姜蒜':'葱姜蒜末', + '番茄':'番茄块','鸡蛋':'蛋液','葱花':'葱花','五花肉':'五花肉块','酱油':'调味包','冰糖':'调味包', + '草鱼':'草鱼块','姜片':'姜片','葱丝':'葱丝','菠菜':'菠菜段','大蒜':'蒜末','西兰花':'西兰花朵', + '胡萝卜':'胡萝卜片','嫩豆腐':'豆腐块','肉末':'肉末','豆瓣酱':'调味包' +}; +function getCleanTypeName(name){return cleanTypeMap[name]||name;} /* 食材明细弹窗(动态渲染,溯源码可编辑) */ function openIngredientModal(name){ @@ -586,20 +593,20 @@ function showDetail(el){ // 食材明细表格 var ings=recipeData[dishName]||[]; bodyHtml+='
食材明细
'; - bodyHtml+=''; + bodyHtml+='
溯源码食材名称分类标准用量/份实际用量/份合计标准
'; if(ings.length){ ings.forEach(function(ig){ var total=ig.stdAmount*(qty||1); - bodyHtml+=''; + bodyHtml+=''; }); } else { - bodyHtml+=''; + bodyHtml+=''; } - bodyHtml+='
溯源码食材名称净菜类型分类标准用量/份实际用量/份合计标准
'+ig.trace+''+ig.name+''+ig.type+''+ig.stdAmount+ig.unit+''+ig.actualAmount+ig.unit+''+total+ig.unit+'
'+ig.trace+''+ig.name+''+getCleanTypeName(ig.name)+''+ig.type+''+ig.stdAmount+ig.unit+''+ig.actualAmount+ig.unit+''+total+ig.unit+'
暂无配方数据
暂无配方数据
'; + bodyHtml+='
'; Drawer.open('烹饪详情 — '+taskId, bodyHtml); } - \ No newline at end of file + diff --git a/web-admin/nutrition/sup-clean-external.html b/web-admin/nutrition/sup-clean-external.html index f15caf0..cf35ac4 100644 --- a/web-admin/nutrition/sup-clean-external.html +++ b/web-admin/nutrition/sup-clean-external.html @@ -101,6 +101,7 @@ textarea.form-control{height:auto;padding:8px 12px;resize:vertical;min-height:60 .form-divider{grid-column:1/-1;border:none;border-top:1px solid var(--border);margin:4px 0;} /* 只读字段 */ .form-control[readonly]{background:#F5F5F5;color:var(--text-secondary);cursor:default;} +.form-control:disabled{background:#f8fafc;color:var(--text-placeholder);cursor:not-allowed;} /* 右侧抽屉 */ .drawer-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:1000;animation:modalFadeIn .2s ease;} .drawer-overlay.closing{animation:modalFadeOut .2s ease forwards;} @@ -213,14 +214,14 @@ textarea.form-control{height:auto;padding:8px 12px;resize:vertical;min-height:60 订单号客户名称净菜类型净菜/餐品包装规格售卖份数计量(kg)单价(元/kg)小计金额下单时间物流单号订单状态操作 - EXT-001社区便民超市🥬 净菜包土豆(土豆丝)5kg/箱1050¥3.5¥1752026-04-22 08:00SF1234567890已完成详情 删除 - EXT-001社区便民超市🥬 净菜包土豆(土豆块)5kg/箱630¥3.5¥1052026-04-22 08:00SF1234567890已完成详情 删除 - EXT-002周边餐饮企业🥬 净菜包净猪里脊1kg/箱550¥28¥1,4002026-04-22 09:30SF9876543210配送中确认收货 详情 删除 + EXT-001社区便民超市🥬 净菜包土豆-土豆丝5kg/箱1050¥3.5¥1752026-04-22 08:00SF1234567890已完成详情 删除 + EXT-001社区便民超市🥬 净菜包土豆-土豆块5kg/箱630¥3.5¥1052026-04-22 08:00SF1234567890已完成详情 删除 + EXT-002周边餐饮企业🥬 净菜包净猪里脊-里脊条1kg/箱550¥28¥1,4002026-04-22 09:30SF9876543210配送中确认收货 详情 删除 EXT-003周边餐饮企业🍱 餐品净菜包宫保鸡丁标准份(500g)4020¥12¥2402026-04-22 09:30SF9876543210配送中确认收货 详情 删除 - EXT-004学校食堂🥬 净菜包鸡肉(鸡肉块)1kg/箱660¥2.0¥1202026-04-22 10:00—待配送立即发货 详情 删除 - EXT-004学校食堂🥬 净菜包净西兰花5kg/箱840¥4.5¥1802026-04-22 10:00—待配送立即发货 详情 删除 - EXT-005职工家属区团购🍱 餐品净菜包清蒸鱼标准份(500g)2010¥15¥1502026-04-22 10:30—备货中备货完成 详情 删除 - EXT-006职工家属区团购🍱 餐品净菜包蒜蓉菠菜标准份(500g)3015¥8¥1202026-04-22 10:30—备货中备货完成 详情 删除 + EXT-004学校食堂🥬 净菜包鸡肉-鸡肉块1kg/箱660¥2.0¥1202026-04-22 10:00—待配送立即发货 详情 删除 + EXT-004学校食堂🥬 净菜包西兰花-西兰花朵5kg/箱840¥4.5¥1802026-04-22 10:00—待配送立即发货 详情 删除 + EXT-005职工家属区团购🍱 餐品净菜包清蒸鱼标准份(600g)2012¥15¥1802026-04-22 10:30—备货中备货完成 详情 删除 + EXT-006职工家属区团购🍱 餐品净菜包蒜蓉菠菜标准份(400g)3012¥8¥962026-04-22 10:30—备货中备货完成 详情 删除
@@ -245,22 +246,35 @@ textarea.form-control{height:auto;padding:8px 12px;resize:vertical;min-height:60
-
-
- - + + + + + + + +
+ +
@@ -285,13 +299,17 @@ textarea.form-control{height:auto;padding:8px 12px;resize:vertical;min-height:60
-
+ +
- +
@@ -299,7 +317,7 @@ textarea.form-control{height:auto;padding:8px 12px;resize:vertical;min-height:60
- +
@@ -450,10 +468,10 @@ var batchInfo={ 'BATCH-DH-20260415-04':{dish:'炒胡萝卜',spec:'大份(800g)',method:'保鲜盒',qty:'6',date:'2026-04-15'} }; var dishIngredients={ - '宫保鸡丁':[{trace:'NC-PROC-JXR-20260415-01',name:'鸡胸肉',type:'主材',amount:'120g'},{trace:'NC-PROC-HUS-20260415-01',name:'花生',type:'辅材',amount:'20g'},{trace:'NC-PROC-GLJ-20260415-01',name:'干辣椒',type:'调料',amount:'5g'}], - '清蒸鱼':[{trace:'NC-PROC-CYU-20260415-01',name:'草鱼',type:'主材',amount:'100g'},{trace:'NC-PROC-JPN-20260415-01',name:'姜片',type:'调料',amount:'适量'}], - '蒜蓉菠菜':[{trace:'NC-PROC-BOC-20260415-01',name:'净菠菜',type:'主材',amount:'120g'},{trace:'NC-PROC-DSN-20260415-01',name:'大蒜',type:'调料',amount:'8g'}], - '炒胡萝卜':[{trace:'NC-PROC-HLB-20260415-01',name:'净胡萝卜',type:'主材',amount:'260g'},{trace:'NC-PROC-CJG-20260415-01',name:'葱姜',type:'调料',amount:'适量'}] + '宫保鸡丁':[{trace:'NC-PROC-JXR-20260415-01',name:'鸡胸肉',cleanType:'鸡胸丁',type:'主材',amount:'120g'},{trace:'NC-PROC-HUS-20260415-01',name:'花生',cleanType:'花生仁',type:'辅材',amount:'20g'},{trace:'NC-PROC-GLJ-20260415-01',name:'干辣椒',cleanType:'辣椒段',type:'调料',amount:'5g'}], + '清蒸鱼':[{trace:'NC-PROC-CYU-20260415-01',name:'草鱼',cleanType:'鱼片',type:'主材',amount:'100g'},{trace:'NC-PROC-JPN-20260415-01',name:'姜片',cleanType:'姜片',type:'调料',amount:'适量'}], + '蒜蓉菠菜':[{trace:'NC-PROC-BOC-20260415-01',name:'净菠菜',cleanType:'菠菜段',type:'主材',amount:'120g'},{trace:'NC-PROC-DSN-20260415-01',name:'大蒜',cleanType:'蒜末',type:'调料',amount:'8g'}], + '炒胡萝卜':[{trace:'NC-PROC-HLB-20260415-01',name:'净胡萝卜',cleanType:'胡萝卜丝',type:'主材',amount:'260g'},{trace:'NC-PROC-CJG-20260415-01',name:'葱姜',cleanType:'姜丝',type:'调料',amount:'适量'}] }; var dishBatch={ '宫保鸡丁':'BATCH-DH-20260415-01', @@ -462,16 +480,30 @@ var dishBatch={ '炒胡萝卜':'BATCH-DH-20260415-04' }; var traceMap={ - '净菠菜':'NC-PROC-BOC-20260415-01', - '净胡萝卜':'NC-PROC-HLB-20260415-01', - '净土豆丝':'NC-PROC-TDS-20260415-01', - '净西兰花':'NC-PROC-XLH-20260415-01', - '净白菜':'NC-PROC-BCA-20260415-01', - '净黄瓜':'NC-PROC-HGU-20260415-01' + '土豆-土豆丝':'NC-PROC-TDS-20260415-01', + '土豆-土豆块':'NC-PROC-TDK-20260415-01', + '净猪里脊-里脊条':'NC-PROC-ZJL-20260415-01', + '鸡肉-鸡肉块':'NC-PROC-CJRK-20260422-01', + '西兰花-西兰花朵':'NC-PROC-XLH-20260422-01', + '胡萝卜-胡萝卜条':'NC-PROC-HLB-20260415-01' +}; +var createNcTypes={ + '土豆':['土豆丝','土豆块','土豆泥'], + '鸡肉':['鸡肉块','鸡肉丝'], + '净猪里脊':['里脊条','里脊片'], + '西兰花':['西兰花朵','西兰花梗'], + '胡萝卜':['胡萝卜条','胡萝卜丝'] +}; +var createCpSpecs={ + '宫保鸡丁':[{label:'标准份(500g)',grams:500},{label:'加量份(750g)',grams:750}], + '清蒸鱼':[{label:'标准份(600g)',grams:600},{label:'大份(900g)',grams:900}], + '蒜蓉菠菜':[{label:'标准份(400g)',grams:400},{label:'加量份(600g)',grams:600}], + '炒胡萝卜':[{label:'标准份(300g)',grams:300},{label:'大份(500g)',grams:500}] }; /* ========== 新建订单弹窗 ========== */ function openCreateOrder(){ + resetCreateOrderForm(); document.getElementById('createOrderModal').classList.add('show'); } function closeCreateOrder(){ @@ -495,26 +527,76 @@ function onOrderBatchChange(val){ panel.style.display='grid'; } -/* 选择净菜后自动填充包装规格并计算 */ -function onItemChange(){ - var sel=document.getElementById('orderItem'); - var opt=sel.options[sel.selectedIndex]; - var pkg=opt.getAttribute('data-pkg')||''; - document.getElementById('orderPkg').value=pkg; - calcOrder(); +function resetCreateOrderForm(){ + document.getElementById('orderType').value='nc'; + document.getElementById('createIngredient').value=''; + document.getElementById('createNcType').innerHTML=''; + document.getElementById('createNcType').disabled=true; + document.getElementById('createDish').value=''; + document.getElementById('createCpSpec').innerHTML=''; + document.getElementById('createCpSpec').disabled=true; + document.getElementById('createNcSpec').value=''; + document.getElementById('orderQty').value=''; + document.getElementById('orderWeight').value=''; + document.getElementById('orderPrice').value=''; + document.getElementById('orderSubtotal').value=''; + toggleCreateOrderFields(); } - -/* 计算计量和小计 */ -function calcOrder(){ - var sel=document.getElementById('orderItem'); - var opt=sel.options[sel.selectedIndex]; - var pkg=opt.getAttribute('data-pkg')||''; - var pkgKg=parseFloat(pkg)||0; - var qty=parseInt(document.getElementById('orderQty').value)||0; - var price=parseFloat(document.getElementById('orderPrice').value)||0; - var weight=pkgKg*qty; - document.getElementById('orderWeight').value=weight>0?weight:''; - var subtotal=price*weight; +function toggleCreateOrderFields(){ + var v=document.getElementById('orderType').value; + document.getElementById('createIngredientWrap').style.display=(v==='nc'?'flex':'none'); + document.getElementById('createNcTypeWrap').style.display=(v==='nc'?'flex':'none'); + document.getElementById('createNcSpecWrap').style.display=(v==='nc'?'flex':'none'); + document.getElementById('createDishWrap').style.display=(v==='cp'?'flex':'none'); + document.getElementById('createCpSpecWrap').style.display=(v==='cp'?'flex':'none'); + syncCreateOrderMeasure(); +} +function sanitizeIntegerInput(el){el.value=el.value.replace(/[^\d]/g,'');} +function updateCreateNcTypes(){ + var ingredient=document.getElementById('createIngredient').value; + var select=document.getElementById('createNcType'); + var options=createNcTypes[ingredient]||[]; + select.innerHTML=''; + options.forEach(function(text){select.innerHTML+='';}); + select.disabled=!options.length; + select.value=''; + syncCreateOrderMeasure(); +} +function updateCreateCpSpecs(){ + var dish=document.getElementById('createDish').value; + var select=document.getElementById('createCpSpec'); + var options=createCpSpecs[dish]||[]; + select.innerHTML=''; + options.forEach(function(item){select.innerHTML+='';}); + select.disabled=!options.length; + select.value=''; + syncCreateOrderMeasure(); +} +function getCreateSpecGrams(){ + var type=document.getElementById('orderType').value; + if(type==='nc'){ + var val=document.getElementById('createNcSpec').value; + return val?parseInt(val,10):0; + } + if(type==='cp'){ + var val2=document.getElementById('createCpSpec').value; + return val2?parseInt(val2,10):0; + } + return 0; +} +function syncCreateOrderMeasure(){ + var qty=parseInt(document.getElementById('orderQty').value||'0',10); + var grams=getCreateSpecGrams(); + var weightInput=document.getElementById('orderWeight'); + var priceNum=parseFloat(document.getElementById('orderPrice').value)||0; + if(!qty||!grams){ + weightInput.value=''; + document.getElementById('orderSubtotal').value=''; + return; + } + var weight=grams*qty/1000; + weightInput.value=weight.toFixed(2); + var subtotal=priceNum*weight; document.getElementById('orderSubtotal').value=subtotal>0?'¥'+subtotal.toFixed(2):''; } @@ -522,10 +604,16 @@ function calcOrder(){ function submitOrder(){ var typeVal=document.getElementById('orderType').value; if(!typeVal){alert('请选择净菜类型');return;} - var item=document.getElementById('orderItem').value; - if(!item){alert('请选择净菜名称');return;} - var price=document.getElementById('orderPrice').value; - if(!price){alert('请输入单价');return;} + if(typeVal==='nc'){ + if(!document.getElementById('createIngredient').value){alert('请选择食材');return;} + if(!document.getElementById('createNcType').value){alert('请选择净菜类型');return;} + if(!document.getElementById('createNcSpec').value){alert('请输入包装规格');return;} + }else{ + if(!document.getElementById('createDish').value){alert('请选择餐品');return;} + if(!document.getElementById('createCpSpec').value){alert('请选择包装规格');return;} + } + if(!document.getElementById('orderQty').value){alert('请输入售卖份数');return;} + if(!document.getElementById('orderPrice').value){alert('请输入单价');return;} var customer=document.getElementById('orderCustomer').value.trim(); if(!customer){alert('请输入客户名称');return;} alert('订单提交成功!'); @@ -667,10 +755,10 @@ function showDetail(el){ var ings=dishIngredients[foodName]; if(ings&&ings.length){ html+='
净菜包明细
'; - html+=''; + html+='
食材溯源码食材名称分类每份用量
'; for(var i=0;i'; + html+=''; } html+='
食材溯源码食材名称净菜类型分类每份用量
'+ings[i].name+''+ings[i].type+''+ings[i].amount+'
'+ings[i].trace+''+ings[i].name+''+ings[i].cleanType+''+ings[i].type+''+ings[i].amount+'
'; } diff --git a/web-admin/nutrition/sup-clean-internal.html b/web-admin/nutrition/sup-clean-internal.html index 9602e3a..6a29391 100644 --- a/web-admin/nutrition/sup-clean-internal.html +++ b/web-admin/nutrition/sup-clean-internal.html @@ -96,6 +96,8 @@ tbody tr:hover td.td-actions{background:#F8FBFF;} .form-item input,.form-item select,.form-item textarea{height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 12px;font-size:var(--font-sm);color:var(--text-primary);outline:none;background:#fff;} .form-item input:focus,.form-item select:focus{border-color:var(--primary);} .form-item select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;padding-right:28px;} +.form-item input[readonly]{background:#f8fafc;cursor:not-allowed;} +.form-item select:disabled{background:#f8fafc;color:var(--text-placeholder);cursor:not-allowed;} /* 右侧抽屉 */ .drawer-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:1000;animation:modalFadeIn .2s ease;} .drawer-overlay.closing{animation:modalFadeOut .2s ease forwards;} @@ -190,13 +192,13 @@ tbody tr:hover td.td-actions{background:#F8FBFF;} 申领单号申领场所净菜类型净菜/餐品包装规格申领份数申领数量(kg)订单状态申领时间预定配送时间配送人操作 - INT-001一号食堂厨房🥬 净菜包菠菜500g/袋5025已完成2026-04-22 07:302026-04-22 09:00李配送详情 删除 - INT-001一号食堂厨房🥬 净菜包玉米(玉米粒)1kg/盒2020已完成2026-04-22 07:302026-04-22 09:00李配送详情 删除 - INT-002二号食堂厨房🥬 净菜包猪排骨2kg/盘2040配送中2026-04-22 08:002026-04-22 10:00王配送确认收货 详情 删除 + INT-001一号食堂厨房🥬 净菜包菠菜-菠菜段500g/袋5025已完成2026-04-22 07:302026-04-22 09:00李配送详情 删除 + INT-001一号食堂厨房🥬 净菜包玉米-玉米粒1kg/盒2020已完成2026-04-22 07:302026-04-22 09:00李配送详情 删除 + INT-002二号食堂厨房🥬 净菜包猪排骨-排骨块2kg/盘2040配送中2026-04-22 08:002026-04-22 10:00王配送确认收货 详情 删除 INT-003二号食堂厨房🍱 餐品净菜包宫保鸡丁标准份(500g)3015配送中2026-04-22 08:002026-04-22 10:00王配送确认收货 详情 删除 - INT-004三号食堂厨房🥬 净菜包草鱼(鱼片)2kg/盘2040待配送2026-04-22 08:302026-04-22 10:30—立即配送 详情 删除 + INT-004三号食堂厨房🥬 净菜包草鱼-鱼片2kg/盘2040待配送2026-04-22 08:302026-04-22 10:30—立即配送 详情 删除 INT-005一号食堂厨房🍱 餐品净菜包清蒸鱼标准份(500g)157.5待配送2026-04-22 09:002026-04-22 11:00—立即配送 详情 删除 - INT-006三号食堂厨房🥬 净菜包土豆(土豆丝)500g/袋4020备货中2026-04-22 09:152026-04-22 11:30—备货完成 详情 删除 + INT-006三号食堂厨房🥬 净菜包土豆-土豆丝500g/袋4020备货中2026-04-22 09:152026-04-22 11:30—备货完成 详情 删除 INT-007二号食堂厨房🍱 餐品净菜包蒜蓉菠菜标准份(500g)2512.5备货中2026-04-22 09:302026-04-22 12:00—备货完成 详情 删除 @@ -224,15 +226,37 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
净菜类型*
- +
申领场所*
-
-
净菜名称*
- + + +
包装批次号
@@ -250,17 +274,21 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
+ +
申领份数*
- +
申领数量(kg)*
- +
预定配送时间
@@ -369,7 +397,10 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}