index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="query-wrap">
  3. <view class="title-cont">
  4. <view class="search-view">
  5. <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入出库订单号"
  6. @input="input">
  7. </uni-easyinput>
  8. </view>
  9. <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
  10. </view>
  11. <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  12. <view class="inner-item" v-for="(item,index) in dataList" :key="index" @click="itemDetails(item)">
  13. <view class="item-stats">
  14. <span v-if="item.stas == 'A'">已确认待拣货</span>
  15. <span v-if="item.stas == 'B'">已出库待配送</span>
  16. <span v-if="item.stas == 'C'">配送中</span>
  17. <span v-if="item.stas == 'D'">已配送</span>
  18. </view>
  19. <view class="inventory-item">
  20. <view class="shuo-item-name">
  21. <view class="shuo-label">
  22. 出库订单号:
  23. </view>
  24. <view class="shuo-unit">
  25. {{item.stooutId}}
  26. </view>
  27. </view>
  28. </view>
  29. <view class="inventory-item">
  30. <view class="shuo-item-name">
  31. <view class="shuo-label">
  32. 来源订单号:
  33. </view>
  34. <view class="shuo-unit">
  35. {{item.soucId}}
  36. </view>
  37. </view>
  38. </view>
  39. <view class="inventory-item">
  40. <view class="shuo-item">
  41. <view class="shuo-label">
  42. 出库品种数:
  43. </view>
  44. <view class="shuo-cont">
  45. {{item.stoCnt}}
  46. </view>
  47. </view>
  48. <view class="shuo-item">
  49. <view class="shuo-label">
  50. 出库总数量:
  51. </view>
  52. <view class="shuo-cont">
  53. {{item.devCnt}}
  54. </view>
  55. </view>
  56. </view>
  57. <view class="inventory-item">
  58. <view class="shuo-item">
  59. <view class="shuo-label">
  60. 出库类型:
  61. </view>
  62. <view class="shuo-cont">
  63. {{item.stoType}}
  64. </view>
  65. </view>
  66. <view class="shuo-item">
  67. <view class="shuo-label">
  68. 目标位置
  69. </view>
  70. <view class="shuo-cont">
  71. {{item.deptName}}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="inventory-item">
  76. <view class="shuo-item">
  77. <view class="shuo-label">
  78. 出库人:
  79. </view>
  80. <view class="shuo-cont">
  81. {{item.crteUsrName}}
  82. </view>
  83. </view>
  84. <view class="shuo-item">
  85. <view class="shuo-label">
  86. 出库时间:
  87. </view>
  88. <view class="shuo-cont">
  89. {{forMatTime(item.crteTime)}}
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </z-paging>
  95. </view>
  96. </template>
  97. <script>
  98. import {
  99. mapState,
  100. mapMutations,
  101. mapActions
  102. } from 'vuex';
  103. import {
  104. debounce
  105. } from 'lodash';
  106. import moment from "moment";
  107. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  108. export default {
  109. mixins: [ZPMixin],
  110. data() {
  111. return {
  112. index: 0,
  113. value: "",
  114. dataList: [],
  115. inputVal: "",
  116. codeVal: "",
  117. confirmVal: "",
  118. changeVal: "",
  119. classes: [],
  120. listData: [],
  121. tabList: ['待配送', '已配送'],
  122. valueList: 0,
  123. beforeClose: true,
  124. datetimesingle: [],
  125. }
  126. },
  127. computed: {
  128. ...mapState(['houseSelectData'])
  129. },
  130. onShow() {
  131. uni.$once('update', function(data) {
  132. // uni.redirectTo({
  133. // url: '/pages/grounding/grounding' //写你的路径
  134. // });
  135. })
  136. },
  137. mounted() {
  138. },
  139. methods: {
  140. ...mapActions(['getDeliveryData']),
  141. ...mapMutations(['setAcceptDetaData']),
  142. async queryList(pageNo, pageSize) {
  143. await this.getDeliveryData({
  144. pam: {
  145. current: pageNo,
  146. size: pageSize,
  147. stooutId: this.value,
  148. type: this.index == '0' ? 'waitDev' : 'delvSuc',
  149. pdaType: "pda",
  150. soucStroomId: this.houseSelectData.houseId
  151. },
  152. that: this
  153. });
  154. },
  155. //日期格式化
  156. forMatTime(time) {
  157. return moment(time).format("YYYY-MM-DD");
  158. },
  159. //跳转配送详情
  160. itemDetails(item) {
  161. uni.setStorage({
  162. key: 'deliveredDetail',
  163. data: item
  164. });
  165. uni.navigateTo({
  166. url: '/pages/deliveredDetail/index',
  167. success: function(res) {
  168. console.log(res, "res")
  169. }
  170. });
  171. },
  172. input: debounce(function(e) {
  173. this.value = e;
  174. this.getDeliveryData({
  175. pam: {
  176. stooutId: this.value,
  177. type: this.index == '0' ? 'waitDev' : 'delvSuc'
  178. },
  179. that: this
  180. });
  181. }, 500),
  182. changeTab(index) {
  183. this.index = index;
  184. this.$refs.paging.reload();
  185. },
  186. },
  187. watch: {
  188. }
  189. }
  190. </script>
  191. <style lang="scss" scoped>
  192. .query-wrap {
  193. width: 100%;
  194. padding: 20rpx;
  195. box-sizing: border-box;
  196. background-color: #F1F1F1;
  197. overflow-y: scroll;
  198. overflow-x: hidden;
  199. .time-view {
  200. height: 350rpx;
  201. background-color: #fff;
  202. padding: 50rpx 50rpx 0 50rpx;
  203. box-sizing: border-box;
  204. .btn-view {
  205. width: 100%;
  206. height: 100rpx;
  207. margin-top: 100rpx;
  208. display: flex;
  209. justify-content: space-around;
  210. }
  211. }
  212. .title-cont {
  213. padding-top: 10rpx;
  214. width: 100%;
  215. background-color: #fff;
  216. .search-view {
  217. width: 100%;
  218. height: 100rpx;
  219. display: flex;
  220. align-items: center;
  221. padding: 0rpx 20rpx 0rpx 20rpx;
  222. box-sizing: border-box;
  223. .filter-text {
  224. width: 72rpx;
  225. height: 50rpx;
  226. line-height: 50rpx;
  227. color: rgba(1, 169, 146, 1);
  228. font-size: 36rpx;
  229. font-family: PingFangSC-bold;
  230. padding-left: 20rpx;
  231. }
  232. }
  233. }
  234. }
  235. uni-page-body {
  236. width: 100%;
  237. height: 100%;
  238. }
  239. </style>