businessGoodsManage.wxml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!-- 顶部导航 -->
  2. <view class="nav-wrap">
  3. <scroll-view
  4. class="nav"
  5. scroll-x>
  6. <view bindtap="changeTabs"
  7. class="nav-item"
  8. data-value="{{item.value}}"
  9. wx:for="{{tabs}}"
  10. wx:key="value">
  11. <text class="{{item.value === active ? 'active' : ''}}">{{item.name}}</text>
  12. </view>
  13. </scroll-view>
  14. </view>
  15. <!-- 内容区 -->
  16. <view class="main">
  17. <swiper style="height:100%"
  18. current="{{current}}"
  19. bindchange="handleSwiper">
  20. <swiper-item wx:for="{{originScrollViewData}}"
  21. wx:key="index">
  22. <scroll-view scroll-y
  23. style="height:100%;"
  24. refresher-enabled="{{true}}"
  25. refresher-threshold="{{refresherThreshold}}"
  26. refresher-default-style="none"
  27. refresher-background="#FFF"
  28. refresher-triggered="{{item.isRefresh}}"
  29. bindrefresherpulling="onRefresh"
  30. bindscrolltolower="fetOrderList">
  31. <!-- 下拉刷新 -->
  32. <view slot="refresher" class="pulldown-wrapper">
  33. <van-loading
  34. wx:if="{{item.isRefresh}}"
  35. size="24px"
  36. type="spinner">加载中...
  37. </van-loading>
  38. <view wx:if="{{!item.isRefresh}}" class="van-loading">
  39. <text class="van-loading__text">下拉刷新</text>
  40. </view>
  41. </view>
  42. <view class="list"
  43. wx:for="{{item.list}}"
  44. wx:for-item="order"
  45. wx:key="id">
  46. <view class="top">
  47. <view>产品货号:{{order.product_code}}</view>
  48. <!-- 已上架 审核未通过 -->
  49. <view
  50. class="{{order.product_status_color}}"
  51. wx:if="{{!!order.product_status_text}}">{{order.product_status_text}}
  52. </view>
  53. </view>
  54. <view class="middle">
  55. <view class="photo-wrap">
  56. <image src="{{order.product_img_url}}"></image>
  57. </view>
  58. <view class="name-wrap">
  59. <view class="name">{{order.product_title}}</view>
  60. <view class="box">
  61. <view class="stock">库存:{{order.product_count}}</view>
  62. <view class="price">价格: ¥{{tools.fen2Yuan(order.product_price)}}</view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="bottom">
  67. <button
  68. type="default"
  69. data-item="{{order}}"
  70. catch:tap="showDeleteOrder">删除产品
  71. </button>
  72. <button
  73. type="default"
  74. data-item="{{order}}"
  75. catch:tap="handleProductUp"
  76. wx:if="{{order.product_check_status === 1 && (order.product_status === 0 || order.product_status === 1)}}">{{order.product_status === 0 ? '上架' : '下架'}}
  77. </button>
  78. <button
  79. type="default"
  80. style="color: rgba(107, 133, 89, 1);"
  81. data-item="{{order}}"
  82. bind:tap="jumpOrderDetail">编辑产品
  83. </button>
  84. </view>
  85. </view>
  86. <view
  87. class="list-bitmap"
  88. wx:if="{{item.finished && item.list.length < 1}}">
  89. <text>暂无数据</text>
  90. </view>
  91. <!-- 上拉加载 -->
  92. <view class="pullup-wrapper" wx:if="{{!item.isRefresh}}">
  93. <van-loading
  94. wx:if="{{!item.finished}}"
  95. size="24px"
  96. type="spinner">加载中...
  97. </van-loading>
  98. <view wx:if="{{item.finished && item.list.length > 0}}" class="van-loading">
  99. <text class="van-loading__text">没有更多了</text>
  100. </view>
  101. </view>
  102. </scroll-view>
  103. </swiper-item>
  104. </swiper>
  105. </view>
  106. <!-- 弹窗:删除商品二次确认 -->
  107. <van-popup
  108. custom-class="customer-van-model"
  109. show="{{ booDeleteOrder }}"
  110. bind:close="hideDeleteOrder">
  111. <view class="customer-van-model_body">
  112. <view class="content">产品删除后将无法恢复,您确定删除吗?</view>
  113. </view>
  114. <view class="customer-van-model_footer">
  115. <button class="customer-van-model_cancel"
  116. hover-class="none"
  117. type="default"
  118. bind:tap="hideDeleteOrder">取消
  119. </button>
  120. <button class="customer-van-model_confirm"
  121. hover-class="none"
  122. type="primary"
  123. disabled="{{booLock}}"
  124. bind:tap="confirmDeleteOrder">确定
  125. </button>
  126. </view>
  127. </van-popup>
  128. <!-- 弹窗:商品上架下架二次确认 -->
  129. <van-popup
  130. custom-class="customer-van-model"
  131. show="{{ booProductUp }}"
  132. bind:close="hideProductUp">
  133. <view class="customer-van-model_body">
  134. <view class="content">确认{{itemData.product_status === 0 ? '上架' : '下架'}}上架吗?</view>
  135. </view>
  136. <view class="customer-van-model_footer">
  137. <button class="customer-van-model_cancel"
  138. hover-class="none"
  139. type="default"
  140. bind:tap="hideProductUp">取消
  141. </button>
  142. <button class="customer-van-model_confirm"
  143. hover-class="none"
  144. type="primary"
  145. disabled="{{booLock}}"
  146. bind:tap="confirmProductUp">确定
  147. </button>
  148. </view>
  149. </van-popup>
  150. <wxs src="../../components/wxs/index.wxs" module="tools"></wxs>