customSale.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="input-wrap_box">
  5. <view>
  6. <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
  7. </view>
  8. </view>
  9. <view class="top-bar">
  10. <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
  11. </view>
  12. <view class="main-view">
  13. <view class="space-view ex-table">
  14. <block>
  15. <t-table :headerBackgroundColor="'#F0F2F6'">
  16. <t-tr header>
  17. <t-th>客户</t-th>
  18. <t-th>笔数</t-th>
  19. <t-th>扎数</t-th>
  20. <t-th>金额</t-th>
  21. <t-th>成本</t-th>
  22. <t-th>利润</t-th>
  23. </t-tr>
  24. <block v-if="profile.list && !$util.isEmpty(profile.list)">
  25. <view v-for="(item, index) in profile.list" :key="index">
  26. <t-tr>
  27. <t-td><view style="color:#333333;font-size:28upx;">{{item.customName?item.customName:'-'}}</view></t-td>
  28. <t-td><view style="color:#333333;font-size:28upx;">{{parseFloat(item.num)}}</view></t-td>
  29. <t-td><view style="color:#333333;font-size:28upx;">{{item.count?parseFloat(item.count):0}}</view></t-td>
  30. <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.amount)}}</view></t-td>
  31. <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.cost)}}</view></t-td>
  32. <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.profit)}}</view></t-td>
  33. </t-tr>
  34. </view>
  35. </block>
  36. <t-tr><t-td><view style="color:black;font-weight:bold;font-size:28upx;">{{profile.totalNum||0}}笔¥{{profile.totalAmount||0}} 成本¥{{ profile.totalCost||0 }} 利润¥{{ profile.totalProfit||0 }}</view></t-td></t-tr>
  37. <t-tr><t-td>
  38. <view style="color:#1c89e0;font-size:28upx;">
  39. 从2025年11月20号起是准确数据,之前的数据不准确
  40. </view>
  41. </t-td></t-tr>
  42. <t-tr><t-td>
  43. <view style="color:#1c89e0;font-size:28upx;">
  44. 扎数没有减掉售后的数量,只能作为参考数据。金额、成本和利润已经减掉了售后部分,是准确的。
  45. </view>
  46. </t-td></t-tr>
  47. </t-table>
  48. </block>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  56. import SelectList from "@/components/plugin/selectList";
  57. import { getStatKhCgProfile } from "@/api/stat/index";
  58. import { list } from "@/mixins";
  59. import ShopSelect from "@/components/module/shopSelect";
  60. import DateSelect from "@/components/module/dateSelect";
  61. import AppSearchModule from "@/components/module/app-search";
  62. import {mapActions, mapGetters} from "vuex";
  63. export default {
  64. components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
  65. mixins: [list],
  66. computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
  67. data() {
  68. return {
  69. params:{
  70. searchTime:'',
  71. startTime: "",
  72. endTime: "",
  73. },
  74. profile:[],
  75. searchText:'',
  76. };
  77. },
  78. onPullDownRefresh() {
  79. this.resetList();
  80. this.getList().then(res => {
  81. uni.stopPullDownRefresh();
  82. });
  83. },
  84. methods: {
  85. ...mapActions(['setUserShopAll']),
  86. searchFn(e){
  87. this.searchText = e;
  88. },
  89. selectDateFn(val) {
  90. this.params = {...this.params,...val}
  91. this.init();
  92. },
  93. async init() {
  94. this.getList();
  95. },
  96. getList() {
  97. let that = this
  98. uni.showLoading()
  99. getStatKhCgProfile(this.params).then(res => {
  100. uni.hideLoading()
  101. that.profile = res.data
  102. });
  103. }
  104. }
  105. };
  106. </script>
  107. <style lang="scss" scoped>
  108. .ex-page {
  109. background: white;
  110. padding-top:20upx;
  111. height: 100%;
  112. display: flex;
  113. flex-direction: column;
  114. .top-bar {
  115. position: absolute;
  116. left: 0;
  117. top:130upx;
  118. display: flex;
  119. width: 100%;
  120. z-index: 20;
  121. .bar{
  122. width: 50%;
  123. height: 100%;
  124. text-align: center;
  125. &:nth-child(1){
  126. border-right: 1upx solid #eeeeec;
  127. }
  128. }
  129. }
  130. .main-view {
  131. margin-top: 90upx;
  132. flex: 1;
  133. background-color: #f9fbfc;
  134. .space-view {
  135. background-color: #fff;
  136. .change-level{
  137. font-size:22upx;
  138. padding:10upx 15upx;
  139. }
  140. }
  141. .ex-info {
  142. padding: 30upx;
  143. .info-cell {
  144. display: flex;
  145. align-items: center;
  146. font-size: 28upx;
  147. &:not(:first-child) {
  148. margin-top: 20upx;
  149. }
  150. .cell-label {
  151. width: 110upx;
  152. color: #666666;
  153. }
  154. .cell-value {
  155. margin-left: 40upx;
  156. color: #333;
  157. &.warning {
  158. color: #ffaf1d;
  159. }
  160. &.success {
  161. color: #27c325;
  162. }
  163. }
  164. }
  165. }
  166. .ex-table {
  167. ::v-deep.icon-info {
  168. color: #333333;
  169. }
  170. }
  171. }
  172. .bar-view {
  173. display: flex;
  174. justify-content: space-between;
  175. align-items: center;
  176. padding: 0 30upx;
  177. width: 100%;
  178. height: 100upx;
  179. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  180. .info-view {
  181. font-size: 26upx;
  182. }
  183. .btn-view {
  184. display: flex;
  185. .admin-button-com {
  186. margin: 0 10upx;
  187. }
  188. }
  189. }
  190. }
  191. </style>