index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view>
  3. <view>
  4. <sl-filter :themeColor="themeColor" :menuList="menuList" @result="result"></sl-filter>
  5. </view>
  6. <scroll-view :scroll-y="true" class="page">
  7. <view class="cu-list menu card-menu margin-top">
  8. <view class="cu-item" style="margin-top: 10rpx;" v-for="(item,index) in data">
  9. <view class="content">
  10. <view class="cu-form-group">
  11. <view class="title" style="min-width: calc(6em + 15px);">制衣生产车间</view>
  12. <text class="text-grey" style="flex: 1;">{{item.zyProductWorkshop}}</text>
  13. </view>
  14. <view class="cu-form-group">
  15. <view class="title" style="min-width: calc(6em + 15px);">制衣班组</view>
  16. <text class="text-grey" style="flex: 1;">{{item.zyTeam}}</text>
  17. </view>
  18. <view class="cu-form-group">
  19. <view class="title" style="min-width: calc(6em + 15px);">订单号</view>
  20. <text class="text-grey" style="flex: 1;">{{item.orderNo}}</text>
  21. </view>
  22. <view class="cu-form-group">
  23. <view class="title" style="min-width: calc(6em + 15px);">数量</view>
  24. <text class="text-grey" style="flex: 1;">{{item.stockQty}}</text>
  25. </view>
  26. <view class="cu-form-group">
  27. <view class="title" style="min-width: calc(6em + 15px);">交期</view>
  28. <text class="text-grey" style="flex: 1;">{{item.deliveryDate}}</text>
  29. </view>
  30. </view>
  31. </view>
  32. <u-toast ref="uToast"></u-toast>
  33. </view>
  34. </scroll-view>
  35. </view>
  36. </template>
  37. <script>
  38. import {
  39. getFilterData
  40. } from '@/api/biz/filing.js'
  41. import slFilter from '@/components/sl-filter/sl-filter.vue'
  42. export default {
  43. components: {
  44. slFilter
  45. },
  46. data() {
  47. return {
  48. data: [],
  49. themeColor: '#000000',
  50. filterResult: '',
  51. menuList: [{
  52. 'title': '车间',
  53. 'detailTitle': '请选择制衣生产车间(可多选)',
  54. 'isMutiple': true,
  55. 'key': 'workshop',
  56. 'detailList': [{
  57. 'title': '不限',
  58. 'value': ''
  59. }, {
  60. 'title': '制衣一厂',
  61. 'value': '1'
  62. }, {
  63. 'title': '制衣二厂',
  64. 'value': '1'
  65. }]
  66. },
  67. {
  68. 'title': '排序',
  69. 'key': 'sort',
  70. 'isSort': true,
  71. 'detailList': [{
  72. 'title': '默认排序',
  73. 'value': ''
  74. }]
  75. }
  76. ]
  77. }
  78. },
  79. onLoad() {
  80. this.loadData()
  81. },
  82. onShow(){
  83. this.loadData()
  84. },
  85. methods: {
  86. result(val) {
  87. console.log('filter_result:' + JSON.stringify(val));
  88. this.filterResult = JSON.stringify(val, null, 2)
  89. },
  90. loadData() {
  91. getFilterData().then(res => {
  92. if (res.success) {
  93. this.data = res.data
  94. } else {
  95. this.$refs.uToast.show({
  96. type: 'error',
  97. message: res.message,
  98. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  99. })
  100. }
  101. })
  102. }
  103. }
  104. }
  105. </script>
  106. <style scoped>
  107. .page {
  108. height: 100Vh;
  109. width: 100vw;
  110. }
  111. .page.show {
  112. overflow: hidden;
  113. }
  114. .cu-form-group {
  115. min-height: 0;
  116. border: none;
  117. }
  118. </style>