XUYangWei пре 2 месеци
родитељ
комит
84777a3580
1 измењених фајлова са 37 додато и 2 уклоњено
  1. 37 2
      features/feature/src/main/ets/pages/EditGreenPlantPage.ets

+ 37 - 2
features/feature/src/main/ets/pages/EditGreenPlantPage.ets

@@ -145,6 +145,23 @@ struct EditGreenPlantPage{
   onBackPressUpdateData(ans:string='false'){
     yTRouter.pop(ans,true)
   }
+  //重置
+  reset(){
+    this.vm.time=""
+    this.vm.date=""
+    this.vm.dayNumber=""
+    this.vm.week=""
+    this.vm.mon=""
+    this.vm.time=""
+    this.vm.taskUrl=""
+    this.vm.taskName=""
+    this.vm.frequency=DateFrequency.NONE
+    this.vm.remindTaskItemId=0
+    this.vm.remindTaskName=""
+    this.vm.remindTaskUrl=""
+    this.vm.remindPlantsId=0
+    this.vm.remindPlantsName=""
+  }
   build() {
     NavDestination(){
       Column({space:20}) {
@@ -254,6 +271,7 @@ struct EditGreenPlantPage{
                     })
                    return
                   }
+                  this.reset()
                   this.isShowMaintenanceBuilder = true
                 }
               })
@@ -279,6 +297,7 @@ struct EditGreenPlantPage{
                     })
                    return
                   }
+                  this.reset()
                   this.isShowRemindClockBuilder = true
 
                 }
@@ -521,7 +540,7 @@ struct EditGreenPlantPage{
             },
             swiperBuilder2:()=>{
               //日期
-              this.SelectRemindDate()
+              this.SelectCustomRemindDate()
             },
             swiperComController:this.vm.swiperComController[3]
           })
@@ -758,7 +777,6 @@ struct EditGreenPlantPage{
       DiaryDatePicker({
         back:()=>{
           this.vm.swiperController.changeIndex(0,true)
-
         },
         selectDateBack:(date: Date)=>{
           //需要带参数确定
@@ -768,6 +786,23 @@ struct EditGreenPlantPage{
       })
     }.ColStyle()
   }
+  @Builder
+  SelectCustomRemindDate(){
+    //日期
+    Column(){
+      DiaryDatePicker({
+        back:()=>{
+          this.vm.swiperController[3].changeIndex(1,true)
+        },
+        selectDateBack:(date: Date)=>{
+          //需要带参数确定
+          this.vm.swiperController[3].changeIndex(1,true)
+          this.vm.date=dayjs(date).format('YYYY-MM-DD')
+        }
+      })
+    }.ColStyle()
+  }
+
   @Builder
   SelectRemindWeek(){
     //周