list.vue 5.0 KB

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