order-card.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="container" @click="handleDetail">
  3. <view class="lef">
  4. <view class="dtim">时间:{{props.v.prescriptionTime}}</view>
  5. <view class="patie">
  6. <image class="faceu" aspectFill :src="props.v.faceurl?props.v.faceurl:'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/cat-1.png'" />
  7. <view class="pattt">
  8. <view class="patiin">
  9. <view class="name">{{props.v.name}}</view>
  10. <view class="seage">{{props.v.sex}},{{v.age}}岁</view>
  11. </view>
  12. <view class="case">{{props.v.disName}}-{{props.v.symName}}</view>
  13. <view class="pres" v-if="props.v.deployState && deployArr[parseInt(props.v.deployState)-1].name">当前处方状态: {{props.v.deployState?deployArr[parseInt(props.v.deployState)-1].name:'未知'}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="rig">
  18. <view class="left">
  19. <view class="presno">处方号:{{props.v.preNo}}</view>
  20. <view class="presno">就诊科室:{{props.v.department}}</view>
  21. <view class="presno">
  22. 处方信息:
  23. <text class="tips">
  24. {{props.v.dosageForm}},{{props.v.number}}剂
  25. </text>
  26. </view>
  27. <view class="presno">处方金额:{{props.v.prescriptionSum}}元</view>
  28. </view>
  29. <view class="righ">
  30. <view class="source" :class="{'zy':props.v.preMzZy==='1'}">{{props.v.preMzZy==='1'?'门诊':'住院'}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. name: 'OrderCard'
  38. }
  39. </script>
  40. <script setup>
  41. import { onMounted, ref } from 'vue'
  42. const deployArr = ref([
  43. {name:'抓药', id: '1' },
  44. {name:'复核', id: '2' },
  45. {name:'浸泡', id: '3' },
  46. {name:'煎煮', id: '4' },
  47. {name:'打包', id: '5' },
  48. ])
  49. const props = defineProps({
  50. v: {
  51. default: function() {
  52. return {}
  53. },
  54. type: Object
  55. },
  56. c: {
  57. default: 0,
  58. type: Number
  59. }
  60. })
  61. const handleDetail = ()=>{
  62. console.log("handleDetail", props.v, props.c)
  63. if(props.c===0){
  64. uni.navigateTo({
  65. url:`/pages/edit/edit?id=${props.v.id}&depolyStatus=1`
  66. })
  67. } else {
  68. uni.navigateTo({
  69. url:`/pages/detail/detail?id=${props.v.id}`
  70. })
  71. }
  72. }
  73. onMounted(() => {
  74. })
  75. </script>
  76. <style lang="scss">
  77. .container{
  78. display: flex;
  79. justify-content: flex-start;
  80. align-items: flex-start;
  81. width: 100%;
  82. margin-top: 10px;
  83. .lef{
  84. flex:1;
  85. display: flex;
  86. flex-direction: column;
  87. padding-left: 2px;
  88. .dtim{
  89. margin-bottom: 4px;
  90. }
  91. .patie{
  92. display: flex;
  93. .faceu{
  94. width: 70px;
  95. height:70px;
  96. }
  97. .pattt{
  98. margin-left: 12px;
  99. display: flex;
  100. flex-direction: column;
  101. .patiin{
  102. display: flex;
  103. .name{
  104. font-size: 20px;
  105. font-weight: 800;
  106. }
  107. .seage{
  108. margin-left: 12px;
  109. font-size: 18px;
  110. font-weight: 400;
  111. color: #cfcfcf;
  112. }
  113. }
  114. .case{
  115. font-size: 18px;
  116. font-weight: 400;
  117. color: #808184;
  118. }
  119. .pres{
  120. font-size: 18px;
  121. font-weight: 400;
  122. color: #cfcfcf;
  123. }
  124. }
  125. }
  126. }
  127. .rig{
  128. flex:1;
  129. display: flex;
  130. justify-content:space-between;
  131. margin-left: 200px;
  132. .left{
  133. display: flex;
  134. flex-direction: column;
  135. .presno{
  136. font-size: 18px;
  137. font-weight: 400;
  138. margin-bottom: 4px;
  139. color: #cfcfcf;
  140. .tips{
  141. color: #28292a;
  142. }
  143. }
  144. }
  145. .righ{
  146. .source{
  147. display: flex;
  148. align-items: center;
  149. justify-content: center;
  150. border-radius: 25px 0 0 25px;
  151. width: 80px;
  152. height: 50px;
  153. background-color: #808184;
  154. color: #fff;
  155. }
  156. .zy{
  157. background-color: #c6c8cd!important;
  158. color: #000!important;
  159. }
  160. }
  161. }
  162. }
  163. </style>