improvedExWaehousing.vue 5.2 KB

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