myComplain.vue 7.8 KB

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