allot.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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">
  18. {{ getDictValue('物品类型', baseInfo.assetType) }}编码
  19. {{ item.onlyCode }}
  20. </view>
  21. <view class="s2">
  22. <!-- {{ dict.bizScene[item.dialType] }} -->
  23. </view>
  24. </view>
  25. <view class="main">
  26. <view class="row">
  27. <view class="row-item">
  28. <text class="t1">调拨单号</text>
  29. <text class="t2">{{ item.dialNumber }}</text>
  30. </view>
  31. <view class="row-item">
  32. <text class="t1">包装编码</text>
  33. <text class="t2">{{ item.num }}</text>
  34. </view>
  35. </view>
  36. <view class="row">
  37. <view class="row-item" v-if="!baseInfo.isUnpack">
  38. <text class="t1">最小包装单元</text>
  39. <text class="t2">{{
  40. `${item.measurementUnit || ''}${item.unit}/${
  41. item.minPackUnit
  42. }`
  43. }}</text>
  44. </view>
  45. <view class="row-item" v-if="dimension == 1">
  46. <text class="t1">批次号</text>
  47. <text class="t2">{{ item.batchNo }}</text>
  48. </view>
  49. </view>
  50. <view class="row">
  51. <view class="row-item w100">
  52. <text class="t1">调出货位</text>
  53. <text class="t2"
  54. >{{ item.warehouseName }}-{{ item.outWarehouseAreaName }}-{{
  55. item.outWarehouseAreaGoodsCode
  56. }}-{{ item.outGoodsAllocationCode }}</text
  57. >
  58. </view>
  59. </view>
  60. <view class="row">
  61. <view class="row-item w100">
  62. <text class="t1">调入货位</text>
  63. <text class="t2"
  64. >{{ item.inWarehouseName }}-{{ item.inWarehouseAreaName }}-{{
  65. item.inWarehouseAreaGoodsCode
  66. }}-{{ item.inGoodsAllocationCode }}</text
  67. >
  68. </view>
  69. </view>
  70. <view class="row">
  71. <view class="row-item">
  72. <text class="t1">审核时间</text>
  73. <text class="t2">{{ item.auditorTime }}</text>
  74. </view>
  75. </view>
  76. <!-- <view class="ckmx" @click="goDetails(item)"> 查看明细 </view> -->
  77. </view>
  78. </view>
  79. </view>
  80. <u-loadmore :status="status" style="margin: 20rpx 0" />
  81. </scroll-view>
  82. </view>
  83. </template>
  84. <script>
  85. import { post } from '@/utils/api.js'
  86. let [page, size, isEnd] = [1, 10, true]
  87. import dictMixins from '@/mixins/dictMixins'
  88. export default {
  89. props: ['batchNum', 'inventoryCode', 'isInfo', 'baseInfo', 'dimension'],
  90. mixins: [dictMixins],
  91. data () {
  92. return {
  93. listData: [],
  94. status: 'loading',
  95. searchValue: ''
  96. // dict: {
  97. // bizScene: {
  98. // 1: '库内调拨',
  99. // 2: '库外调拨'
  100. // }
  101. // }
  102. }
  103. },
  104. created () {
  105. this.getData()
  106. },
  107. methods: {
  108. // 触底
  109. lower () {
  110. console.log('触底')
  111. if (isEnd) {
  112. return
  113. }
  114. this.getMoreLists()
  115. },
  116. getData () {
  117. let par = {
  118. page,
  119. size,
  120. batchNum: this.batchNum,
  121. inventoryCode: this.inventoryCode
  122. }
  123. if (this.searchValue !== '') {
  124. par.key = this.searchValue
  125. }
  126. par = this.URLSearchParams(par)
  127. // post(this.apiUrl + '/InventoryBook/select/getTransferList?' + par).then(
  128. post(this.apiUrl + '/InventoryBook/select/getTransferDetail?' + par).then(
  129. res => {
  130. if (res.success) {
  131. this.listData = [...this.listData, ...res.data.records]
  132. let pages = res.data.pages
  133. if (page < pages) {
  134. isEnd = false
  135. } else {
  136. isEnd = true
  137. this.status = 'nomore'
  138. }
  139. }
  140. }
  141. )
  142. },
  143. getMoreLists () {
  144. page++
  145. this.getData()
  146. },
  147. search () {
  148. this.page = 1
  149. this.listData = []
  150. this.status = 'loading'
  151. this.getData()
  152. },
  153. goDetails (item) {
  154. let par = {
  155. bizNum: item.dialNumber,
  156. batchNum: this.batchNum,
  157. type: '调拨'
  158. }
  159. par = this.URLSearchParams(par)
  160. uni.navigateTo({
  161. url: '/pages/warehouse/inventory/order/order?' + par
  162. })
  163. }
  164. }
  165. }
  166. </script>
  167. <style lang="scss" scoped>
  168. .main-wrap {
  169. height: calc(100% - 170rpx);
  170. &.info {
  171. height: calc(100% - 236rpx);
  172. }
  173. }
  174. .scroll-Y {
  175. //height: calc(100% - 112rpx);
  176. height: 100vh;
  177. background-color: #fafafa;
  178. }
  179. .order-list {
  180. .item {
  181. background-color: #fff;
  182. margin-bottom: 30rpx;
  183. margin-bottom: 30rpx;
  184. .title {
  185. display: flex;
  186. padding: 20rpx;
  187. justify-content: space-between;
  188. align-items: center;
  189. border-bottom: 1px solid #dedede;
  190. .s1 {
  191. color: #333333;
  192. font-size: 28rpx;
  193. font-weight: bold;
  194. }
  195. .s2 {
  196. font-size: 28rpx;
  197. font-weight: bold;
  198. color: #333333;
  199. }
  200. }
  201. .main {
  202. padding: 0 30rpx;
  203. .row {
  204. display: flex;
  205. align-items: center;
  206. justify-content: space-between;
  207. padding: 20rpx 0;
  208. border-bottom: 1px dashed #dedede;
  209. .row-item {
  210. .t1 {
  211. font-weight: bold;
  212. font-size: 28rpx;
  213. color: #333333;
  214. margin-right: 20rpx;
  215. }
  216. .t2 {
  217. font-size: 28rpx;
  218. color: #333333;
  219. }
  220. }
  221. }
  222. .ckmx {
  223. color: #70b603;
  224. font-size: 28rpx;
  225. font-weight: bold;
  226. padding: 20rpx;
  227. display: flex;
  228. justify-content: flex-end;
  229. }
  230. }
  231. }
  232. }
  233. </style>