index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="query-wrap">
  3. <view class="card">
  4. <view class="search-view">
  5. <uni-easyinput
  6. prefixIcon="search"
  7. :value="value"
  8. placeholder="请输入采购订单号"
  9. @iconClick="iconClick"
  10. @input="input"
  11. style="width: 100%; flex: 1"
  12. >
  13. </uni-easyinput>
  14. </view>
  15. </view>
  16. <z-paging
  17. ref="paging"
  18. @query="getData"
  19. v-model="filteredList"
  20. :use-page-scroll="true"
  21. >
  22. <view
  23. v-for="(item, index) in filteredList"
  24. :key="index"
  25. class="inner-item"
  26. @click="goDetail(item)"
  27. >
  28. <view class="item-stats">
  29. <span>{{ item.stasDes }}</span>
  30. </view>
  31. <view class="inventory-item">
  32. <view class="shuo-item">
  33. <view class="shuo-label"> 采购品种: </view>
  34. <view class="shuo-cont">
  35. {{ item.detlCnt || "" }}
  36. </view>
  37. </view>
  38. <view class="shuo-item">
  39. <view class="shuo-label"> 采购总数: </view>
  40. <view class="shuo-cont">
  41. {{ item.purcCntSum }}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="inventory-item">
  46. <view class="shuo-item">
  47. <view class="shuo-label"> 采购总额: </view>
  48. <view class="shuo-cont">
  49. {{ item.purcAmt || "" }}
  50. </view>
  51. </view>
  52. </view>
  53. <view class="inventory-item">
  54. <view class="shuo-item">
  55. <view class="shuo-label"> 来源机构: </view>
  56. <view class="shuo-cont">
  57. {{ item.orgName }}
  58. </view>
  59. </view>
  60. </view>
  61. <view class="inventory-item">
  62. <view class="shuo-item-name">
  63. <view class="shuo-label"> 采购时间: </view>
  64. <view class="shuo-cont">
  65. {{ item.docmkDate }}
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </z-paging>
  71. </view>
  72. </template>
  73. <script>
  74. import ZPMixin from "@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js";
  75. import { debounce } from "lodash";
  76. export default {
  77. mixins: [ZPMixin],
  78. data() {
  79. return {
  80. searchNo: "",
  81. currentTab: 0,
  82. filteredList: [],
  83. value: "",
  84. };
  85. },
  86. methods: {
  87. getData(pageNo, pageSize) {
  88. this.$http(
  89. "drugHospital.getApprList",
  90. {
  91. id: this.value,
  92. current: pageNo,
  93. size: pageSize,
  94. },
  95. "加载中"
  96. ).then((res) => {
  97. if (res && res.data) {
  98. this.$refs.paging.complete(res.data);
  99. }
  100. });
  101. },
  102. iconClick() {},
  103. input: debounce(function (e) {
  104. this.value = e;
  105. this.$refs.paging.reload();
  106. }, 500),
  107. changeTab(idx) {
  108. this.currentTab = idx;
  109. this.getData();
  110. },
  111. goDetail(item) {
  112. uni.setStorage({
  113. key: "planApprovalDetail",
  114. data: item,
  115. });
  116. uni.navigateTo({
  117. url:
  118. "/consumablespkg/pages/planApproval/details/index?activeTab=" + this.currentTab,
  119. });
  120. },
  121. },
  122. };
  123. </script>
  124. <style lang="scss" scoped>
  125. .query-wrap {
  126. width: 100%;
  127. padding: 20rpx;
  128. box-sizing: border-box;
  129. background-color: #f1f1f1;
  130. overflow-y: scroll;
  131. overflow-x: hidden;
  132. }
  133. uni-page-body {
  134. width: 100%;
  135. height: 100%;
  136. }
  137. .search-view {
  138. width: 100%;
  139. height: 100rpx;
  140. display: flex;
  141. align-items: center;
  142. padding: 0rpx 20rpx 0rpx 20rpx;
  143. box-sizing: border-box;
  144. .filter-text {
  145. width: 72rpx;
  146. height: 50rpx;
  147. line-height: 50rpx;
  148. color: rgba(1, 169, 146, 1);
  149. font-size: 36rpx;
  150. font-family: PingFangSC-bold;
  151. padding-left: 20rpx;
  152. }
  153. }
  154. .card {
  155. background: #fff;
  156. border-radius: 20rpx;
  157. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  158. padding: 0;
  159. margin-bottom: 20rpx;
  160. }
  161. .search-view uni-easyinput {
  162. width: 100% !important;
  163. flex: 1 !important;
  164. }
  165. </style>