建材商城系统20241014
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

238 lines
4.5 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="订单中心" bgColor="#DC2828" color="#fff" leftClick @leftClick="$utils.navigateBack" />
  4. <uv-tabs :list="tabs"
  5. :activeStyle="{color : '#FD5100', fontWeight : 600}"
  6. lineColor="#FD5100"
  7. lineHeight="8rpx"
  8. lineWidth="50rpx"
  9. @click="clickTabs"></uv-tabs>
  10. <view v-if="orderList.records.length > 0" class="list">
  11. <view class="item" v-for="(item, index) in orderList.records" @click="toOrderDetail(item.id)" :key="index">
  12. <!-- 顶部 -->
  13. <view class="top">
  14. <view class="service">
  15. <text>{{item.projectId_dictText}}</text>
  16. <text>{{item.type_dictText}}</text>
  17. </view>
  18. <view class="status">
  19. <text> {{item.state_dictText}}</text>
  20. </view>
  21. </view>
  22. <!-- -->
  23. <view class="content">
  24. <view class="left">
  25. <image mode="aspectFill" :src="item.image"></image>
  26. </view>
  27. <view class="right">
  28. <view class="text-hidden-1">
  29. 客户姓名{{item.name}}
  30. </view>
  31. <view class="text-hidden-1">
  32. 下单时间{{item.unit}}
  33. </view>
  34. <view class="text-hidden-1">
  35. 联系电话{{item.address}}
  36. </view>
  37. </view>
  38. </view>
  39. <!-- -->
  40. <view class="bottom">
  41. <view class="price">
  42. 总价格<text class="num">{{item.money}}</text>
  43. </view>
  44. <view class="b1">
  45. 查看详情
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import { mapGetters } from 'vuex'
  54. export default {
  55. components : {
  56. },
  57. computed : {
  58. ...mapGetters(['userShop']),
  59. },
  60. data() {
  61. return {
  62. tabs: [{
  63. name: '全部'
  64. },
  65. {
  66. name: '待付款'
  67. },
  68. {
  69. name: '配送中'
  70. },
  71. {
  72. name: '已完成'
  73. },
  74. {
  75. name: '已取消'
  76. }
  77. ],
  78. queryParams: {
  79. pageNo: 1,
  80. pageSize: 10
  81. },
  82. orderList : {
  83. records : [
  84. {
  85. projectId_dictText:"泰山工装石膏板",
  86. money : 99.99,
  87. address : '广东省广州市越秀区城南故事C3栋2802',
  88. name : '李**',
  89. phone : '150*****091',
  90. unit : '120*40*75【桌子尺寸】',
  91. image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
  92. state_dictText : '已完成',
  93. }
  94. ],
  95. total : 0,
  96. },
  97. state : -1,
  98. }
  99. },
  100. onShow() {
  101. this.orderPage()
  102. },
  103. //滚动到屏幕底部
  104. onReachBottom() {
  105. if(this.queryParams.pageSize < this.orderList.total){
  106. this.queryParams.pageSize += 10
  107. this.orderPage()
  108. }
  109. },
  110. methods: {
  111. orderPage(){
  112. let queryParams = {
  113. ...this.queryParams,
  114. }
  115. if(this.state != -1){
  116. queryParams.state = this.state
  117. }
  118. this.$api('orderPage', queryParams, res => {
  119. if(res.code == 200){
  120. this.orderList = res.result
  121. }
  122. })
  123. },
  124. //点击tab栏
  125. clickTabs(index) {
  126. if (index == 0) {
  127. this.state = -1;
  128. } else {
  129. this.state = index - 1;
  130. }
  131. this.queryParams.pageSize = 10
  132. this.orderPage()
  133. },
  134. //跳转订单详情页面
  135. toOrderDetail(id) {
  136. uni.navigateTo({
  137. url: '/pages_order/order/orderDetail?id=' + id
  138. })
  139. },
  140. getOrderList(){
  141. },
  142. }
  143. }
  144. </script>
  145. <style scoped lang="scss">
  146. .page{
  147. }
  148. .list {
  149. .item {
  150. width: calc(100% - 40rpx);
  151. background-color: #fff;
  152. margin: 20rpx;
  153. box-sizing: border-box;
  154. border-radius: 16rpx;
  155. padding: 30rpx;
  156. .top {
  157. display: flex;
  158. justify-content: space-between;
  159. align-items: center;
  160. font-size: 30rpx;
  161. .service {}
  162. .status {
  163. font-size: 26rpx;
  164. font-weight: 600;
  165. }
  166. }
  167. .content {
  168. display: flex;
  169. margin: 10rpx 0;
  170. .left {
  171. width: 150rpx;
  172. height: 150rpx;
  173. border-radius: 10rpx;
  174. image {
  175. width: 150rpx;
  176. height: 150rpx;
  177. border-radius: 10rpx;
  178. }
  179. }
  180. .right {
  181. width: calc(100% - 160rpx);
  182. color: #777;
  183. font-size: 24rpx;
  184. padding-left: 20rpx;
  185. line-height: 40rpx;
  186. background-color: #F8F8F8;
  187. }
  188. }
  189. .bottom {
  190. display: flex;
  191. justify-content: space-between;
  192. font-size: 25rpx;
  193. .price {
  194. color: #787777;
  195. font-weight: 900;
  196. text {
  197. color: #fd7d41;
  198. font-size: 30rpx;
  199. }
  200. }
  201. .b1 {
  202. border: 1px solid #777;
  203. color: #777;
  204. box-sizing: border-box;
  205. }
  206. .b2 {
  207. background: linear-gradient(178deg, #4FD3BC, #60C285);
  208. color: #fff;
  209. }
  210. view {
  211. margin: 12rpx;
  212. border-radius: 28rpx;
  213. padding: 8rpx 28rpx;
  214. margin-bottom: 0;
  215. }
  216. }
  217. }
  218. }
  219. </style>