Browse Source

fix: 已支付展示时间

liweimin 2 years ago
parent
commit
782d2ccc8a

+ 1 - 1
antbuilder/industry/hospitalV2/components/hospital-payment/index.axml

@@ -7,7 +7,7 @@
   showTimeSelector="{{ showTimeSelector }}"
   defaultStatus="{{ defaultStatus }}"
   onAutoFilter="onAutoFilter"
->
+> 
   <scroll-fetch
     ref="saveRef"
     slot-scope="props"

+ 19 - 1
antbuilder/industry/hospitalV2/components/hospital-payment/index.js

@@ -13,6 +13,7 @@ Component({
 			endTime: "",
 			startTime: "",
 			medicCards: [],
+      timeShow: false,
 		},
 
 		/* 赛选项目 */
@@ -48,6 +49,7 @@ Component({
 		onFilterHandel(filters) {
       if (!this.hisPatientId) return
 			this.filters = filters;
+      
 			this.scrollRef.refresh();
 		},
 
@@ -61,8 +63,24 @@ Component({
 
 	  onService(page) {
 			const { type, status } = this.filters || {};
-      console.log('this.hisPatientId', this.hisPatientId);
       if(!this.hisPatientId) return
+      if(this.filters.status === '1'){
+        this.setData({
+          showTimeSelector: true
+        })
+        if(!this.filters.startTime){
+          my.showToast({
+            type: "fail",
+            content: "请选择时间段",
+            duration: 3000,
+          });
+        }
+        return 
+      } else {
+        this.setData({
+          showTimeSelector: false
+        })
+      }
 			return payHistory({
 				...this.filters,
 				type: type || "9",

+ 2 - 1
antbuilder/industry/hospitalV2/components/hospital-payment/index.json

@@ -3,6 +3,7 @@
   "usingComponents": {
     "scroll-fetch": "../components/scroll-fetch/index",
     "patient-tabs-pro": "../components/patient-tabs-pro/index",
-    "subscribe-msg": "../components/subscribe-msg/index"
+    "subscribe-msg": "../components/subscribe-msg/index",
+    "time-option": "../../../hospitalV2/components/components/patient-tabs-pro/filters/time-option/index"
   }
 }