itemCustom.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="top-bar">
  5. <view>aaaaa</view>
  6. </view>
  7. <scroll-view scroll-y scroll-with-animation class="main-view">
  8. <view class="space-view ex-table">
  9. <t-table :headerBackgroundColor="'#F0F2F6'">
  10. <t-tr header>
  11. <t-th><view style="width:160upx;">花材</view></t-th>
  12. <t-th>预订</t-th>
  13. <t-th>上架</t-th>
  14. <t-th>剩余</t-th>
  15. <t-th>路上</t-th>
  16. <t-th>待采</t-th>
  17. <t-th>操作</t-th>
  18. </t-tr>
  19. <template v-if="!$util.isEmpty(bookData)">
  20. <view v-for="(item, index) in bookData" :key="index" @click="goDetail(item)">
  21. <t-tr>
  22. <t-td><view style="color:#333333;font-size:25upx;width:160upx;text-align:left;height:60upx;display: flex;align-items: center;">{{item.name}}</view></t-td>
  23. <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
  24. <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
  25. <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
  26. <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
  27. <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
  28. <t-td>
  29. <view style="color:#333333;font-size:22upx;height:60upx;display: flex;align-items: center;position: relative;">
  30. <text>操作</text>
  31. <text style="color:#CCCCCC;position: absolute;top:52upx;width:300upx;right:-30upx;text-align:right;font-size:21upx;">
  32. {{ item.customName }}<text style="margin-left:12upx;" v-if="item.seatSn != 0">{{'货号:'+item.seatSn }}</text>
  33. </text>
  34. </view>
  35. </t-td>
  36. </t-tr>
  37. </view>
  38. </template>
  39. </t-table>
  40. </view>
  41. </scroll-view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  47. import SelectList from "@/components/plugin/selectList";
  48. import { getBookItemCustomList } from "@/api/book"
  49. import { list } from "@/mixins";
  50. import ShopSelect from "@/components/module/shopSelect";
  51. import DateSelect from "@/components/module/dateSelect";
  52. import {mapActions, mapGetters} from "vuex";
  53. import AppSearchModule from "@/components/module/app-search";
  54. export default {
  55. components: {
  56. SelectList,
  57. AppWrapperEmpty,
  58. ShopSelect,
  59. DateSelect,
  60. AppSearchModule
  61. },
  62. mixins: [list],
  63. computed: {
  64. },
  65. data() {
  66. return {
  67. dataList: [],
  68. bookData:[]
  69. };
  70. },
  71. onPullDownRefresh() {
  72. this.getStatList().then(res => {
  73. uni.stopPullDownRefresh();
  74. });
  75. },
  76. onLoad() {
  77. },
  78. methods: {
  79. ...mapActions(['setUserShopAll']),
  80. goDetail(){
  81. },
  82. async init() {
  83. this.getStatList();
  84. },
  85. getStatList() {
  86. let that = this
  87. uni.showLoading()
  88. getBookItemCustomList().then(res => {
  89. uni.hideLoading()
  90. if (!this.$util.isEmpty(res.data.list)) {
  91. that.bookData = res.data.list
  92. }else{
  93. that.bookData=[]
  94. }
  95. });
  96. }
  97. }
  98. };
  99. </script>
  100. <style lang="scss" scoped>
  101. .ex-page {
  102. background: white;
  103. padding-top:20upx;
  104. height: 100%;
  105. display: flex;
  106. flex-direction: column;
  107. .top-bar {
  108. }
  109. .main-view {
  110. flex: 1;
  111. background-color: #f9fbfc;
  112. .space-view {
  113. background-color: #fff;
  114. }
  115. .ex-info {
  116. padding: 30upx;
  117. .info-cell {
  118. display: flex;
  119. align-items: center;
  120. font-size: 28upx;
  121. &:not(:first-child) {
  122. margin-top: 20upx;
  123. }
  124. .cell-label {
  125. width: 110upx;
  126. color: #666666;
  127. }
  128. .cell-value {
  129. margin-left: 40upx;
  130. color: #333;
  131. &.warning {
  132. color: #ffaf1d;
  133. }
  134. &.success {
  135. color: #27c325;
  136. }
  137. }
  138. }
  139. }
  140. .ex-table {
  141. ::v-deep.icon-info {
  142. color: #333333;
  143. }
  144. }
  145. }
  146. .bar-view {
  147. display: flex;
  148. justify-content: space-between;
  149. align-items: center;
  150. padding: 0 30upx;
  151. width: 100%;
  152. height: 100upx;
  153. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  154. .info-view {
  155. font-size: 26upx;
  156. }
  157. .btn-view {
  158. display: flex;
  159. .admin-button-com {
  160. margin: 0 10upx;
  161. }
  162. }
  163. }
  164. }
  165. </style>