selectDate_two.axml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. <view data-index="4" class="{{dateIndex == '4' ? 'dateActive':''}} flex-1" catchTap="activeDate">自定义</view>
  15. </block>
  16. </view>
  17. <view class="data-main">
  18. <block a:if="{{dateIndex=='1'}}">
  19. <picker onChange="selectYear" value="{{yearIndex}}" range="{{yearArr}}">
  20. <view class="dateVal">{{yearArr[yearIndex]}}</view>
  21. </picker>
  22. <!--<text class="dateVal" onTap="selectYear">{{year}}</text> -->
  23. </block>
  24. <block a:if="{{dateIndex=='3'}}">
  25. <text class="dateVal" onTap="selectDate">{{month}}</text>
  26. </block>
  27. <block a:if="{{dateIndex=='2'}}">
  28. <view class="flex-box flex-center-center">
  29. <picker onChange="selectYear2" value="{{jdYearIndex}}" range="{{yearArr}}">
  30. <view class="dateVal">{{yearArr[jdYearIndex]}}</view>
  31. </picker>
  32. <!--<text class="dateVal" onTap="selectDay">{{jdYear}}</text> -->
  33. <text class="fontColorD" style="margin:0 20rpx;">--</text>
  34. <picker onChange="setjdji" value="{{jdji}}" range="{{jdArr}}">
  35. <view class="dateVal">{{jdArr[jdji]}}</view>
  36. </picker>
  37. <!--<text class="dateVal" onTap="selectDay2">{{jdji}}</text> -->
  38. </view>
  39. </block>
  40. <block a:if="{{dateIndex=='4'}}">
  41. <text data-index="customIndOn" class="dateVal" onTap="customDate">{{customIndOn}}</text>
  42. <text class="fontColorD" style="margin:0 20rpx;">--</text>
  43. <text data-index="customIndTw" class="dateVal" onTap="customDate">{{customIndTw}}</text>
  44. <!-- <view class="flex-box flex-center-center">
  45. <picker onChange="selectYear2" value="{{customIndOn}}" range="{{customArr}}">
  46. <view class="dateVal">{{customArr[customInd]}}</view>
  47. </picker>
  48. <text class="fontColorD" style="margin:0 20rpx;">--</text>
  49. <picker onChange="setjdji" value="{{customIndOnTw}}" range="{{customArr}}">
  50. <view class="dateVal">{{customArr[jdji]}}</view>
  51. </picker>
  52. </view> -->
  53. </block>
  54. </view>
  55. <view class="flex-box date-btn">
  56. <view class="flex-1" catchTap="onClose">取消</view>
  57. <view class="flex-1" catchTap="onConfirm">确定</view>
  58. </view>
  59. </view>
  60. <view class="meng" catchTap="onClose"></view>
  61. </view>