improvedExWaehousing.vue 4.8 KB

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