drugCredentials.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="userInfoTopFixe">
  5. <UserInfo :user-info="currentUser" bgClass="bgLinGra"></UserInfo>
  6. </view>
  7. <view class="content_inner" v-if="!showNoData">
  8. <view class="prescription_list" v-if="list.length > 0" v-for="(item, index) in list" :key="index" @click="jumpQueryPatient(item)">
  9. <view class="title_box border_bottom">
  10. <text class="title_text">{{item.ClassName}}</text>
  11. <view class="voucher_box">
  12. <text class="colorCustom">取药凭证</text>
  13. <image class="arrow" :src="iconUrl.icon_rightGreen"></image>
  14. </view>
  15. </view>
  16. <view class="take_medicine_box">
  17. <view class="take_medicine_item border_bottom" v-for="(subItem, subIndex) in item.Data_1" :key="subIndex">
  18. <view class="take_medicine_info">
  19. <view class="drug_name_box displayFlexBetween">
  20. <view class="drug_name_child displayFlexBetween">
  21. <view>{{subItem.Project}}</view>
  22. <view>x{{subItem.Number}}</view>
  23. </view>
  24. <text class="take_medicine_num">¥{{subItem.SumOfMoney/100}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="money_box_bottom border_top">
  30. <text>小计:</text>
  31. <text>¥{{getSum(item.Data_1)}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view v-else class="noData">
  36. <NoData :value="noDataValue"></NoData>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup lang="ts">
  42. import { ref, getCurrentInstance } from 'vue';
  43. import { useOnLoad } from '@dcloudio/uni-app';
  44. import { common } from '@/utils';
  45. import icon from '@/utils/icon';
  46. import { queryDrugQueueList } from '@/pagesPatient/service/prescriptionManagement';
  47. import UserInfo from '@/pagesPersonal/st1/components/userInfo/userInfo.vue';
  48. import NoData from '@/pages/st1/components/noData/noData.vue';
  49. const { proxy } = getCurrentInstance() as any;
  50. const app = getApp();
  51. const iconUrl = ref(icon);
  52. const currentUser = ref<any>({});
  53. const list = ref<any[]>([]);
  54. const showNoData = ref(false);
  55. const noDataValue = ref('暂无取药信息');
  56. useOnLoad((options) => {
  57. currentUser.value = app.globalData.currentUser;
  58. main();
  59. });
  60. const refresh = () => {
  61. main();
  62. };
  63. const main = async () => {
  64. let queryData = {
  65. HosId: app.globalData.hosId,
  66. MemberId: currentUser.value.memberId,
  67. CardType: currentUser.value.cardType,
  68. CardNo: currentUser.value.cardNo,
  69. Store: {
  70. cardEncryptionStore: currentUser.value.encryptionStore || '',
  71. baseMemberEncryptionStore: currentUser.value.baseMemberEncryptionStore
  72. }
  73. };
  74. let { resp } = await queryDrugQueueList(queryData);
  75. let dataList: any[] = [];
  76. let isNoData = true;
  77. if (!common.isEmpty(resp)) {
  78. dataList = resp;
  79. isNoData = false;
  80. }
  81. list.value = dataList;
  82. showNoData.value = isNoData;
  83. };
  84. const jumpQueryPatient = (item: any) => {
  85. common.goToUrl(`/pagesPatient/st1/business/prescriptionManagement/drugCredentialsDetails/drugCredentialsDetails?queryBean=${JSON.stringify(item)}`);
  86. };
  87. const getSum = (list: any[]) => {
  88. let num = 0;
  89. if (list && list.length > 0) {
  90. for (let i = 0; i < list.length; i++) {
  91. num += Number(list[i].SumOfMoney || 0);
  92. }
  93. }
  94. return num / 100;
  95. };
  96. </script>
  97. <style lang="scss">
  98. .content_inner {
  99. padding: 220upx 30upx 0;
  100. }
  101. .prescription_list {
  102. background: white;
  103. margin-bottom: 30upx;
  104. border-radius: 24upx;
  105. }
  106. .prescription_list:last-child {
  107. margin-bottom: 0 !important;
  108. }
  109. .title_box {
  110. padding: 0 30upx;
  111. height: 112upx;
  112. box-sizing: border-box;
  113. display: flex;
  114. flex-direction: row;
  115. justify-content: space-between;
  116. align-items: center;
  117. }
  118. .title_text {
  119. font-size: 32upx;
  120. font-weight: bold;
  121. color: #333;
  122. }
  123. .voucher_box {
  124. display: flex;
  125. flex-direction: row;
  126. justify-content: space-between;
  127. align-items: center;
  128. }
  129. .voucher_box text {
  130. font-size: 30upx;
  131. margin-right: 16upx;
  132. }
  133. .take_medicine_box {
  134. padding-left: 30upx;
  135. box-sizing: border-box;
  136. }
  137. .take_medicine_item {
  138. padding: 22upx 30upx 26upx 0;
  139. display: flex;
  140. flex-direction: row;
  141. justify-content: space-between;
  142. align-items: flex-start;
  143. }
  144. .take_medicine_info {
  145. width: 100%;
  146. }
  147. .take_medicine_info view:nth-child(1) {
  148. font-size: 30upx;
  149. color: #333;
  150. line-height: 50upx;
  151. }
  152. .take_medicine_info view:nth-child(2) {
  153. font-size: 24upx;
  154. color: #999;
  155. margin-top: 2upx;
  156. }
  157. .take_medicine_info view:nth-child(3) {
  158. font-size: 30upx;
  159. color: #ff3434;
  160. }
  161. .drug_name_box view:nth-child(1) {
  162. width: 80%;
  163. }
  164. .drug_name_box view:nth-child(2) {
  165. font-size: 30upx;
  166. color: #999;
  167. margin: 0;
  168. }
  169. .take_medicine_num {
  170. font-size: 30upx;
  171. color: #333;
  172. }
  173. .money_box_bottom {
  174. width: 100%;
  175. height: 100upx;
  176. padding: 0 30upx;
  177. box-sizing: border-box;
  178. display: flex;
  179. flex-direction: row;
  180. justify-content: flex-end;
  181. align-items: center;
  182. }
  183. .money_box_bottom text:nth-child(1) {
  184. font-size: 32upx;
  185. color: #333;
  186. font-weight: 0 !important;
  187. }
  188. .money_box_bottom text:nth-child(2) {
  189. font-size: 32upx;
  190. color: #ff3434;
  191. font-weight: 0 !important;
  192. }
  193. .arrow{
  194. margin-right: 0;
  195. }
  196. </style>