selectTime.wxml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!--pages/indexPages/yyqhPages/selectTime/selectTime.wxml-->
  2. <scroll-view class="containers" scroll-y enhanced show-scrollbar="{{false}}">
  3. <view class="baseInfo-box">
  4. <view class="baseInfo-content">
  5. <view class="baseInfos">
  6. <image class="baseBg" src="../../../../images/selectTime/baseBg.png" mode="widthFix" />
  7. <view class="base-item">
  8. <view class="base-item-label">办税大厅:</view>
  9. <view class="base-item-value">{{hall}}</view>
  10. </view>
  11. <view class="base-item">
  12. <view class="base-item-label">办理业务:</view>
  13. <view class="base-item-value">{{business.ywmc + '—' + business.ywxxmc}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="times {{dateBoxStyle}}">
  19. <view class="showHiden" catch:tap="showHiden"></view>
  20. <view class="times-box">
  21. <view wx:if="{{dateBoxStyle == ''? index<4:index<10}}" class="time {{dateIndex == index?'timeActive':''}}" wx:for="{{dates}}" wx:key="index" data-index="{{index}}" data-item="{{item}}" catch:tap="selectDate">
  22. <view class="day">{{item.week}}</view>
  23. <view class="date">{{item.date}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="selectTimes">
  28. <view class="selectTime {{index == timeIndex?'selectTimeActive':tools.yy(item) == 0?'selectTimeNone':''}}" wx:for="{{times}}" wx:key="index" data-index="{{index}}" data-item="{{item}}" catch:tap="selectTime">
  29. <view class="number">余号:{{tools.yy(item)}}</view>
  30. <view class="sjd">{{item.periodName}}</view>
  31. </view>
  32. </view>
  33. </scroll-view>
  34. <view class="bottom">
  35. <view class="selectedInfo">{{tools.bigDate(dates[dateIndex].date)}}({{dates[dateIndex].week}}) | {{times[timeIndex].periodName}}</view>
  36. <view class="button" hover-class="active" bind:tap="next">确认预约</view>
  37. </view>
  38. <wxs module="tools">
  39. var yy = function (e) {
  40. if (e) {
  41. return Number(e.capacity) - Number(e.appointNum)
  42. } else {
  43. return ""
  44. }
  45. }
  46. var bigDate = function (e) {
  47. if (e) {
  48. return e.split("-")[0] + "月" + e.split("-")[1] + "日"
  49. } else {
  50. return ""
  51. }
  52. }
  53. var tools = {
  54. yy: yy,
  55. bigDate: bigDate
  56. }
  57. module.exports = tools;
  58. </wxs>