improvedWrehousing.vue 4.3 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">
  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. },
  61. onShow() {
  62. let _data = helper.erpWarehouse
  63. this.warehouseName = _data.warehouseName
  64. this.warehouseList = _data.allWarehouse
  65. this.warehouseCWList = _data.warehouseCWList
  66. this.binNumber = _data.binNumber
  67. this.positionId = _data.positionId
  68. this.warehouseId = _data.warehouseId
  69. this.getList()
  70. },
  71. methods: {
  72. getList() {
  73. this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
  74. positionId: this.positionId,
  75. baseId: this.warehouseId,
  76. currentPage: this.currentPage,
  77. pageSize: this.pageSize,
  78. inOutFlag: 2
  79. }).then(res => {
  80. if (res.data.code == 200) {
  81. this.dataList = res.data.data.records
  82. }
  83. })
  84. },
  85. warehousechange(e) {
  86. this.warehouseName = this.warehouseList[e[0]].warehouseName
  87. this.warehouseId = this.warehouseList[e[0]].id
  88. this.warehouseCWList = this.warehouseList[e[0]].positionInfos
  89. this.warehouseCWchange([0])
  90. this.currentPage = 1
  91. this.pageSize = 9999
  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. this.binNumber = this.warehouseCWList[e[0]].binNumber
  98. helper.erpWarehouse.warehouseCWList = this.warehouseCWList//保存仓位列表,用于解决待完善出入库返回该页面仓库与仓位不匹配问题
  99. helper.erpWarehouse.positionId = this.positionId
  100. helper.erpWarehouse.warehouseId = this.warehouseId
  101. helper.erpWarehouse.binNumber = this.binNumber
  102. this.currentPage = 1
  103. this.pageSize = 9999
  104. this.getList()
  105. },
  106. goDetail(val) {
  107. // uni.setStorageSync('erpContractNoList',val)
  108. uni.setStorageSync('erpContractNo',val.contractNo)
  109. uni.setStorageSync('ContractNoCar',val.carNo)
  110. uni.navigateTo({
  111. url: '/pages/erp/improvedWrehousing/improvedWrehousingDetail?data=' + JSON.stringify(val),
  112. })
  113. }
  114. }
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. .dropdown {
  119. display: flex;
  120. margin: 20rpx 0;
  121. justify-content: space-between;
  122. .left,
  123. .right {
  124. display: flex;
  125. align-items: center;
  126. }
  127. }
  128. .content1 {
  129. padding: 40rpx 20rpx;
  130. margin: 20rpx;
  131. border-radius: 10rpx;
  132. background: #FFFFFF;
  133. }
  134. .content2 {
  135. .row {
  136. display: flex;
  137. justify-content: space-between;
  138. border-bottom: 1px solid #EEEEEE;
  139. padding: 21rpx 0;
  140. .right,
  141. input {
  142. font-size: 28rpx;
  143. color: #333333;
  144. }
  145. }
  146. .row-bottom {
  147. .right-bottom {
  148. width: 300rpx;
  149. text-align: right;
  150. }
  151. }
  152. }
  153. .content2-item {
  154. background: white;
  155. margin: 0 20rpx 20rpx 20rpx;
  156. padding: 10rpx;
  157. border-radius: 15rpx;
  158. }
  159. .no-boder {
  160. border-bottom: none !important;
  161. }
  162. </style>