index.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <view wx:if="{{type == 'sameYear'}}" class="global-card time-range" style='margin-bottom:0;' bindtap="openSameYear">
  2. <view class='left'>
  3. <view class="iconfont {{iconName}}">{{title}}</view>
  4. </view>
  5. <view class="right">
  6. <view style="width: 100%;" style="flex: 1;">
  7. <view style='color:#3874F6;'>{{value}}年 {{startMonth}}月-{{endMonth}}月</view>
  8. </view>
  9. <view class="iconfont icon-webxialaxuanxiangjiantou" />
  10. </view>
  11. </view>
  12. <view wx:else class="global-card time-range" style='margin-bottom:0;' bindtap="openActionSheet">
  13. <view class='left'>
  14. <view class="iconfont {{iconName}}">{{title}}</view>
  15. </view>
  16. <view class="right">
  17. <picker mode='date' value='{{value}}' fields='{{fields}}' start="{{start}}" end='{{end}}' style="width: 100%;" style="flex: 1;" bindchange='onChange'>
  18. <view style='color:#3874F6;'>{{value}}</view>
  19. </picker>
  20. <view class="iconfont icon-webxialaxuanxiangjiantou" />
  21. </view>
  22. </view>
  23. <van-dialog use-slot title="数据范围" width='355' show="{{ showSameYear }}" show-cancel-button bind:close="onClose" bind:confirm='onConfirm' confirm-button-color='#3874F6'>
  24. <view class="dialog">
  25. <view class="row">
  26. <view class="label">
  27. 年度:
  28. </view>
  29. <view class="year">
  30. <picker mode='date' value='{{year}}' fields='{{fields}}' start="{{start}}" end='{{end}}' style="width: 100%;flex: 1;" bindchange='onYear'>
  31. <view style='color:#3874F6;'>{{year}}</view>
  32. </picker>
  33. </view>
  34. </view>
  35. <view class="row">
  36. <view class="label">
  37. 月份:
  38. </view>
  39. <view class="options">
  40. <view class="option {{((item + 1) >= startMonth1 && (item + 1) <= endMonth1) ? 'active' : ''}}" wx:for="{{12}}" wx:key="item" bindtap="onMonthTap" data-month="{{item + 1}}">
  41. {{item + 1}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </van-dialog>