index.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <template>
  2. <view>
  3. <view class="wrap">
  4. <view class="u-tabs-box" style="width:100%">
  5. <u-tabs :list="list" :is-scroll="false" :current="current" @change="handleFilterBrand"></u-tabs>
  6. </view>
  7. <view class="page-box" v-if="pages!=0">
  8. <view class="order" v-for="(res,index) in orderList" :key="index">
  9. <view class="order-one">
  10. </view>
  11. <text class="order-one-text">{{ $t('auditManagement.money') }}:¥{{res.amount}}</text>
  12. <view class="order-one-view">
  13. {{b2bStatus}}
  14. </view>
  15. <view class="order-one-xian">
  16. </view>
  17. <view class="order-two">
  18. <view class="">
  19. {{ $t('auditManagement.createTime') }}
  20. </view>
  21. <view class="">
  22. {{res.createTime}}
  23. </view>
  24. </view>
  25. <view class="order-two" v-if="res.agentAuditTime != null">
  26. <view class="">
  27. {{ $t('auditManagement.auditTime') }}
  28. </view>
  29. <view class="">
  30. {{res.agentAuditTime}}
  31. </view>
  32. </view>
  33. <view class="order-two">
  34. <view class="">
  35. {{res.brandName}}{{ $t('auditManagement.tire') }}
  36. </view>
  37. <view class="">
  38. ¥{{res.amount}}
  39. </view>
  40. </view>
  41. <view class="order-two">
  42. <view class="">
  43. {{ $t('auditManagement.currentStatus') }}
  44. </view>
  45. <view v-if="res.status == 0">
  46. {{ $t('auditManagement.waitingForAudit') }}
  47. </view>
  48. <view v-else-if="res.status == 1">
  49. {{ $t('auditManagement.noPass') }}
  50. </view>
  51. <view v-else-if="res.status == 2">
  52. {{ $t('auditManagement.pass') }}
  53. </view>
  54. <view v-else-if="res.status == 3">
  55. {{ $t('auditManagement.expired') }}
  56. </view>
  57. <view v-else-if="res.status == 4">
  58. {{ $t('auditManagement.audited') }}
  59. </view>
  60. </view>
  61. </view>
  62. <u-loadmore :status="status" />
  63. </view>
  64. <view v-else style="margin-top: 100rpx;">
  65. <u-empty :text="$t('unified.nodata')" mode="list"></u-empty>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import {
  72. request
  73. } from '../../../common/request/request'
  74. require("promise.prototype.finally").shim()
  75. export default {
  76. data() {
  77. return {
  78. orderList: [
  79. ],
  80. length: '',
  81. status: '没',
  82. pages: '',
  83. b2bStatus: '',
  84. list: [{
  85. name: this.$t('auditManagement.waitingForAudit')
  86. }, {
  87. name: this.$t('auditManagement.audited')
  88. }, {
  89. name: this.$t('auditManagement.invaild')
  90. }],
  91. current: 0,
  92. current3: 0,
  93. current2: 1
  94. };
  95. },
  96. onLoad() {},
  97. created() {
  98. uni.setNavigationBarTitle({
  99. title: this.$t('auditManagement.title')
  100. });
  101. this.getDate()
  102. },
  103. methods: {
  104. // 获取列表数据
  105. getDate() {
  106. uni.showLoading({
  107. title: '加载中...'
  108. });
  109. request({
  110. url: '/myapp/storeSelectCoupon',
  111. method: 'post',
  112. data: {
  113. storeId: this.$store.state.storeInfo.storeId,
  114. "size": 10, //门店0
  115. "current": this.current2,
  116. "status": this.current3,
  117. 'userId': this.$store.state.storeInfo.userId
  118. }
  119. }).then(res => {
  120. this.orderList = this.orderList.concat(res.data.data.records)
  121. // 页数
  122. this.pages = res.data.data.pages
  123. this.orderList = this.orderList.concat(res.data.data.records)
  124. for (let i = 0; i < res.data.data.records.length; i++) {
  125. if (res.data.data.records[i].status == 0) {
  126. this.b2bStatus = this.$t('auditManagement.waitingForAudit')
  127. } else if (res.data.data.records[i].status == 2) {
  128. this.b2bStatus = this.$t('auditManagement.audited')
  129. } else {
  130. this.b2bStatus = this.$t('auditManagement.invaild')
  131. }
  132. }
  133. }).catch(err => {
  134. })
  135. .finally(() => {
  136. setTimeout(() => {
  137. uni.hideLoading();
  138. this.loading = false;
  139. }, 300)
  140. })
  141. },
  142. handleFilterBrand: function(v2) {
  143. this.current = v2
  144. if (v2 == 0) {
  145. this.current1 = 0
  146. this.current3 = 0
  147. } else if (v2 == 1) {
  148. this.current1 = 4
  149. this.current3 = 4
  150. } else {
  151. this.current1 = 3
  152. this.current3 = 3
  153. }
  154. this.current2 = 1
  155. request({
  156. url: '/myapp/storeSelectCoupon',
  157. method: 'post',
  158. data: {
  159. storeId: this.$store.state.storeInfo.storeId,
  160. "size": 10, //门店0
  161. "current": this.current2,
  162. "status": this.current1,
  163. 'userId': this.$store.state.storeInfo.userId
  164. }
  165. }).then(res => {
  166. this.orderList = res.data.data.records
  167. // 页数
  168. this.pages = res.data.data.pages
  169. // this.orderList = this.orderList.concat(res.data.data.records)
  170. for (let i = 0; i < res.data.data.records.length; i++) {
  171. if (res.data.data.records[i].status == 0) {
  172. this.b2bStatus = this.$t('auditManagement.waitingForAudit')
  173. } else if (res.data.data.records[i].status == 2) {
  174. this.b2bStatus = this.$t('auditManagement.audited')
  175. } else {
  176. this.b2bStatus = this.$t('auditManagement.invaild')
  177. }
  178. }
  179. }).catch(err => {
  180. })
  181. .finally(() => {
  182. setTimeout(() => {
  183. uni.hideLoading();
  184. this.loading = false;
  185. }, 300)
  186. })
  187. }
  188. },
  189. onReachBottom() {
  190. setTimeout(() => {
  191. if (this.current2 > this.pages) {
  192. this.status = 'nomore'
  193. } else {
  194. this.current2 = ++this.current2;
  195. this.status = 'loading';
  196. this.getDate()
  197. }
  198. }, 2000)
  199. }
  200. }
  201. </script>
  202. <style>
  203. /* #ifndef H5 */
  204. page {
  205. height: 100%;
  206. background-color: #f2f2f2;
  207. }
  208. /* #endif */
  209. </style>
  210. <style lang="scss" scoped>
  211. .u-tabs-box {
  212. width: 100%;
  213. // padding-left:30rpx;
  214. }
  215. .order-one-view {
  216. width: 120rpx;
  217. line-height: 40rpx;
  218. background-color: #0094FE;
  219. position: relative;
  220. left: 575rpx;
  221. top: -35rpx;
  222. border-top-left-radius: 50rpx;
  223. border-bottom-left-radius: 50rpx;
  224. font-size: 24rpx;
  225. color: #fff;
  226. text-align: center;
  227. }
  228. // 插件代码
  229. .order {
  230. width: 710rpx;
  231. background-color: #ffffff;
  232. margin: 20rpx auto;
  233. border-radius: 20rpx;
  234. box-sizing: border-box;
  235. padding: 20rpx;
  236. font-size: 28rpx;
  237. .top {
  238. display: flex;
  239. justify-content: space-between;
  240. .left {
  241. display: flex;
  242. align-items: center;
  243. .store {
  244. margin: 0 10rpx;
  245. font-size: 32rpx;
  246. font-weight: bold;
  247. }
  248. }
  249. .right {
  250. color: $u-type-warning-dark;
  251. }
  252. }
  253. .item {
  254. display: flex;
  255. margin: 20rpx 0 0;
  256. .left {
  257. margin-right: 20rpx;
  258. image {
  259. width: 200rpx;
  260. height: 200rpx;
  261. border-radius: 10rpx;
  262. }
  263. }
  264. .content {
  265. .title {
  266. font-size: 28rpx;
  267. line-height: 50rpx;
  268. }
  269. .type {
  270. margin: 10rpx 0;
  271. font-size: 24rpx;
  272. color: $u-tips-color;
  273. }
  274. .delivery-time {
  275. color: #e5d001;
  276. font-size: 24rpx;
  277. }
  278. }
  279. .right {
  280. margin-left: 10rpx;
  281. padding-top: 20rpx;
  282. text-align: right;
  283. .decimal {
  284. font-size: 24rpx;
  285. margin-top: 4rpx;
  286. }
  287. .number {
  288. color: $u-tips-color;
  289. font-size: 24rpx;
  290. }
  291. }
  292. }
  293. .total {
  294. margin-top: 20rpx;
  295. text-align: right;
  296. font-size: 24rpx;
  297. .total-price {
  298. font-size: 32rpx;
  299. }
  300. }
  301. .bottom {
  302. display: flex;
  303. margin-top: 40rpx;
  304. padding: 0 10rpx;
  305. justify-content: space-between;
  306. align-items: center;
  307. .btn {
  308. line-height: 52rpx;
  309. width: 160rpx;
  310. border-radius: 26rpx;
  311. border: 2rpx solid $u-border-color;
  312. font-size: 26rpx;
  313. text-align: center;
  314. color: $u-type-info-dark;
  315. }
  316. .evaluate {
  317. color: $u-type-warning-dark;
  318. border-color: $u-type-warning-dark;
  319. }
  320. }
  321. }
  322. .centre {
  323. text-align: center;
  324. margin: 200rpx auto;
  325. font-size: 32rpx;
  326. image {
  327. width: 164rpx;
  328. height: 164rpx;
  329. border-radius: 50%;
  330. margin-bottom: 20rpx;
  331. }
  332. .tips {
  333. font-size: 24rpx;
  334. color: #999999;
  335. margin-top: 20rpx;
  336. }
  337. .btn {
  338. margin: 80rpx auto;
  339. width: 200rpx;
  340. border-radius: 32rpx;
  341. line-height: 64rpx;
  342. color: #ffffff;
  343. font-size: 26rpx;
  344. background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
  345. }
  346. }
  347. .wrap {
  348. display: flex;
  349. flex-direction: column;
  350. height: calc(100vh - var(--window-top));
  351. width: 100%;
  352. }
  353. .swiper-box {
  354. flex: 1;
  355. }
  356. .swiper-item {
  357. height: 100%;
  358. }
  359. // 手敲代码
  360. .order-one {
  361. width: 6rpx;
  362. height: 30rpx;
  363. margin-top: 5rpx;
  364. margin-right: 30rpx;
  365. background-color: #0292FD;
  366. float: left;
  367. }
  368. .order-two {
  369. display: flex;
  370. justify-content: space-between;
  371. margin-top: 15rpx;
  372. font-size: 24rpx;
  373. color: #6A6A6A;
  374. }
  375. // 线
  376. .order-one-xian {
  377. width: 642rpx;
  378. height: 1rpx;
  379. border-bottom: 1rpx solid #E7E8EA;
  380. margin: 0 auto;
  381. margin-top: -20rpx;
  382. margin-bottom: 30rpx;
  383. }
  384. .order-one-text {
  385. font-size: 28rpx;
  386. font-weight: bold;
  387. color: #000;
  388. }
  389. </style>