improvedExWaehousing.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view class="warp">
  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 class="content2">
  26. <view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
  27. <view class="row">
  28. <view class="left">合同编号</view>
  29. <view>{{item.contractNo}}</view>
  30. </view>
  31. <view class="row">
  32. <view class="left">车牌号</view>
  33. <view>{{item.carNo}}</view>
  34. </view>
  35. <view class="row">
  36. <view class="left">暂存时间</view>
  37. <view>{{item.updateDate}}</view>
  38. </view>
  39. <view class="row no-boder">
  40. <view class="left">提交人</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: 10,
  56. positionId: "",
  57. binNumber: "",
  58. binNumber: "",
  59. warehouseName: '',
  60. warehouseList: [],
  61. warehouseCWList:[],
  62. dataList: []
  63. }
  64. },
  65. onLoad() {
  66. this.positionId = helper.erpWarehouse.positionId
  67. this.warehouseId = helper.erpWarehouse.warehouseId
  68. this.getList()
  69. },
  70. onShow() {
  71. this.positionId = helper.erpWarehouse.positionId
  72. this.warehouseId = helper.erpWarehouse.warehouseId
  73. let _data = helper.erpWarehouse
  74. this.positionId = _data.positionId
  75. this.warehouseId = _data.warehouseId
  76. this.warehouseList = _data.allWarehouse
  77. this.warehouseCWList = _data.warehouseCWList
  78. this.warehouseName = _data.warehouseName
  79. this.binNumber = _data.binNumber
  80. },
  81. methods: {
  82. getList() {
  83. this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
  84. positionId:this.positionId,
  85. baseId: this.warehouseId,
  86. currentPage: this.currentPage,
  87. pageSize: this.pageSize,
  88. inOutFlag:1
  89. }).then(res => {
  90. if (res.data.code == 200) {
  91. this.dataList = res.data.data.records
  92. }
  93. })
  94. },
  95. warehousechange(e) {
  96. this.warehouseName = this.warehouseList[e[0]].warehouseName
  97. this.warehouseId =this.warehouseList[e[0]].id
  98. this.warehouseCWList = this.warehouseList[e[0]].positionInfos
  99. this.warehouseCWchange([0])
  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. helper.erpWarehouse.binNumber = this.binNumber
  106. helper.erpWarehouse.warehouseName = this.warehouseName
  107. helper.erpWarehouse.positionId = this.positionId
  108. helper.erpWarehouse.warehouseId = this.warehouseId
  109. this.getList()
  110. },
  111. goDetail(val) {
  112. uni.navigateTo({
  113. url: '/pages/erp/improvedExWaehousing/improvedExWaehousingDetail?data=' + JSON.stringify(val),
  114. })
  115. }
  116. }
  117. }
  118. </script>
  119. <style scoped lang="scss">
  120. uni-page-body {
  121. overflow: hidden;
  122. }
  123. // .warp {
  124. // margin: 10rpx;
  125. // padding: 20rpx 20rpx 140rpx 20rpx;
  126. // .top {
  127. // display: flex;
  128. // margin-bottom: 20rpx;
  129. // border-radius: 20rpx;
  130. // background: white;
  131. // padding: 20rpx;
  132. // .top-left {
  133. // margin-right: 20rpx;
  134. // }
  135. // }
  136. // }
  137. .dropdown {
  138. display: flex;
  139. margin: 20rpx 0;
  140. justify-content: space-between;
  141. .left,
  142. .right {
  143. display: flex;
  144. }
  145. }
  146. .content1 {
  147. padding: 40rpx 20rpx;
  148. margin: 20rpx;
  149. border-radius: 10rpx;
  150. background: #FFFFFF;
  151. }
  152. .content2 {
  153. margin: 20rpx;
  154. background: #FFFFFF;
  155. border-radius: 10rpx;
  156. .content2-item {
  157. padding: 20rpx;
  158. margin-bottom: 10rpx;
  159. // border-bottom: 1px solid #ccc;
  160. }
  161. .item-style {
  162. display: inline-block;
  163. width: 50%;
  164. }
  165. }
  166. .content,
  167. .content1,
  168. .content2 {
  169. border-radius: 20rpx;
  170. background: white;
  171. padding: 20rpx;
  172. .title {
  173. font-size: 28rpx;
  174. font-weight: 600;
  175. color: #333333;
  176. }
  177. .row {
  178. display: flex;
  179. justify-content: space-between;
  180. border-bottom: 1px solid #EEEEEE;
  181. padding: 21rpx 0;
  182. .right,
  183. input {
  184. font-size: 28rpx;
  185. color: #333333;
  186. }
  187. }
  188. .row-bottom {
  189. .right-bottom {
  190. width: 300rpx;
  191. text-align: right;
  192. }
  193. }
  194. }
  195. .bottom-btn {
  196. width: 92%;
  197. position: fixed;
  198. bottom: 40rpx;
  199. display: flex;
  200. z-index: 2;
  201. }
  202. </style>