index.vue 7.4 KB

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