selectDate_two.axml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <view class="all-date">
  2. <view class="data-tier" catchTap="onClose"></view>
  3. <view class="date-header {{isShow?'showPop':''}}">
  4. <view class="flex-box selectDateType">
  5. <block a:if="{{showSelect}}">
  6. <view data-index="1" a:if="{{dateIndex == '1'}}" class="{{dateIndex == '1' ? 'dateActive':''}} flex-1" catchTap="activeDate">年</view>
  7. <view data-index="2" a:if="{{dateIndex == '2'}}" class="{{dateIndex == '2' ? 'dateActive':''}} flex-1" catchTap="activeDate">季度</view>
  8. <view data-index="3" a:if="{{dateIndex == '3'}}" class="{{dateIndex == '3' ? 'dateActive':''}} flex-1" catchTap="activeDate">月</view>
  9. </block>
  10. <block a:else>
  11. <view data-index="1" class="{{dateIndex == '1' ? 'dateActive':''}} flex-1" catchTap="activeDate">年</view>
  12. <view data-index="2" class="{{dateIndex == '2' ? 'dateActive':''}} flex-1" catchTap="activeDate">季度</view>
  13. <view data-index="3" class="{{dateIndex == '3' ? 'dateActive':''}} flex-1" catchTap="activeDate">月</view>
  14. </block>
  15. </view>
  16. <view class="data-main">
  17. <block a:if="{{dateIndex=='1'}}">
  18. <picker onChange="selectYear" value="{{yearIndex}}" range="{{yearArr}}">
  19. <view class="dateVal">{{yearArr[yearIndex]}}</view>
  20. </picker>
  21. <!--<text class="dateVal" onTap="selectYear">{{year}}</text> -->
  22. </block>
  23. <block a:if="{{dateIndex=='3'}}">
  24. <text class="dateVal" onTap="selectDate">{{month}}</text>
  25. </block>
  26. <block a:if="{{dateIndex=='2'}}">
  27. <view class="flex-box flex-center-center">
  28. <picker onChange="selectYear2" value="{{jdYearIndex}}" range="{{yearArr}}">
  29. <view class="dateVal">{{yearArr[jdYearIndex]}}</view>
  30. </picker>
  31. <!--<text class="dateVal" onTap="selectDay">{{jdYear}}</text> -->
  32. <text class="fontColorT" style="margin:0 20rpx;">--</text>
  33. <picker onChange="setjdji" value="{{jdji}}" range="{{jdArr}}">
  34. <view class="dateVal">{{jdArr[jdji]}}</view>
  35. </picker>
  36. <!--<text class="dateVal" onTap="selectDay2">{{jdji}}</text> -->
  37. </view>
  38. </block>
  39. </view>
  40. <view class="flex-box date-btn">
  41. <view class="flex-1" catchTap="onClose">取消</view>
  42. <view class="flex-1" catchTap="onConfirm">确定</view>
  43. </view>
  44. </view>
  45. <view class="meng" catchTap="onClose"></view>
  46. </view>