index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view class="query-wrap">
  3. <view class="title-cont">
  4. <view class="search-view">
  5. <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入订单号"
  6. @input="input">
  7. </uni-easyinput>
  8. </view>
  9. <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
  10. </view>
  11. <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
  12. <view class="inner-item" v-for="(item,index) in dataList" :key="index" @click="itemDetails(item)">
  13. <view class="item-stats">
  14. <span>{{item.stas}}</span>
  15. </view>
  16. <view class="inventory-item">
  17. <view class="shuo-item-name">
  18. <view class="shuo-label">
  19. 订单号:
  20. </view>
  21. <view class="shuo-unit">
  22. {{item.ordNo}}
  23. </view>
  24. </view>
  25. </view>
  26. <view class="inventory-item">
  27. <view class="shuo-item">
  28. <view class="shuo-label">
  29. 申领品种数:
  30. </view>
  31. <view class="shuo-cont">
  32. {{item.catCnt}}
  33. </view>
  34. </view>
  35. <view class="shuo-item">
  36. <view class="shuo-label">
  37. 申领总数量:
  38. </view>
  39. <view class="shuo-cont">
  40. {{item.sumCnt}}
  41. </view>
  42. </view>
  43. </view>
  44. <view class="inventory-item">
  45. <view class="shuo-item">
  46. <view class="shuo-label">
  47. 手术名称:
  48. </view>
  49. <view class="shuo-cont">
  50. {{item.oprnName}}
  51. </view>
  52. </view>
  53. <view class="shuo-item">
  54. <view class="shuo-label">
  55. 手术间:
  56. </view>
  57. <view class="shuo-cont">
  58. {{item.oprtRoom}}
  59. </view>
  60. </view>
  61. </view>
  62. <view class="inventory-item">
  63. <view class="shuo-item">
  64. <view class="shuo-label">
  65. 主治医生:
  66. </view>
  67. <view class="shuo-cont">
  68. {{item.atddr}}
  69. </view>
  70. </view>
  71. <view class="shuo-item">
  72. <view class="shuo-label">
  73. 患者名称:
  74. </view>
  75. <view class="shuo-cont">
  76. {{item.patn}}
  77. </view>
  78. </view>
  79. </view>
  80. <view class="inventory-item">
  81. <view class="shuo-item-name">
  82. <view class="shuo-label">
  83. 手术日期:
  84. </view>
  85. <view class="shuo-cont">
  86. {{item.oprtTime}}
  87. </view>
  88. </view>
  89. </view>
  90. <view class="inventory-item">
  91. <view class="shuo-item">
  92. <view class="shuo-label">
  93. 申领人:
  94. </view>
  95. <view class="shuo-cont">
  96. {{item.crteUsrName}}
  97. </view>
  98. </view>
  99. <view class="shuo-item">
  100. <view class="shuo-label">
  101. 申领时间:
  102. </view>
  103. <view class="shuo-cont">
  104. {{forMatTime(item.crteTime)}}
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </z-paging>
  110. </view>
  111. </template>
  112. <script>
  113. import {
  114. mapState,
  115. mapMutations,
  116. mapActions
  117. } from 'vuex';
  118. import {
  119. debounce
  120. } from 'lodash';
  121. import moment from "moment";
  122. import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
  123. export default {
  124. mixins: [ZPMixin],
  125. data() {
  126. return {
  127. index: 0,
  128. value: "",
  129. dataList: [],
  130. inputVal: "",
  131. codeVal: "",
  132. confirmVal: "",
  133. changeVal: "",
  134. classes: [],
  135. listData: [],
  136. tabList: ['待清台', '已清台'],
  137. valueList: 0,
  138. beforeClose: true,
  139. datetimesingle: [],
  140. }
  141. },
  142. computed: {
  143. // ...mapState(['groundData'])
  144. },
  145. onShow() {
  146. uni.$once('update', function(data) {
  147. // uni.redirectTo({
  148. // url: '/pages/grounding/grounding' //写你的路径
  149. // });
  150. })
  151. },
  152. mounted() {
  153. var pages = getCurrentPages();
  154. let currentRoute = pages[pages.length - 1].route
  155. },
  156. methods: {
  157. ...mapActions(['getFollowData']),
  158. ...mapMutations(['setAcceptDetaData']),
  159. async queryList(pageNo, pageSize) {
  160. await this.getFollowData({
  161. pam: {
  162. current: pageNo,
  163. size: pageSize,
  164. ordNo: this.value,
  165. stas: this.index == '0' ? 'C' : 'D'
  166. },
  167. that: this
  168. });
  169. },
  170. //日期格式化
  171. forMatTime(time) {
  172. return moment(time).format("YYYY-MM-DD");
  173. },
  174. //跳转清台详情
  175. itemDetails(item) {
  176. uni.setStorage({
  177. key: 'followplatdetail',
  178. data: {
  179. form: item,
  180. type: '3'
  181. }
  182. });
  183. uni.navigateTo({
  184. url: '/pages/followplatdetail/index',
  185. success: function(res) {
  186. console.log(res, "res")
  187. }
  188. });
  189. },
  190. input:debounce(function(e) {
  191. this.value = e;
  192. this.getFollowData({
  193. pam: {
  194. ordNo: this.value,
  195. stas: this.index == '0' ? 'C' : 'D'
  196. },
  197. that: this
  198. });
  199. },500),
  200. changeTab(index) {
  201. this.index = index;
  202. this.$refs.paging.reload();
  203. },
  204. },
  205. watch: {
  206. }
  207. }
  208. </script>
  209. <style lang="scss" scoped>
  210. .query-wrap {
  211. width: 100%;
  212. padding: 20rpx;
  213. box-sizing: border-box;
  214. background-color: #F1F1F1;
  215. overflow-y: scroll;
  216. overflow-x: hidden;
  217. .time-view {
  218. height: 350rpx;
  219. background-color: #fff;
  220. padding: 50rpx 50rpx 0 50rpx;
  221. box-sizing: border-box;
  222. .btn-view {
  223. width: 100%;
  224. height: 100rpx;
  225. margin-top: 100rpx;
  226. display: flex;
  227. justify-content: space-around;
  228. }
  229. }
  230. .title-cont {
  231. padding-top: 10rpx;
  232. width: 100%;
  233. background-color: #fff;
  234. .search-view {
  235. width: 100%;
  236. height: 100rpx;
  237. display: flex;
  238. align-items: center;
  239. padding: 0rpx 20rpx 0rpx 20rpx;
  240. box-sizing: border-box;
  241. .filter-text {
  242. width: 72rpx;
  243. height: 50rpx;
  244. line-height: 50rpx;
  245. color: rgba(1, 169, 146, 1);
  246. font-size: 36rpx;
  247. font-family: PingFangSC-bold;
  248. padding-left: 20rpx;
  249. }
  250. }
  251. }
  252. }
  253. uni-page-body {
  254. width: 100%;
  255. height: 100%;
  256. }
  257. </style>