list.vue 6.3 KB

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