list.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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">{{item.feedbackStatus}}</view>
  40. <view style='flex:2;text-align:right;'>{{item.createDate}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- <view v-show="isContent">
  45. <uni-load-more :status="loadStatus"></uni-load-more>
  46. </view> -->
  47. </view>
  48. </template>
  49. <script>
  50. import helper from '@/common/helper.js';
  51. export default {
  52. data() {
  53. return {
  54. show1: false,
  55. show2: false,
  56. currentPage: 1,
  57. pageSize: 10,
  58. positionId: "",
  59. isContent:false,
  60. binNumber: "",
  61. status: '执行中',
  62. positionName: '',
  63. flag:'',
  64. statusList: [
  65. {name:'执行中',value:1},
  66. {name:'已完货',value:2},
  67. {name:'全部任务',value:3},
  68. ],
  69. feedbackFlag:1,
  70. dataList: [],
  71. allWarehouse: [],
  72. showTime: ''
  73. }
  74. },
  75. onLoad() {
  76. this.positionId = helper.erpWarehouse.positionId
  77. this.warehouseId = helper.erpWarehouse.warehouseId
  78. },
  79. onShow() {
  80. let _data = helper.erpWarehouse
  81. this.warehouseList = _data.allWarehouse
  82. this.warehouseCWList = _data.warehouseCWList
  83. this.binNumber = _data.binNumber
  84. this.positionId = _data.positionId
  85. this.warehouseId = _data.warehouseId
  86. this.getList()
  87. },
  88. onReachBottom() {
  89. this.currentPage+=1
  90. this.flag='1'
  91. this.getList(false)
  92. // this.getMoreNews()
  93. },
  94. methods: {
  95. getList() {
  96. this.$api.doRequest('get', '/tranProcessInfo/selectTranProcessInfo', {
  97. feedbackFlag: this.feedbackFlag,
  98. currentPage: this.currentPage,
  99. pageSize: this.pageSize
  100. }).then(res => {
  101. if (res.data.code == 200) {
  102. if(this.flag=='1'){
  103. var data=res.data.data.records
  104. this.dataList = this.dataList.concat(data)
  105. }
  106. else{
  107. this.dataList =res.data.data.records
  108. }
  109. if(res.data.data.records.length==0){
  110. this.isContent=true
  111. }
  112. }
  113. })
  114. },
  115. statuschange(e) {
  116. this.status = this.statusList[e[0]].name
  117. this.feedbackFlag=this.statusList[e[0]].value
  118. this.currentPage = 1,
  119. this.flag='0'
  120. this.getList()
  121. },
  122. goDetail(val) {
  123. if(val.tranType == "他运"){
  124. uni.navigateTo({
  125. url: `/pages/erp/deliveryfeedback/otherfeedback?id=${val.id}&status=${val.feedbackStatus}`,
  126. })
  127. }else{
  128. uni.navigateTo({
  129. url: '/pages/erp/deliveryfeedback/details?id=' + val.id,
  130. })
  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 0;
  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:10px;
  178. background:#fff;
  179. padding:0 20rpx;
  180. border-radius:10px;
  181. border-bottom: 1px solid #EEEEEE;
  182. }
  183. .content2-item:last-child{
  184. border-bottom: 1px solid transparent;
  185. }
  186. .no-boder {
  187. border-bottom: none !important;
  188. }
  189. .bold{
  190. font-size:18px;
  191. font-weight:600;
  192. }
  193. </style>