order-card.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view class="container" @click="handleDetail">
  3. <view class="t">
  4. <view class="d1"></view>
  5. <view class="d2">
  6. <view class="dtim">时间:{{props.v.prescriptionTime}}</view>
  7. </view>
  8. <view class="d3"><view class="presno">处方号:{{props.v.preNo}}</view></view>
  9. <view class="d4"><view class="source" :class="{'zy':props.v.preMzZy==='1'}">{{props.v.preMzZy==='1'?'门诊':'住院'}}</view></view>
  10. </view>
  11. <view class="m">
  12. <image class="faceu" aspectFill :src="props.v.sex==='男'?'/static/hz.png':'/static/hy.png'" />
  13. <view class="patie">
  14. <view class="name">{{props.v.name}}</view>
  15. <view class="seage">
  16. <image class="img" aspectFill :src="props.v.sex==='男'?'/static/male.png':'/static/female.png'" />
  17. <view class="sex">{{props.v.sex}}</view>
  18. <view class="sep">|</view>
  19. <view class="age">{{v.age}}岁</view>
  20. </view>
  21. <view class="case">{{props.v.disName}} - {{props.v.symName}}</view>
  22. </view>
  23. <view class="pres">
  24. <view class="department">就诊科室:{{props.v.department}}</view>
  25. <view class="presInfo">
  26. 处方信息:
  27. <text class="tips">
  28. {{props.v.dosageForm}},{{props.v.number}}剂
  29. </text>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="b">
  34. <view class="zt">当前处方状态: {{deployStateName}}</view>
  35. <view class="je">处方金额:{{props.v.prescriptionSum}}元</view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. name: 'OrderCard'
  42. }
  43. </script>
  44. <script setup>
  45. import { onMounted, ref,computed } from 'vue'
  46. const props = defineProps({
  47. v: {
  48. default: function() {
  49. return {
  50. name: '',
  51. deployState:0,
  52. }
  53. },
  54. type: Object
  55. },
  56. c: {
  57. default: 0,
  58. type: Number
  59. }
  60. })
  61. const deployStateName = computed(()=>{
  62. switch(props.v.deployState) {
  63. case '1':
  64. return '抓药';
  65. case '2':
  66. return '复核';
  67. case '3':
  68. return '浸泡';
  69. case '4':
  70. return '煎煮';
  71. case '5':
  72. return '打包';
  73. default:
  74. return '异常状态';
  75. }
  76. })
  77. const handleDetail = ()=>{
  78. console.log("handleDetail", props.v, props.c)
  79. if(props.c===0){
  80. uni.navigateTo({
  81. url:`/pages/edit/edit?id=${props.v.id}`
  82. })
  83. } else {
  84. uni.navigateTo({
  85. url:`/pages/detail/detail?id=${props.v.id}`
  86. })
  87. }
  88. }
  89. </script>
  90. <style lang="scss">
  91. .container{
  92. display: flex;
  93. width: 100%;
  94. display: flex;
  95. flex-direction:column;
  96. width: 100%;
  97. margin-top: 10rpx;
  98. .t{
  99. display: flex;
  100. background-color: #EBF8F7;
  101. height: 33.75rpx;
  102. width: 709.38rpx;
  103. font-size: 13.75rpx;
  104. color: #999999;
  105. justify-content:flex-start;
  106. align-items:center;
  107. .d1::before{
  108. content: '';
  109. display: inline-block;
  110. width: 20px;
  111. height: 20px;
  112. background: "#18C7B0";
  113. }
  114. .d2{
  115. margin-left: 16rpx;
  116. }
  117. .d3{
  118. margin-left: 200rpx;
  119. }
  120. .d4{
  121. margin-left: auto;
  122. .source{
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. border-radius: 25rpx 0 0 25rpx;
  127. font-size: 13.75rpx;
  128. width: 50rpx;
  129. height: 21.25rpx;
  130. background-color: #18C7B0;
  131. color: #fff;
  132. }
  133. .zy{
  134. background-color: #82ABE1!important;
  135. }
  136. }
  137. }
  138. .m{
  139. display: flex;
  140. align-items: center;
  141. justify-content: flex-start;
  142. margin: 11.88rpx 25rpx 18.75rpx;
  143. .faceu{
  144. width: 73.13rpx;
  145. height: 73.13rpx;
  146. margin-right: 10rpx;
  147. }
  148. .patie{
  149. display: flex;
  150. flex-direction:column;
  151. justify-content: flex-start;
  152. align-items: flex-start;
  153. height: 73.13rpx;
  154. width: 270rpx;
  155. .name{
  156. font-size: 17.5rpx;
  157. color: #333333;
  158. display: flex;
  159. align-items: center;
  160. justify-content: flex-start;
  161. }
  162. .seage{
  163. display: flex;
  164. margin-top: 8rpx;
  165. .img{
  166. height: 15rpx;
  167. width: 15rpx;
  168. }
  169. .sex{
  170. font-size: 12rpx;
  171. color: #999999;
  172. padding-right: 8.75rpx;
  173. }
  174. .sep{
  175. font-size: 10rpx;
  176. color: #999999;
  177. }
  178. .age{
  179. font-size: 12rpx;
  180. color: #999999;
  181. padding-left: 8.75rpx;
  182. }
  183. }
  184. .case{
  185. margin-top: 3rpx;
  186. font-size: 15rpx;
  187. color: #333333;
  188. }
  189. }
  190. .pres{
  191. display: flex;
  192. flex-direction:column;
  193. justify-content: flex-start;
  194. align-items: flex-start;
  195. margin-left: 4rpx;
  196. height: 73.13rpx;
  197. .department{
  198. margin-top: 5rpx;
  199. font-size: 15rpx;
  200. color: #999999;
  201. }
  202. .presInfo{
  203. margin-top: 10rpx;
  204. font-size: 15rpx;
  205. color: #333333;
  206. .tips{}
  207. }
  208. }
  209. }
  210. .b{
  211. display: flex;
  212. flex-direction:row;
  213. justify-content: space-between;
  214. align-items: center;
  215. height: 33.75rpx;
  216. width: 709.38rpx;
  217. color: #999999;
  218. padding: 10rpx 48.78rpx;
  219. margin-bottom: 10rpx;
  220. .zt{
  221. display: flex;
  222. width: 200rpx;
  223. font-size: 13.75rpx;
  224. }
  225. .je{
  226. display: flex;
  227. width: 200rpx;
  228. font-size: 15rpx;
  229. }
  230. }
  231. }
  232. </style>