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