improvedExWaehousing.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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="item-style">{{item.contractNo}}</view>
  20. <view class="item-style">{{item.carNo}}</view>
  21. <view class="item-style">{{item.updateDate}}</view>
  22. <view class="item-style">{{item.backOffice}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import helper from '@/common/helper.js';
  29. export default {
  30. data() {
  31. return {
  32. show1: false,
  33. show2: false,
  34. currentPage: 1,
  35. pageSize: 10,
  36. positionId: "",
  37. binNumber: "",
  38. binNumber: "",
  39. warehouseName: '',
  40. warehouseList: [],
  41. warehouseCWList:[],
  42. dataList: []
  43. }
  44. },
  45. onLoad() {
  46. this.positionId = helper.erpWarehouse.positionId
  47. this.warehouseId = helper.erpWarehouse.warehouseId
  48. this.getList()
  49. },
  50. onShow() {
  51. this.positionId = helper.erpWarehouse.positionId
  52. this.warehouseId = helper.erpWarehouse.warehouseId
  53. let _data = helper.erpWarehouse
  54. this.positionId = _data.positionId
  55. this.warehouseId = _data.warehouseId
  56. this.warehouseList = _data.allWarehouse
  57. this.warehouseCWList = _data.warehouseCWList
  58. this.warehouseName = _data.warehouseName
  59. this.binNumber = _data.binNumber
  60. },
  61. methods: {
  62. getList() {
  63. this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
  64. positionId:this.positionId,
  65. baseId: this.warehouseId,
  66. currentPage: this.currentPage,
  67. pageSize: this.pageSize,
  68. inOutFlag:1
  69. }).then(res => {
  70. if (res.data.code == 200) {
  71. this.dataList = res.data.data.records
  72. }
  73. })
  74. },
  75. warehousechange(e) {
  76. this.warehouseName = this.warehouseList[e[0]].warehouseName
  77. this.warehouseId =this.warehouseList[e[0]].id
  78. this.warehouseCWList = this.warehouseList[e[0]].positionInfos
  79. this.warehouseCWchange([0])
  80. },
  81. warehouseCWchange(e) {
  82. this.binNumber = this.warehouseCWList[e[0]].binNumber
  83. this.warehouseId = this.warehouseCWList[e[0]].baseId
  84. this.positionId = this.warehouseCWList[e[0]].id
  85. helper.erpWarehouse.binNumber = this.binNumber
  86. helper.erpWarehouse.warehouseName = this.warehouseName
  87. helper.erpWarehouse.positionId = this.positionId
  88. helper.erpWarehouse.warehouseId = this.warehouseId
  89. this.getList()
  90. },
  91. goDetail(val) {
  92. uni.navigateTo({
  93. url: '/pages/erp/improvedExWaehousing/improvedExWaehousingDetail?data=' + JSON.stringify(val),
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style scoped lang="scss">
  100. .dropdown {
  101. display: flex;
  102. margin: 20rpx 0;
  103. justify-content: space-between;
  104. .left,
  105. .right {
  106. display: flex;
  107. }
  108. }
  109. .content1 {
  110. padding: 40rpx 20rpx;
  111. margin: 20rpx;
  112. border-radius: 10rpx;
  113. background: #FFFFFF;
  114. }
  115. .content2 {
  116. // padding: 20rpx;
  117. margin: 20rpx;
  118. // border-bottom: 1px solid #ccc;
  119. background: #FFFFFF;
  120. border-radius: 10rpx;
  121. .content2-item {
  122. padding: 20rpx;
  123. margin-bottom: 10rpx;
  124. border-bottom: 1px solid #ccc;
  125. // padding-bottom: 10px;
  126. }
  127. .item-style {
  128. display: inline-block;
  129. width: 50%;
  130. }
  131. }
  132. </style>