From 35e47bc01908c58a13b883bb3f2079ba9ac49da9 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Wed, 17 Dec 2025 15:14:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E8=B0=B1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/canteen/dish/menu/detail.vue | 17 ++++++++++++++--- src/views/canteen/dish/menu/edit.vue | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/views/canteen/dish/menu/detail.vue b/src/views/canteen/dish/menu/detail.vue index 087f44b1..980399bb 100644 --- a/src/views/canteen/dish/menu/detail.vue +++ b/src/views/canteen/dish/menu/detail.vue @@ -181,12 +181,12 @@ @@ -1885,7 +1885,18 @@ export default { const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始 const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; - } + }, + //price salePrice + patternValue(row){ + if(row.price&&row.salePrice){ + console.log(111) + setTimeout(()=>{ + if(Number(row.salePrice)>=(Number(row.price))){ + row.salePrice = Number(row.price) + } + },200) + } + } } }; diff --git a/src/views/canteen/dish/menu/edit.vue b/src/views/canteen/dish/menu/edit.vue index a8b3e68a..4c919821 100644 --- a/src/views/canteen/dish/menu/edit.vue +++ b/src/views/canteen/dish/menu/edit.vue @@ -180,12 +180,12 @@ @@ -2111,7 +2111,18 @@ export default { const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始 const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; - } + }, + //price salePrice + patternValue(row){ + if(row.price&&row.salePrice){ + console.log(111) + setTimeout(()=>{ + if(Number(row.salePrice)>=(Number(row.price))){ + row.salePrice = Number(row.price) + } + },200) + } + } } };