improvedExWaehousing.vue 4.1 KB

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