scanning_result_seimin.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view class="Scanning_Result_seimin">
  3. <view class="Scanning_top" v-if="queryObj.status == 200">
  4. <view class="Scanning_top_icon">
  5. <text class="cubeic-ok icon_transport transport-duigou"></text>
  6. </view>
  7. <view class="Scanning_top_text">
  8. <view class="text1"> 操作成功 </view>
  9. </view>
  10. </view>
  11. <view class="Scanning_top" v-if="queryObj.status != 200">
  12. <view class="Scanning_top_icon">
  13. <text class="cubeic-close icon_transport transport-shibai"></text>
  14. </view>
  15. <view class="Scanning_top_text">
  16. <view class="text1"> 操作失败 </view>
  17. </view>
  18. </view>
  19. <view class="Scanning_cont" v-if="queryObj.status == 200">
  20. <view> 药包编码 : #{{ queryObj.packid }} </view>
  21. <view v-if="queryObj.account"> 交接人账号 : {{ queryObj.account }} </view>
  22. <view v-if="queryObj.accountName">
  23. 交接人姓名 : {{ queryObj.accountName }}
  24. </view>
  25. <view> 所属科室 : {{ queryObj.targetDept || "-" }} </view>
  26. </view>
  27. <view class="Scanning_cont" v-if="queryObj.status != 200">
  28. <view class="Scanning_cont_center">
  29. {{ queryObj.msg }}
  30. </view>
  31. </view>
  32. <view class="foot_btn">
  33. <view class="btn3" @click="showAlert()"> 知道了 </view>
  34. <view class="btn3" @click="toDrugBatches(queryObj.batchNo)" v-if="taskTypeConfig.drugsBatchInfo == 1"> 药品批次 </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { post, webHandle } from "../../http/http.js";
  40. export default {
  41. data() {
  42. return {
  43. hosId: null,
  44. options: {},
  45. queryObj: {},
  46. taskTypeConfig: {},
  47. };
  48. },
  49. methods: {
  50. // 跳转到药品批次页面
  51. toDrugBatches(batchNo){
  52. uni.navigateTo({
  53. url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
  54. });
  55. },
  56. // 知道了
  57. showAlert() {
  58. uni.navigateTo({
  59. url: "../receiptpage/receiptpage",
  60. });
  61. },
  62. // 判断药品页面控制-是否显示关联批次药品
  63. isShowDrugsBatchInfo(){
  64. uni.showLoading({
  65. title: "加载中",
  66. mask: true,
  67. });
  68. post("/simple/data/fetchDataList/taskType", {
  69. "idx": 0,
  70. "sum": 10,
  71. "taskType": {
  72. "simpleQuery": true,
  73. "hosId": {
  74. "id": this.hosId
  75. },
  76. "associationType": {
  77. "key": "association_types",
  78. "value": "drugsBag"
  79. }
  80. }
  81. }).then((res) => {
  82. if (res.status == 200) {
  83. res.list = res.list || [];
  84. let taskType = res.list[0] || {};
  85. if(taskType.id){
  86. post("/simple/data/fetchDataList/taskTypeConfig", {
  87. "idx": 0,
  88. "sum": 10,
  89. "taskTypeConfig": {
  90. "taskTypeDTO": {
  91. "hosId": {
  92. "id": this.hosId
  93. },
  94. "associationType": taskType.associationType
  95. }
  96. }
  97. }).then((res) => {
  98. if (res.status == 200) {
  99. res.list = res.list || [];
  100. this.taskTypeConfig = res.list[0] || {};
  101. uni.hideLoading();
  102. } else {
  103. uni.hideLoading();
  104. uni.showToast({
  105. icon: "none",
  106. title: "请求失败!",
  107. });
  108. }
  109. });
  110. }else{
  111. uni.hideLoading();
  112. uni.showToast({
  113. icon: "none",
  114. title: "请配置药品业务类型!",
  115. });
  116. }
  117. } else {
  118. uni.hideLoading();
  119. uni.showToast({
  120. icon: "none",
  121. title: "请求失败!",
  122. });
  123. }
  124. });
  125. },
  126. },
  127. onLoad(options) {
  128. this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
  129. console.log(options, "result");
  130. this.options = options;
  131. this.isShowDrugsBatchInfo();
  132. this.queryObj = JSON.parse(this.options.info);
  133. // #ifdef APP-PLUS
  134. webHandle("no", "app");
  135. // #endif
  136. // #ifdef H5
  137. webHandle("no", "wx");
  138. // #endif
  139. },
  140. };
  141. </script>
  142. <style lang="less">
  143. .Scanning_Result_seimin {
  144. padding: 0 20rpx;
  145. .Scanning_top {
  146. .Scanning_top_icon {
  147. width: 140rpx;
  148. height: 140rpx;
  149. margin: 0 auto;
  150. margin-top: 116rpx;
  151. border-radius: 50%;
  152. line-height: 140rpx;
  153. .cubeic-ok {
  154. font-size: 140rpx;
  155. color: #35b34a;
  156. }
  157. .cubeic-close {
  158. font-size: 140rpx;
  159. color: #ff3b53;
  160. }
  161. }
  162. .Scanning_top_text {
  163. .text1 {
  164. margin-top: 40rpx;
  165. font-size: 48rpx;
  166. text-align: center;
  167. }
  168. .success_tips {
  169. color: red;
  170. font-size: 30rpx;
  171. }
  172. }
  173. }
  174. .Scanning_cont {
  175. font-size: 32rpx;
  176. text-align: center;
  177. view {
  178. margin-bottom: 16rpx;
  179. }
  180. .Scanning_cont_center {
  181. text-align: center;
  182. }
  183. .text {
  184. margin-top: 24rpx;
  185. color: #35b34a;
  186. }
  187. .text1 {
  188. margin-top: 24rpx;
  189. color: #ff3b53;
  190. }
  191. }
  192. .foot_btn {
  193. line-height: 88rpx;
  194. height: 100rpx;
  195. margin-top: 40rpx;
  196. display: flex;
  197. justify-content: center;
  198. .btn1,
  199. .btn2,
  200. .btn3 {
  201. height: 88rpx;
  202. flex: 1;
  203. margin: 0 1%;
  204. background-image: linear-gradient(to right, #72c172, #3bb197);
  205. color: #fff;
  206. border-radius: 8rpx;
  207. font-size: 32rpx;
  208. margin-top: 16rpx;
  209. text-align: center;
  210. }
  211. }
  212. }
  213. </style>