makeStat.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="top-bar">
  5. <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
  6. </view>
  7. <scroll-view scroll-y scroll-with-animation class="main-view">
  8. <view class="space-view ex-table">
  9. <block>
  10. <t-table :headerBackgroundColor="'#F0F2F6'">
  11. <t-tr header>
  12. <t-th><view style="color:black;">大小</view></t-th>
  13. <t-th><view style="color:black;">生产数</view></t-th>
  14. <t-th><view style="color:black;">操作</view></t-th>
  15. </t-tr>
  16. <t-tr v-for="(item, inIndex) in profit.makeStat" :key="inIndex">
  17. <t-td>
  18. <view style="color:black;font-size:28upx;">{{inIndex}}支</view>
  19. </t-td>
  20. <t-td>
  21. <block v-for="(it, ix) in item" :key="ix">
  22. <view style="color:black;font-size:28upx;">{{it.name}} {{it.num}}</view>
  23. </block>
  24. </t-td>
  25. <t-td>-</t-td>
  26. </t-tr>
  27. </t-table>
  28. </block>
  29. </view>
  30. </scroll-view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  36. import SelectList from "@/components/plugin/selectList";
  37. import { getStatMake } from "@/api/stat";
  38. import { list } from "@/mixins";
  39. import ShopSelect from "@/components/module/shopSelect";
  40. import DateSelect from "@/components/module/dateSelect";
  41. import {mapActions, mapGetters} from "vuex";
  42. export default {
  43. components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
  44. mixins: [list],
  45. computed: {
  46. ...mapGetters(["getDictionariesInfo","getLoginInfo"])
  47. },
  48. data() {
  49. return {
  50. params:{
  51. searchTime:'',
  52. startTime: "",
  53. endTime: "",
  54. },
  55. profit:[],
  56. };
  57. },
  58. onPullDownRefresh() {
  59. this.resetList();
  60. this.getStatList().then(res => {
  61. uni.stopPullDownRefresh();
  62. });
  63. },
  64. methods: {
  65. ...mapActions(['setUserShopAll']),
  66. selectDateFn(val) {
  67. this.params = {...this.params,...val}
  68. this.init();
  69. },
  70. init() {
  71. this.getStatList();
  72. },
  73. getStatList() {
  74. let that = this
  75. getStatMake(this.params).then(res => {
  76. that.profit = res.data
  77. });
  78. }
  79. }
  80. };
  81. </script>
  82. <style lang="scss" scoped>
  83. .ex-page {
  84. background: white;
  85. height: 100%;
  86. display: flex;
  87. flex-direction: column;
  88. .top-bar {
  89. position: absolute;
  90. left: 0;
  91. display: flex;
  92. width: 100%;
  93. top:20upx;
  94. z-index: 20;
  95. .bar{
  96. width: 50%;
  97. height: 100%;
  98. text-align: center;
  99. &:nth-child(1){
  100. border-right: 1upx solid #eeeeec;
  101. }
  102. }
  103. }
  104. .main-view {
  105. margin-top: 80upx;
  106. flex: 1;
  107. background-color: #f9fbfc;
  108. .space-view {
  109. background-color: #fff;
  110. }
  111. .ex-info {
  112. padding: 30upx;
  113. .info-cell {
  114. display: flex;
  115. align-items: center;
  116. font-size: 28upx;
  117. &:not(:first-child) {
  118. margin-top: 20upx;
  119. }
  120. .cell-label {
  121. width: 110upx;
  122. color: #666666;
  123. }
  124. .cell-value {
  125. margin-left: 40upx;
  126. color: #333;
  127. &.warning {
  128. color: #ffaf1d;
  129. }
  130. &.success {
  131. color: #27c325;
  132. }
  133. }
  134. }
  135. }
  136. .ex-table {
  137. ::v-deep.icon-info {
  138. color: #333333;
  139. }
  140. }
  141. }
  142. .bar-view {
  143. display: flex;
  144. justify-content: space-between;
  145. align-items: center;
  146. padding: 0 30upx;
  147. width: 100%;
  148. height: 100upx;
  149. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  150. .info-view {
  151. font-size: 26upx;
  152. }
  153. .btn-view {
  154. display: flex;
  155. .admin-button-com {
  156. margin: 0 10upx;
  157. }
  158. }
  159. }
  160. }
  161. </style>