list.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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" v-if="config.showDrugsBagTypeCount == 1">
  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 class="foot_btn_spe">
  35. <view class="column">
  36. <view class="btn" @click="goBack()">返回</view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. get,
  44. post,
  45. SM,
  46. webHandle
  47. } from "@/http/http.js";
  48. export default {
  49. data() {
  50. return {
  51. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  52. drugsBagList: [], //药包列表
  53. queryObj: {}, //路由传递过来的数据
  54. workOrder: {}, //工单信息
  55. config: {}, //配置
  56. };
  57. },
  58. methods: {
  59. // 返回
  60. goBack(){
  61. uni.navigateBack()
  62. },
  63. // 详情
  64. toDetail(drugsBagId){
  65. if(this.config.showDrugsBagDetails != 1){
  66. return;
  67. }
  68. uni.navigateTo({
  69. url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}&showPatientInfo=${this.queryObj.showPatientInfo}`,
  70. });
  71. },
  72. //获取页面信息
  73. getInfo(){
  74. uni.showLoading({
  75. title: "加载中",
  76. mask: true,
  77. });
  78. let info$ = post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId});
  79. let config$ = post(`/simple/data/fetchDataList/taskTypeConfig`, {
  80. "idx": 0,
  81. "sum": 1,
  82. "taskTypeConfig": {
  83. "taskTypeDTO": {
  84. "hosId": {
  85. "id": this.hosId
  86. },
  87. "ordinaryField": {
  88. "key": "ordinary_field",
  89. "value": this.queryObj.drugsBagType
  90. }
  91. }
  92. }
  93. });
  94. Promise.all([info$, config$]).then(result => {
  95. uni.hideLoading();
  96. let [info, config] = result || [];
  97. if(info.state == 200){
  98. if(info.data){
  99. this.drugsBagList = info.data.drugsBagList || [];
  100. this.workOrder = info.data.workOrder || {};
  101. }
  102. }else{
  103. uni.showToast({
  104. icon: "none",
  105. title: info.msg || "接口获取数据失败!",
  106. });
  107. }
  108. if(config.status == 200){
  109. let list = config.list || [];
  110. this.config = list.length ? list[0] : {};
  111. }else{
  112. uni.showToast({
  113. icon: "none",
  114. title: config.msg || "接口获取数据失败!",
  115. });
  116. }
  117. })
  118. },
  119. },
  120. onLoad(options) {
  121. console.log(options, "options");
  122. this.queryObj = options;
  123. this.getInfo();
  124. // #ifdef APP-PLUS
  125. webHandle("no", "app");
  126. // #endif
  127. // #ifdef H5
  128. webHandle("no", "wx");
  129. // #endif
  130. },
  131. };
  132. </script>
  133. <style lang="less" scoped>
  134. .Scanning_Result {
  135. background: #F7F7F7;
  136. display: flex;
  137. flex-direction: column;
  138. height: 100vh;
  139. .Scanning_top {
  140. margin: 32rpx auto;
  141. .Scanning_top_icon {
  142. font-size: 30rpx;
  143. font-weight: bold;
  144. .newicon{
  145. margin: 0 32rpx;
  146. }
  147. }
  148. }
  149. .Scanning_top_tips{
  150. display: flex;
  151. align-items: center;
  152. justify-content: center;
  153. font-size: 28rpx;
  154. margin-bottom: 32rpx;
  155. gap: 64rpx;
  156. }
  157. .Scanning_cont {
  158. flex: 1;
  159. min-height: 0;
  160. display: flex;
  161. flex-direction: column;
  162. .scrollContent{
  163. flex: 1;
  164. min-height: 0;
  165. overflow: hidden;
  166. }
  167. .column{
  168. background: #FFFFFF;
  169. font-size: 24rpx;
  170. margin-bottom: 16rpx;
  171. .head{
  172. padding: 24rpx;
  173. display: flex;
  174. justify-content: space-between;
  175. align-content: center;
  176. border-bottom: 1rpx solid #D2D2D2;
  177. font-weight: bold;
  178. }
  179. .body{
  180. padding: 24rpx;
  181. .bodyColumn{
  182. display: flex;
  183. justify-content: space-between;
  184. align-content: center;
  185. margin-top: 24rpx;
  186. &:first-of-type{
  187. margin-top: 0;
  188. }
  189. .value{
  190. text-align: left;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. .foot_btn_spe {
  197. padding: 0 24rpx;
  198. margin: 24rpx 0;
  199. display: flex;
  200. flex-direction: column;
  201. align-items: center;
  202. gap: 24rpx;
  203. font-weight: bold;
  204. .column{
  205. width: 100%;
  206. height: 78rpx;
  207. display: flex;
  208. align-items: center;
  209. justify-content: space-between;
  210. gap: 24rpx;
  211. .btn {
  212. height: 100%;
  213. flex: 1;
  214. background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
  215. color: #fff;
  216. border-radius: 4rpx;
  217. font-size: 30rpx;
  218. display: flex;
  219. justify-content: center;
  220. align-items: center;
  221. }
  222. }
  223. }
  224. }
  225. </style>