allot.vue 5.4 KB

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