moneyList.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#666666"></navbar>
  4. <div class="tabB" :style="{top:tabTop+'px'}">
  5. <view class="tabBox">
  6. <view :class="{active:selTabIndex==0}" @click="switchTab(0)">商城订单</view>
  7. <!-- <view :class="{active:selTabIndex==2}" @click="switchTab(2)">实体店订单</view> -->
  8. <view :class="{active:selTabIndex==3}" @click="switchTab(3)">线下订单</view>
  9. <!-- <view :class="{active:selTabIndex==1}" @click="switchTab(1)">加盟订单</view> -->
  10. </view>
  11. <view class="order-type u-flex-center-sb" v-if="selTabIndex == 0">
  12. <view class="type-name u-font26 u-181818" :class="{'active': isChange == item.value}"
  13. v-for="(item,index) in orderType" :key="index" @click="clickBtn(item.value)">
  14. {{item.label}}
  15. </view>
  16. </view>
  17. </div>
  18. <view class="bigbox" :class="selTabIndex == 0 ? 'bigbox0' : 'bigbox3'">
  19. <view v-if="listdata.length>0">
  20. <template v-if="selTabIndex == 0">
  21. <view class="u-bg-fff ppsPd umb20" v-for="(item,index) in listdata" :key="item.id">
  22. <view class="pt15-pb24 u-border-one-one" style="padding-bottom: 30rpx;">
  23. <view class="u-flex-center-sb" style="align-items: center;">
  24. <view class="u-flex" style="align-items: center;">
  25. <text class="iconfont2 u-font40" style="padding-top: 2rpx;color: #FA6138;">&#xe611;</text>
  26. <text class="u-1A1A1A u-font30 u-ml15 ">{{item.shop_name}}</text>
  27. <!-- <text style="margin-top: 4rpx;" class="u-CCC right-icon iconfont">&#xe6c7;</text> -->
  28. </view>
  29. <text class="u-FF0000 u-font28">{{item.order_status}}</text>
  30. </view>
  31. </view>
  32. <view>
  33. <view class="goodsItem u-border-one-one u-flex">
  34. <image :src="item.goods_img" class="u-goods200 u-ml15" mode=""></image>
  35. <view class="u-flex1 u-flex-column-start rightText u-ml30">
  36. <view class="u-text2 u-1A1A1A u-font28">{{item.goods_title}}</view>
  37. <view class="bottext u-flex-column-start u-flex1">
  38. <text class="u-font22 u-999 " style="width: 100%;"
  39. v-if="item.sku_set_name">规格:{{item.sku_set_name}}</text>
  40. <view class="u-flex-center botPrice u-mt25">
  41. <view class="u-FF0000 u-font32 good-text">
  42. <rich-text :nodes="$mUtil.priceBigSmall(item.sale_price)"></rich-text>
  43. </view>
  44. <text class="u-font26 u-999 u-ml15" v-if="item.number">x {{item.number}}</text>
  45. </view>
  46. </view>
  47. <view class="contribution-txt">贡献值:{{item.consumption_value}} <text class="u-font26 u-ml15"
  48. v-if="item.number">x {{item.number}}</text></view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="botList">
  53. <view class="u-flex-center-sb u-mt20">
  54. <view class="u-font26 u-181818 opacity ">购买人</view>
  55. <text style="text-align: right;"
  56. class="u-font26 u-999 u-text-width-two">{{item.user_info.nickname}}</text>
  57. </view>
  58. <view class="u-flex-center-sb u-mt20">
  59. <view class="u-font26 u-181818 opacity">下单时间</view>
  60. <text class="u-font26 u-999">{{item.create_time}}</text>
  61. </view>
  62. <view class="u-flex-center-sb u-mt20">
  63. <view class="u-font26 u-181818 opacity">所得贡献值</view>
  64. <view class="u-font26 u-FF0000 u-bold">
  65. <rich-text :nodes="$mUtil.priceBigSmall(item.able_gains, false)"></rich-text>
  66. </view>
  67. </view>
  68. <view class="u-flex-center-sb u-mt20" v-if="item.balance_gains > 0">
  69. <view class="u-font26 u-181818 opacity">所得金额</view>
  70. <view class="u-font26 u-FF0000 u-bold">
  71. <rich-text :nodes="$mUtil.priceBigSmall(item.balance_gains, false)"></rich-text>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <template v-if="selTabIndex == 3">
  78. <view class="offline">
  79. <view class="order-item" v-for="item in listdata" :key="item.id">
  80. <view class="order-item-head">
  81. <view class="item-info">
  82. <view class="order-num">
  83. <text class="num">订单号:</text>
  84. <text class="">{{item.offline_order.order_code}}</text>
  85. </view>
  86. <view class="order-time-price">
  87. <text class="time">{{item.create_time}}</text>
  88. <text class="">消费金额:{{item.offline_order.sales_money}}</text>
  89. </view>
  90. </view>
  91. <!-- <view class="iconfont3 item-icon">&#xe65e;</view> -->
  92. </view>
  93. <view class="tip">
  94. <view class="label">打赏积分:</view>{{item.offline_order.shop_consume_integral_able}}
  95. </view>
  96. <view class="tip">
  97. <view class="label">所得收益:</view>{{item.income_point}}
  98. </view>
  99. </view>
  100. </view>
  101. </template>
  102. <loadMore v-if="listdata.length>0" :status="status"></loadMore>
  103. </view>
  104. <nodata v-else :config="{top:20,content:'暂无数据~'}"></nodata>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. var app = getApp()
  110. export default {
  111. data() {
  112. return {
  113. config: {
  114. back: true, //false是tolbar页面 是则不写
  115. title: '推广订单',
  116. color: '#1A1A1A',
  117. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  118. backgroundColor: [1, "#fff"],
  119. statusBarFontColor: '#1A1A1A'
  120. },
  121. isChange: 0,
  122. // orderType: ["全部订单", "已付款", "已完成", "已结算"],
  123. orderType: [{
  124. label: "全部订单",
  125. value: ""
  126. },
  127. {
  128. label: "已付款",
  129. value: 1
  130. },
  131. {
  132. label: "已完成",
  133. value: 2
  134. },
  135. {
  136. label: "已结算",
  137. value: 3
  138. },
  139. ],
  140. listdata: [],
  141. status: 'more', //more|loading|noMore
  142. noData: false,
  143. parmas: {
  144. page: 1,
  145. limit: 10,
  146. status: '',
  147. // user_order_gains_type: 0
  148. },
  149. tabTop: 0,
  150. selTabIndex: 0
  151. }
  152. },
  153. onReachBottom(e) {
  154. this.status = 'loading'
  155. this.parmas.page++
  156. if (this.selTabIndex == 0) {
  157. this.listData()
  158. } else {
  159. this.getOfflineorderincome()
  160. }
  161. },
  162. onPullDownRefresh() {
  163. this.rest()
  164. if (this.selTabIndex == 0) {
  165. this.listData()
  166. } else {
  167. this.getOfflineorderincome()
  168. }
  169. },
  170. onLoad() {
  171. this.tabTop = app.globalData.barHeight + 44;
  172. this.listData()
  173. },
  174. methods: {
  175. switchTab(index) {
  176. this.selTabIndex = index;
  177. this.parmas.page = 1;
  178. this.listdata = []
  179. if (this.selTabIndex == 0) {
  180. this.parmas.user_order_gains_type = index;
  181. this.listData()
  182. } else {
  183. this.getOfflineorderincome()
  184. }
  185. },
  186. rest() {
  187. this.parmas.page = 1
  188. this.listdata = []
  189. },
  190. listData() {
  191. this.$http.get('/userordergains/pages', this.parmas).then(async res => {
  192. if (res && res.code == 200) {
  193. uni.stopPullDownRefresh()
  194. this.listdata = this.listdata.concat(res.page.list)
  195. if (this.listdata.length == 0) {
  196. this.noData = true
  197. } else {
  198. this.noData = false
  199. }
  200. if (res.page.totalPage <= res.page.currPage) {
  201. this.status = 'noMore'
  202. } else {
  203. this.status = 'more'
  204. }
  205. }
  206. })
  207. },
  208. getOfflineorderincome() {
  209. this.$http.get('/offlineorderincome/page', this.parmas).then(async res => {
  210. if (res && res.code == 200) {
  211. uni.stopPullDownRefresh()
  212. this.listdata = this.listdata.concat(res.page.list)
  213. if (this.listdata.length == 0) {
  214. this.noData = true
  215. } else {
  216. this.noData = false
  217. }
  218. if (res.page.totalPage <= res.page.currPage) {
  219. this.status = 'noMore'
  220. } else {
  221. this.status = 'more'
  222. }
  223. }
  224. })
  225. },
  226. clickBtn(index) {
  227. this.isChange = index
  228. if (index == 0) {
  229. this.parmas.status = ''
  230. } else {
  231. this.parmas.status = index
  232. }
  233. this.rest()
  234. this.listData()
  235. },
  236. }
  237. }
  238. </script>
  239. <style lang="scss">
  240. .tabBox {
  241. display: flex;
  242. justify-content: space-around;
  243. padding: 0 30rpx;
  244. border-bottom: 1rpx solid #E6E6E6;
  245. >view {
  246. font-size: 30rpx;
  247. padding: 22rpx 0;
  248. color: #1A1A1A;
  249. position: relative;
  250. font-weight: 700;
  251. }
  252. >.active {
  253. color: #FA6138;
  254. &::after {
  255. display: block;
  256. width: 100%;
  257. height: 4rpx;
  258. content: "";
  259. background: #FA6138;
  260. position: absolute;
  261. bottom: 0;
  262. left: 0;
  263. border-radius: 2rpx;
  264. }
  265. }
  266. }
  267. .good-text {
  268. font-weight: 700;
  269. }
  270. .opacity {
  271. opacity: 0.9;
  272. }
  273. .rightText {
  274. margin-top: 4rpx;
  275. }
  276. .contribution-txt {
  277. margin-top: 6rpx;
  278. color: #FF6600;
  279. font-size: 26rpx;
  280. }
  281. // .bigbox {
  282. // margin-top: 200rpx;
  283. // }
  284. .bigbox0 {
  285. margin-top: 200rpx;
  286. }
  287. .bigbox3 {
  288. margin-top: 88rpx;
  289. }
  290. .ppsPd {
  291. padding: 30rpx;
  292. border-bottom: 0.5px solid #e6e6e6;
  293. }
  294. .goodsItem {
  295. padding: 30rpx 0;
  296. position: relative;
  297. }
  298. .umb20 {
  299. margin-bottom: 20rpx;
  300. }
  301. .wt112 {
  302. width: 140rpx;
  303. }
  304. .img30 {
  305. width: 30rpx;
  306. height: 30rpx;
  307. }
  308. .tabB {
  309. width: 100%;
  310. position: fixed;
  311. left: 0;
  312. z-index: 66;
  313. background: #FFFFFF;
  314. }
  315. .order-type {
  316. height: 110rpx;
  317. width: 100%;
  318. box-sizing: border-box;
  319. padding: 0 30rpx;
  320. .type-name {
  321. border-radius: 30px;
  322. padding: 12rpx 18rpx;
  323. display: inline-block;
  324. background: #F2F2F2;
  325. border-radius: 30rpx;
  326. }
  327. .active {
  328. background: #FA6138;
  329. color: #FFFFFF;
  330. }
  331. }
  332. .wd-bgImg {
  333. position: relative;
  334. padding: 25rpx 0rpx;
  335. image {
  336. width: 100%;
  337. height: 200rpx;
  338. vertical-align: bottom;
  339. }
  340. .moneyInfo {
  341. position: absolute;
  342. top: 25rpx;
  343. width: 92%;
  344. .mt40 {
  345. margin-top: 40rpx;
  346. }
  347. .detail-btn button {
  348. height: 56rpx;
  349. line-height: 30rpx;
  350. border-radius: 28px;
  351. opacity: 0.82;
  352. padding: 10rpx 30rpx;
  353. background-color: #EED9A9;
  354. color: #0B844A;
  355. }
  356. }
  357. }
  358. .wdInput {
  359. background-color: #FFFFFF;
  360. border-radius: 18rpx 18rpx 0px 0rpx;
  361. padding: 40rpx 22rpx 32rpx;
  362. .input {
  363. height: 80rpx;
  364. line-height: 80rpx;
  365. font-size: 60rpx;
  366. border-bottom: 1rpx solid #D9D9D9;
  367. padding-bottom: 25rpx;
  368. input {
  369. height: 80rpx;
  370. line-height: 80rpx;
  371. font-size: 36rpx;
  372. }
  373. }
  374. }
  375. .bg-fff {
  376. background-color: #FFFFFF;
  377. padding: 26rpx 22rpx 36rpx;
  378. border-radius: 0rpx 0rpx 18px 18rpx;
  379. }
  380. .ml46 {
  381. margin-left: 46rpx;
  382. }
  383. .apply-btn {
  384. margin-top: 114rpx;
  385. button {
  386. background: #0B844A;
  387. color: #FFFFFF;
  388. }
  389. }
  390. .zfb-wx {
  391. padding-bottom: 24rpx;
  392. .payIcon {
  393. color: #00aaef;
  394. font-size: 32rpx;
  395. margin-right: 18rpx;
  396. }
  397. .wxIcon {
  398. color: rgb(37, 171, 56);
  399. font-size: 32rpx;
  400. margin-right: 18rpx;
  401. }
  402. }
  403. .zhInput input {
  404. width: 62%;
  405. height: 70rpx;
  406. line-height: 70rpx;
  407. padding: 0rpx 20rpx;
  408. border: 1rpx solid #D9D9D9;
  409. border-radius: 6rpx;
  410. }
  411. .popup {
  412. width: 100%;
  413. .bg-top {
  414. background-color: #F5F5F5;
  415. padding: 20rpx 30rpx;
  416. border-radius: 18rpx 18rpx 0px 0px;
  417. }
  418. .bankCardList {
  419. background-color: #FFFFFF;
  420. padding: 0rpx 30rpx;
  421. padding-bottom: 185rpx;
  422. .item {
  423. height: 84rpx;
  424. line-height: 84rpx;
  425. image {
  426. width: 48rpx;
  427. height: 42rpx;
  428. margin-top: 20rpx;
  429. vertical-align: bottom;
  430. }
  431. .rh-br {
  432. width: 100%;
  433. border-bottom: 1rpx solid #E6E6E6;
  434. }
  435. .pull-right {
  436. float: right !important;
  437. }
  438. }
  439. }
  440. }
  441. .ml56 {
  442. margin-left: 56rpx;
  443. }
  444. .ml200 {
  445. margin-left: 200rpx;
  446. }
  447. .offline {
  448. padding: 0 30rpx;
  449. .order-item {
  450. padding: 30rpx 0;
  451. border-bottom: 1rpx solid #f2f2f2;
  452. .order-item-head {
  453. display: flex;
  454. justify-content: space-between;
  455. align-items: center;
  456. width: 100%;
  457. }
  458. .item-info {
  459. font-size: 28rpx;
  460. font-family: PingFang SC, PingFang SC-Regular;
  461. font-weight: 400;
  462. color: #808080;
  463. .order-num {
  464. margin-bottom: 10rpx;
  465. .num {
  466. color: #1A1A1A;
  467. }
  468. }
  469. .order-time-price {
  470. font-size: 24rpx;
  471. .time {
  472. margin-right: 89rpx;
  473. }
  474. }
  475. }
  476. .tip {
  477. display: flex;
  478. justify-content: flex-end;
  479. color: #808080;
  480. font-size: 28rpx;
  481. margin-bottom: 10rpx;
  482. .label {
  483. color: #1A1A1A;
  484. }
  485. }
  486. .tip:last-child {
  487. margin-bottom: 0;
  488. }
  489. .item-icon {
  490. width: 32rpx;
  491. height: 32rpx;
  492. transform: rotate(-90deg);
  493. flex-shrink: 0;
  494. }
  495. }
  496. }
  497. </style>