index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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 ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  17. <view
  18. class="inner-item"
  19. v-for="(item, indx) in dataList"
  20. :key="indx"
  21. @click="itemDetails(item)"
  22. >
  23. <view class="item-stats">
  24. <span v-if="item.stas == 'A'">未调价</span>
  25. <span v-if="item.stas == 'B'">调价中</span>
  26. <span v-if="item.stas == 'D'">已调价</span>
  27. </view>
  28. <view class="inventory-item" style="margin-top: 40rpx">
  29. <view class="shuo-item-name">
  30. <view class="shuo-label-podnme"> 药品名称: </view>
  31. <view class="shuo-unit">
  32. <span>{{ item.drugName }}</span>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="inventory-item">
  37. <view class="shuo-item-name">
  38. <view class="shuo-label"> 药品编码: </view>
  39. <view class="shuo-unit">
  40. {{ item.drugListId }}
  41. </view>
  42. </view>
  43. </view>
  44. <view class="inventory-item">
  45. <view class="shuo-item-name">
  46. <view class="shuo-label"> 医保编码: </view>
  47. <view class="shuo-unit">
  48. {{ item.natDrugNo }}
  49. </view>
  50. </view>
  51. </view>
  52. <view class="inventory-item">
  53. <view class="shuo-item">
  54. <view class="shuo-label"> 是否集采: </view>
  55. <view class="shuo-cont">
  56. {{ item.isFas }}
  57. </view>
  58. </view>
  59. <view class="shuo-item">
  60. <view class="shuo-label"> 药品剂型: </view>
  61. <view class="shuo-cont">
  62. {{ item.dosformName }}
  63. </view>
  64. </view>
  65. </view>
  66. <view class="inventory-item">
  67. <view class="shuo-item">
  68. <view class="shuo-label"> 集采批次: </view>
  69. <view class="shuo-cont">
  70. {{ item.fasBtch || "" }}
  71. </view>
  72. </view>
  73. </view>
  74. <view class="inventory-item">
  75. <view class="shuo-item-name">
  76. <view class="shuo-label"> 药品规格: </view>
  77. <view class="shuo-cont">
  78. {{
  79. "【" +
  80. item.specName +
  81. "*" +
  82. item.convrat +
  83. item.pac +
  84. "/" +
  85. item.pacUnt +
  86. "】"
  87. }}
  88. </view>
  89. </view>
  90. </view>
  91. <view class="inventory-item">
  92. <view class="shuo-item-name">
  93. <view class="shuo-label"> 是否基药: </view>
  94. <view class="shuo-cont">
  95. {{ item.essdrugType }}
  96. </view>
  97. </view>
  98. </view>
  99. <view class="inventory-item">
  100. <view class="shuo-item-name">
  101. <view class="shuo-label"> 配送企业: </view>
  102. <view class="shuo-cont">
  103. {{ item.splerName }}
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </z-paging>
  109. </view>
  110. </template>
  111. <script>
  112. import { mapState, mapMutations, mapActions } from "vuex";
  113. import { debounce } from "lodash";
  114. import moment from "moment";
  115. import ZPMixin from "@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js";
  116. import UnidatetimePicker from "@/consumablespkg/components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue";
  117. export default {
  118. components: {
  119. UnidatetimePicker,
  120. },
  121. mixins: [ZPMixin],
  122. data() {
  123. return {
  124. index: 0,
  125. value: "",
  126. dataList: [],
  127. datetimesingle: [],
  128. };
  129. },
  130. computed: {
  131. ...mapState(["instData"]),
  132. },
  133. methods: {
  134. async queryList(pageNo, pageSize) {
  135. await this.$http(
  136. "drugHospital.getPurcOrd",
  137. {
  138. current: pageNo,
  139. size: pageSize,
  140. spdId: this.instData.spdId,
  141. id: this.value,
  142. },
  143. "加载中"
  144. ).then((res) => {
  145. if (res && res.data) {
  146. this.$refs.paging.complete(res.data);
  147. }
  148. });
  149. },
  150. //筛选时间
  151. filterTime() {
  152. this.$refs.popup.open("bottom");
  153. },
  154. forMatTime(row) {
  155. return moment(row).format("YYYY-MM-DD HH:mm");
  156. },
  157. // 日期重置
  158. reset() {
  159. this.datetimesingle = [];
  160. },
  161. //日期确定按钮
  162. btnConfirm() {
  163. this.$refs.popup.close();
  164. this.$refs.paging.reload();
  165. },
  166. //跳转订单详情
  167. itemDetails(item) {
  168. uni.setStorage({
  169. key: "puhseOrderDetail",
  170. data: item,
  171. });
  172. uni.navigateTo({
  173. url: "/consumablespkg/pages/tableContents/details/index",
  174. success: function (res) {
  175. console.log(res, "res");
  176. },
  177. });
  178. },
  179. input: debounce(function (e) {
  180. this.value = e;
  181. this.$refs.paging.reload();
  182. }, 500),
  183. iconClick(e) {
  184. console.log(e, "点击搜索拿到的数据");
  185. },
  186. blur(e) {
  187. this.$nextTick(() => {});
  188. },
  189. changeTab(index) {
  190. this.index = index;
  191. this.$refs.paging.reload();
  192. },
  193. },
  194. watch: {},
  195. };
  196. </script>
  197. <style lang="scss" scoped>
  198. .query-wrap {
  199. width: 100%;
  200. padding: 20rpx;
  201. box-sizing: border-box;
  202. background-color: #f1f1f1;
  203. overflow-y: scroll;
  204. overflow-x: hidden;
  205. }
  206. uni-page-body {
  207. width: 100%;
  208. height: 100%;
  209. }
  210. .time-view {
  211. height: 350rpx;
  212. background-color: #fff;
  213. padding: 50rpx 50rpx 0 50rpx;
  214. box-sizing: border-box;
  215. .btn-view {
  216. width: 100%;
  217. height: 100rpx;
  218. margin-top: 100rpx;
  219. display: flex;
  220. justify-content: space-around;
  221. }
  222. }
  223. .search-view {
  224. width: 100%;
  225. height: 100rpx;
  226. display: flex;
  227. align-items: center;
  228. padding: 0rpx 20rpx 0rpx 20rpx;
  229. box-sizing: border-box;
  230. .filter-text {
  231. width: 72rpx;
  232. height: 50rpx;
  233. line-height: 50rpx;
  234. color: rgba(1, 169, 146, 1);
  235. font-size: 36rpx;
  236. font-family: PingFangSC-bold;
  237. padding-left: 20rpx;
  238. }
  239. }
  240. .item-stats {
  241. margin-top: 80rpx;
  242. }
  243. .card {
  244. background: #fff;
  245. border-radius: 20rpx;
  246. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  247. padding: 0;
  248. margin-bottom: 20rpx;
  249. }
  250. .search-view uni-easyinput {
  251. width: 100% !important;
  252. flex: 1 !important;
  253. }
  254. </style>