myComplain.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <template>
  2. <view class="content">
  3. <view class="complain_cont">
  4. <view class="complain_tabs" v-show="!isShow">
  5. <u-tabs :list="list" :is-scroll="true" name="illegal" :current="current" active-color="#FF7F00"
  6. @change="change"></u-tabs>
  7. </view>
  8. </view>
  9. <u-tabs :list="listTab" :is-scroll="false" inactive-color="#333333" active-color="#FF7F00" :current="currentIndex" @change="changeTab">
  10. </u-tabs>
  11. <view class="tabs_box dis">
  12. <!-- 全部 -->
  13. <view class="complain_box" v-for="(item,index) in orderlist" :key="index" @click="bindonline(item)">
  14. <view class="complain_part1">
  15. <view class="part1_left">{{item.illegal}}</view>
  16. <!-- <view class="part1_left" v-if="item.complaintType=='2'">拒绝系统推单</view> -->
  17. <!-- <view class="part1_left" v-if="item.complaintType=='3'">残损违规</view> -->
  18. <view class="part1_right">扣款{{item.deductMoney}}元</view>
  19. </view>
  20. <view class="complain_part2" v-if="item.shipAddressDetail">
  21. <image src="../../../static/image/black.png"></image>
  22. <text>{{item.shipAddressDetail}}</text>
  23. </view>
  24. <view class="complain_part2" v-if="item.deilveryAddressDetail">
  25. <image src="../../../static/image/orange.png"></image>
  26. <text>{{item.deilveryAddressDetail}}</text>
  27. </view>
  28. <u-line color="#E6E6E6" />
  29. <view class="complain_title">
  30. <span v-if="item.complaintState=='1'">可申诉</span>
  31. <span v-if="item.complaintState=='2'">申诉中</span>
  32. <span v-if="item.complaintState=='3'">申诉未通过</span>
  33. <span v-if="item.complaintState=='4'">申诉通过</span>
  34. </view>
  35. </view>
  36. <view class="empty" v-if="orderlist.length == 0">
  37. <view
  38. style="display: block; width: 90%; margin: 0 auto; position: fixed;top: 35%;left: 0rpx;right: 0rpx;text-align: center;">
  39. <image src="../../../static/image/empty.png" style="width: 300rpx;height: 300rpx;"></image>
  40. <view style="color: #CCCCCC;">暂无内容</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {
  50. isShow: false,
  51. page: 1,
  52. limit: 10,
  53. complaintType: null,
  54. complaintState: '',
  55. listTab: [{
  56. name: '全部'
  57. }, {
  58. name: '可申诉'
  59. }, {
  60. name: '申诉中'
  61. }, {
  62. name: '申诉未通过'
  63. }, {
  64. name: '申诉通过'
  65. }],
  66. currentIndex: 0,
  67. list: [{
  68. id: '',
  69. illegal: '全部'
  70. }],
  71. current: 0,
  72. orderlist: [],
  73. totalCount: 0,
  74. illegalId: ''
  75. }
  76. },
  77. mounted() {
  78. },
  79. onLoad() {
  80. this.getTypeList()
  81. this.bindorder()
  82. },
  83. methods: {
  84. getTypeList() {
  85. this.$Request.getT('/app/illegalType/selectIllegalTypeList').then(res => {
  86. if (res.code == 0) {
  87. this.list = [...this.list, ...res.data]
  88. }
  89. });
  90. },
  91. bindlist(index) {
  92. console.log(index)
  93. this.current = index;
  94. this.isShow = !this.isShow
  95. },
  96. // 获取全部数据
  97. bindorder() {
  98. this.$Request.getT('/app/indent/findAllComplaint', {
  99. page: this.page,
  100. limit: this.limit,
  101. complaintState: this.complaintState,
  102. illegalId: this.illegalId
  103. }).then(res => {
  104. if (res.code == 0) {
  105. this.totalCount = res.data.totalCount
  106. if (this.page == 1) {
  107. this.orderlist = res.data.list
  108. } else {
  109. this.orderlist = this.list_box.concat(res.data.list)
  110. }
  111. } else {
  112. console.log('失败:', res.data)
  113. }
  114. });
  115. },
  116. change(index) {
  117. console.log(index)
  118. this.illegalId = this.list[index].id
  119. this.orderlist = []
  120. this.current = index;
  121. this.currentIndex = 0
  122. this.page = 1
  123. this.complaintState = ''
  124. this.bindorder()
  125. },
  126. changeTab(index) {
  127. this.orderlist = []
  128. this.currentIndex = index
  129. this.page = 1
  130. if (index == 0) {
  131. this.complaintState = ''
  132. } else {
  133. this.complaintState = index
  134. }
  135. this.bindorder()
  136. },
  137. bindonline(item) {
  138. // if(item.complaintState == 1 || item.complaintState == 4) {
  139. uni.navigateTo({
  140. url: '/pages/riderMy/myComplain/online_complain/online_complain?indentNumber=' + item
  141. .indentNumber + '&complaintId=' + item.complaintId
  142. })
  143. // }
  144. },
  145. bindshow() {
  146. this.isShow = !this.isShow
  147. },
  148. },
  149. // 上拉加载
  150. onReachBottom: function() {
  151. if (this.page < this.totalCount) {
  152. this.page = this.page + 1;
  153. } else {
  154. uni.showToast({
  155. title: '已经最后一页啦',
  156. icon: 'none'
  157. })
  158. }
  159. this.bindorder();
  160. }
  161. }
  162. </script>
  163. <style>
  164. body {
  165. background-color: #F5F5F5;
  166. }
  167. .empty {
  168. width: 100%;
  169. background: #ffffff;
  170. /* #ifdef MP-WEIXIN */
  171. height: 93vh;
  172. /* #endif */
  173. /* #ifndef MP-WEIXIN */
  174. height: 80vh;
  175. /* #endif */
  176. }
  177. .u-tab-item {
  178. font-weight: 400 !important;
  179. color: #000000 !important;
  180. font-size: 24rpx !important;
  181. }
  182. .tabs_box {
  183. /* display: none; */
  184. /* position: absolute; */
  185. /* top: 144rpx; */
  186. }
  187. .dis {
  188. /* display: block; */
  189. /* width: 100%; */
  190. /* position: absolute; */
  191. /* top: 100rpx; */
  192. }
  193. .content {
  194. width: 100%;
  195. position: relative;
  196. }
  197. .complain_cont {
  198. width: 100%;
  199. position: relative;
  200. /* display: flex; */
  201. }
  202. .complain_tabs {
  203. width: 100%;
  204. }
  205. .complain_btn {
  206. width: 15%;
  207. background: #FFFFFF;
  208. box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
  209. height: 88rpx;
  210. position: absolute;
  211. top: 0rpx;
  212. right: 0rpx;
  213. z-index: 10075;
  214. }
  215. .btn {
  216. color: #999999;
  217. font-size: 25rpx;
  218. letter-spacing: 2rpx;
  219. text-align: center;
  220. line-height: 88rpx;
  221. }
  222. .complain_none {
  223. width: 15%;
  224. background: #FFFFFF;
  225. box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
  226. height: 88rpx;
  227. position: absolute;
  228. top: 88rpx;
  229. right: 0rpx;
  230. }
  231. .popup_list {
  232. width: 97%;
  233. margin: 0 auto;
  234. position: relative;
  235. top: 90rpx;
  236. }
  237. .list_tabs {
  238. width: 90%;
  239. height: auto;
  240. display: flex;
  241. justify-content: start;
  242. flex-wrap: wrap;
  243. }
  244. .tabs {
  245. border: 1rpx solid #cccccc;
  246. padding: 0rpx 25rpx;
  247. line-height: 50rpx;
  248. margin: 10rpx 10rpx;
  249. }
  250. /* 全部 */
  251. .complain_box {
  252. width: 90%;
  253. margin: 0 auto;
  254. /* height: 300rpx; */
  255. background: #ffffff;
  256. margin-top: 30rpx;
  257. border-radius: 17rpx;
  258. }
  259. .complain_part1 {
  260. width: 90%;
  261. margin: 0 auto;
  262. display: flex;
  263. /* padding-top: 20rpx; */
  264. }
  265. .part1_left {
  266. flex: 1;
  267. font-size: 26rpx;
  268. font-weight: bold;
  269. letter-spacing: 2rpx;
  270. height: 80rpx;
  271. justify-content: left;
  272. align-items: center;
  273. display: flex;
  274. }
  275. .part1_right {
  276. flex: 1;
  277. color: #FF1B1B;
  278. display: flex;
  279. justify-content: flex-end;
  280. align-items: center;
  281. }
  282. .complain_part2 {
  283. width: 90%;
  284. margin: 0 auto;
  285. height: 50rpx;
  286. display: flex;
  287. justify-content: left;
  288. align-items: center;
  289. }
  290. .complain_part2 image {
  291. width: 15rpx;
  292. height: 15rpx;
  293. margin-right: 20rpx;
  294. }
  295. .complain_part2 text {
  296. color: #999999;
  297. font-size: 24rpx;
  298. }
  299. .u-line {
  300. border-bottom-width: 3px !important;
  301. margin-top: 20rpx !important;
  302. }
  303. .complain_title {
  304. width: 90%;
  305. margin: 0 auto;
  306. height: 80rpx;
  307. display: flex;
  308. justify-content: flex-end;
  309. align-items: center;
  310. color: #FF2727;
  311. font-size: 27rpx;
  312. font-weight: bold;
  313. letter-spacing: 2rpx;
  314. }
  315. </style>