improvedExWaehousing.vue 4.1 KB

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