myOrder.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <view class="box">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的订单'" :cj="3"></homenav>
  4. <view class="tab">
  5. <view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">全部</view>
  6. <view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">待付款</view>
  7. <view class="tabLine" :class="{tabActive:tabIndex==5}" @click="tabClick(5)">待成团</view>
  8. <view class="tabLine" :class="{tabActive:tabIndex==2}" @click="tabClick(2)">待服务</view>
  9. <view class="tabLine" :class="{tabActive:tabIndex==3}" @click="tabClick(3)">已完成</view>
  10. </view>
  11. <view class="main">
  12. <view class="itemBg" v-for="(item,index) in items" @click="goDetail(item)">
  13. <view class="itemTop">
  14. <view class="itemType" v-if="item.SheetType==1">商城-商品订单</view>
  15. <view class="itemType" v-if="item.SheetType==2">商城-项目订单</view>
  16. <view class="itemType" v-if="item.SheetType==3">商城-套餐订单</view>
  17. <view class="itemType" v-if="item.SheetType==4">救援订单</view>
  18. <view class="itemType" v-if="item.SheetType==5">钣喷订单</view>
  19. <view class="itemType" v-if="item.SheetType==6">集客订单</view>
  20. <view class="itemSheetState redColor" v-if="item.SheetState==1">待付款</view>
  21. <view class="itemSheetState orangeColor" v-if="item.SheetState==2">待服务</view>
  22. <view class="itemSheetState greenColor" v-if="item.SheetState==3">已完成</view>
  23. <view class="itemSheetState" v-if="item.SheetState==4">已取消</view>
  24. </view>
  25. <view class="itemShopBg">
  26. <view class="shopName">{{item.SheetContent}}</view>
  27. <view style="color: #333333;font-size: 22rpx;">¥<span class="price">{{item.PayType==1?item.RealMoney:0}}</span></view>
  28. </view>
  29. <view class="renBox" v-if="item.SheetType==6">
  30. <image src="../../../static/timg/icon_ren.png" mode="" class="renimg"></image>
  31. <view class="renMobilePhone">{{item.MobilePhone}}</view>
  32. <view class="renNickName">{{item.NickName?item.NickName:''}}</view>
  33. </view>
  34. <view class="itemName">{{item.CreateTime}}</view>
  35. </view>
  36. <nodata v-show="items==''&&isload"></nodata>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import nodata from '@/components/nodata/nodata.vue'
  42. import homenav from "@/components/homenav/nav.vue"
  43. export default {
  44. components: {
  45. nodata,homenav
  46. },
  47. data() {
  48. return {
  49. page: 1,
  50. tabIndex: '',
  51. items: [],
  52. isload: false,
  53. iStatusBarHeight:'',
  54. }
  55. },
  56. onLoad(opt) {
  57. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  58. this.tabIndex = opt.num;
  59. this.getData()
  60. },
  61. onShow() {
  62. console.log(this.tabIndex)
  63. this.getData()
  64. },
  65. methods: {
  66. tabClick(num) {
  67. this.tabIndex = num;
  68. this.page = 1;
  69. this.getData()
  70. },
  71. goDetail(item) {
  72. //SheetType 1 商品2项目3套餐4救援5钣喷6集客
  73. if((item.SheetType==1)||(item.SheetType==2)||(item.SheetType==3)){
  74. uni.navigateTo({
  75. url: "mallOrderDetail?id=" + item.ID +"&SheetType=" + item.SheetType
  76. })
  77. }
  78. else if (item.SheetType==5){
  79. uni.navigateTo({
  80. url: "paintOrderDetail?id=" + item.ID
  81. })
  82. }
  83. else if (item.SheetType==6){
  84. uni.navigateTo({
  85. url: "activityOrderDetail?id=" + item.ID
  86. })
  87. }
  88. },
  89. getData() {
  90. uni.showLoading({
  91. title: '加载中'
  92. });
  93. this.isload = false;
  94. var padata = {
  95. page: this.page,
  96. limit: 10,
  97. sheetState: this.tabIndex > 0 ? this.tabIndex : ''
  98. }
  99. this.$http('openOrderManagement/getOpenSheetList', padata, 'GET').then(res => {
  100. uni.hideLoading();
  101. this.isload = true;
  102. var list = res.data.Items;
  103. if (this.page == 1) {
  104. this.items = list
  105. } else {
  106. this.items = this.items.concat(list)
  107. }
  108. })
  109. },
  110. },
  111. onReachBottom() {
  112. this.page++;
  113. this.getData()
  114. },
  115. onPullDownRefresh() {
  116. this.page = 1;
  117. this.getData()
  118. setTimeout(function() {
  119. uni.stopPullDownRefresh();
  120. }, 1000);
  121. }
  122. }
  123. </script>
  124. <style scoped>
  125. .box {
  126. min-height: 100vh;
  127. background: #F4F5F7;
  128. }
  129. .renBox{
  130. color: #1A1A1A;
  131. background: #F7F7F7;
  132. border-radius: 10rpx;
  133. display: flex;
  134. padding: 20rpx;font-size: 24rpx;
  135. line-height: 30rpx;
  136. margin-top: 16rpx;
  137. }
  138. .renimg{
  139. width: 30rpx;height: 30rpx;
  140. }
  141. .renMobilePhone{
  142. padding-left: 13rpx;
  143. }
  144. .renNickName{
  145. padding-left: 20rpx;
  146. }
  147. .tab {
  148. background: #FFFFFF;
  149. display: flex;
  150. justify-content: space-between;
  151. line-height: 92rpx;
  152. position: fixed;
  153. width: calc(100vw - 100rpx);
  154. padding-left: 50rpx;
  155. padding-right: 50rpx;
  156. height: 92rpx;
  157. z-index: 11;
  158. }
  159. .tabLine {
  160. font-size: 28rpx;
  161. color: #333333;
  162. text-align: center;
  163. }
  164. .tabActive {
  165. color: #FF0000;
  166. font-weight: bold;
  167. border-bottom: 4rpx solid #FF0000;
  168. }
  169. .main {
  170. padding-top: 92rpx;
  171. padding-bottom: 20rpx;
  172. background-color: #F4F5F7;
  173. }
  174. .itemBg {
  175. margin: 20rpx 24rpx;
  176. background-color: #FFFFFF;
  177. border-radius: 10rpx;
  178. padding: 20rpx;
  179. }
  180. .itemTop {
  181. display: flex;
  182. justify-content: space-between;
  183. }
  184. .itemType {
  185. color: #999999;
  186. font-size: 24rpx;
  187. }
  188. .itemSheetState {
  189. font-size: 24rpx;
  190. color: #999999
  191. }
  192. .redColor {
  193. color: #FF0000;
  194. }
  195. .orangeColor {
  196. color: #F19D01;
  197. }
  198. .greenColor {
  199. color: #00A040;
  200. }
  201. .itemShopBg {
  202. display: flex;
  203. justify-content: space-between;
  204. margin-top: 20rpx;
  205. }
  206. .shopName {
  207. color: #333333;
  208. font-size: 30rpx;
  209. font-weight: bold;
  210. /* 隐藏文字显示 ...不换行 */
  211. overflow: hidden;
  212. text-overflow: ellipsis;
  213. white-space: nowrap;
  214. }
  215. .price {
  216. color: #333333;
  217. font-weight: bold;
  218. font-size: 32rpx;
  219. }
  220. .itemName {
  221. color: #666666;
  222. font-size: 24rpx;
  223. padding: 16rpx 0;
  224. height: 30rpx;
  225. overflow: hidden;
  226. text-overflow: ellipsis;
  227. white-space: nowrap;
  228. }
  229. .plateBg {
  230. display: flex;
  231. justify-content: space-between;
  232. align-items: center;
  233. }
  234. .plateNumber {
  235. color: #666666;
  236. font-size: 24rpx;
  237. margin-bottom: 20rpx;
  238. display: flex;
  239. }
  240. .itemLineBottom {
  241. display: flex;
  242. justify-content: flex-end;
  243. }
  244. .itemBtn1 {
  245. width: 150rpx;
  246. height: 56rpx;
  247. border-radius: 36rpx;
  248. border: 2rpx solid #DDDDDD;
  249. text-align: center;
  250. line-height: 56rpx;
  251. font-size: 28rpx;
  252. color: #3C3C3C;
  253. margin-left: 40rpx;
  254. }
  255. .itemBtn2 {
  256. width: 150rpx;
  257. height: 56rpx;
  258. border-radius: 36rpx;
  259. border: 2rpx solid #FF4F00;
  260. text-align: center;
  261. line-height: 56rpx;
  262. font-size: 28rpx;
  263. color: #FF4F00;
  264. margin-left: 40rpx;
  265. }
  266. .orderState {
  267. color: #F19D01;
  268. font-size: 24rpx;
  269. padding-left: 20rpx;
  270. }
  271. </style>