myTeam.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view class="center">
  3. <view class="center_top">
  4. <u-search placeholder="输入车队名称" v-model="searchKeyWord" @change="getList" maxlength="15"></u-search>
  5. <view class="flex top_inTeam" @click="inTeam">
  6. <view class="img_sign">
  7. <image src="../../static/images/riders/inTeam.png" mode="" class="topImg_css"></image>
  8. <span class="info_sign" v-if="inTeamShow"></span>
  9. </view>
  10. <view class="text_css">
  11. 入队申请
  12. </view>
  13. </view>
  14. <view class="flex top_fleetInvite" @click="fleetInvitation">
  15. <view class="img_sign">
  16. <image src="../../static/images/riders/fleetInvite.png" mode="" class="topImg_css"></image>
  17. <span class="info_sign" v-if="fleetInviteShow"></span>
  18. </view>
  19. <view class="text_css">
  20. 车队邀请
  21. </view>
  22. </view>
  23. </view>
  24. <view class="fleet">
  25. <view v-for="(item,index) in formData" class="flex fleet_item" @click="fleetInfo(item)">
  26. <view class="fleet_img">
  27. <u--image class="flex-end" :showLoading="true" :src="item.coverUrl" width="45px" height="45px"
  28. shape='circle'>
  29. </u--image>
  30. <span class="info_sign" v-if="item.announcement == 0"></span>
  31. <image src="../../static/images/riders/captain.png" mode="" v-if="item.captainFlag == 1" class="captain_sign"></image>
  32. </view>
  33. <view class="fleet_right">
  34. <view class="flex">
  35. <view class="fleet_name">
  36. {{item.fleetName}}({{item.fleetMemberNum}})
  37. </view>
  38. <!-- “审核中”和“已驳回”只有管理本人可见 -->
  39. <view class="fleet_invite audit" v-if="item.captainFlag == 1 && item.fleetStatus =='审核中'">{{item.fleetStatus}}</view>
  40. <view class="fleet_invite rebut" v-if="item.captainFlag == 1 && item.fleetStatus =='已驳回'">{{item.fleetStatus}}</view>
  41. <!-- 审核通过的不显示状态 -->
  42. <!-- <view class="fleet_invite adopt">已通过</view> -->
  43. <!-- <view class="fleet_invite"
  44. v-if="item.captainFlag == 1 && (item.fleetStatus =='审核中' || item.fleetStatus =='已驳回') ">
  45. {{item.fleetStatus}}</view>
  46. <view class="fleet_invite" v-else-if="item.fleetStatus != '已通过'">{{item.fleetStatus}}</view> -->
  47. <!-- <view class="fleet_invite" v-if="item.captainFlag == 1">{{item.fleetStatus}}</view> -->
  48. </view>
  49. <view class="fleet_address">
  50. {{item.province}} {{item.city}} {{item.area}}
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. formData: [],
  62. searchKeyWord: "",
  63. fleetInviteShow:false,
  64. inTeamShow:false
  65. }
  66. },
  67. onShow() {
  68. this.commonId = uni.getStorageSync("firstAuthentication").commonId
  69. this.checkInfo()//检查是否有未读信息
  70. this.getList()
  71. },
  72. onLoad() {
  73. },
  74. onNavigationBarButtonTap(e) {
  75. this.$u.route("/pages/riders/addFleet")
  76. },
  77. methods: {
  78. checkInfo(){
  79. this.$request.baseRequest('get', '/fleetMemberInfo/redDot', {
  80. commonId: this.commonId
  81. }).then(res => {
  82. if(res.data.teamApplication == 0){
  83. this.inTeamShow = true
  84. }
  85. if(res.data.fleetInvitation == 0){
  86. this.fleetInviteShow = true
  87. }
  88. })
  89. .catch(res => {
  90. uni.$u.toast(res.message);
  91. });
  92. },
  93. getList() {
  94. this.$request.baseRequest('get', '/fleetMemberInfo/selectMyFleetInfo', {
  95. commonId: this.commonId,
  96. searchKeyWord: this.searchKeyWord,
  97. pageSize: 10,
  98. currentPage: 1
  99. }).then(res => {
  100. this.formData = res.data.records
  101. })
  102. .catch(res => {
  103. uni.$u.toast(res.message);
  104. });
  105. },
  106. fleetInfo(item) {
  107. console.log(item)
  108. uni.$u.route("/pages/riders/fleetSee", {
  109. fleetId: item.fleetId,
  110. id: item.id,
  111. type: item.captainFlag
  112. })
  113. // uni.$u.route('/pages/goodSource/shippingDetails', {
  114. // id: id,
  115. // });
  116. // this.$u.route("/pages/riders/fleetSee")
  117. },
  118. inTeam() {
  119. this.$u.route("/pages/riders/inTeam")
  120. },
  121. fleetInvitation() {
  122. this.$u.route("/pages/riders/fleetInvitation")
  123. },
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .center {
  129. // padding: 30rpx;
  130. background: #F2F4F7;
  131. .row1 {
  132. display: flex;
  133. justify-content: flex-end;
  134. margin-top: 46rpx;
  135. margin: 40rpx 30rpx 0 0;
  136. }
  137. .center_top{
  138. padding: 30rpx;
  139. background: #FFFFFF;
  140. margin-bottom: 30rpx;
  141. }
  142. .topImg_css{
  143. width: 64rpx;
  144. height: 64rpx;
  145. margin-top: 38rpx;
  146. }
  147. .top_fleetInvite,.top_inTeam{
  148. height: 120rpx;
  149. line-height: 140rpx;
  150. }
  151. .text_css{
  152. margin-left: 30rpx;
  153. }
  154. .img_sign{
  155. position: relative;
  156. .info_sign{
  157. position: absolute;
  158. display: inline-block;
  159. width: 20rpx;
  160. height: 20rpx;
  161. border-radius: 10rpx;
  162. background: #FE5C5C;
  163. top: 30rpx;
  164. right: -3px;
  165. }
  166. }
  167. }
  168. .fleet {
  169. margin-top: 30rpx;
  170. background: #FFFFFF;
  171. padding: 30rpx;
  172. .fleet_item{
  173. margin-bottom: 50rpx;
  174. }
  175. .fleet_img {
  176. width: 20%;
  177. position: relative;
  178. .captain_sign{
  179. position: absolute;
  180. width: 28rpx;
  181. height: 28rpx;
  182. bottom: 0rpx;
  183. left: 64rpx;
  184. }
  185. .info_sign{
  186. position: absolute;
  187. display: inline-block;
  188. width: 20rpx;
  189. height: 20rpx;
  190. border-radius: 10rpx;
  191. background: #FE5C5C;
  192. top: 0rpx;
  193. left: 70rpx;
  194. // right: -3px;
  195. }
  196. }
  197. .fleet_right {
  198. width: 80%;
  199. .fleet_name {
  200. width: 80%;
  201. color: #333333;
  202. font-weight: 600;
  203. font-size: 34rpx;
  204. }
  205. // .fleet_invite {
  206. // background-color: #5878e8;
  207. // color: #fff;
  208. // }
  209. .audit{
  210. color: #FE6300;
  211. }
  212. .rebut{
  213. color: #FB1E1E;
  214. }
  215. .fleet_address{
  216. color: #BABABA ;
  217. font-size: 26rpx;
  218. }
  219. }
  220. }
  221. </style>