list.vue 4.9 KB

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