statCatItem.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="main-view">
  5. <view class="space-view ex-table">
  6. <block>
  7. <t-table :headerBackgroundColor="'#F0F2F6'">
  8. <t-tr header><t-th>图片</t-th><t-th>名称</t-th><t-th>数量</t-th><t-th>操作</t-th></t-tr>
  9. <view v-for="(item, index) in statData" :key="index">
  10. <t-tr>
  11. <t-td><view><image :src="item.cover" style="width:60upx;height:60upx;border-radius:10upx;"></image></view></t-td>
  12. <t-td><view>{{item.itemName}}</view></t-td>
  13. <t-td><view>{{item.num}}</view></t-td>
  14. <t-td><view></view></t-td>
  15. </t-tr>
  16. </view>
  17. </t-table>
  18. </block>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  26. import SelectList from "@/components/plugin/selectList";
  27. import { list } from "@/mixins";
  28. import ShopSelect from "@/components/module/shopSelect";
  29. import DateSelect from "@/components/module/dateSelect";
  30. import AppSearchModule from "@/components/module/app-search";
  31. import { getStatWorkCatItem } from "@/api/stat/index";
  32. export default {
  33. components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
  34. mixins: [list],
  35. computed: {
  36. },
  37. data() {
  38. return {
  39. isShow:false,
  40. customizationTime:[],
  41. shopId:'',
  42. itemId:'',
  43. nowTime: "",
  44. showTimeDropdown: false,
  45. nowShop: "",
  46. showShopDropdown: false,
  47. dataList: [],
  48. profile:[],
  49. statData:[],
  50. searchContent:'',
  51. };
  52. },
  53. onPullDownRefresh() {
  54. this.resetList();
  55. this.getList().then(res => {
  56. uni.stopPullDownRefresh();
  57. });
  58. },
  59. onLoad() {
  60. },
  61. methods: {
  62. async init() {
  63. this.getList();
  64. },
  65. getList() {
  66. let that = this
  67. uni.showLoading()
  68. getStatWorkCatItem(this.option).then(res => {
  69. uni.hideLoading()
  70. if (!this.$util.isEmpty(res.data.list)) {
  71. that.statData = res.data.list
  72. }
  73. });
  74. }
  75. }
  76. };
  77. </script>
  78. <style lang="scss" scoped>
  79. .ex-page {
  80. background: white;
  81. height: 100%;
  82. display: flex;
  83. flex-direction: column;
  84. .top-bar {
  85. position: absolute;
  86. left: 0;
  87. top:100upx;
  88. display: flex;
  89. width: 100%;
  90. z-index: 20;
  91. .bar{
  92. width: 50%;
  93. height: 100%;
  94. text-align: center;
  95. &:nth-child(1){
  96. border-right: 1upx solid #eeeeec;
  97. }
  98. }
  99. }
  100. .main-view {
  101. margin-top: 80upx;
  102. flex: 1;
  103. background-color: #f9fbfc;
  104. .space-view {
  105. background-color: #fff;
  106. .change-level{
  107. font-size:22upx;
  108. padding:10upx 15upx;
  109. }
  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. /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>