index.wxml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <view class="container">
  2. <van-search use-action-slot placeholder='请输入搜索关键词' shape='round' bind:search="onSearch" bind:clear="onSearch" />
  3. <view class="header" style="height: 20rpx;"></view>
  4. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  5. <view wx:for="{{list}}" wx:key="sa_storeid" class="list-item">
  6. <view class="item" bind:tap="goToDetail" data-id="{{item.sa_storeid}}">
  7. <view class="top">
  8. <view class="name-row">
  9. <view class="name">{{item.storename || '--'}}</view>
  10. <view class="storeno-tag">NO.{{item.storeno || '--'}}</view>
  11. </view>
  12. <view class="statu" style="border-color: {{set.color(item.status)}}; color: {{set.color(item.status)}};">
  13. {{item.status || '--'}}
  14. </view>
  15. </view>
  16. <view class="content">
  17. <view class="row" wx:if="{{item.applystatus}}">
  18. <view class="exp">申请状态:<text style="color: {{set.applyColor(item.applystatus)}};">{{item.applystatus}}</text></view>
  19. </view>
  20. <view class="row">
  21. <view class="exp">导购人数:{{item.salercount || '0'}}</view>
  22. <view class="exp">面积:{{item.area || '--'}}㎡</view>
  23. </view>
  24. <view class="row">
  25. <view class="exp">类型:{{item.storetype || '--'}}</view>
  26. <view class="exp">市场类型:{{item.markettype || '--'}}</view>
  27. </view>
  28. <view class="row">
  29. <view class="exp">负责人:{{item.leadername || '--'}}</view>
  30. <view class="exp">省市县:{{(item.province || '--') + (item.city || '--') + (item.county || '--')}}</view>
  31. </view>
  32. <view class="row">
  33. <view class="exp full-width">地址:{{item.address || '--'}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="actions">
  38. <view class="action-btn edit" bind:tap="onEdit" data-item="{{item}}">
  39. <van-icon name="edit" size="28rpx" color="#fff" custom-style="margin-right: 8rpx;" />
  40. <text>编辑</text>
  41. </view>
  42. <view wx:if="{{item.status === '停用' && item.applystatus !== '启用申请'}}" class="action-btn apply-enable" bind:tap="onApplyEnable" data-item="{{item}}">
  43. <van-icon name="add-o" size="28rpx" color="#fff" custom-style="margin-right: 8rpx;" />
  44. <text>启用申请</text>
  45. </view>
  46. <view wx:if="{{item.status === '启用' && item.applystatus !== '停用申请'}}" class="action-btn apply-disable" bind:tap="onApplyDisable" data-item="{{item}}">
  47. <van-icon name="close" size="28rpx" color="#fff" custom-style="margin-right: 8rpx;" />
  48. <text>停用申请</text>
  49. </view>
  50. <view wx:if="{{item.status === '停用'}}" class="action-btn delete" bind:tap="onDelete" data-item="{{item}}">
  51. <van-icon name="delete" size="28rpx" color="#fff" custom-style="margin-right: 8rpx;" />
  52. <text>删除</text>
  53. </view>
  54. </view>
  55. </view>
  56. <Yl_Empty wx:if="{{list.length==0}}" />
  57. <view style="height:150rpx;" />
  58. </Yl_ListBox>
  59. <!-- 新建按钮 -->
  60. <view class="create-order-button">
  61. <van-button custom-class="create-btn" color="#3874F6" bind:tap="goToCreate">新建门店</van-button>
  62. </view>
  63. </view>
  64. <wxs module="set">
  65. module.exports = {
  66. color: function (statu) {
  67. var color = '#999999';
  68. switch (statu) {
  69. case "启用":
  70. color = '#52C41A';
  71. break;
  72. case "停用":
  73. color = '#FF4D4F';
  74. break;
  75. case "":
  76. color = '#999999';
  77. break;
  78. };
  79. return color;
  80. },
  81. applyColor: function (statu) {
  82. var color = '#999999';
  83. switch (statu) {
  84. case "启用申请":
  85. color = '#FA8C16';
  86. break;
  87. case "停用申请":
  88. color = '#FF4D4F';
  89. break;
  90. };
  91. return color;
  92. }
  93. }
  94. </wxs>