index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item" v-for="(item,index) in listData" :key="index">
  4. <view class="item-stats">
  5. {{item.stas}}
  6. </view>
  7. <view class="inventory-item">
  8. <view class="shuo-item-name">
  9. <view class="shuo-label">
  10. 盘点单号:
  11. </view>
  12. <view class="shuo-unit">
  13. {{item.intrNo}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="inventory-item">
  18. <view class="shuo-item-name">
  19. <view class="shuo-label">
  20. 任务名称:
  21. </view>
  22. <view class="shuo-cont">
  23. {{item.taskName}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="inventory-item">
  28. <view class="shuo-item">
  29. <view class="shuo-label">
  30. 任务类型:
  31. </view>
  32. <view class="shuo-cont">
  33. {{item.type}}
  34. </view>
  35. </view>
  36. <view class="shuo-item">
  37. <view class="shuo-label">
  38. 目标仓库:
  39. </view>
  40. <view class="shuo-cont">
  41. {{item.stroomName}}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="inventory-item">
  46. <view class="shuo-item-name">
  47. <view class="shuo-label">
  48. 盘点品种数:
  49. </view>
  50. <view class="shuo-cont">
  51. {{item.catCnt}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="inventory-item">
  56. <view class="shuo-item">
  57. <view class="shuo-label">
  58. 应盘总数:
  59. </view>
  60. <view class="shuo-cont">
  61. {{item.sumCnt}}
  62. </view>
  63. </view>
  64. <view class="shuo-item">
  65. <view class="shuo-label">
  66. 实盘总数:
  67. </view>
  68. <view class="shuo-cont">
  69. {{item.intrCnt}}
  70. </view>
  71. </view>
  72. </view>
  73. <view class="inventory-item">
  74. <view class="shuo-item-name">
  75. <view class="shuo-label">
  76. 盘点时间:
  77. </view>
  78. <view class="shuo-cont">
  79. {{forMatTime(item.startDate)}}
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false" style="margin-top:20rpx"></v-tabs>
  85. <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  86. <view class="inner-item" v-for="(item,index) in dataList" :key="index" @click="itemDetails(item)">
  87. <view class="item-stats">
  88. {{item.stas}}
  89. </view>
  90. <view class="inventory-item">
  91. <view class="shuo-item-name">
  92. <view class="shuo-label-podnme">
  93. {{item.prodName}}
  94. </view>
  95. <view class="shuo-unit">
  96. <span>{{ item.unt }} ({{ item.pacCnt
  97. }}{{ item.prcUnt }}/{{ item.unt }})</span>
  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-cont">
  107. {{item.spec}}
  108. </view>
  109. </view>
  110. <view class="shuo-item">
  111. <view class="shuo-label">
  112. 型号:
  113. </view>
  114. <view class="shuo-cont">
  115. {{item.mol}}
  116. </view>
  117. </view>
  118. </view>
  119. <view class="inventory-item">
  120. <view class="shuo-item">
  121. <view class="shuo-label">
  122. 耗材类别:
  123. </view>
  124. <view class="shuo-cont-blue">
  125. <span v-if="item.mcsType == '0'"> 普通耗材 </span>
  126. <span v-if="item.mcsType == '1'"> 高值耗材 </span>
  127. <span v-if="item.mcsType == '2'"> 试剂 </span>
  128. <span v-if="item.mcsType == '3'"> 总务耗材 </span>
  129. </view>
  130. </view>
  131. <view class="shuo-item">
  132. <view class="shuo-label">
  133. 生产来源:
  134. </view>
  135. <view class="shuo-cont-blue">
  136. <span v-if="item.prodSouc == '1'" type="success"> 国产 </span>
  137. <span v-if="item.prodSouc == '2'" type="danger"> 进口 </span>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="inventory-item">
  142. <view class="shuo-item-name">
  143. <view class="shuo-label">
  144. 生产企业:
  145. </view>
  146. <view class="shuo-cont">
  147. {{item.prodEntp}}
  148. </view>
  149. </view>
  150. </view>
  151. <view class="inventory-item">
  152. <view class="shuo-item">
  153. <view class="shuo-label">
  154. 所在库房:
  155. </view>
  156. <view class="shuo-cont">
  157. {{stromName}}
  158. </view>
  159. </view>
  160. <view class="shuo-item">
  161. <view class="shuo-label">
  162. 所在货位:
  163. </view>
  164. <view class="shuo-cont">
  165. {{item.cgoLocName}}
  166. </view>
  167. </view>
  168. </view>
  169. <view class="inventory-item">
  170. <view class="shuo-item">
  171. <view class="shuo-label">
  172. 应在库:
  173. </view>
  174. <view class="shuo-label-green">
  175. {{item.invCnt}}
  176. </view>
  177. </view>
  178. <view class="shuo-item">
  179. <view class="shuo-label">
  180. 实在库:
  181. </view>
  182. <view class="shuo-label-green">
  183. {{item.intrCnt}}
  184. </view>
  185. </view>
  186. </view>
  187. <view class="inventory-item">
  188. <view class="shuo-item">
  189. <view class="shuo-label">
  190. 盈:
  191. </view>
  192. <view class="shuo-label-green">
  193. {{item.profitCnt}}
  194. </view>
  195. </view>
  196. <view class="shuo-item">
  197. <view class="shuo-label">
  198. 亏:
  199. </view>
  200. <view class="shuo-label-green">
  201. {{item.lsCnt}}
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. </z-paging>
  207. </view>
  208. </template>
  209. <script>
  210. import {
  211. mapState,
  212. mapMutations,
  213. mapActions
  214. } from 'vuex';
  215. import moment from "moment";
  216. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  217. const paging = {
  218. current: 1,
  219. size: 10000
  220. };
  221. export default {
  222. mixins: [ZPMixin],
  223. data() {
  224. return {
  225. index: 0,
  226. tabList: ['盈', '亏', '对平'],
  227. listData: [],
  228. detailsData: [],
  229. type: 2,
  230. dataList: []
  231. }
  232. },
  233. computed: {
  234. ...mapState([])
  235. },
  236. onShow() {
  237. let that = this;
  238. this.$forceUpdate();
  239. uni.getStorage({
  240. key: 'Inventorydetails',
  241. success: function(res) {
  242. that.listData = [
  243. res.data
  244. ];
  245. }
  246. });
  247. },
  248. mounted() {
  249. },
  250. methods: {
  251. ...mapActions(['getInvenResultData']),
  252. ...mapMutations(['']),
  253. async queryList(pageNo, pageSize) {
  254. await this.getInvenResultData({
  255. pam: {
  256. current: pageNo,
  257. size: pageSize,
  258. intrNo: this.listData[0].intrNo,
  259. intrType: this.type
  260. },
  261. that: this
  262. });
  263. },
  264. //日期格式化
  265. forMatTime(time) {
  266. return moment(time).format("YYYY-MM-DD");
  267. },
  268. changeTab(e) {
  269. let intype = null;
  270. if (e == 0) {
  271. intype = 2
  272. }
  273. if (e == 1) {
  274. intype = 3
  275. }
  276. if (e == 2) {
  277. intype = 1
  278. }
  279. this.type = intype;
  280. this.$refs.paging.reload();
  281. }
  282. },
  283. watch: {
  284. }
  285. }
  286. </script>
  287. <style lang="scss" scoped>
  288. .query-wrap {
  289. width: 100%;
  290. padding: 20rpx;
  291. box-sizing: border-box;
  292. background-color: #F1F1F1;
  293. position: relative;
  294. .botm-btn {
  295. width: 100%;
  296. height: 120rpx;
  297. background-color: #fff;
  298. position: fixed;
  299. left: 0;
  300. bottom: 0;
  301. padding-top: 40rpx;
  302. }
  303. .time-view {
  304. height: 350rpx;
  305. background-color: #fff;
  306. padding: 50rpx 50rpx 0 50rpx;
  307. box-sizing: border-box;
  308. .btn-view {
  309. width: 100%;
  310. height: 100rpx;
  311. margin-top: 100rpx;
  312. display: flex;
  313. justify-content: space-around;
  314. }
  315. }
  316. }
  317. uni-page-body {
  318. width: 100%;
  319. height: 100%;
  320. }
  321. </style>