outbound.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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="请输入单号" @iconClick="iconClick"
  6. @input="input" @blur="blur" @confirm="confirm">
  7. </uni-easyinput>
  8. <view class="filter-text" @click.stop="filterTime">
  9. 筛选
  10. </view>
  11. </view>
  12. <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
  13. </view>
  14. <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  15. <view class="inner-item" v-for="(item,index) in dataList" :key="index" @click="itemDetails(item)">
  16. <view class="item-stats">
  17. {{item.stas=='B'?'已拣货':"待拣货"}}
  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">
  31. <view class="shuo-label">
  32. 出库品种数:
  33. </view>
  34. <view class="shuo-label-green">
  35. {{item.stoCnt}}
  36. </view>
  37. </view>
  38. <view class="shuo-item">
  39. <view class="shuo-label">
  40. 出库总数量:
  41. </view>
  42. <view class="shuo-label-green">
  43. {{item.devCnt}}
  44. </view>
  45. </view>
  46. </view>
  47. <view class="inventory-item">
  48. <view class="shuo-item">
  49. <view class="shuo-label">
  50. 出库总金额:
  51. </view>
  52. <view class="shuo-cont">
  53. {{item.devAmt}}
  54. </view>
  55. </view>
  56. <view class="shuo-item">
  57. <view class="shuo-label">
  58. 已拣货数量:
  59. </view>
  60. <view class="shuo-cont">
  61. {{item.pickCnt}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="inventory-item">
  66. <view class="shuo-item">
  67. <view class="shuo-label">
  68. 出库类型:
  69. </view>
  70. <view class="shuo-cont">
  71. {{item.stoType}}
  72. </view>
  73. </view>
  74. <view class="shuo-item">
  75. <view class="shuo-label">
  76. 目标位置:
  77. </view>
  78. <view class="shuo-cont">
  79. {{item.deptName}}
  80. </view>
  81. </view>
  82. </view>
  83. <view class="inventory-item">
  84. <view class="shuo-item">
  85. <view class="shuo-label">
  86. 出库人:
  87. </view>
  88. <view class="shuo-cont">
  89. {{item.crteUsrName}}
  90. </view>
  91. </view>
  92. <view class="shuo-item">
  93. <view class="shuo-label">
  94. 出库时间:
  95. </view>
  96. <view class="shuo-cont">
  97. {{ forMatTime(item.crteTime) }}
  98. </view>
  99. </view>
  100. </view>
  101. <view class="inventory-item">
  102. <view class="shuo-item">
  103. <view class="shuo-label">
  104. 来源订单:
  105. </view>
  106. <view class="shuo-label-green">
  107. {{item.soucId}}
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </z-paging>
  113. <uni-popup ref="popup" :mask-click="false">
  114. <view class="time-view">
  115. <uni-datetime-picker type="daterange" v-model="datetimesingle" />
  116. <view class="btn-view">
  117. <button type="primary" plain="true" style="height:70rpx;line-height: 70rpx;"
  118. @click.stop="reset()">重置</button>
  119. <button type="primary" plain="true" style="height:70rpx;line-height: 70rpx;"
  120. @click.stop="btnConfirm()">确定</button>
  121. </view>
  122. </view>
  123. </uni-popup>
  124. </view>
  125. </template>
  126. <script>
  127. import {
  128. mapState,
  129. mapMutations,
  130. mapActions
  131. } from 'vuex';
  132. import moment from "moment";
  133. import {
  134. debounce
  135. } from 'lodash';
  136. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  137. export default {
  138. mixins: [ZPMixin],
  139. data() {
  140. return {
  141. index: 0,
  142. value: "",
  143. dataList: [],
  144. inputVal: "",
  145. codeVal: "",
  146. confirmVal: "",
  147. changeVal: "",
  148. classes: [],
  149. listData: [],
  150. tabList: ['待拣货', '已拣货'],
  151. valueList: 0,
  152. beforeClose: true,
  153. datetimesingle: [],
  154. }
  155. },
  156. computed: {
  157. ...mapState(['houseSelectData'])
  158. },
  159. onShow() {
  160. if (this.$refs.paging) {
  161. this.$refs.paging.reload();
  162. }
  163. this.$forceUpdate();
  164. uni.$once('update', function(data) {
  165. // uni.redirectTo({
  166. // url: '/pages/grounding/grounding' //写你的路径
  167. // });
  168. })
  169. },
  170. mounted() {
  171. },
  172. methods: {
  173. ...mapActions(['getoutbondData']),
  174. async queryList(pageNo, pageSize) {
  175. await this.getoutbondData({
  176. pam: {
  177. current: pageNo,
  178. size: pageSize,
  179. stooutId: this.value,
  180. type: this.index == "0" ? "pick" : "sto",
  181. ordDate: this.datetimesingle,
  182. pdaType: "pda",
  183. soucStroomId: this.houseSelectData.houseId
  184. },
  185. that: this
  186. });
  187. },
  188. //日期格式化
  189. forMatTime(time) {
  190. return moment(time).format("YYYY-MM-DD");
  191. },
  192. //日期确定按钮
  193. btnConfirm() {
  194. this.$refs.popup.close();
  195. this.$refs.paging.reload();
  196. },
  197. //筛选时间
  198. filterTime() {
  199. this.$refs.popup.open('bottom')
  200. },
  201. //跳转验收详情
  202. itemDetails(item) {
  203. uni.setStorage({
  204. key: 'picking-details',
  205. data: item
  206. });
  207. uni.navigateTo({
  208. url: '/pages/picking-details/index',
  209. success: function(res) {
  210. console.log(res, "res")
  211. }
  212. });
  213. },
  214. input:debounce(function(e) {
  215. this.value = e;
  216. this.getoutbondData({
  217. pam: {
  218. stooutId: this.value,
  219. type: this.index == "0" ? "pick" : "sto"
  220. },
  221. that: this
  222. });
  223. },500),
  224. iconClick(e) {
  225. console.log(e, '点击搜索拿到的数据');
  226. },
  227. // 日期重置
  228. reset() {
  229. this.datetimesingle = [];
  230. this.$refs.popup.close();
  231. this.$refs.paging.reload();
  232. },
  233. blur(e) {
  234. this.$nextTick(() => {
  235. // this.value = e.target.value;
  236. })
  237. },
  238. confirm(e) {
  239. this.$nextTick(() => {
  240. // this.value = e;
  241. // this.confirmVal = e;
  242. })
  243. },
  244. changeTab(index) {
  245. this.index = index;
  246. this.$refs.paging.reload();
  247. },
  248. oncloseList() {
  249. this.$refs.inputDialog.close()
  250. },
  251. changeList(e) {
  252. // console.log(e)
  253. },
  254. onchange(e) {
  255. // console.log(e, 44)
  256. },
  257. onnodeclick(node) {
  258. console.log(node, "node");
  259. },
  260. onpopupclosed(e) {
  261. // console.log(e, 33)
  262. }
  263. },
  264. watch: {
  265. groundData(newData, flodData) {
  266. this.$refs.paging.complete(newData);
  267. },
  268. }
  269. }
  270. </script>
  271. <style lang="scss" scoped>
  272. .query-wrap {
  273. width: 100%;
  274. padding: 20rpx;
  275. box-sizing: border-box;
  276. background-color: #F1F1F1;
  277. overflow-y: scroll;
  278. overflow-x: hidden;
  279. .time-view {
  280. height: 350rpx;
  281. background-color: #fff;
  282. padding: 50rpx 50rpx 0 50rpx;
  283. box-sizing: border-box;
  284. .btn-view {
  285. width: 100%;
  286. height: 100rpx;
  287. margin-top: 100rpx;
  288. display: flex;
  289. justify-content: space-around;
  290. }
  291. }
  292. .title-cont {
  293. padding-top: 10rpx;
  294. width: 100%;
  295. background-color: #fff;
  296. .search-view {
  297. width: 100%;
  298. height: 100rpx;
  299. display: flex;
  300. align-items: center;
  301. padding: 0rpx 20rpx 0rpx 20rpx;
  302. box-sizing: border-box;
  303. .filter-text {
  304. width: 72rpx;
  305. height: 50rpx;
  306. line-height: 50rpx;
  307. color: rgba(1, 169, 146, 1);
  308. font-size: 36rpx;
  309. font-family: PingFangSC-bold;
  310. padding-left: 20rpx;
  311. }
  312. }
  313. }
  314. }
  315. uni-page-body {
  316. width: 100%;
  317. height: 100%;
  318. }
  319. </style>