index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="query-wrap">
  3. <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入采购单号" @iconClick="iconClick" @input="input">
  4. </uni-easyinput>
  5. <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
  6. <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  7. <view class="inner-item" v-for="(item,indx) in dataList" :key="indx" @click="itemDetails(item)">
  8. <view class="inventory-item">
  9. <view class="shuo-item-name">
  10. <view class="shuo-label-podnme">
  11. 采购订单号
  12. </view>
  13. <view class="shuo-unit">
  14. {{item.id}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="inventory-item">
  19. <view class="shuo-item">
  20. <view class="shuo-label">
  21. 采购品种数:
  22. </view>
  23. <view class="shuo-cont">
  24. {{item.detlCnt}}
  25. </view>
  26. </view>
  27. <view class="shuo-item">
  28. <view class="shuo-label">
  29. 采购总数量:
  30. </view>
  31. <view class="shuo-cont">
  32. {{item.qtySum}}
  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.purcAmt}}
  43. </view>
  44. </view>
  45. <view class="shuo-item">
  46. <view class="shuo-label">
  47. 来源机构:
  48. </view>
  49. <view class="shuo-cont">
  50. {{item.deptName||""}}
  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. <span v-if="item.purcType == '2'">{{ item.oprn }}</span>
  61. <span v-if="item.purcType == '1'">普通采购</span>
  62. </view>
  63. </view>
  64. <view class="shuo-item">
  65. <view class="shuo-label">
  66. 采购时间:
  67. </view>
  68. <view class="shuo-cont">
  69. {{forMatTime(item.docmkDate)}}
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </z-paging>
  75. </view>
  76. </template>
  77. <script>
  78. import {
  79. mapState,
  80. mapMutations,
  81. mapActions
  82. } from 'vuex';
  83. import {
  84. debounce
  85. } from 'lodash';
  86. import moment from "moment";
  87. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  88. export default {
  89. mixins: [ZPMixin],
  90. data() {
  91. return {
  92. index: 0,
  93. value1: "",
  94. value: "",
  95. dataList: [],
  96. inputVal: "",
  97. codeVal: "",
  98. confirmVal: "",
  99. changeVal: "",
  100. tabList: ['待确认', '已确认'],
  101. valueList: 0,
  102. beforeClose: true,
  103. itemData: {}
  104. }
  105. },
  106. computed: {
  107. ...mapState(['instData', 'userData']),
  108. },
  109. onShow() {
  110. uni.$once('update', function(data) {
  111. // uni.redirectTo({
  112. // url: '/pages/grounding/grounding' //写你的路径
  113. // });
  114. })
  115. },
  116. mounted() {
  117. },
  118. methods: {
  119. ...mapActions(['getTakingData']),
  120. async queryList(pageNo, pageSize) {
  121. let pamStas = this.index == "0" ? "A" : 'B';
  122. await this.getTakingData({
  123. pam: {
  124. current: pageNo,
  125. size: pageSize,
  126. spdId: this.instData.spdId,
  127. stas: pamStas,
  128. id: this.value
  129. },
  130. that: this
  131. })
  132. },
  133. forMatTime(row) {
  134. return moment(row).format("YYYY-MM-DD");
  135. },
  136. //跳转受理详情
  137. itemDetails(item) {
  138. uni.setStorage({
  139. key: 'orderTakDetailData',
  140. data: item
  141. });
  142. uni.navigateTo({
  143. url: '/subpkg/pages/mcs-order-taking/details',
  144. success: function(res) {
  145. console.log(res, "res")
  146. }
  147. });
  148. },
  149. input: debounce(function(e) {
  150. this.value = e;
  151. let pamStas = this.index == "0" ? "A" : 'B';
  152. this.getTakingData({
  153. pam: {
  154. spdId: this.instData.spdId,
  155. stas: pamStas,
  156. id: e
  157. },
  158. that: this
  159. })
  160. this.$nextTick(() => {
  161. // this.value = e;
  162. // this.inputVal = e;
  163. })
  164. }, 500),
  165. iconClick(e) {
  166. console.log(e, '点击搜索拿到的数据');
  167. },
  168. blur(e) {
  169. this.$nextTick(() => {
  170. // this.value = e.target.value;
  171. })
  172. },
  173. changeTab(index) {
  174. this.index = index;
  175. this.$refs.paging.reload();
  176. },
  177. handleShelf(item) {
  178. },
  179. changeList(e) {
  180. // console.log(e)
  181. },
  182. onchange(e) {
  183. // console.log(e, 44)
  184. },
  185. onnodeclick(node) {
  186. console.log(node, "node");
  187. },
  188. onpopupclosed(e) {
  189. // console.log(e, 33)
  190. }
  191. },
  192. watch: {
  193. }
  194. }
  195. </script>
  196. <style lang="scss" scoped>
  197. .query-wrap {
  198. width: 100%;
  199. padding: 20rpx;
  200. box-sizing: border-box;
  201. background-color: #F1F1F1;
  202. overflow-y: scroll;
  203. overflow-x: hidden;
  204. }
  205. uni-page-body {
  206. width: 100%;
  207. height: 100%;
  208. }
  209. </style>