improvedExWaehousing.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="wrap">
  3. <view class="dropdown content1">
  4. <view class="left" @click='show1=true'>
  5. <view>{{warehouseName}}</view>
  6. <u-icon name="arrow-right"></u-icon>
  7. <u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
  8. :range="warehouseList"></u-picker>
  9. </view>
  10. <view class="right" @click='show2=true'>
  11. <view>{{binNumber}}仓位</view>
  12. <u-icon name="arrow-right"></u-icon>
  13. <u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
  14. :range="warehouseCWList"></u-picker>
  15. </view>
  16. </view>
  17. <view class="content2">
  18. <view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
  19. <view class="row bold">
  20. <view class="left">{{item.contractNo}}</view>
  21. <view>{{item.carNo}}</view>
  22. </view>
  23. <view style='color:#878C9C;font-size:14px;' class="row">
  24. <view class="left">{{item.updateDate}}</view>
  25. <view>{{item.backOffice}}</view>
  26. </view>
  27. <view v-if="item.outType=='火运'||item.outType=='集装箱船'" style='color:#878C9C;font-size:14px;' class="row">
  28. <view v-if='item.boxNo' class="left">箱号:{{item.boxNo}}</view>
  29. <view v-if='item.boxNoOther'>箱号2:{{item.boxNoOther}}</view>
  30. </view>
  31. <view v-if="item.outType=='散船'" style='color:#878C9C;font-size:14px;' class="row">
  32. <view v-if='item.binNo' class="left">仓位号:{{item.binNo}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import helper from '@/common/helper.js';
  40. export default {
  41. data() {
  42. return {
  43. show1: false,
  44. show2: false,
  45. currentPage: 1,
  46. pageSize: 9999,
  47. positionId: "",
  48. binNumber: "",
  49. warehouseName: '',
  50. positionName: '',
  51. warehouseList: [],
  52. warehouseCWList: [],
  53. dataList: [],
  54. allWarehouse: [],
  55. showTime: ''
  56. }
  57. },
  58. onLoad() {
  59. this.positionId = helper.erpWarehouse.positionId
  60. this.warehouseId = helper.erpWarehouse.warehouseId
  61. },
  62. onShow() {
  63. let _data = helper.erpWarehouse
  64. this.warehouseName = _data.warehouseName
  65. this.warehouseList = _data.allWarehouse
  66. this.warehouseCWList = _data.warehouseCWList
  67. this.binNumber = _data.binNumber
  68. this.positionId = _data.positionId
  69. this.warehouseId = _data.warehouseId
  70. this.getList()
  71. },
  72. methods: {
  73. getList() {
  74. this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
  75. positionId: this.positionId,
  76. baseId: this.warehouseId,
  77. currentPage: this.currentPage,
  78. pageSize: this.pageSize,
  79. inOutFlag: 1
  80. }).then(res => {
  81. if (res.data.code == 200) {
  82. this.dataList = res.data.data.records
  83. }
  84. })
  85. },
  86. warehousechange(e) {
  87. this.warehouseName = this.warehouseList[e[0]].warehouseName
  88. this.warehouseId = this.warehouseList[e[0]].id
  89. this.warehouseCWList = this.warehouseList[e[0]].positionInfos
  90. this.warehouseCWchange([0])
  91. },
  92. warehouseCWchange(e) {
  93. this.binNumber = this.warehouseCWList[e[0]].binNumber
  94. this.warehouseId = this.warehouseCWList[e[0]].baseId
  95. this.positionId = this.warehouseCWList[e[0]].id
  96. helper.erpWarehouse.binNumber = this.binNumber
  97. helper.erpWarehouse.warehouseName = this.warehouseName
  98. helper.erpWarehouse.positionId = this.positionId
  99. helper.erpWarehouse.warehouseId = this.warehouseId
  100. helper.erpWarehouse.warehouseCWList = this.warehouseCWList//保存仓位列表,用于解决待完善出入库返回该页面仓库与仓位不匹配问题
  101. this.getList()
  102. },
  103. goDetail(val) {
  104. uni.navigateTo({
  105. url: '/pages/erp/improvedExWaehousing/improvedExWaehousingDetail?data=' + JSON.stringify(val),
  106. })
  107. }
  108. }
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .dropdown {
  113. display: flex;
  114. margin: 20rpx 0;
  115. justify-content: space-between;
  116. .left,
  117. .right {
  118. display: flex;
  119. align-items: center;
  120. }
  121. }
  122. .content1 {
  123. padding: 40rpx 20rpx;
  124. margin: 20rpx;
  125. border-radius: 10rpx;
  126. background: #FFFFFF;
  127. }
  128. .content2 {
  129. background: white;
  130. margin:10px;
  131. border-radius:10px;
  132. .row {
  133. display: flex;
  134. justify-content: space-between;
  135. // border-bottom: 1px solid #EEEEEE;
  136. padding: 18rpx 10rpx;
  137. .right,
  138. input {
  139. font-size: 28rpx;
  140. color: #333333;
  141. }
  142. }
  143. .row-bottom {
  144. .right-bottom {
  145. width: 300rpx;
  146. text-align: right;
  147. }
  148. }
  149. }
  150. .content2-item {
  151. // margin: 0 20rpx 20rpx 20rpx;
  152. margin:0 10px;
  153. // padding: 10rpx;
  154. border-bottom: 1px solid #EEEEEE;
  155. }
  156. .content2-item:last-child{
  157. border-bottom: 1px solid transparent;
  158. }
  159. .no-boder {
  160. border-bottom: none !important;
  161. }
  162. .bold{
  163. font-size:18px;
  164. font-weight:600;
  165. }
  166. </style>