earnings.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <view>
  3. <view class="bg padding-tb-xl">
  4. <view class="box padding">
  5. <view>
  6. <!-- <view class="lins"></view> -->
  7. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  8. <view style="width: 50%;">订单总金额</view>
  9. <view style="width: 50%;">{{dataCentre.money?dataCentre.money:0}}<text class="text-sm">元</text></view>
  10. </view>
  11. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  12. <view style="width: 50%;">订 单 数 量</view>
  13. <view style="width: 50%;">{{dataCentre.count?dataCentre.count:0}}<text class="text-sm">单</text></view>
  14. </view>
  15. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  16. <view style="width: 50%;">外卖订单金额</view>
  17. <view style="width: 50%;">{{dataCentre.takeMoney1?dataCentre.takeMoney1:0}}<text class="text-sm">元</text></view>
  18. </view>
  19. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  20. <view style="width: 50%;">外卖订单数</view>
  21. <view style="width: 50%;">{{dataCentre.takeCount2?dataCentre.takeCount2:0}}<text class="text-sm">单</text></view>
  22. </view>
  23. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  24. <view style="width: 50%;">退款订单金额</view>
  25. <view style="width: 50%;">{{dataCentre.cancelOrderMoney?dataCentre.cancelOrderMoney:0}}<text class="text-sm">元</text></view>
  26. </view>
  27. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  28. <view style="width: 50%;">退款订单数</view>
  29. <view style="width: 50%;">{{dataCentre.cancelOrderCount?dataCentre.cancelOrderCount:0}}<text class="text-sm">单</text></view>
  30. </view>
  31. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  32. <view style="width: 50%;">到店单金额</view>
  33. <view style="width: 50%;">{{dataCentre.takeMoney?dataCentre.takeMoney:0}}<text class="text-sm">元</text></view>
  34. </view>
  35. <view class="margin-top marginlr" style="display: flex;font-size:32upx;">
  36. <view style="width: 50%;">到店订单数</view>
  37. <view style="width: 50%;">{{dataCentre.takeCount?dataCentre.takeCount:0}}<text class="text-sm">单</text></view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <!-- <view class="page-box" v-if="orderList.length == 0" >
  43. <view class="centre">
  44. <image src="../../static/images/empty.png" mode=""></image>
  45. <view class="tips">暂无内容</view>
  46. </view>
  47. </view> -->
  48. <view style="margin: 10upx;">
  49. <view class="boxs" v-for="(item,index) in orderList" :key='index' >
  50. <view class="flex justify-between align-center padding">
  51. <view class="textRed">已完成</view>
  52. <view style="color:#999999;">{{item.payTime}}</view>
  53. </view>
  54. <view class="line"></view>
  55. <view class="padding">
  56. <view style="color:#333333;" class="text-lg text-bold">{{item.orderGoodsList[0].goodsName}}</view>
  57. <view style="color:#333333;" class="padding-tb-sm"><text
  58. style="color:#999999;">规格:</text>{{item.orderGoodsList[0].skuMessage}}</view>
  59. <view style="color:#333333;"><text style="color:#999999;">取餐号:</text>{{item.orderCode}}</view>
  60. </view>
  61. <view class="line"></view>
  62. <view class="flex justify-between padding">
  63. <view style="color:#333333;" class="text-lg">
  64. <text style="color:#999999;" class="text-df">实收:</text>¥{{item.payMoney}}
  65. </view>
  66. <view class="look" @click="getDet(item)" >查看详情</view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. dataCentre: {},
  77. page: 1,
  78. limit: 10,
  79. orderList: [],
  80. shopId: '',
  81. totalCount: 0
  82. }
  83. },
  84. onLoad(option) {
  85. this.shopId = option.shopId
  86. this.getDataCentre()
  87. this.getOrderList()
  88. },
  89. methods: {
  90. getDet(item) {
  91. uni.navigateTo({
  92. url: '/shop/orderDet?orderNumber=' + item.orderNumber
  93. })
  94. },
  95. // 收入
  96. getDataCentre() {
  97. this.$Request.getA("/admin/goodsShop/selectStoreData?shopId=" + this.shopId).then(res => {
  98. if (res.code == 0) {
  99. this.dataCentre = res.hashMap
  100. }
  101. });
  102. },
  103. getOrderList() {
  104. let data = {
  105. page: this.page,
  106. limit: this.limit,
  107. status: 4,
  108. shopId: this.shopId
  109. }
  110. this.$Request.getA("/admin/order/selectAllOrder",data).then(res => {
  111. if (res.code == 0) {
  112. if(this.page == 1) {
  113. this.orderList = res.data.list
  114. } else {
  115. this.orderList = [...this.orderList, ...res.data.list]
  116. }
  117. this.totalCount = res.data.totalCount
  118. }
  119. uni.stopPullDownRefresh();
  120. uni.hideLoading()
  121. });
  122. }
  123. },
  124. onReachBottom: function() {
  125. this.page = this.page + 1;
  126. this.getOrderList();
  127. if(this.totalCount == this.orderList.length) {
  128. uni.showToast({
  129. title: '已经到底了~',
  130. icon: 'none'
  131. })
  132. }
  133. },
  134. onPullDownRefresh: function() {
  135. this.page = 1;
  136. this.getOrderList();
  137. },
  138. }
  139. </script>
  140. <style lang="scss" scoped>
  141. page {
  142. background: #EDF1F7;
  143. }
  144. .bg {
  145. background: #FFFFFF;
  146. }
  147. .box {
  148. width: 686upx;
  149. // height: 329upx;
  150. background: linear-gradient(90deg, #D0AA72 0%, #DBB984 100%);
  151. border-radius: 16upx;
  152. margin: 0 auto;
  153. color: #ffffff;
  154. }
  155. .lins {
  156. width: 1upx;
  157. height: 60upx;
  158. border: 1upx solid #FFFFFF;
  159. }
  160. .boxs {
  161. // width: 686upx;
  162. /* height: 363upx; */
  163. background: #FFFFFF;
  164. border-radius: 20upx;
  165. margin: 0 auto;
  166. margin-bottom: 20rpx;
  167. }
  168. .textRed {
  169. font-size: 30upx;
  170. font-family: PingFang SC;
  171. font-weight: 500;
  172. color: #D80204;
  173. }
  174. .line {
  175. width: 686upx;
  176. height: 1upx;
  177. border: 1upx solid #E6E6E6;
  178. }
  179. .look {
  180. width: 150upx;
  181. height: 50upx;
  182. background: #FCD202;
  183. border-radius: 25upx;
  184. line-height: 50upx;
  185. text-align: center;
  186. font-size: 24upx;
  187. }
  188. .page-box {
  189. position: relative;
  190. // left: 0;
  191. height: 50vh;
  192. z-index: 0;
  193. top: 70px;
  194. }
  195. .centre {
  196. position: absolute;
  197. left: 0;
  198. top: 0;
  199. right: 0;
  200. bottom: 0;
  201. margin: auto;
  202. height: 400rpx;
  203. text-align: center;
  204. // padding: 200rpx auto;
  205. font-size: 32rpx;
  206. image {
  207. width: 387rpx;
  208. height: 341rpx;
  209. // margin-bottom: 20rpx;
  210. margin: 0 auto 20rpx;
  211. // border: 1px dotted #000000;
  212. }
  213. .tips {
  214. font-size: 32rpx;
  215. color: #2F3044;
  216. margin-top: 20rpx;
  217. font-weight: 700;
  218. }
  219. .btn {
  220. margin: 80rpx auto;
  221. width: 600rpx;
  222. border-radius: 32rpx;
  223. line-height: 90rpx;
  224. color: #ffffff;
  225. font-size: 34rpx;
  226. background: #5074FF;
  227. }
  228. }
  229. </style>