improvedExWaehousing.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 v-model="show1" :default-value='[0]' mode="selector" :list="warehouseList" @confirm="confirmWarehouse">
  8. </u-picker> -->
  9. <u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
  10. :range="warehouseList"></u-picker>
  11. </view>
  12. <view class="right" @click='show2=true'>
  13. <view>{{binNumber}}仓位</view>
  14. <u-icon name="arrow-right"></u-icon>
  15. <!-- <u-picker v-model="show2" :default-value='[0]' mode="selector" :list="positionList" @confirm="confirmPositon">
  16. </u-picker> -->
  17. <u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
  18. :range="warehouseCWList"></u-picker>
  19. </view>
  20. </view>
  21. <view class="content2">
  22. <view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
  23. <view class="item-style">{{item.contractNo}}</view>
  24. <view class="item-style">{{item.carNo}}</view>
  25. <view class="item-style">{{item.inOutDate}}</view>
  26. <view class="item-style">{{item.backOffice}}</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: 10,
  40. positionId: "",
  41. binNumber: "",
  42. // warehouseName: '鲅鱼圈一号库',
  43. // positionName: '102仓位',
  44. binNumber: "",
  45. warehouseName: '',
  46. warehouseList: [],
  47. warehouseCWList:[],
  48. // positionList: [{
  49. // "label": '102仓位',
  50. // "value": '1'
  51. // }],
  52. dataList: []
  53. }
  54. },
  55. onLoad() {
  56. this.positionId = helper.erpWarehouse.positionId
  57. this.getList()
  58. },
  59. onShow() {
  60. let _data = helper.erpWarehouse
  61. this.positionId = _data.positionId
  62. this.warehouseList = _data.allWarehouse
  63. this.warehouseCWList = _data.warehouseCWList
  64. this.warehouseName = _data.warehouseName
  65. this.binNumber = _data.binNumber
  66. },
  67. methods: {
  68. getList() {
  69. this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
  70. positionId:this.positionId,
  71. baseId: helper.erpWarehouse.warehouseId,
  72. currentPage: this.currentPage,
  73. pageSize: this.pageSize,
  74. inOutFlag:1
  75. }).then(res => {
  76. if (res.data.code == 200) {
  77. this.dataList = res.data.data.records
  78. }
  79. })
  80. },
  81. warehousechange(e) {
  82. this.warehouseName = this.warehouseList[e[0]].warehouseName
  83. },
  84. warehouseCWchange(e) {
  85. this.binNumber = this.warehouseCWList[e[0]].binNumber
  86. },
  87. goDetail(val) {
  88. uni.navigateTo({
  89. url: '/pages/erp/improvedExWaehousing/improvedExWaehousingDetail?data=' + JSON.stringify(val),
  90. })
  91. }
  92. }
  93. }
  94. </script>
  95. <style scoped lang="scss">
  96. .dropdown {
  97. display: flex;
  98. margin: 20rpx 0;
  99. justify-content: space-between;
  100. .left,
  101. .right {
  102. display: flex;
  103. }
  104. }
  105. .content1 {
  106. padding: 40rpx 20rpx;
  107. margin: 20rpx;
  108. border-radius: 10rpx;
  109. background: #FFFFFF;
  110. }
  111. .content2 {
  112. // padding: 20rpx;
  113. margin: 20rpx;
  114. // border-bottom: 1px solid #ccc;
  115. background: #FFFFFF;
  116. border-radius: 10rpx;
  117. .content2-item {
  118. padding: 20rpx;
  119. margin-bottom: 10rpx;
  120. border-bottom: 1px solid #ccc;
  121. // padding-bottom: 10px;
  122. }
  123. .item-style {
  124. display: inline-block;
  125. width: 50%;
  126. }
  127. }
  128. </style>