list.vue 6.5 KB

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