Răsfoiți Sursa

refactor:交易记录页面更换时间选择器

zhanghui 2 ani în urmă
părinte
comite
ecb9d7700a
1 a modificat fișierele cu 13 adăugiri și 16 ștergeri
  1. 13 16
      myPages/transactionRecord/index.vue

+ 13 - 16
myPages/transactionRecord/index.vue

@@ -14,10 +14,15 @@
             </View>
 
             <view class="statistics flex-row justify-between ">
-                <view class="left flex-row" @click="showDate">
-                    <text>{{dataTime || '全部'}}</text>
-                    <image class="xialaImage" src="/static/transaction/u5.png"></image>
-                </view>
+
+
+                <picker class="picker" @change="sureChooseDate" mode='date' fields="month"  range-key="label" >
+                    <view class="left flex-row" @click="showDate">
+                        <text>{{dataTime || '全部'}}</text>
+                        <image class="xialaImage" src="/static/transaction/u5.png"></image>
+                    </view>
+                </picker>
+
                 <view class="right flex-row justify-around">
                     <text>储值¥{{tranFlowstatistic.rechargeAmount || 0}}</text>
                     <text>消费-¥{{tranFlowstatistic.consumeAmount || 0 }}</text>
@@ -40,15 +45,6 @@
         </view>
 
 
-        <u-datetime-picker
-                :show="serviceTimeShow"
-                v-model="value1"
-                mode="year-month"
-                :closeOnClickOverlay="true"
-                @confirm="sureChooseDate()"
-        ></u-datetime-picker>
-
-
     </view>
 </template>
 <script>
@@ -103,9 +99,10 @@
 
             // 确定选择的服务日期
             sureChooseDate(e){
-                this.serviceTimeShow = false;
-                this.dataTime = uni.$u.timeFormat(e.value, 'yyyy-mm');
-                this.$refs.MescrollItem[this.tabIndex].downCallback()
+                this.dataTime = e.detail.value
+                setTimeout(f=>{
+                    this.$refs.MescrollItem[this.tabIndex].downCallback()
+                },100)
 
             },
             // 交易列表