improvedWrehousing.vue 4.7 KB

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