rescueOrder.vue 6.4 KB

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