index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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.purcAmt}}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="inventory-item">
  37. <view class="shuo-item-name">
  38. <view class="shuo-label">
  39. 来源机构:
  40. </view>
  41. <view class="shuo-cont">
  42. {{item.orgName}}
  43. </view>
  44. </view>
  45. </view>
  46. <view class="inventory-item">
  47. <view class="shuo-item">
  48. <view class="shuo-label">
  49. 计划类型:
  50. </view>
  51. <view class="shuo-cont">
  52. {{item.planType}}
  53. </view>
  54. </view>
  55. <view class="shuo-item">
  56. <view class="shuo-label">
  57. 采购时间:
  58. </view>
  59. <view class="shuo-cont">
  60. {{forMatTime(item.docmkDate)}}
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </z-paging>
  66. </view>
  67. </template>
  68. <script>
  69. import {
  70. mapState,
  71. mapMutations,
  72. mapActions
  73. } from 'vuex';
  74. import {
  75. debounce
  76. } from 'lodash';
  77. import moment from "moment";
  78. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  79. export default {
  80. mixins: [ZPMixin],
  81. data() {
  82. return {
  83. index: 0,
  84. value1: "",
  85. value: "",
  86. dataList: [],
  87. inputVal: "",
  88. codeVal: "",
  89. confirmVal: "",
  90. changeVal: "",
  91. tabList: ['待确认', '已确认'],
  92. valueList: 0,
  93. beforeClose: true,
  94. itemData: {}
  95. }
  96. },
  97. computed: {
  98. ...mapState(['instData', 'userData']),
  99. },
  100. onShow() {
  101. uni.$once('update', function(data) {
  102. // uni.redirectTo({
  103. // url: '/pages/grounding/grounding' //写你的路径
  104. // });
  105. })
  106. },
  107. mounted() {
  108. },
  109. methods: {
  110. ...mapActions(['getTakingData']),
  111. async queryList(pageNo, pageSize) {
  112. let pamStas = this.index == "0" ? "A" : 'B';
  113. await this.getTakingData({
  114. pam: {
  115. current: pageNo,
  116. size: pageSize,
  117. spdId: this.instData.spdId,
  118. stas: pamStas,
  119. id: this.value
  120. },
  121. that: this
  122. })
  123. },
  124. forMatTime(row) {
  125. return moment(row).format("YYYY-MM-DD");
  126. },
  127. //跳转受理详情
  128. itemDetails(item) {
  129. uni.setStorage({
  130. key: 'orderTakDetailData',
  131. data: item
  132. });
  133. uni.navigateTo({
  134. url: '/durgsubpkg/pages/order-taking/details',
  135. success: function(res) {
  136. console.log(res, "res")
  137. }
  138. });
  139. },
  140. input: debounce(function(e) {
  141. this.value = e;
  142. let pamStas = this.index == "0" ? "A" : 'B';
  143. this.getTakingData({
  144. pam: {
  145. spdId: this.instData.spdId,
  146. stas: pamStas,
  147. id: e
  148. },
  149. that: this
  150. })
  151. this.$nextTick(() => {
  152. // this.value = e;
  153. // this.inputVal = e;
  154. })
  155. }, 500),
  156. iconClick(e) {
  157. console.log(e, '点击搜索拿到的数据');
  158. },
  159. blur(e) {
  160. this.$nextTick(() => {
  161. // this.value = e.target.value;
  162. })
  163. },
  164. changeTab(index) {
  165. this.index = index;
  166. this.$refs.paging.reload();
  167. },
  168. handleShelf(item) {
  169. },
  170. changeList(e) {
  171. // console.log(e)
  172. },
  173. onchange(e) {
  174. // console.log(e, 44)
  175. },
  176. onnodeclick(node) {
  177. console.log(node, "node");
  178. },
  179. onpopupclosed(e) {
  180. // console.log(e, 33)
  181. }
  182. },
  183. watch: {
  184. }
  185. }
  186. </script>
  187. <style lang="scss" scoped>
  188. .query-wrap {
  189. width: 100%;
  190. padding: 20rpx;
  191. box-sizing: border-box;
  192. background-color: #F1F1F1;
  193. overflow-y: scroll;
  194. overflow-x: hidden;
  195. }
  196. uni-page-body {
  197. width: 100%;
  198. height: 100%;
  199. }
  200. </style>