customer-view.wxml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <import src="../public-view.wxml" />
  2. <scroll-view scroll-y class="bg-scroll-view" style="background-color:{{data.length == 0 ? 'white' : '#F5F5F5'}};">
  3. <template is="customer-header-view" data="{{t: header.t, s: header.s, src: '../../../icon/public/customer_header_m.png'}}" wx:if="{{data.length != 0}}" />
  4. <view wx:if="{{type == 'manager'}}" class="item-bg">
  5. <template is="manager-item" wx:for="{{data}}" wx:key="" data="{{...data[index], in: index}}" />
  6. <view class="no-data" wx:if="{{data.length == 0}}">
  7. <image src="../../../icon/public/customer_empty.png"></image>
  8. <text>暂无购买人员信息</text>
  9. <!-- <text>暂无购买人,购买功能即将开放</text> -->
  10. </view>
  11. </view>
  12. <view wx:else class="item-bg">
  13. <template is="choose-item" wx:for="{{data}}" wx:key="" data="{{...data[index], in: index}}" />
  14. <view wx:if="{{type == 'nPurchase'}}" class="new-item" bindtap="newCustomerAction">
  15. <image src="../../../icon/public/customer_add.png"></image>
  16. <text>新增人员</text>
  17. </view>
  18. </view>
  19. <view class="scroll-view-bottom-view{{adapter.suffix}}" wx:if="{{type != 'manager'}}"></view>
  20. </scroll-view>
  21. <template is="bottom-view-botton" wx:if="{{type != 'manager'}}" data="{{t: '下一步', suffix: adapter.suffix, action: 'nextStep'}}" />
  22. <template name="choose-item">
  23. <view class="item" bindtap="chooseAction" id="{{in}}">
  24. <text>{{h}}</text>
  25. <view>
  26. <view>
  27. <text>{{user_name}}</text>
  28. <!-- <text>上次购买</text> -->
  29. </view>
  30. <text>{{id_card}}</text>
  31. </view>
  32. <image src="../../../icon/public/{{img}}"></image>
  33. </view>
  34. </template>
  35. <template name="manager-item">
  36. <view class="item">
  37. <text>{{h}}</text>
  38. <view>
  39. <view>
  40. <text>{{user_name}}</text>
  41. <!-- <text>上次购买</text> -->
  42. </view>
  43. <text>{{id_card}}</text>
  44. </view>
  45. <view id="{{in}}" bindtap="editAction">
  46. <image src="../../../icon/public/customer_edit.png"></image>
  47. </view>
  48. <view id="{{in}}" bindtap="deleteAction">
  49. <image src="../../../icon/public/customer_delete.png"></image>
  50. </view>
  51. </view>
  52. </template>