improvedWrehousing.vue 5.4 KB

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