order-card.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view class="container" v-if="props.workStatus=='0' || props.c=='1'" @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. <view class="container" v-else @click="handleSelect">
  39. <view class="t">
  40. <view class="d1"></view>
  41. <view class="d2">
  42. <view class="dtim">时间:{{props.v.prescriptionTime}}</view>
  43. </view>
  44. <view class="d3"><view class="presno">处方号:{{props.v.preNo}}</view></view>
  45. <view class="d4"><view class="source" :class="{'zy':props.v.preMzZy==='1'}">{{props.v.preMzZy==='1'?'门诊':'住院'}}</view></view>
  46. </view>
  47. <view class="m">
  48. <view class="radio">
  49. <label><radio value="selected" color="#18C7B0" :checked="selected"/></label>
  50. </view>
  51. <image class="faceu" aspectFill :src="props.v.sex==='男'?'/static/hz.png':'/static/hy.png'" />
  52. <view class="patie">
  53. <view class="name">{{props.v.name}}</view>
  54. <view class="seage">
  55. <image class="img" aspectFill :src="props.v.sex==='男'?'/static/male.png':'/static/female.png'" />
  56. <view class="sex">{{props.v.sex}}</view>
  57. <view class="sep">|</view>
  58. <view class="age">{{v.age}}岁</view>
  59. </view>
  60. <view class="case">{{props.v.disName}} - {{props.v.symName}}</view>
  61. </view>
  62. <view class="pres">
  63. <view class="department">就诊科室:{{props.v.department}}</view>
  64. <view class="presInfo">
  65. 处方信息:
  66. <text class="tips">
  67. {{props.v.dosageForm}},{{props.v.number}}剂
  68. </text>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="b">
  73. <view class="zt">当前处方状态: {{deployStateName}}</view>
  74. <view class="je">处方金额:{{props.v.prescriptionSum}}元</view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. name: 'OrderCard'
  81. }
  82. </script>
  83. <script setup>
  84. import { onMounted, ref,computed } from 'vue'
  85. const props = defineProps({
  86. v: {
  87. default: function() {
  88. return {
  89. name: '',
  90. deployState:0,
  91. preNo:''
  92. }
  93. },
  94. type: Object
  95. },
  96. workStatus: {
  97. default:'0',
  98. type: String
  99. },
  100. // 当前tab
  101. c: {
  102. default: 0,
  103. type: Number
  104. }
  105. })
  106. const selected = ref(false)
  107. const emit = defineEmits(['emitSelect'])
  108. console.log('props.workStatus',props.workStatus)
  109. const deployStateName = computed(()=>{
  110. switch(props.v.deployState) {
  111. case '1':
  112. return '抓药';
  113. case '2':
  114. return '复核';
  115. case '3':
  116. return '浸泡';
  117. case '4':
  118. return '煎煮';
  119. case '5':
  120. return '打包';
  121. default:
  122. return '异常状态';
  123. }
  124. })
  125. const handleDetail = ()=>{
  126. console.log("handleDetail", props.v, props.c)
  127. if(props.c===0){
  128. uni.navigateTo({
  129. url:`/pages/edit/edit?id=${props.v.id}`
  130. // url:`/pages/review/review?id=&preNo=${props.v.preNo}&deployState=${props.v.deployState}`
  131. })
  132. } else {
  133. uni.navigateTo({
  134. url:`/pages/detail/detail?id=${props.v.id}`
  135. })
  136. }
  137. }
  138. const handleSelect = ()=>{
  139. console.log('handleSelect>>',props.v.id)
  140. emit('emitSelect', props.v.id)
  141. selected.value = !selected.value
  142. }
  143. </script>
  144. <style lang="scss">
  145. .container{
  146. display: flex;
  147. width: 100%;
  148. display: flex;
  149. flex-direction:column;
  150. width: 100%;
  151. margin-top: 10rpx;
  152. .t{
  153. display: flex;
  154. background-color: #EBF8F7;
  155. height: 33.75rpx;
  156. width: 709.38rpx;
  157. font-size: 13.75rpx;
  158. color: #999999;
  159. justify-content:flex-start;
  160. align-items:center;
  161. .d1::before{
  162. content: '';
  163. display: inline-block;
  164. width: 20px;
  165. height: 20px;
  166. background: "#18C7B0";
  167. }
  168. .d2{
  169. margin-left: 16rpx;
  170. }
  171. .d3{
  172. margin-left: 200rpx;
  173. }
  174. .d4{
  175. margin-left: auto;
  176. .source{
  177. display: flex;
  178. align-items: center;
  179. justify-content: center;
  180. border-radius: 25rpx 0 0 25rpx;
  181. font-size: 13.75rpx;
  182. width: 50rpx;
  183. height: 21.25rpx;
  184. background-color: #18C7B0;
  185. color: #fff;
  186. }
  187. .zy{
  188. background-color: #82ABE1!important;
  189. }
  190. }
  191. }
  192. .m{
  193. display: flex;
  194. align-items: center;
  195. justify-content: flex-start;
  196. margin: 11.88rpx 25rpx 15.75rpx;
  197. .radio{
  198. }
  199. .faceu{
  200. width: 73.13rpx;
  201. height: 73.13rpx;
  202. margin-right: 10rpx;
  203. }
  204. .patie{
  205. display: flex;
  206. flex-direction:column;
  207. justify-content: flex-start;
  208. align-items: flex-start;
  209. height: 73.13rpx;
  210. width: 270rpx;
  211. .name{
  212. font-size: 17.5rpx;
  213. color: #333333;
  214. display: flex;
  215. align-items: center;
  216. justify-content: flex-start;
  217. }
  218. .seage{
  219. display: flex;
  220. margin-top: 8rpx;
  221. .img{
  222. height: 15rpx;
  223. width: 15rpx;
  224. }
  225. .sex{
  226. font-size: 12rpx;
  227. color: #999999;
  228. padding-right: 8.75rpx;
  229. }
  230. .sep{
  231. font-size: 10rpx;
  232. color: #999999;
  233. }
  234. .age{
  235. font-size: 12rpx;
  236. color: #999999;
  237. padding-left: 8.75rpx;
  238. }
  239. }
  240. .case{
  241. margin-top: 3rpx;
  242. font-size: 15rpx;
  243. color: #333333;
  244. }
  245. }
  246. .pres{
  247. display: flex;
  248. flex-direction:column;
  249. justify-content: flex-start;
  250. align-items: flex-start;
  251. margin-left: 4rpx;
  252. height: 73.13rpx;
  253. .department{
  254. margin-top: 5rpx;
  255. font-size: 15rpx;
  256. color: #999999;
  257. }
  258. .presInfo{
  259. margin-top: 10rpx;
  260. font-size: 15rpx;
  261. color: #333333;
  262. .tips{}
  263. }
  264. }
  265. }
  266. .b{
  267. display: flex;
  268. flex-direction:row;
  269. justify-content: space-between;
  270. align-items: center;
  271. height: 33.75rpx;
  272. width: 709.38rpx;
  273. color: #999999;
  274. padding: 10rpx 48.78rpx;
  275. margin-bottom: 10rpx;
  276. .zt{
  277. display: flex;
  278. width: 200rpx;
  279. font-size: 13.75rpx;
  280. }
  281. .je{
  282. display: flex;
  283. width: 200rpx;
  284. font-size: 15rpx;
  285. }
  286. }
  287. }
  288. </style>