order-card.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. preNo:''
  53. }
  54. },
  55. type: Object
  56. },
  57. // 当前tab
  58. c: {
  59. default: 0,
  60. type: Number
  61. }
  62. })
  63. console.log('props.v',props.v)
  64. const deployStateName = computed(()=>{
  65. switch(props.v.deployState) {
  66. case '1':
  67. return '抓药';
  68. case '2':
  69. return '复核';
  70. case '3':
  71. return '浸泡';
  72. case '4':
  73. return '煎煮';
  74. case '5':
  75. return '打包';
  76. default:
  77. return '异常状态';
  78. }
  79. })
  80. const handleDetail = ()=>{
  81. console.log("handleDetail", props.v, props.c)
  82. if(props.c===0){
  83. uni.navigateTo({
  84. url:`/pages/edit/edit?id=${props.v.id}`
  85. // url:`/pages/review/review?id=&preNo=${props.v.preNo}&deployState=${props.v.deployState}`
  86. })
  87. } else {
  88. uni.navigateTo({
  89. url:`/pages/detail/detail?id=${props.v.id}`
  90. })
  91. }
  92. }
  93. </script>
  94. <style lang="scss">
  95. .container{
  96. display: flex;
  97. width: 100%;
  98. display: flex;
  99. flex-direction:column;
  100. width: 100%;
  101. margin-top: 10rpx;
  102. .t{
  103. display: flex;
  104. background-color: #EBF8F7;
  105. height: 33.75rpx;
  106. width: 709.38rpx;
  107. font-size: 13.75rpx;
  108. color: #999999;
  109. justify-content:flex-start;
  110. align-items:center;
  111. .d1::before{
  112. content: '';
  113. display: inline-block;
  114. width: 20px;
  115. height: 20px;
  116. background: "#18C7B0";
  117. }
  118. .d2{
  119. margin-left: 16rpx;
  120. }
  121. .d3{
  122. margin-left: 200rpx;
  123. }
  124. .d4{
  125. margin-left: auto;
  126. .source{
  127. display: flex;
  128. align-items: center;
  129. justify-content: center;
  130. border-radius: 25rpx 0 0 25rpx;
  131. font-size: 13.75rpx;
  132. width: 50rpx;
  133. height: 21.25rpx;
  134. background-color: #18C7B0;
  135. color: #fff;
  136. }
  137. .zy{
  138. background-color: #82ABE1!important;
  139. }
  140. }
  141. }
  142. .m{
  143. display: flex;
  144. align-items: center;
  145. justify-content: flex-start;
  146. margin: 11.88rpx 25rpx 18.75rpx;
  147. .faceu{
  148. width: 73.13rpx;
  149. height: 73.13rpx;
  150. margin-right: 10rpx;
  151. }
  152. .patie{
  153. display: flex;
  154. flex-direction:column;
  155. justify-content: flex-start;
  156. align-items: flex-start;
  157. height: 73.13rpx;
  158. width: 270rpx;
  159. .name{
  160. font-size: 17.5rpx;
  161. color: #333333;
  162. display: flex;
  163. align-items: center;
  164. justify-content: flex-start;
  165. }
  166. .seage{
  167. display: flex;
  168. margin-top: 8rpx;
  169. .img{
  170. height: 15rpx;
  171. width: 15rpx;
  172. }
  173. .sex{
  174. font-size: 12rpx;
  175. color: #999999;
  176. padding-right: 8.75rpx;
  177. }
  178. .sep{
  179. font-size: 10rpx;
  180. color: #999999;
  181. }
  182. .age{
  183. font-size: 12rpx;
  184. color: #999999;
  185. padding-left: 8.75rpx;
  186. }
  187. }
  188. .case{
  189. margin-top: 3rpx;
  190. font-size: 15rpx;
  191. color: #333333;
  192. }
  193. }
  194. .pres{
  195. display: flex;
  196. flex-direction:column;
  197. justify-content: flex-start;
  198. align-items: flex-start;
  199. margin-left: 4rpx;
  200. height: 73.13rpx;
  201. .department{
  202. margin-top: 5rpx;
  203. font-size: 15rpx;
  204. color: #999999;
  205. }
  206. .presInfo{
  207. margin-top: 10rpx;
  208. font-size: 15rpx;
  209. color: #333333;
  210. .tips{}
  211. }
  212. }
  213. }
  214. .b{
  215. display: flex;
  216. flex-direction:row;
  217. justify-content: space-between;
  218. align-items: center;
  219. height: 33.75rpx;
  220. width: 709.38rpx;
  221. color: #999999;
  222. padding: 10rpx 48.78rpx;
  223. margin-bottom: 10rpx;
  224. .zt{
  225. display: flex;
  226. width: 200rpx;
  227. font-size: 13.75rpx;
  228. }
  229. .je{
  230. display: flex;
  231. width: 200rpx;
  232. font-size: 15rpx;
  233. }
  234. }
  235. }
  236. </style>