From f937285895907a20dfbf82fe8a9f3d28494713f7 Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Thu, 25 Mar 2021 18:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9F=E8=B0=B1=E8=AE=A1=E5=88=92=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=97=B6=E6=9B=B4=E6=96=B0=E5=A4=A9=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E9=A3=9F=E8=B0=B1=E6=9A=82=E5=81=9C=E9=99=90=E5=88=B6=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=EF=BC=8C=E4=B8=8D=E8=83=BD=E6=B7=BB=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=9C=88=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysRecipesPlanServiceImpl.java | 13 ++++++------- .../RecipesPlanDrawer/PlanPauseDrawer/index.vue | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java index 87629416e..b5bd90305 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java @@ -181,13 +181,12 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService { List delList = new ArrayList<>(); for (SysRecipesPlan plan : oldRecipesPlanList) { if(index < newSize){ - if(plan.getStartDate().compareTo(newRecipesPlanList.get(index).getStartDate()) != 0 - || plan.getEndDate().compareTo(newRecipesPlanList.get(index).getEndDate()) != 0){ - plan.setStartDate(newRecipesPlanList.get(index).getStartDate()); - plan.setEndDate(newRecipesPlanList.get(index).getEndDate()); - plan.setPauseDate(newRecipesPlanList.get(index).getPauseDate()); - updateList.add(plan); - } + plan.setStartDate(newRecipesPlanList.get(index).getStartDate()); + plan.setEndDate(newRecipesPlanList.get(index).getEndDate()); + plan.setPauseDate(newRecipesPlanList.get(index).getPauseDate()); + plan.setStartNumDay(plan.getStartNumDay()); + plan.setEndNumDay(plan.getEndNumDay()); + updateList.add(plan); }else{ delList.add(plan.getId()); } diff --git a/stdiet-ui/src/components/RecipesPlanDrawer/PlanPauseDrawer/index.vue b/stdiet-ui/src/components/RecipesPlanDrawer/PlanPauseDrawer/index.vue index 7667dbd9a..4e97924ac 100644 --- a/stdiet-ui/src/components/RecipesPlanDrawer/PlanPauseDrawer/index.vue +++ b/stdiet-ui/src/components/RecipesPlanDrawer/PlanPauseDrawer/index.vue @@ -137,6 +137,7 @@ end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" + :picker-options="orderPickerOptions" > @@ -233,7 +234,8 @@ export default { }, orderPickerOptions: { disabledDate(time) { - return time.getTime() < Date.now() - 24 * 60 * 60 * 1000; + //不能添加上月日期的暂停,会影响提成计算 + return time.getTime() < dayjs().startOf('month').valueOf() }, }, };