productManagement.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="product-manger-wrapper">
  3. <!-- <headersVue headerTitle="商品管理" @headerJump="headerJump"></headersVue> -->
  4. <view class="product-manger-content">
  5. <view class="product-manger-content--top">
  6. <searchVue @search="search" class="search-box"></searchVue>
  7. <view class="btn-product" @click="onHandleAddProduct">
  8. <image
  9. src="/static/images/new_ui/tianjiachanpin.png"
  10. mode="scaleToFill"
  11. />
  12. <view class="txt">添加商品</view>
  13. </view>
  14. </view>
  15. <view class="product-manger-content--tab">
  16. <tabsVue :category="dataList" />
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import headersVue from "../components/headers/headers.vue";
  23. import searchVue from "./components/search/search.vue";
  24. import tabsVue from "./components/tablist.vue";
  25. //商品列表
  26. export default {
  27. components: {
  28. headersVue,
  29. searchVue,
  30. tabsVue
  31. },
  32. methods: {
  33. headerJump() {
  34. uni.switchTab({ url: "/pages/my/index" });
  35. },
  36. onHandleAddProduct() {
  37. uni.redirectTo({
  38. url:`./addProduct`
  39. })
  40. }
  41. },
  42. data() {
  43. return {
  44. dataList: [
  45. {
  46. type: 1,
  47. name: "出售中商品",
  48. count: 10
  49. },
  50. {
  51. type: 2,
  52. name: "仓库中商品",
  53. count: 31
  54. },
  55. {
  56. type: 3,
  57. name: "已售罄商品",
  58. count: 0
  59. },
  60. {
  61. type: 4,
  62. name: "警戒库存",
  63. count: 0
  64. },
  65. {
  66. type: 5,
  67. name: "回收站商品",
  68. count: 0
  69. },
  70. {
  71. type: 6,
  72. name: "待审核商品",
  73. count: 0
  74. },
  75. {
  76. type: 7,
  77. name: "审核未通过商品",
  78. count: 0
  79. }
  80. ],
  81. };
  82. }
  83. };
  84. </script>
  85. <style>
  86. page {
  87. background-color: #f7f8fc;
  88. }
  89. </style>
  90. <style lang="scss" scoped>
  91. .product-manger-wrapper {
  92. // margin-top: 96rpx;
  93. // border: 2rpx solid #f00;
  94. background: #fff;
  95. .product-manger-content {
  96. &--top {
  97. display: flex;
  98. .search-box {
  99. flex: 1;
  100. }
  101. .btn-product {
  102. user-select: none;
  103. width: 160rpx;
  104. flex-shrink: 0;
  105. display: flex;
  106. align-items: center;
  107. gap: 15rpx;
  108. image {
  109. width: 32rpx;
  110. height: 32rpx;
  111. }
  112. .txt {
  113. font-weight: 400;
  114. font-size: 26rpx;
  115. color: #666666;
  116. word-break: break-all;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. </style>