index.vue 5.3 KB

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