detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. <template>
  2. <view class="main">
  3. <uni-nav-bar dark :fixed="true" background-color="#18C7B0" status-bar left-icon="left" height="62.5rpx" width="750rpx"
  4. title="处方详情" @clickLeft="handleBack"
  5. />
  6. <view class="content">
  7. <view class="header">
  8. <view class="ti">
  9. <view class="left">
  10. <view class="baracode">
  11. <w-barcode :options="preseObj"></w-barcode>
  12. <view class="barnum">{{v.preNo}}</view>
  13. </view>
  14. </view>
  15. <view class="mid">
  16. <text class="title">中药处方笺</text>
  17. </view>
  18. <view class="rig"><text class="title">{{v.type=='1'?"中药处方":v.type=='1'?"中药制剂":""}}</text></view>
  19. </view>
  20. <view class="patiinfo">
  21. <view class="r1">
  22. <view class="row"><span class="we">姓名:</span>{{v.name}}</view>
  23. <view class="row"><span class="we">性别:</span>{{v.sex}}</view>
  24. <view class="row"><span class="we">年龄:</span>{{v.age}}岁</view>
  25. <view class="row"><span class="we">电话:</span>{{v.contactNumber}}</view>
  26. <view class="row"><span class="we">当前处方状态:</span>{{v.state=="1"?"配药":v.state=="2"?"煎药":v.state=="3"?"发药":v.state=="4"?"配送":""}}</view>
  27. </view>
  28. <view class="r2">
  29. <view class="row"><span class="we">就诊科室:</span>{{v.department}}</view>
  30. <view class="row"><span class="we">临床诊断:</span>{{v.disName}}—{{v.symName}}</view>
  31. <view class="row"><span class="we">开方时间:</span>{{v.prescriptionTime}}</view>
  32. </view>
  33. <view class="r3"><span class="we">联系地址:</span>{{v.address}}</view>
  34. </view>
  35. </view>
  36. <view class="rp">
  37. <view class="title">
  38. <text class="text">Rp:</text>
  39. </view>
  40. <view class="lists">
  41. <view class="item" v-for="(x, i) in v.rp" :key="i">
  42. <view class="le tag-view">
  43. <!-- <uni-tag :text="x.matName+x.matDose+x.matUnitName" /> -->
  44. {{x.matName+x.matDose+x.matUnitName}}
  45. </view>
  46. <view class="rig">
  47. <view class="up"> {{x.matUsageName}}</view>
  48. <view class="do"> {{x.sign}}</view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="footer">
  53. <view class="js">
  54. 剂数:{{v.number}}
  55. <view v-if="v.daijianCost!==''" class="pies_tips">
  56. (代煎)
  57. </view>
  58. </view>
  59. <view class="js">{{v.dosageForm}}</view>
  60. <view class="js">{{v.prescriptionUsage}}</view>
  61. <view class="js">每次{{v.concentration}}</view>
  62. <view class="js">{{v.frequency}}</view>
  63. <view class="freque">{{v.medicationTime}}</view>
  64. </view>
  65. <view class="rp-tips">{{v.entrust}}</view>
  66. </view>
  67. <view class="amountarea">
  68. <view class="amount">
  69. <view class="r1">
  70. <view class="pijw">药品金额:{{v.prescriptionSum}}</view>
  71. </view>
  72. <view class="r2">
  73. <view class="jyf">煎药费:{{v.daijianCost}}</view>
  74. <view class="psf">配送费:{{v.distributionCost}}</view>
  75. </view>
  76. <view class="r3">
  77. 总金额:{{v.prescriptionTotalSum}}
  78. <!-- <view class="zjw"></view> -->
  79. </view>
  80. </view>
  81. <view class="service">
  82. <view class="kf"><span class="we">开方:</span>{{v.operateList[0].operater || ''}}</view>
  83. <view class="kf"><span class="we">审核:</span>{{v.operateList[1].operater || ''}}</view>
  84. <view class="kf"><span class="we">调配:</span>{{v.operateList[2].operater || ''}}</view>
  85. <view class="kf"><span class="we">复核:</span>{{v.operateList[3].operater || ''}}</view>
  86. <view class="kf"><span class="we">浸泡:</span>{{v.operateList[4].operater || ''}}</view>
  87. <view class="kf"><span class="we">煎煮:</span>{{v.operateList[5].operater || ''}}</view>
  88. <view class="kf"><span class="we">打包:</span>{{v.operateList[6].operater || ''}}</view>
  89. <view class="kf"><span class="we">发药:</span>{{v.operateList[7].operater || ''}}</view>
  90. </view>
  91. </view>
  92. <view class="comment">
  93. <view class="z">注:</view>
  94. <text>{{v.entrust1111}}</text>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. export default {
  101. name: ''
  102. }
  103. </script>
  104. <script setup>
  105. import { onMounted, ref, getCurrentInstance } from 'vue'
  106. import { selectOrderDetail, upload } from "@/static/js/request.js"
  107. import { onLoad } from '@dcloudio/uni-app'
  108. const preseId = ref(11220822134401)
  109. const preseObj = ref({
  110. code: '',
  111. color:['#000'], // 条形码的颜色
  112. bgColor: '#FFFFFF', // 背景色
  113. width: 200, // 宽度
  114. height: 50 // 高度
  115. })
  116. const imageStyles =ref({
  117. width:112.5,
  118. height:112.5,
  119. border:{
  120. color:"#DDDDDD",
  121. width:1,
  122. style:'solid',
  123. radius:'4px'
  124. }
  125. })
  126. const depolyImage = ref([])
  127. const barOpations = ref({
  128. height: 80,
  129. displayValue: false
  130. })
  131. const v=ref({
  132. preNo:'11220822134401',
  133. presType:'普通处方',
  134. name:'李某',
  135. sex:'男',
  136. age:35,
  137. contactNumber:'13888888888',
  138. state: '发药',
  139. department:'中医内科',
  140. disName:'胃脘痛病',
  141. symName:'脾胃虚寒证',
  142. prescriptionTime:'2023-06-01 15:58',
  143. address:'浙江省某某事某某去某某事中医院门诊楼三楼302是',
  144. rp:[
  145. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  146. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  147. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  148. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  149. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  150. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  151. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  152. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  153. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  154. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
  155. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  156. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  157. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  158. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  159. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  160. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  161. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  162. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  163. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  164. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
  165. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  166. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  167. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  168. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  169. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  170. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  171. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  172. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  173. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  174. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
  175. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  176. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  177. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  178. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  179. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
  180. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
  181. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  182. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  183. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
  184. {matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''}
  185. ],
  186. number:3,
  187. pies_tips:'待见',
  188. dosageForm:'汤剂',
  189. prescriptionUsage:'煎服',
  190. concentration:'200ml',
  191. frequency:'一日三次',
  192. medicationTime:'饭后服',
  193. entrust:'注意多休息,饮食清单。',
  194. prescriptionSum: '187.00',
  195. daijianCost:'30.00',
  196. distributionCost:'10.00',
  197. prescriptionTotleSum: '227.00',
  198. yljgName:'杭州某某高级中医院',
  199. operateList:[
  200. {py:'kf',title:'开方',operater:''},
  201. {py:'sh',title:'审核',operater:''},
  202. {py:'tp',title:'调配',operater:''},
  203. {py:'fh',title:'复核',operater:''},
  204. {py:'jp',title:'浸泡',operater:''},
  205. {py:'jz',title:'煎煮',operater:''},
  206. {py:'db',title:'打包',operater:''},
  207. {py:'fy',title:'发药',operater:''},
  208. ],
  209. // extra_doc:'A医生',
  210. // check_doc:'B医生',
  211. // depoly:'调陪人',
  212. // review:'复核人',
  213. // steep:'浸泡',
  214. // cook:'煎煮人',
  215. // pack:'大宝人',
  216. // dispen:'发药人',
  217. // },
  218. entrust1111:'1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他'
  219. })
  220. onMounted(() => {
  221. })
  222. onLoad(async(options) => {
  223. console.log('options', options)
  224. const userId = uni.getStorageSync('userId')
  225. const params = {
  226. token: uni.getStorageSync('token'),
  227. data: {
  228. id: options.id || '',
  229. preNo: options.preId || '',
  230. depolyStatus: options.depolyStatus || ''
  231. }
  232. }
  233. console.log("params",params)
  234. const {data:res} = await selectOrderDetail(params)
  235. // console.log('data',data.data)
  236. // const res.code = 200
  237. if (res.code === 200) {
  238. v.prescriptionTime = res.data.prescriptionTime,
  239. v.value.name = res.data.name,
  240. v.value.sex = res.data.sex,
  241. v.value.age = res.data.age,
  242. v.value.contactNumber = res.data.contactNumber
  243. v.value.address = res.data.address
  244. v.value.concentration = res.data.concentration
  245. v.value.frequency = res.data.frequency
  246. v.value.medicationTime = res.data.medicationTime
  247. v.value.disName = res.data.disName,
  248. v.value.symName = res.data.symName,
  249. v.value.preNo = res.data.preNo,
  250. console.log('onLoad v.value.preNo', v.value.preNo)
  251. preseObj.value.code = v.value.preNo
  252. v.value.department = res.data.department,
  253. v.value.dosageForm = res.data.dosageForm,
  254. v.value.prescriptionUsage = res.data.prescriptionUsage,
  255. v.value.number = res.data.number,
  256. v.value.prescriptionSum = res.data.prescriptionSum,
  257. v.value.prescriptionTotalSum = res.data.prescriptionTotalSum,
  258. v.value.daijianCost = res.data.daijianCost,
  259. v.value.distributionCost = res.data.distributionCost,
  260. v.value.prescriptionTotleSum = res.data.prescriptionTotleSum,
  261. v.value.entrust = res.data.entrust,
  262. v.value.rp = res.data.detailList
  263. v.value.yljgName = res.data.yljgName || ''
  264. v.value.state = res.data.state,
  265. console.log('res.data.state',res.data.state)
  266. switch (res.data.state) {
  267. case '1':
  268. v.value.state = '配药'
  269. break
  270. case '2':
  271. v.value.state = '煎药'
  272. break
  273. case '3':
  274. v.value.state = '发药'
  275. break
  276. case '4':
  277. v.value.state = '配送'
  278. break
  279. case '5':
  280. v.value.state = '已分配'
  281. break
  282. case '6':
  283. v.value.state = '已传送'
  284. break
  285. default:
  286. v.value.state = '配药'
  287. }
  288. v.value.operateList[0].operater = res.data.doctor || ''
  289. v.value.operateList[1].operater = res.data.checkBy || ''
  290. v.value.operateList[2].operater = res.data.tiaopeiName || ''
  291. // 循环operateList
  292. const length = res.data.operateList
  293. if(length > 0){
  294. res.data.operateList.forEach((item)=>{
  295. switch(item.type){
  296. case '2':
  297. v.value.operateList[3].operater = item.createBy
  298. break
  299. case '3':
  300. v.value.operateList[4].operater = item.createBy
  301. break
  302. case '4':
  303. v.value.operateList[5].operater = item.createBy
  304. break
  305. case '5':
  306. v.value.operateList[6].operater = item.createBy
  307. break
  308. case '6':
  309. v.value.operateList[7].operater = item.createBy
  310. break
  311. defalut:console.log('处方签res.data.operateList数据异常',item.type)
  312. }
  313. })
  314. }
  315. }
  316. })
  317. const handleBack =()=>{
  318. uni.navigateBack({
  319. delta: 1
  320. })
  321. }
  322. </script>
  323. <style lang="scss">
  324. .main {
  325. display: flex;
  326. flex-direction:column;
  327. justify-content:flex-start;
  328. width: 750rpx;
  329. :deep(.uni-nav-bar-text){
  330. font-size: 20px;
  331. }
  332. :deep(.uni-navbar-btn-text){
  333. font-size: 16px;
  334. }
  335. .content{
  336. margin: 5rpx;
  337. background-color: #fff;
  338. flex-direction:column;
  339. align-items: center;
  340. .header{
  341. display: flex;
  342. flex-direction:column;
  343. margin:16rpx 16rpx 0;
  344. .ti{
  345. display: flex;
  346. flex-direction:row;
  347. justify-content: space-between;
  348. margin-top: 15.22rpx;
  349. .left{
  350. align-items: flex-start;
  351. .baracode{
  352. display: flex;
  353. flex-direction:column;
  354. .barnum{
  355. font-size: 15rpx;
  356. display: flex;
  357. justify-content:center;
  358. align-items: center;
  359. letter-spacing: 0.3em;
  360. }
  361. }
  362. }
  363. .mid{
  364. display: flex;
  365. margin-right: 160rpx;
  366. .title{
  367. font-size: 23.75rpx;
  368. font-weight: 800;
  369. }
  370. }
  371. .rig{
  372. display: flex;
  373. .title{
  374. font-size: 16rpx;
  375. width: 40rpx;
  376. font-weight: 300;
  377. }
  378. }
  379. }
  380. .patiinfo{
  381. display: flex;
  382. flex-direction:column;
  383. margin-top: 25.2rpx;
  384. padding-bottom: 21.45rpx;
  385. border-bottom: 1px solid #979797;
  386. .r1{
  387. display: flex;
  388. flex-direction:row;
  389. margin-bottom:15rpx;
  390. .row{
  391. font-size: 15rpx;
  392. font-weight: 400;
  393. margin-right: 30rpx;
  394. }
  395. .we{
  396. color:#999999;
  397. }
  398. }
  399. .r2{
  400. display: flex;
  401. flex-direction:row;
  402. margin-bottom:15rpx;
  403. .row{
  404. font-size: 15rpx;
  405. font-weight: 400;
  406. margin-right: 30rpx;
  407. }
  408. .we{
  409. color:#999999;
  410. }
  411. }
  412. .r3{
  413. display: flex;
  414. flex-direction:row;
  415. font-size: 15rpx;
  416. .we{
  417. color:#999999;
  418. }
  419. }
  420. }
  421. }
  422. .rp{
  423. display: flex;
  424. flex-direction:column;
  425. margin:22.39rpx 17.36rpx 0;
  426. border-bottom: 1px solid #979797;
  427. .title{
  428. font-size: 22rpx;
  429. margin-bottom: 10rpx;
  430. }
  431. .lists{
  432. display: flex;
  433. flex-wrap: wrap;
  434. flex-direction: row;
  435. justify-content:flex-start;
  436. align-content:flex-start;
  437. margin-left:20rpx;
  438. height: 545rpx;
  439. .item{
  440. display: flex;
  441. justify-content:center;
  442. align-items: center;
  443. width: 161rpx;
  444. margin: 0 10rpx 20rpx 0;
  445. // position: relative;
  446. .le{
  447. display: flex;
  448. font-size: 12rpx;
  449. width: 150rpx;
  450. word-wrap: break-word;
  451. // z-index: 100;
  452. // position: absolute;
  453. }
  454. .tag-view:deep(.uni-tag){
  455. display: flex;
  456. justify-content:center;
  457. align-items: center;
  458. font-size: 15rpx;
  459. // width: 140rpx;
  460. padding: 6rpx 6rpx;
  461. }
  462. .rig{
  463. display: flex;
  464. flex-direction:column;
  465. margin-left: 5.31rpx;
  466. width: 200rpx;
  467. // z-index: 200;
  468. // position: absolute;
  469. left:120rpx;
  470. .up{
  471. margin-bottom:8rpx;
  472. font-size: 10rpx;
  473. height: 12.5rpx;
  474. }
  475. .do{
  476. font-size: 12rpx;
  477. height: 12.5rpx;
  478. }
  479. }
  480. }
  481. }
  482. .footer{
  483. margin: 0 10rpx 8rpx;
  484. display: flex;
  485. font-size: 15rpx;
  486. .js{
  487. display: flex;
  488. margin-right: 54.4rpx;
  489. .pies_tips{}
  490. }
  491. .freque{}
  492. }
  493. .rp-tips{
  494. display: flex;
  495. justify-content:flex-end;
  496. font-size: 15rpx;
  497. margin-right: 10rpx;
  498. }
  499. }
  500. .amountarea{
  501. display: flex;
  502. margin: 21.3rpx 19.38px 0;
  503. padding-bottom: 20.94rpx;
  504. border-bottom: 1px solid #979797;
  505. .amount{
  506. display: flex;
  507. flex-direction:column;
  508. .r1{
  509. border: 1px solid #979797;
  510. font-size: 15rpx;
  511. width: 287.5rpx;
  512. display: flex;
  513. justify-content:center;
  514. align-items: center;
  515. height: 33.75rpx;
  516. }
  517. .r2{
  518. display: flex;
  519. justify-content:center;
  520. align-items: center;
  521. font-size: 15rpx;
  522. height: 33.75rpx;
  523. width: 287.5rpx;
  524. border-left: 1px solid #979797;
  525. border-right: 1px solid #979797;
  526. .jyf{
  527. width: 143.93rpx;
  528. display: flex;
  529. justify-content:center;
  530. align-items: center;
  531. }
  532. .psf{
  533. border-left: 1px solid #979797;
  534. width: 143.93rpx;
  535. display: flex;
  536. justify-content:center;
  537. align-items: center;
  538. }
  539. }
  540. .r3{
  541. display: flex;
  542. justify-content:center;
  543. align-items: center;
  544. height: 33.75rpx;
  545. font-size: 15rpx;
  546. border: 1px solid #979797;
  547. }
  548. }
  549. .service{
  550. display: flex;
  551. flex-wrap: wrap;
  552. margin-left: 60rpx;
  553. .kf{
  554. font-size: 15rpx;
  555. margin-right: 60rpx;
  556. width:90rpx;
  557. .we{
  558. font-size: 15rpx;
  559. color:#999999;
  560. }
  561. }
  562. }
  563. }
  564. .comment{
  565. margin: 10rpx 16rpx 10rpx;
  566. font-size: 15rpx;
  567. display: flex;
  568. }
  569. }
  570. }
  571. </style>