list.vue 7.0 KB

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