index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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 v-if="globalImages" :src="globalImages + 'imgs/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. import { waitForGlobalImages } from '@/utils/globalImageLoader'
  53. export default {
  54. data() {
  55. return {
  56. isShow: false,
  57. page: 1,
  58. limit: 10,
  59. complaintType: null,
  60. complaintState: '',
  61. listTab: [{
  62. name: '全部'
  63. }, {
  64. name: '可申诉'
  65. }, {
  66. name: '申诉中'
  67. }, {
  68. name: '申诉未通过'
  69. }, {
  70. name: '申诉通过'
  71. }],
  72. currentIndex: 0,
  73. list: [{
  74. id: '',
  75. illegal: '全部'
  76. }],
  77. current: 0,
  78. orderlist: [],
  79. totalCount: 0,
  80. illegalId: '',
  81. globalImages: '',
  82. }
  83. },
  84. mounted() {
  85. },
  86. onLoad() {
  87. this.getTypeList()
  88. this.bindorder()
  89. waitForGlobalImages().then((path) => {
  90. console.log('✅ 全局图片路径:', path)
  91. this.globalImages = path
  92. })
  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/indent/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: '/my/appeal/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. .green {
  189. width: 16rpx;
  190. height: 16rpx;
  191. background: #1FC657;
  192. border-radius: 50%;
  193. margin-right: 20rpx;
  194. }
  195. .orgin {
  196. width: 16rpx;
  197. height: 16rpx;
  198. background: #FBAC04;
  199. border-radius: 50%;
  200. margin-right: 20rpx;
  201. }
  202. .u-tab-item {
  203. font-weight: 400 !important;
  204. color: #000000 !important;
  205. font-size: 24rpx !important;
  206. }
  207. .tabs_box {
  208. /* display: none; */
  209. /* position: absolute; */
  210. /* top: 144rpx; */
  211. }
  212. .dis {
  213. /* display: block; */
  214. /* width: 100%; */
  215. /* position: absolute; */
  216. /* top: 100rpx; */
  217. }
  218. .content {
  219. width: 100%;
  220. position: relative;
  221. }
  222. .complain_cont {
  223. width: 100%;
  224. position: relative;
  225. /* display: flex; */
  226. }
  227. .complain_tabs {
  228. width: 100%;
  229. }
  230. .complain_btn {
  231. width: 15%;
  232. background: #FFFFFF;
  233. box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
  234. height: 88rpx;
  235. position: absolute;
  236. top: 0rpx;
  237. right: 0rpx;
  238. z-index: 10075;
  239. }
  240. .btn {
  241. color: #999999;
  242. font-size: 25rpx;
  243. letter-spacing: 2rpx;
  244. text-align: center;
  245. line-height: 88rpx;
  246. }
  247. .complain_none {
  248. width: 15%;
  249. background: #FFFFFF;
  250. box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
  251. height: 88rpx;
  252. position: absolute;
  253. top: 88rpx;
  254. right: 0rpx;
  255. }
  256. .popup_list {
  257. width: 97%;
  258. margin: 0 auto;
  259. position: relative;
  260. top: 90rpx;
  261. }
  262. .list_tabs {
  263. width: 90%;
  264. height: auto;
  265. display: flex;
  266. justify-content: start;
  267. flex-wrap: wrap;
  268. }
  269. .tabs {
  270. border: 1rpx solid #cccccc;
  271. padding: 0rpx 25rpx;
  272. line-height: 50rpx;
  273. margin: 10rpx 10rpx;
  274. }
  275. /* 全部 */
  276. .complain_box {
  277. width: 90%;
  278. margin: 0 auto;
  279. /* height: 300rpx; */
  280. background: #ffffff;
  281. margin-top: 30rpx;
  282. border-radius: 17rpx;
  283. }
  284. .complain_part1 {
  285. width: 90%;
  286. margin: 0 auto;
  287. display: flex;
  288. /* padding-top: 20rpx; */
  289. }
  290. .part1_left {
  291. flex: 1;
  292. font-size: 26rpx;
  293. font-weight: bold;
  294. letter-spacing: 2rpx;
  295. height: 80rpx;
  296. justify-content: left;
  297. align-items: center;
  298. display: flex;
  299. }
  300. .part1_right {
  301. flex: 1;
  302. color: #FF1B1B;
  303. display: flex;
  304. justify-content: flex-end;
  305. align-items: center;
  306. }
  307. .complain_part2 {
  308. width: 90%;
  309. margin: 0 auto;
  310. height: 50rpx;
  311. display: flex;
  312. justify-content: left;
  313. align-items: center;
  314. }
  315. .complain_part2 image {
  316. width: 15rpx;
  317. height: 15rpx;
  318. margin-right: 20rpx;
  319. }
  320. .complain_part2 text {
  321. color: #999999;
  322. font-size: 24rpx;
  323. }
  324. .u-line {
  325. border-bottom-width: 3px !important;
  326. margin-top: 20rpx !important;
  327. }
  328. .complain_title {
  329. width: 90%;
  330. margin: 0 auto;
  331. height: 80rpx;
  332. display: flex;
  333. justify-content: flex-end;
  334. align-items: center;
  335. color: #FF2727;
  336. font-size: 27rpx;
  337. font-weight: bold;
  338. letter-spacing: 2rpx;
  339. }
  340. </style>