edit.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. <template>
  2. <view class="main">
  3. <uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar left-icon="left" left-text="返回" :leftWidth=120 :rightWidth=120 :height=100 :width="1200"
  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.pres_id}}</view>
  13. </view>
  14. </view>
  15. <view class="mid">
  16. <text class="title">中药处方笺</text>
  17. </view>
  18. <view class="rig"><text class="title">{{v.pres_type}}</text></view>
  19. </view>
  20. <view class="patiinfo">
  21. <view class="r1">
  22. <view class="row">姓名:{{v.name}}</view>
  23. <view class="row">性别:{{v.sex}}</view>
  24. <view class="row">年龄:{{v.age}}岁</view>
  25. <view class="row">电话:{{v.tel}}</view>
  26. <view class="row status">当前处方状态:{{v.pres_status}}</view>
  27. </view>
  28. <view class="r2">
  29. <view class="row">就诊科室:{{v.office}}</view>
  30. <view class="row">临床诊断:{{v.dis_name}}—{{v.sym_name}}</view>
  31. <view class="row">开方时间:{{v.create_at}}</view>
  32. </view>
  33. <view class="r3">联系地址:{{v.addr}}</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 :inverted="!selectRps.includes(x)" :text=x.name+x.num @click="handleGetRps(x)" />
  44. </view>
  45. <view class="rig">
  46. <view class="up"> {{x.tips}}</view>
  47. <view class="do"> {{x.sign}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="footer">
  52. <view class="js">
  53. 剂数:{{v.pies}}
  54. <view v-if="v.pies_tips!==''" class="pies_tips">
  55. ({{v.pies_tips}})
  56. </view>
  57. </view>
  58. <view class="js">{{v.med_type}}</view>
  59. <view class="js">{{v.eat_type}}</view>
  60. <view class="js">每次{{v.capa}}</view>
  61. <view class="js">{{v.freque}}</view>
  62. <view class="freque">{{v.eat_tips}}</view>
  63. </view>
  64. <view class="rp-tips">{{v.rp_tips}}</view>
  65. </view>
  66. <view class="amountarea">
  67. <view class="amount">
  68. <view class="r1">
  69. <view class="pijw">药品金额:{{v.money.drugs_amount}}</view>
  70. </view>
  71. <view class="r2">
  72. <view class="jyf">煎药费:{{v.money.cook_fee}}</view>
  73. <view class="psf">配送费:{{v.money.delie_fee}}</view>
  74. </view>
  75. <view class="r3">
  76. 总金额:{{v.money.summary}}
  77. <!-- <view class="zjw"></view> -->
  78. </view>
  79. </view>
  80. <view class="service">
  81. <view class="kf">开方:{{v.service.extra_doc}}</view>
  82. <view class="kf">审核:{{v.service.check_doc}}</view>
  83. <view class="kf">调配:{{v.service.depoly}}</view>
  84. <view class="kf">复核:{{v.service.review}}</view>
  85. <view class="kf">浸泡:{{v.service.steep}}</view>
  86. <view class="kf">煎煮:{{v.service.cook}}</view>
  87. <view class="kf">打包:{{v.service.pack}}</view>
  88. <view class="kf">发药:{{v.service.dispen}}</view>
  89. </view>
  90. </view>
  91. <view class="comment">
  92. <view class="z">注:</view>
  93. <text>{{v.comment}}</text>
  94. </view>
  95. </view>
  96. <view class="upload">
  97. <view class="title">上传照片</view>
  98. <uni-file-picker
  99. class="plugin"
  100. v-model="depolyImage"
  101. file-mediatype="image"
  102. mode="grid"
  103. file-extname="png,jpg"
  104. :image-styles="depolyImageStyles"
  105. :limit="3"
  106. @success="success"
  107. />
  108. </view>
  109. <view class="cooment">
  110. <view class="title">备注内容</view>
  111. <view class="tex">
  112. <input placeholder="请输入" placeholder-style="font-size: 30px;" height="40px" @input="bindTextInput" class="input"/>
  113. </view>
  114. </view>
  115. <view class="radio">
  116. <label for="">
  117. <switch :checked="isPrint" @change="handleChange" /> 上传时直接打印标签
  118. </label>
  119. </view>
  120. <view class="submit">
  121. <button type="primary" class="bu" @click="handleSubmit">上传</button>
  122. </view>
  123. <view class="popup">
  124. <uni-popup ref="alertDialog" type="dialog">
  125. <uni-popup-dialog type="center" cancelText="不打印" confirmText="打印" title="打印标签" @confirm="dialogConfirm" @close="dialogClose">
  126. <view class="cotent" id="printMe">
  127. <view class="title">默默事中医院取药标签打印(门诊)</view>
  128. <view class="body">
  129. <view class="lef">
  130. <view class="baracode">
  131. <w-barcode class="cav" :options="preseObj"></w-barcode>
  132. <view class="barnum">NO.{{v.pres_id}}</view>
  133. </view>
  134. </view>
  135. <view class="rig">
  136. <view class="hz">患者:<view class="bold">{{v.name}},{{v.sex}},{{v.age}}岁</view></view>
  137. <view class="hz">出生日期:<view class="bold">{{v.birth}}</view></view>
  138. </view>
  139. </view>
  140. </view>
  141. </uni-popup-dialog>
  142. </uni-popup>
  143. </view>
  144. </view>
  145. </template>
  146. <script>
  147. export default {
  148. name: ''
  149. }
  150. </script>
  151. <script setup>
  152. import { onMounted, ref, getCurrentInstance } from 'vue'
  153. import { selectOrderDetail } from "@/static/api.js"
  154. import { onLoad } from '@dcloudio/uni-app'
  155. const preseId = ref(11220822134401)
  156. const preseObj = ref({
  157. code: '11220822134401',
  158. color:['#000'], // 条形码的颜色
  159. bgColor: '#FFFFFF', // 背景色
  160. width: 200, // 宽度
  161. height: 50 // 高度
  162. })
  163. const {proxy} = getCurrentInstance()
  164. const depolyImageStyles = ref({
  165. width:200,
  166. height:200,
  167. border:{
  168. color:"#cfcfcf",
  169. width:1,
  170. style:'dashed',
  171. radius:'2px'
  172. }
  173. })
  174. const depolyImage = ref([])
  175. const barOpations = ref({
  176. height: 80,
  177. displayValue: false
  178. })
  179. const selectRps = ref([])
  180. const isPrint = ref(true)
  181. const success = ()=>{
  182. console.log('uni-file-picker',depolyImage.value)
  183. }
  184. const bindTextInput = (e)=>{
  185. console.log(e.detail.value)
  186. }
  187. const v=ref({
  188. pres_id:11220822134401,
  189. pres_type:'普通处方',
  190. name:'李某',
  191. sex:'男',
  192. age:35,
  193. tel:'13888888888',
  194. pres_status: '发药',
  195. office:'中医内科',
  196. dis_name:'胃脘痛病',
  197. sym_name:'脾胃虚寒证',
  198. create_at:'2023-06-01 15:58',
  199. addr:'浙江省某某事某某去某某事中医院门诊楼三楼302是',
  200. rp:[
  201. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  202. {name:'车前子',num:'6g',tips:'先煎',sign:'医生签名'},
  203. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  204. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  205. {name:'车前子',num:'6g',tips:'先煎',sign:'医生签名'},
  206. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  207. {name:'车前子',num:'6g',tips:'',sign:''},
  208. {name:'车前子',num:'6g',tips:'',sign:''},
  209. {name:'车前子',num:'6g',tips:'',sign:''},
  210. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  211. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  212. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  213. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  214. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  215. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  216. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  217. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  218. {name:'车前子',num:'6g',tips:'先煎',sign:'医生签名'},
  219. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  220. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  221. {name:'车前子',num:'6g',tips:'先煎',sign:'医生签名'},
  222. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  223. {name:'车前子',num:'6g',tips:'',sign:''},
  224. {name:'车前子',num:'6g',tips:'',sign:''},
  225. {name:'车前子',num:'6g',tips:'',sign:''},
  226. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  227. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  228. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  229. {name:'车前子',num:'6g',tips:'先煎',sign:''},
  230. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  231. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  232. {name:'车前子',num:'6g',tips:'包煎',sign:''},
  233. {name:'车前子',num:'6g',tips:'',sign:''},
  234. {name:'车前子',num:'6g',tips:'',sign:''},
  235. {name:'车前子',num:'6g',tips:'',sign:''},
  236. {name:'车前子',num:'6g',tips:'',sign:''},
  237. {name:'车前子',num:'6g',tips:'',sign:''},
  238. {name:'车前子',num:'6g',tips:'',sign:''},
  239. {name:'车前子',num:'6g',tips:'',sign:''},
  240. {name:'车前子',num:'6g',tips:'',sign:''},
  241. {name:'车前子',num:'6g',tips:'',sign:''},
  242. {name:'车前子',num:'6g',tips:'',sign:''},
  243. {name:'车前子',num:'6g',tips:'',sign:''},
  244. {name:'车前子',num:'6g',tips:'',sign:''}
  245. ],
  246. pies:3,
  247. pies_tips:'待见',
  248. med_type:'汤剂',
  249. eat_type:'煎服',
  250. capa:'200ml',
  251. freque:'一日三次',
  252. eat_tips:'饭后服',
  253. rp_tips:'注意多休息,饮食清单。',
  254. money:{
  255. drugs_amount: 187.00,
  256. cook_fee:30.00,
  257. delie_fee:10.00,
  258. summary: 227.00,
  259. },
  260. service:{
  261. extra_doc:'A医生',
  262. check_doc:'B医生',
  263. depoly:'调陪人',
  264. review:'复核人',
  265. steep:'浸泡',
  266. cook:'煎煮人',
  267. pack:'大宝人',
  268. dispen:'发药人',
  269. },
  270. comment:'1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他'
  271. })
  272. onMounted(() => {
  273. })
  274. onLoad(async() => {
  275. const params = {
  276. token: token,
  277. data: {
  278. id: userId,
  279. }
  280. }
  281. const {data:res } = selectOrderDetail(params)
  282. })
  283. const handleGetRps = (v)=>{
  284. console.log('handleGetRps', v)
  285. if(!selectRps.value.includes(v)) {
  286. selectRps.value.push(v)
  287. } else {
  288. selectRps.value.splice(selectRps.value.indexOf(v), 1)
  289. }
  290. }
  291. const handleChange = ()=>{
  292. isPrint.value = !isPrint.value
  293. console.log('handleChange', isPrint.value)
  294. }
  295. const handleBack =()=>{
  296. uni.navigateBack({
  297. delta: 1
  298. })
  299. }
  300. const handleSubmit = ()=>{
  301. if(!isPrint){
  302. // 直接调用接口,然后打印
  303. print("#printMe")
  304. console.log('直接调用接口,然后打印')
  305. } else {
  306. // 弹窗提醒
  307. // console.log("handleSubmit proxy.$refs.alertDialog",proxy.$refs.alertDialog)
  308. proxy.$refs.alertDialog.open('center')
  309. }
  310. }
  311. const dialogConfirm = ()=>{
  312. console.log('dialogConfirm直接调用接口,然后打印')
  313. print("#printMe")
  314. }
  315. const dialogClose = ()=>{
  316. console.log('dialogClose直接调用接口,不打印')
  317. }
  318. </script>
  319. <style lang="scss">
  320. .main {
  321. display: flex;
  322. flex-direction:column;
  323. justify-content:flex-start;
  324. // height: 2000px;
  325. width: 1200px;
  326. .content{
  327. margin: 10px;
  328. background-color: #fff;
  329. flex-direction:column;
  330. align-items: center;
  331. .header{
  332. display: flex;
  333. flex-direction:column;
  334. margin:16px 16px 0;
  335. .ti{
  336. display: flex;
  337. flex-direction:row;
  338. justify-content: space-between;
  339. .left{
  340. align-items: flex-start;
  341. .baracode{
  342. display: flex;
  343. flex-direction:column;
  344. width: 320px;
  345. // align-items: center;
  346. .barnum{
  347. width:320px;
  348. font-size: 40px;
  349. display: flex;
  350. justify-content:center;
  351. align-items: center;
  352. letter-spacing: 0.1em;
  353. }
  354. }
  355. }
  356. .mid{
  357. align-items: flex-start;
  358. justify-content:center;
  359. width:320px;
  360. display: flex;
  361. .title{
  362. font-size: 40px;
  363. margin-top: 20px;
  364. font-weight: 800;
  365. }
  366. }
  367. .rig{
  368. align-items: flex-start;
  369. justify-content:flex-end;
  370. width:320px;
  371. display: flex;
  372. .title{
  373. font-size: 26px;
  374. width: 60px;
  375. font-weight: 300;
  376. }
  377. }
  378. }
  379. .patiinfo{
  380. display: flex;
  381. flex-direction:column;
  382. margin-top: 5px;
  383. padding-bottom: 10px;
  384. border-bottom: 1px solid #000;
  385. .r1{
  386. display: flex;
  387. flex-direction:row;
  388. height: 50px;
  389. .row{
  390. font-size: 28px;
  391. font-weight: 400;
  392. margin-right: 30px;
  393. }
  394. .status{
  395. background-color: #cfcfcf;
  396. }
  397. }
  398. .r2{
  399. display: flex;
  400. flex-direction:row;
  401. margin-top: 5px;
  402. height: 50px;
  403. .row{
  404. font-size: 28px;
  405. font-weight: 400;
  406. margin-right: 20px;
  407. }
  408. }
  409. .r3{
  410. display: flex;
  411. flex-direction:row;
  412. height: 50px;
  413. margin-top: 5px;
  414. font-size: 28px;
  415. font-weight: 400;
  416. }
  417. }
  418. }
  419. .rp{
  420. display: flex;
  421. flex-direction:column;
  422. margin:0 16px 0;
  423. border-bottom: 1px solid #000;
  424. .title{
  425. font-size: 40px;
  426. }
  427. .lists{
  428. display: flex;
  429. flex-wrap: wrap;
  430. flex-direction: row;
  431. justify-content:flex-start;
  432. align-content:flex-start;
  433. margin-left:80px;
  434. // width: 1000px;
  435. // height: 1800px;
  436. .item{
  437. display: flex;
  438. justify-content:center;
  439. align-items: center;
  440. height:80px;
  441. width: 220px;
  442. margin-right: 40px;
  443. // flex-basis: 25%;
  444. .le{
  445. display: flex;
  446. // width: 160px;
  447. font-size: 28px;
  448. }
  449. .tag-view:deep(.uni-tag){
  450. display: flex;
  451. justify-content:center;
  452. align-items: center;
  453. font-size: 20px;
  454. height: 40px;
  455. width: 100px;
  456. padding: 6px 20px;
  457. }
  458. .rig{
  459. display: flex;
  460. flex-direction:column;
  461. margin-left: 10px;
  462. .up{
  463. width: 80px;
  464. height: 22px;
  465. }
  466. .do{
  467. width: 80px;
  468. height: 22px;
  469. }
  470. }
  471. }
  472. }
  473. .footer{
  474. margin: 20px 0 0 80px;
  475. display: flex;
  476. font-size: 25px;
  477. .js{
  478. display: flex;
  479. margin-right: 100px;
  480. .pies_tips{}
  481. }
  482. .freque{}
  483. }
  484. .rp-tips{
  485. display: flex;
  486. justify-content:flex-end;
  487. font-size: 25px;
  488. }
  489. }
  490. .amountarea{
  491. display: flex;
  492. margin: 10px 16px 0;
  493. padding-bottom: 10px;
  494. border-bottom: 1px solid #000;
  495. .amount{
  496. display: flex;
  497. flex-direction:column;
  498. .r1{
  499. border: 1px solid #000;
  500. font-size: 30px;
  501. width: 400px;
  502. display: flex;
  503. justify-content:center;
  504. align-items: center;
  505. height: 50px;
  506. }
  507. .r2{
  508. display: flex;
  509. justify-content:center;
  510. align-items: center;
  511. font-size: 30px;
  512. height: 50px;
  513. width: 400px;
  514. border-left: 1px solid #000;
  515. border-right: 1px solid #000;
  516. .jyf{
  517. width: 200px;
  518. display: flex;
  519. justify-content:center;
  520. align-items: center;
  521. }
  522. .psf{
  523. border-left: 1px solid #000;
  524. width: 201px;
  525. display: flex;
  526. justify-content:center;
  527. align-items: center;
  528. }
  529. }
  530. .r3{
  531. display: flex;
  532. justify-content:center;
  533. align-items: center;
  534. height: 50px;
  535. font-size: 30px;
  536. border: 1px solid #000;
  537. }
  538. }
  539. .service{
  540. display: flex;
  541. flex-wrap: wrap;
  542. margin-left: 50px;
  543. .kf{
  544. font-size: 30px;
  545. margin-right: 55px;
  546. }
  547. }
  548. }
  549. .comment{
  550. margin: 10px 16px 10px;
  551. font-size: 30px;
  552. line-height: 50px;
  553. display: flex;
  554. }
  555. }
  556. .upload{
  557. margin: 0 10px 10px;
  558. background-color: #fff;
  559. flex-direction:column;
  560. align-items: center;
  561. padding: 20px;
  562. .title{
  563. font-size: 40px;
  564. margin-bottom:20px;
  565. }
  566. .plugin{
  567. // margin-left: 20px;
  568. }
  569. }
  570. .cooment{
  571. margin: 0 10px 10px 10px;
  572. background-color: #fff;
  573. flex-direction:column;
  574. align-items: center;
  575. padding: 20px;
  576. .title{
  577. font-size: 40px;
  578. margin-bottom:20px;
  579. }
  580. .tex{
  581. display: flex;
  582. justify-content:flex-start;
  583. align-items: center;
  584. margin-bottom:20px;
  585. border: 1px solid #cfcfcf;
  586. height: 60px;
  587. .input{
  588. height: 30px;
  589. font-size: 30px;
  590. padding-left: 10px;
  591. }
  592. }
  593. }
  594. .radio{
  595. display: flex;
  596. margin: 0 10px 10px 10px;
  597. // background-color: #fff;
  598. flex-direction:column;
  599. // align-items: center;
  600. font-size: 20px!important;
  601. }
  602. .submit{
  603. display: flex;
  604. margin: 40px 10px;
  605. // background-color: #fff;
  606. align-items: center;
  607. .bu{
  608. display: flex;
  609. justify-content:center;
  610. align-items: center;
  611. height: 60px;
  612. width: 600px;
  613. font-size: 30px;
  614. }
  615. }
  616. :deep(.uni-popup-dialog){
  617. width: 800px;
  618. height: 500px;
  619. display: flex;
  620. flex-direction: column;
  621. background-color: #e1e3e9;
  622. // justify-content:center;
  623. // align-items: center;
  624. .uni-dialog-title-text{
  625. display: flex;
  626. font-size: 30px;
  627. padding-top: 20px;
  628. }
  629. .uni-dialog-content{
  630. display: flex;
  631. margin: 20px 40px;
  632. background-color: #fff;
  633. .cotent{
  634. display: flex;
  635. flex-direction: column;
  636. .title{
  637. font-size: 30px;
  638. font-weight: 500;
  639. margin-bottom: 10px;
  640. display: flex;
  641. align-items: center;
  642. justify-content:center;
  643. }
  644. .body{
  645. display: flex;
  646. // flex-direction: column;
  647. justify-content:center;
  648. .lef{
  649. display: flex;
  650. flex-direction: column;
  651. width: 320px;
  652. justify-content:center;
  653. .baracode{
  654. display: flex;
  655. flex-direction:column;
  656. width: 320px;
  657. .cav{
  658. width:320px;
  659. }
  660. .barnum{
  661. width:320px;
  662. font-size: 28px;
  663. display: flex;
  664. justify-content:center;
  665. align-items: center;
  666. letter-spacing: 0.1em;
  667. }
  668. }
  669. }
  670. .rig{
  671. display: flex;
  672. flex-direction: column;
  673. width: 340px;
  674. margin-left: 30px;
  675. .hz{
  676. display: flex;
  677. margin-bottom: 10px;
  678. font-size: 28px;
  679. }
  680. .bold{
  681. font-weight: 500;
  682. }
  683. }
  684. }
  685. }
  686. }
  687. .uni-dialog-button-group{
  688. display: flex;
  689. margin-top: 20px;
  690. border: 0;
  691. .uni-dialog-button{
  692. display: flex;
  693. height: 78px;
  694. width: 100px!important;
  695. border: 1px solid #000;
  696. margin:0 40px;
  697. border-radius: 4px;
  698. .uni-dialog-button-text{
  699. font-size: 32px;
  700. }
  701. }
  702. .uni-border-left{
  703. height: 80px;
  704. width: 100px;
  705. border: 1px solid #007aff;
  706. background-color: #007aff;
  707. border: 1px solid #007aff;
  708. .uni-dialog-button-text{
  709. font-size: 32px;
  710. color: #fff;
  711. }
  712. }
  713. }
  714. }
  715. }
  716. </style>