index.axml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <view class="reason-form">
  2. <!-- -->
  3. <view class="two-level-menu">
  4. <view class="title">
  5. <view class="back-icon" a:if="{{showSecondReason}}" onTap="handleReset">
  6. <am-icon type="left" size="30"></am-icon>
  7. </view>
  8. {{showSecondReason ? reasons[currentIndex].childContent.childSubject : subject}}
  9. </view>
  10. <page-result class="reason-container" local a:if="{{ reasonsError }}" type="network" title="查询来访原因列表失败" brief="点击按钮重试" footer="{{footer}}" onTapLeft="refreshReason"></page-result>
  11. <view class="reason-container flex-grid column3" a:if="{{reasons && reasons.length > 0 && !showSecondReason }}">
  12. <view class="btn-box {{currentIndex === index? 'active' : ''}} {{reasons.length <= 6 ? (reasons.length <= 3 ? 'line1' : 'line2') : 'line3'}}" a:for="{{reasons}}" a:key="{{item.name}}" onTap="handleReasons" data-code="{{item.code}}" data-title="{{item.name}}" data-index="{{index}}" >
  13. {{item.name}}
  14. </view>
  15. </view>
  16. <view a:if="{{showSecondReason}}">
  17. <view class="reason-container flex-grid column4" a:if="{{reasons && reasons[currentIndex].childContent.childContentType === 'radio'}}">
  18. <view class="btn-box {{form.description === item.code? 'active' : ''}}" a:for="{{reasons[currentIndex].childContent.childContentDatasource}}" a:key="{{item.title}}" onTap="handleSecondReason" data-title="{{item.title}}" data-value="{{item.code}}" data-logo="{{item.logo || ''}}">
  19. <image a:if="{{item.logo}}" class="logo" mode="scaleToFill" src="{{item.logo.length == 32 ? imgSrcPrefix + item.logo : item.logo}}"></image>
  20. {{item.title}}
  21. </view>
  22. </view>
  23. <block>
  24. <view a:if="{{reasons[currentIndex].showFloor}}">
  25. <!-- 小区信息以及房间选择步骤条 -->
  26. <steps activeIndex="{{ form.roomInfo ? 2 : activatedStep }}" communityInfo="{{ passport }}" roomInfo="{{ form }}" onClick="onStepsItemClick"></steps>
  27. </view>
  28. <view class="text-container" a:if="{{reasons[currentIndex] && reasons[currentIndex].childContent.childContentType === 'textarea'}}" >
  29. <textarea focus controlled value="{{form.description}}" placeholder="{{reasons[currentIndex].childContent.tips||''}}" maxlength="{{reasons[currentIndex].childContent.childContentLength}}" onInput="handleSecondReason"></textarea>
  30. </view>
  31. </block>
  32. </view>
  33. </view>
  34. <!-- -->
  35. <view class="button-container">
  36. <button class="btn" size="default" type="primary" onTap="onSubmit" disabled="{{ buttonDisable }}">提交登记</button>
  37. </view>
  38. </view>