outboundDelivery.vue 5.3 KB

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