statCatItem.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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.itemCover" style="width:50upx;height:50upx;border-radius:10upx;"></image></view></t-td>
  12. <t-td><view>{{item.itemName}}</view></t-td>
  13. <t-td><view>{{item.num?parseFloat(item.num):0}}</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 AppSearchModule from "@/components/module/app-search";
  29. import { getStatWorkCatItem } from "@/api/stat/index";
  30. export default {
  31. components: { SelectList, AppWrapperEmpty,AppSearchModule},
  32. mixins: [list],
  33. data() {
  34. return {
  35. isShow:false,
  36. customizationTime:[],
  37. shopId:'',
  38. itemId:'',
  39. nowTime: "",
  40. showTimeDropdown: false,
  41. nowShop: "",
  42. showShopDropdown: false,
  43. dataList: [],
  44. profile:[],
  45. statData:[],
  46. searchContent:'',
  47. };
  48. },
  49. onPullDownRefresh() {
  50. this.resetList();
  51. this.getList().then(res => {
  52. uni.stopPullDownRefresh();
  53. });
  54. },
  55. onLoad() {
  56. },
  57. methods: {
  58. async init() {
  59. this.getList();
  60. },
  61. getList() {
  62. let that = this
  63. uni.showLoading()
  64. getStatWorkCatItem(this.option).then(res => {
  65. uni.hideLoading()
  66. if (!this.$util.isEmpty(res.data.list)) {
  67. that.statData = res.data.list
  68. }
  69. });
  70. }
  71. }
  72. };
  73. </script>
  74. <style lang="scss" scoped>
  75. .ex-page {
  76. background: white;
  77. height: 100%;
  78. display: flex;
  79. flex-direction: column;
  80. .top-bar {
  81. position: absolute;
  82. left: 0;
  83. top:100upx;
  84. display: flex;
  85. width: 100%;
  86. z-index: 20;
  87. .bar{
  88. width: 50%;
  89. height: 100%;
  90. text-align: center;
  91. &:nth-child(1){
  92. border-right: 1upx solid #eeeeec;
  93. }
  94. }
  95. }
  96. .main-view {
  97. margin-top: 80upx;
  98. flex: 1;
  99. background-color: #f9fbfc;
  100. .space-view {
  101. background-color: #fff;
  102. .change-level{
  103. font-size:22upx;
  104. padding:10upx 15upx;
  105. }
  106. }
  107. .ex-info {
  108. padding: 30upx;
  109. .info-cell {
  110. display: flex;
  111. align-items: center;
  112. font-size: 28upx;
  113. &:not(:first-child) {
  114. margin-top: 20upx;
  115. }
  116. .cell-label {
  117. width: 110upx;
  118. color: #666666;
  119. }
  120. .cell-value {
  121. margin-left: 40upx;
  122. color: #333;
  123. &.warning {
  124. color: #ffaf1d;
  125. }
  126. &.success {
  127. color: #27c325;
  128. }
  129. }
  130. }
  131. }
  132. .ex-table {
  133. /deep/.icon-info {
  134. color: #333333;
  135. }
  136. }
  137. }
  138. .bar-view {
  139. display: flex;
  140. justify-content: space-between;
  141. align-items: center;
  142. padding: 0 30upx;
  143. width: 100%;
  144. height: 100upx;
  145. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  146. .info-view {
  147. font-size: 26upx;
  148. }
  149. .btn-view {
  150. display: flex;
  151. .admin-button-com {
  152. margin: 0 10upx;
  153. }
  154. }
  155. }
  156. }
  157. </style>