edit.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  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">
  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. const preseId = ref(11220822134401)
  154. const preseObj = ref({
  155. code: '11220822134401',
  156. color:['#000'], // 条形码的颜色
  157. bgColor: '#FFFFFF', // 背景色
  158. width: 200, // 宽度
  159. height: 50 // 高度
  160. })
  161. const {proxy} = getCurrentInstance()
  162. const depolyImageStyles = ref({
  163. width:200,
  164. height:200,
  165. border:{
  166. color:"#cfcfcf",
  167. width:1,
  168. style:'dashed',
  169. radius:'2px'
  170. }
  171. })
  172. const depolyImage = ref([])
  173. const barOpations = ref({
  174. height: 80,
  175. displayValue: false
  176. })
  177. const selectRps = ref([])
  178. const isPrint = ref(true)
  179. const success = ()=>{
  180. console.log('uni-file-picker',depolyImage.value)
  181. }
  182. const bindTextInput = (e)=>{
  183. console.log(e.detail.value)
  184. }
  185. const v=ref({
  186. pres_id:11220822134401,
  187. pres_type:'普通处方',
  188. name:'李某',
  189. sex:'男',
  190. age:35,
  191. tel:'13888888888',
  192. pres_status: '发药',
  193. office:'中医内科',
  194. dis_name:'胃脘痛病',
  195. sym_name:'脾胃虚寒证',
  196. create_at:'2023-06-01 15:58',
  197. addr:'浙江省某某事某某去某某事中医院门诊楼三楼302是',
  198. rp:[
  199. {name:'车前子',num:'6g',tips:'包煎',sign:'医生签名'},
  200. {name:'车前子',num:'6g',tips:'先煎',sign:'医生签名'},
  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. ],
  244. pies:3,
  245. pies_tips:'待见',
  246. med_type:'汤剂',
  247. eat_type:'煎服',
  248. capa:'200ml',
  249. freque:'一日三次',
  250. eat_tips:'饭后服',
  251. rp_tips:'注意多休息,饮食清单。',
  252. money:{
  253. drugs_amount: 187.00,
  254. cook_fee:30.00,
  255. delie_fee:10.00,
  256. summary: 227.00,
  257. },
  258. service:{
  259. extra_doc:'A医生',
  260. check_doc:'B医生',
  261. depoly:'调陪人',
  262. review:'复核人',
  263. steep:'浸泡',
  264. cook:'煎煮人',
  265. pack:'大宝人',
  266. dispen:'发药人',
  267. },
  268. comment:'1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他'
  269. })
  270. onMounted(() => {
  271. })
  272. const handleGetRps = (v)=>{
  273. console.log('handleGetRps', v)
  274. if(!selectRps.value.includes(v)) {
  275. selectRps.value.push(v)
  276. } else {
  277. selectRps.value.splice(selectRps.value.indexOf(v), 1)
  278. }
  279. }
  280. const handleChange = ()=>{
  281. isPrint.value = !isPrint.value
  282. console.log('handleChange', isPrint.value)
  283. }
  284. const handleBack =()=>{
  285. uni.navigateBack({
  286. delta: 1
  287. })
  288. }
  289. const handleSubmit = ()=>{
  290. if(!isPrint){
  291. // 直接调用接口,然后打印
  292. console.log('直接调用接口,然后打印')
  293. } else {
  294. // 弹窗提醒
  295. // console.log("handleSubmit proxy.$refs.alertDialog",proxy.$refs.alertDialog)
  296. proxy.$refs.alertDialog.open('center')
  297. }
  298. }
  299. const dialogConfirm = ()=>{
  300. console.log('dialogConfirm直接调用接口,然后打印')
  301. }
  302. const dialogClose = ()=>{
  303. console.log('dialogClose直接调用接口,不打印')
  304. }
  305. </script>
  306. <style lang="scss">
  307. .main {
  308. display: flex;
  309. flex-direction:column;
  310. justify-content:flex-start;
  311. // height: 2000px;
  312. width: 1200px;
  313. .content{
  314. margin: 10px;
  315. background-color: #fff;
  316. flex-direction:column;
  317. align-items: center;
  318. .header{
  319. display: flex;
  320. flex-direction:column;
  321. margin:16px 16px 0;
  322. .ti{
  323. display: flex;
  324. flex-direction:row;
  325. justify-content: space-between;
  326. .left{
  327. align-items: flex-start;
  328. .baracode{
  329. display: flex;
  330. flex-direction:column;
  331. width: 320px;
  332. // align-items: center;
  333. .barnum{
  334. width:320px;
  335. font-size: 40px;
  336. display: flex;
  337. justify-content:center;
  338. align-items: center;
  339. letter-spacing: 0.1em;
  340. }
  341. }
  342. }
  343. .mid{
  344. align-items: flex-start;
  345. justify-content:center;
  346. width:320px;
  347. display: flex;
  348. .title{
  349. font-size: 40px;
  350. margin-top: 20px;
  351. font-weight: 800;
  352. }
  353. }
  354. .rig{
  355. align-items: flex-start;
  356. justify-content:flex-end;
  357. width:320px;
  358. display: flex;
  359. .title{
  360. font-size: 26px;
  361. width: 60px;
  362. font-weight: 300;
  363. }
  364. }
  365. }
  366. .patiinfo{
  367. display: flex;
  368. flex-direction:column;
  369. margin-top: 5px;
  370. padding-bottom: 10px;
  371. border-bottom: 1px solid #000;
  372. .r1{
  373. display: flex;
  374. flex-direction:row;
  375. height: 50px;
  376. .row{
  377. font-size: 28px;
  378. font-weight: 400;
  379. margin-right: 30px;
  380. }
  381. .status{
  382. background-color: #cfcfcf;
  383. }
  384. }
  385. .r2{
  386. display: flex;
  387. flex-direction:row;
  388. margin-top: 5px;
  389. height: 50px;
  390. .row{
  391. font-size: 28px;
  392. font-weight: 400;
  393. margin-right: 20px;
  394. }
  395. }
  396. .r3{
  397. display: flex;
  398. flex-direction:row;
  399. height: 50px;
  400. margin-top: 5px;
  401. font-size: 28px;
  402. font-weight: 400;
  403. }
  404. }
  405. }
  406. .rp{
  407. display: flex;
  408. flex-direction:column;
  409. margin:0 16px 0;
  410. border-bottom: 1px solid #000;
  411. .title{
  412. font-size: 40px;
  413. }
  414. .lists{
  415. display: flex;
  416. flex-wrap: wrap;
  417. flex-direction: row;
  418. justify-content:flex-start;
  419. align-content:flex-start;
  420. margin-left:80px;
  421. // width: 1000px;
  422. // height: 1800px;
  423. .item{
  424. display: flex;
  425. justify-content:center;
  426. align-items: center;
  427. height:80px;
  428. width: 220px;
  429. margin-right: 40px;
  430. // flex-basis: 25%;
  431. .le{
  432. display: flex;
  433. // width: 160px;
  434. font-size: 28px;
  435. }
  436. .tag-view:deep(.uni-tag){
  437. display: flex;
  438. justify-content:center;
  439. align-items: center;
  440. font-size: 20px;
  441. height: 40px;
  442. width: 100px;
  443. padding: 6px 20px;
  444. }
  445. .rig{
  446. display: flex;
  447. flex-direction:column;
  448. margin-left: 10px;
  449. .up{
  450. width: 80px;
  451. height: 22px;
  452. }
  453. .do{
  454. width: 80px;
  455. height: 22px;
  456. }
  457. }
  458. }
  459. }
  460. .footer{
  461. margin: 20px 0 0 80px;
  462. display: flex;
  463. font-size: 25px;
  464. .js{
  465. display: flex;
  466. margin-right: 100px;
  467. .pies_tips{}
  468. }
  469. .freque{}
  470. }
  471. .rp-tips{
  472. display: flex;
  473. justify-content:flex-end;
  474. font-size: 25px;
  475. }
  476. }
  477. .amountarea{
  478. display: flex;
  479. margin: 10px 16px 0;
  480. padding-bottom: 10px;
  481. border-bottom: 1px solid #000;
  482. .amount{
  483. display: flex;
  484. flex-direction:column;
  485. .r1{
  486. border: 1px solid #000;
  487. font-size: 30px;
  488. width: 400px;
  489. display: flex;
  490. justify-content:center;
  491. align-items: center;
  492. height: 50px;
  493. }
  494. .r2{
  495. display: flex;
  496. justify-content:center;
  497. align-items: center;
  498. font-size: 30px;
  499. height: 50px;
  500. width: 400px;
  501. border-left: 1px solid #000;
  502. border-right: 1px solid #000;
  503. .jyf{
  504. width: 200px;
  505. display: flex;
  506. justify-content:center;
  507. align-items: center;
  508. }
  509. .psf{
  510. border-left: 1px solid #000;
  511. width: 201px;
  512. display: flex;
  513. justify-content:center;
  514. align-items: center;
  515. }
  516. }
  517. .r3{
  518. display: flex;
  519. justify-content:center;
  520. align-items: center;
  521. height: 50px;
  522. font-size: 30px;
  523. border: 1px solid #000;
  524. }
  525. }
  526. .service{
  527. display: flex;
  528. flex-wrap: wrap;
  529. margin-left: 50px;
  530. .kf{
  531. font-size: 30px;
  532. margin-right: 55px;
  533. }
  534. }
  535. }
  536. .comment{
  537. margin: 10px 16px 10px;
  538. font-size: 30px;
  539. line-height: 50px;
  540. display: flex;
  541. }
  542. }
  543. .upload{
  544. margin: 0 10px 10px;
  545. background-color: #fff;
  546. flex-direction:column;
  547. align-items: center;
  548. padding: 20px;
  549. .title{
  550. font-size: 40px;
  551. margin-bottom:20px;
  552. }
  553. .plugin{
  554. // margin-left: 20px;
  555. }
  556. }
  557. .cooment{
  558. margin: 0 10px 10px 10px;
  559. background-color: #fff;
  560. flex-direction:column;
  561. align-items: center;
  562. padding: 20px;
  563. .title{
  564. font-size: 40px;
  565. margin-bottom:20px;
  566. }
  567. .tex{
  568. display: flex;
  569. justify-content:flex-start;
  570. align-items: center;
  571. margin-bottom:20px;
  572. border: 1px solid #cfcfcf;
  573. height: 60px;
  574. .input{
  575. height: 30px;
  576. font-size: 30px;
  577. padding-left: 10px;
  578. }
  579. }
  580. }
  581. .radio{
  582. display: flex;
  583. margin: 0 10px 10px 10px;
  584. // background-color: #fff;
  585. flex-direction:column;
  586. // align-items: center;
  587. font-size: 20px!important;
  588. }
  589. .submit{
  590. display: flex;
  591. margin: 40px 10px;
  592. // background-color: #fff;
  593. align-items: center;
  594. .bu{
  595. display: flex;
  596. justify-content:center;
  597. align-items: center;
  598. height: 60px;
  599. width: 600px;
  600. font-size: 30px;
  601. }
  602. }
  603. :deep(.uni-popup-dialog){
  604. width: 800px;
  605. height: 500px;
  606. display: flex;
  607. flex-direction: column;
  608. background-color: #e1e3e9;
  609. // justify-content:center;
  610. // align-items: center;
  611. .uni-dialog-title-text{
  612. display: flex;
  613. font-size: 30px;
  614. padding-top: 20px;
  615. }
  616. .uni-dialog-content{
  617. display: flex;
  618. margin: 20px 40px;
  619. background-color: #fff;
  620. .cotent{
  621. display: flex;
  622. flex-direction: column;
  623. .title{
  624. font-size: 30px;
  625. font-weight: 500;
  626. margin-bottom: 10px;
  627. display: flex;
  628. align-items: center;
  629. justify-content:center;
  630. }
  631. .body{
  632. display: flex;
  633. // flex-direction: column;
  634. justify-content:center;
  635. .lef{
  636. display: flex;
  637. flex-direction: column;
  638. width: 320px;
  639. justify-content:center;
  640. .baracode{
  641. display: flex;
  642. flex-direction:column;
  643. width: 320px;
  644. .cav{
  645. width:320px;
  646. }
  647. .barnum{
  648. width:320px;
  649. font-size: 28px;
  650. display: flex;
  651. justify-content:center;
  652. align-items: center;
  653. letter-spacing: 0.1em;
  654. }
  655. }
  656. }
  657. .rig{
  658. display: flex;
  659. flex-direction: column;
  660. width: 340px;
  661. margin-left: 30px;
  662. .hz{
  663. display: flex;
  664. margin-bottom: 10px;
  665. font-size: 28px;
  666. }
  667. .bold{
  668. font-weight: 500;
  669. }
  670. }
  671. }
  672. }
  673. }
  674. .uni-dialog-button-group{
  675. display: flex;
  676. margin-top: 20px;
  677. border: 0;
  678. .uni-dialog-button{
  679. display: flex;
  680. height: 78px;
  681. width: 100px!important;
  682. border: 1px solid #000;
  683. margin:0 40px;
  684. border-radius: 4px;
  685. .uni-dialog-button-text{
  686. font-size: 32px;
  687. }
  688. }
  689. .uni-border-left{
  690. height: 80px;
  691. width: 100px;
  692. border: 1px solid #007aff;
  693. background-color: #007aff;
  694. border: 1px solid #007aff;
  695. .uni-dialog-button-text{
  696. font-size: 32px;
  697. color: #fff;
  698. }
  699. }
  700. }
  701. }
  702. }
  703. </style>