list.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view class="wrap">
  3. <view class="dropdown content1">
  4. <view class="right" @click='show1=true'>
  5. <view>{{status}}</view>
  6. <u-icon name="arrow-right"></u-icon>
  7. <u-picker @confirm="statuschange" range-key='name' mode="selector" v-model="show1"
  8. :range="statusList"></u-picker>
  9. </view>
  10. </view>
  11. <view class="content2">
  12. <view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
  13. <view style='padding:20px 5px 13px;border-bottom:1px solid #EEEEEE;' class="row">
  14. <view style='font-size:14px;' class="left" v-if="item.tranType != '他运'">{{item.processNo}}</view>
  15. <view style='font-size:14px;' class="left" v-else>{{item.contractNo}}</view>
  16. <view style='color:#22C572;'>{{item.tranType}}</view>
  17. </view>
  18. <view style='font-size:13px;' class="row">
  19. <view style='color:#9698A2;' class="left">{{item.goodsName}}</view>
  20. <view>{{item.weight}}</view>
  21. </view>
  22. <view style='font-size:14px;' v-if="item.sendWarehouse" class="row">
  23. <view style='flex:1;color:#9698A2;' class="left">发货库</view>
  24. <view style='flex:2;text-align:right;'>{{item.sendWarehouse}}</view>
  25. </view>
  26. <view style='font-size:14px;' class="row">
  27. <view style='flex:1;color:#9698A2;' class="left">发货</view>
  28. <view style='flex:2;text-align:right;'>{{item.send}}</view>
  29. </view>
  30. <view style='font-size:14px;' class="row">
  31. <view style='flex:1;color:#9698A2;' class="left">收货</view>
  32. <view style='flex:2;text-align:right;'>{{item.receive}}</view>
  33. </view>
  34. <view style='font-size:14px;' class="row" v-if="item.tranType != '他运'">
  35. <view style='flex:1;color:#9698A2;' class="left" >运输周期</view>
  36. <view style='flex:2;text-align:right;'>{{item.deliveryDateStart}} ~ {{item.deliveryDateEnd}}</view>
  37. </view>
  38. <view style='font-size:14px;' class="row">
  39. <view style='flex:1;color:#9698A2;' class="left" v-if="item.tranType != '他运'">{{item.feedbackStatus}}</view>
  40. <view style='flex:1;color:#9698A2;' class="left" v-else>{{item.receivingStatus}}</view>
  41. <view style='flex:2;text-align:right;'>{{item.createDate}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- <view v-show="isContent">
  46. <uni-load-more :status="loadStatus"></uni-load-more>
  47. </view> -->
  48. </view>
  49. </template>
  50. <script>
  51. import helper from '@/common/helper.js';
  52. export default {
  53. data() {
  54. return {
  55. show1: false,
  56. show2: false,
  57. currentPage: 1,
  58. pageSize: 10,
  59. isContent:false,
  60. positionId: "",
  61. binNumber: "",
  62. status: '执行中',
  63. flag:'',
  64. positionName: '',
  65. statusList: [
  66. {name:'执行中',value:4},
  67. {name:'已完货',value:5},
  68. {name:'全部任务',value:6},
  69. ],
  70. feedbackFlag:4,
  71. dataList: [],
  72. allWarehouse: [],
  73. showTime: ''
  74. }
  75. },
  76. onLoad() {
  77. this.positionId = helper.erpWarehouse.positionId
  78. this.warehouseId = helper.erpWarehouse.warehouseId
  79. },
  80. onShow() {
  81. let _data = helper.erpWarehouse
  82. this.warehouseList = _data.allWarehouse
  83. this.warehouseCWList = _data.warehouseCWList
  84. this.binNumber = _data.binNumber
  85. this.positionId = _data.positionId
  86. this.warehouseId = _data.warehouseId
  87. this.getList()
  88. },
  89. onReachBottom() {
  90. this.currentPage+=1
  91. this.flag='1'
  92. this.getList(false)
  93. // this.getMoreNews()
  94. },
  95. methods: {
  96. getList() {
  97. this.$api.doRequest('get', '/tranProcessInfo/selectTranProcessInfo', {
  98. feedbackFlag: this.feedbackFlag,
  99. currentPage: this.currentPage,
  100. pageSize: this.pageSize
  101. }).then(res => {
  102. if (res.data.code == 200) {
  103. if(this.flag=='1'){
  104. var data=res.data.data.records
  105. this.dataList = this.dataList.concat(data)
  106. }
  107. else{
  108. this.dataList =res.data.data.records
  109. }
  110. if(res.data.data.records.length==0){
  111. this.isContent=true
  112. }
  113. }
  114. })
  115. },
  116. statuschange(e) {
  117. this.status = this.statusList[e[0]].name
  118. this.feedbackFlag=this.statusList[e[0]].value
  119. this.currentPage = 1,
  120. this.flag='0'
  121. this.getList()
  122. },
  123. goDetail(val) {
  124. if(val.tranType == "他运"){
  125. uni.navigateTo({
  126. url: `/pages/erp/receivingfeedback/otherfeedback?id=${val.id}&status=${val.receivingStatus}` ,
  127. })
  128. }else{
  129. uni.navigateTo({
  130. url: '/pages/erp/receivingfeedback/details?id=' + val.id,
  131. })
  132. }
  133. }
  134. }
  135. }
  136. </script>
  137. <style scoped lang="scss">
  138. .dropdown {
  139. display: flex;
  140. margin: 20rpx 0;
  141. justify-content: space-between;
  142. .left,
  143. .right {
  144. display: flex;
  145. align-items: center;
  146. }
  147. }
  148. .content1 {
  149. padding: 40rpx 20rpx;
  150. margin: 20rpx;
  151. border-radius: 10rpx;
  152. background: #FFFFFF;
  153. }
  154. .content2 {
  155. // background: white;
  156. margin:10px 0;
  157. border-radius:10px;
  158. .row {
  159. display: flex;
  160. justify-content: space-between;
  161. // border-bottom: 1px solid #EEEEEE;
  162. padding: 18rpx 10rpx;
  163. .right,
  164. input {
  165. font-size: 28rpx;
  166. color: #333333;
  167. }
  168. }
  169. .row-bottom {
  170. .right-bottom {
  171. width: 300rpx;
  172. text-align: right;
  173. }
  174. }
  175. }
  176. .content2-item {
  177. // margin: 0 20rpx 20rpx 20rpx;
  178. margin:10px;
  179. background:#fff;
  180. padding:0 20rpx;
  181. border-radius:10px;
  182. border-bottom: 1px solid #EEEEEE;
  183. }
  184. .content2-item:last-child{
  185. border-bottom: 1px solid transparent;
  186. }
  187. .no-boder {
  188. border-bottom: none !important;
  189. }
  190. .bold{
  191. font-size:18px;
  192. font-weight:600;
  193. }
  194. </style>