custom.vue 3.8 KB

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