earnings.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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. let data={
  98. shopId:this.shopId
  99. }
  100. this.$Request.getA("/admin/goodsShop/selectStoreData",data).then(res => {
  101. if (res.code == 0) {
  102. this.dataCentre = res.hashMap
  103. }
  104. });
  105. },
  106. getOrderList() {
  107. let data = {
  108. page: this.page,
  109. limit: this.limit,
  110. status: 4,
  111. shopId: this.shopId
  112. }
  113. this.$Request.getA("/admin/order/selectAllOrder",data).then(res => {
  114. if (res.code == 0) {
  115. if(this.page == 1) {
  116. this.orderList = res.data.list
  117. } else {
  118. this.orderList = [...this.orderList, ...res.data.list]
  119. }
  120. this.totalCount = res.data.totalCount
  121. }
  122. uni.stopPullDownRefresh();
  123. uni.hideLoading()
  124. });
  125. }
  126. },
  127. onReachBottom: function() {
  128. this.page = this.page + 1;
  129. this.getOrderList();
  130. if(this.totalCount == this.orderList.length) {
  131. uni.showToast({
  132. title: '已经到底了~',
  133. icon: 'none'
  134. })
  135. }
  136. },
  137. onPullDownRefresh: function() {
  138. this.page = 1;
  139. this.getOrderList();
  140. },
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. page {
  145. background: #EDF1F7;
  146. }
  147. .bg {
  148. background: #FFFFFF;
  149. }
  150. .box {
  151. width: 686upx;
  152. // height: 329upx;
  153. background: linear-gradient(90deg, #D0AA72 0%, #DBB984 100%);
  154. border-radius: 16upx;
  155. margin: 0 auto;
  156. color: #ffffff;
  157. }
  158. .lins {
  159. width: 1upx;
  160. height: 60upx;
  161. border: 1upx solid #FFFFFF;
  162. }
  163. .boxs {
  164. // width: 686upx;
  165. /* height: 363upx; */
  166. background: #FFFFFF;
  167. border-radius: 20upx;
  168. margin: 0 auto;
  169. margin-bottom: 20rpx;
  170. }
  171. .textRed {
  172. font-size: 30upx;
  173. font-family: PingFang SC;
  174. font-weight: 500;
  175. color: #D80204;
  176. }
  177. .line {
  178. width: 686upx;
  179. height: 1upx;
  180. border: 1upx solid #E6E6E6;
  181. }
  182. .look {
  183. width: 150upx;
  184. height: 50upx;
  185. background: #FCD202;
  186. border-radius: 25upx;
  187. line-height: 50upx;
  188. text-align: center;
  189. font-size: 24upx;
  190. }
  191. .page-box {
  192. position: relative;
  193. // left: 0;
  194. height: 50vh;
  195. z-index: 0;
  196. top: 70px;
  197. }
  198. .centre {
  199. position: absolute;
  200. left: 0;
  201. top: 0;
  202. right: 0;
  203. bottom: 0;
  204. margin: auto;
  205. height: 400rpx;
  206. text-align: center;
  207. // padding: 200rpx auto;
  208. font-size: 32rpx;
  209. image {
  210. width: 387rpx;
  211. height: 341rpx;
  212. // margin-bottom: 20rpx;
  213. margin: 0 auto 20rpx;
  214. // border: 1px dotted #000000;
  215. }
  216. .tips {
  217. font-size: 32rpx;
  218. color: #2F3044;
  219. margin-top: 20rpx;
  220. font-weight: 700;
  221. }
  222. .btn {
  223. margin: 80rpx auto;
  224. width: 600rpx;
  225. border-radius: 32rpx;
  226. line-height: 90rpx;
  227. color: #ffffff;
  228. font-size: 34rpx;
  229. background: #5074FF;
  230. }
  231. }
  232. </style>