outboundDelivery.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <!-- 出库 -->
  3. <view class="main-wrap">
  4. <uni-search-bar class="uni-search-bar" @confirm="search" v-model="searchValue" @input="inputChange" cancelButton="none" placeholder="搜索关键字"></uni-search-bar>
  5. <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
  6. <view class="order-list">
  7. <view class="item" v-for="(item, index) in listData" :key="index">
  8. <view class="title">
  9. <view class="s1">出库单号 {{ item.bizNo }}</view>
  10. <view class="s2">
  11. {{ dict.bizScene[item.bizScene] }}
  12. </view>
  13. </view>
  14. <view class="main">
  15. <view class="row">
  16. <view class="row-item">
  17. <text class="t1">出库数量</text>
  18. <text class="t2">{{ item.measureQuantity }}{{ item.measureUnit }}</text>
  19. </view>
  20. <view class="row-item">
  21. <text class="t1">包装数量</text>
  22. <text class="t2">{{ item.packingQuantity }}{{ item.packingUnit }}</text>
  23. </view>
  24. <view class="row-item">
  25. <text class="t1">操作人</text>
  26. <text class="t2"></text>
  27. </view>
  28. <view class="row-item">
  29. <text class="t1">审核人</text>
  30. <text class="t2">{{ item.verifyName }}</text>
  31. </view>
  32. </view>
  33. <view class="row">
  34. <view class="row-item w100">
  35. <text class="t1">出库时间</text>
  36. <text class="t2">{{ item.createTime }}</text>
  37. </view>
  38. </view>
  39. <!-- <view class="ckmx" @click="goDetails(item)">查看明细</view> -->
  40. </view>
  41. </view>
  42. </view>
  43. <u-loadmore fontSize="32" iconSize="36" :status="status" style="margin: 20rpx 0" />
  44. </scroll-view>
  45. </view>
  46. </template>
  47. <script>
  48. import { outInRecordsPage } from '@/api/warehouseManagement'
  49. export default {
  50. props: ['categoryId'],
  51. data() {
  52. return {
  53. page: 1,
  54. size: 20,
  55. isEnd: true,
  56. listData: [],
  57. status: 'loading',
  58. searchValue: '',
  59. dict: {
  60. bizScene: {
  61. 1: '退供出库',
  62. 2: '调拨出库',
  63. 3: '销售出库',
  64. 4: '领用出库',
  65. 5: '报废出库',
  66. 6: '外协出库',
  67. 7: '委外出库',
  68. 8: '受托退货出库',
  69. 9: '仓库委外出库',
  70. 10: '采购退货出库',
  71. 11: '自选领用出库',
  72. 12: '配料出库'
  73. }
  74. }
  75. }
  76. },
  77. created() {
  78. this.getData()
  79. },
  80. methods: {
  81. // 触底
  82. lower() {
  83. console.log('触底')
  84. if (this.isEnd) {
  85. return
  86. }
  87. this.getMoreLists()
  88. },
  89. inputChange() {
  90. // 清除timer对应的延时器
  91. clearTimeout(this.timerId)
  92. // 重新启动一个延时器,并把timerId赋值给this.timer
  93. this.timerId = setTimeout(() => {
  94. // 如果500毫秒内,没有触发新的输入事件,则为搜索关键词赋值
  95. this.search()
  96. }, 500)
  97. },
  98. getData() {
  99. let par = {
  100. pageNum: this.page,
  101. size: this.size,
  102. type: 2,
  103. categoryId: this.categoryId
  104. }
  105. if (this.searchValue !== '') {
  106. par.keyWord = this.searchValue
  107. }
  108. // par = this.URLSearchParams(par)
  109. outInRecordsPage(par).then(res => {
  110. console.log('res----', res)
  111. this.listData = [...this.listData, ...res.list]
  112. let pages = res.count
  113. if (this.listData.length < pages) {
  114. this.isEnd = false
  115. this.status = 'loading'
  116. } else {
  117. this.isEnd = true
  118. this.status = 'nomore'
  119. }
  120. })
  121. },
  122. getMoreLists() {
  123. this.page++
  124. this.getData()
  125. },
  126. search() {
  127. this.page = 1
  128. this.listData = []
  129. this.status = 'loading'
  130. this.getData()
  131. },
  132. goDetails(item) {
  133. let par = {
  134. bizNo: item.id,
  135. type: '出库'
  136. }
  137. par = this.URLSearchParams(par)
  138. uni.navigateTo({
  139. url: '/pages/warehouse/inventory/order/outInStorageDetail?' + par
  140. })
  141. }
  142. }
  143. }
  144. </script>
  145. <style lang="scss" scoped>
  146. .main-wrap {
  147. height: calc(100% - 176rpx);
  148. &.info {
  149. height: calc(100% - 236rpx);
  150. }
  151. }
  152. .scroll-Y {
  153. height: calc(100vh - 322rpx);
  154. }
  155. .order-list {
  156. .item {
  157. background-color: #fff;
  158. margin-bottom: 30rpx;
  159. margin-bottom: 30rpx;
  160. .title {
  161. display: flex;
  162. padding: 20rpx;
  163. justify-content: space-between;
  164. align-items: center;
  165. border-bottom: 1px solid #dedede;
  166. .s1 {
  167. color: #333333;
  168. font-size: 28rpx;
  169. font-weight: bold;
  170. }
  171. .s2 {
  172. font-size: 28rpx;
  173. font-weight: bold;
  174. color: #333333;
  175. }
  176. }
  177. .main {
  178. padding: 0 30rpx;
  179. .row {
  180. display: flex;
  181. align-items: center;
  182. justify-content: space-between;
  183. flex-wrap: wrap;
  184. .row-item {
  185. padding: 20rpx 0;
  186. width: 50%;
  187. border-bottom: 1px dashed #dedede;
  188. .t1 {
  189. font-weight: bold;
  190. font-size: 28rpx;
  191. color: #333333;
  192. margin-right: 20rpx;
  193. }
  194. .t2 {
  195. font-size: 28rpx;
  196. color: #333333;
  197. }
  198. }
  199. }
  200. .ckmx {
  201. color: #70b603;
  202. font-size: 28rpx;
  203. font-weight: bold;
  204. padding: 20rpx;
  205. display: flex;
  206. justify-content: flex-end;
  207. }
  208. }
  209. }
  210. }
  211. </style>