list.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="Scanning_Result">
  3. <view class="Scanning_cont">
  4. <scroll-view scroll-y class="scrollContent">
  5. <view class="column" v-for="item in drugsBagList" :key="item.id" @click="toDetail(item.id)">
  6. <view class="head">
  7. <view class="name">{{item.packid}}</view>
  8. <view class="value">{{item.drugsState ? item.drugsState.name : ''}}</view>
  9. </view>
  10. <view class="body">
  11. <view class="bodyColumn" v-if="queryObj.showPatientInfo==1">
  12. <view class="name">姓名:{{item.patientNames ? item.patientNames : ''}}</view>
  13. </view>
  14. <view class="bodyColumn">
  15. <view class="name">种类数:{{item.drugsTypeCount}}</view>
  16. <view class="value">总数:{{item.drugsCount}}</view>
  17. </view>
  18. <view class="bodyColumn">
  19. <view class="name">收取人:<template v-if="item.startLog">{{item.startLog.username}}</template></view>
  20. <view class="value">收取时间:<template v-if="item.startLog">{{item.startLog.operationTime | formatDate('yyyy-MM-dd hh:mm')}}</template></view>
  21. </view>
  22. <view class="bodyColumn">
  23. <view class="name">送达人:<template v-if="item.endLog">{{item.endLog.username}}</template></view>
  24. <view class="value">送达时间:<template v-if="item.endLog">{{item.endLog.operationTime | formatDate('yyyy-MM-dd hh:mm')}}</template></view>
  25. </view>
  26. <view class="bodyColumn">
  27. <view class="name">收取交接人:<template v-if="item.startLog">{{item.startLog.handoverName}}</template></view>
  28. <view class="name">送达交接人:<template v-if="item.endLog">{{item.endLog.handoverName}}</template></view>
  29. </view>
  30. </view>
  31. </view>
  32. </scroll-view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. get,
  39. post,
  40. SM,
  41. webHandle
  42. } from "@/http/http.js";
  43. export default {
  44. data() {
  45. return {
  46. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  47. drugsBagList: [], //药包列表
  48. queryObj: {}, //路由传递过来的数据
  49. workOrder: {}, //工单信息
  50. config: {}, //配置
  51. };
  52. },
  53. methods: {
  54. // 详情
  55. toDetail(drugsBagId){
  56. uni.navigateTo({
  57. url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}&showPatientInfo=${this.queryObj.showPatientInfo}`,
  58. });
  59. },
  60. //获取页面信息
  61. getInfo(){
  62. uni.showLoading({
  63. title: "加载中",
  64. mask: true,
  65. });
  66. post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId}).then(res => {
  67. uni.hideLoading();
  68. if(res.state == 200){
  69. if(res.data){
  70. this.drugsBagList = res.data.drugsBagList || [];
  71. this.workOrder = res.data.workOrder || {};
  72. }
  73. }else{
  74. uni.showToast({
  75. icon: "none",
  76. title: res.msg || "接口获取数据失败!",
  77. });
  78. }
  79. })
  80. },
  81. },
  82. onLoad(options) {
  83. console.log(options, "options");
  84. this.queryObj = options;
  85. this.getInfo();
  86. // #ifdef APP-PLUS
  87. webHandle("no", "app");
  88. // #endif
  89. // #ifdef H5
  90. webHandle("no", "wx");
  91. // #endif
  92. },
  93. };
  94. </script>
  95. <style lang="less" scoped>
  96. .Scanning_Result {
  97. background: #F7F7F7;
  98. display: flex;
  99. flex-direction: column;
  100. height: 100vh;
  101. .Scanning_top {
  102. margin: 32rpx auto;
  103. .Scanning_top_icon {
  104. font-size: 30rpx;
  105. font-weight: bold;
  106. .newicon{
  107. margin: 0 32rpx;
  108. }
  109. }
  110. }
  111. .Scanning_top_tips{
  112. display: flex;
  113. align-items: center;
  114. justify-content: center;
  115. font-size: 28rpx;
  116. margin-bottom: 32rpx;
  117. gap: 64rpx;
  118. }
  119. .Scanning_cont {
  120. flex: 1;
  121. min-height: 0;
  122. display: flex;
  123. flex-direction: column;
  124. .scrollContent{
  125. flex: 1;
  126. min-height: 0;
  127. overflow: hidden;
  128. }
  129. .column{
  130. background: #FFFFFF;
  131. font-size: 24rpx;
  132. margin-bottom: 16rpx;
  133. .head{
  134. padding: 24rpx;
  135. display: flex;
  136. justify-content: space-between;
  137. align-content: center;
  138. border-bottom: 1rpx solid #D2D2D2;
  139. font-weight: bold;
  140. }
  141. .body{
  142. padding: 24rpx;
  143. .bodyColumn{
  144. display: flex;
  145. justify-content: space-between;
  146. align-content: center;
  147. margin-top: 24rpx;
  148. &:first-of-type{
  149. margin-top: 0;
  150. }
  151. .value{
  152. text-align: left;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. .foot_btn_spe {
  159. margin: 24rpx 0;
  160. display: flex;
  161. flex-direction: column;
  162. align-items: center;
  163. gap: 24rpx;
  164. font-weight: bold;
  165. .column{
  166. width: 100%;
  167. height: 78rpx;
  168. display: flex;
  169. align-items: center;
  170. justify-content: space-between;
  171. gap: 24rpx;
  172. .btn {
  173. height: 100%;
  174. flex: 1;
  175. background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
  176. color: #fff;
  177. border-radius: 4rpx;
  178. font-size: 30rpx;
  179. display: flex;
  180. justify-content: center;
  181. align-items: center;
  182. }
  183. }
  184. }
  185. }
  186. </style>