Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

printTwo.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. <template>
  2. <div id='prescriptionPrint'>
  3. <div id='prescription-print' v-if="item.advices.length == 0" class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
  4. <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
  5. <div class="printTitle">治疗单</div>
  6. <div style="display:flex;">
  7. <div style="width:33%;display:flex;">费别:<span class="under_line">{{ faber ? getName(faber.transBody.outputlist1) : '' }}</span></div>
  8. <div style="width:33%;display:flex;">电脑号:<span class="under_line">{{ faber ? faber.transBody.aac999 : '' }}</span></div>
  9. <div style="width:33%;display:flex;">处方编号:<span class="under_line">{{ item.prescription_number.substring(item.prescription_number.length-6) }}</span></div>
  10. </div>
  11. <div class="infoTitle">
  12. <div>姓名:{{item.patient.name?item.patient.name:""}}</div>
  13. <div>性别:
  14. <span v-if="item.patient.gender == 1">男</span>
  15. <span v-if="item.patient.gender == 2">女</span>
  16. </div>
  17. <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
  18. </div>
  19. <div class="infoMain">
  20. <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
  21. <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line">{{item.info?getDepart(item.info.departments):''}}</span></div>
  22. <div style="margin-bottom: 10px;display:flex;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
  23. <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
  24. <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
  25. <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
  26. <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
  27. <!-- <div>地址:{{item.patient.home_address}}</div> -->
  28. <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
  29. </div>
  30. <!-- <div class="prescriptionBox">
  31. <table style="width:100%;text-align:center;line-height:25px;">
  32. <tr>
  33. <td>序号</td>
  34. <td>项目名称</td>
  35. <td>数量</td>
  36. <td>单位</td>
  37. <td>单价</td>
  38. <td>部位</td>
  39. <td>备注</td>
  40. <td>天数</td>
  41. </tr>
  42. <tr v-for="(it,index) in item.project" :key="index">
  43. <td>{{index+1}}</td>
  44. <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
  45. <td>{{it.single_dose}}</td>
  46. <td>{{getUnit(it.unit)}}</td>
  47. <td>{{it.price}}</td>
  48. <td></td>
  49. <td>{{it.remark}}</td>
  50. <td>{{it.day}}</td>
  51. </tr>
  52. <tr v-for="(it,index) in item.advices" :key="index">
  53. <td>{{index+1}}</td>
  54. <td>{{it.advice_name?it.advice_name:''}}</td>
  55. <td>{{it.single_dose?it.single_dose:''}}</td>
  56. <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
  57. <td>{{it.price}}</td>
  58. <td></td>
  59. <td>{{it.remark}}</td>
  60. <td>{{it.day}}</td>
  61. </tr>
  62. </table>
  63. </div> -->
  64. <div class="prescriptionBox">
  65. <div class="Rp">Rp:</div>
  66. <!-- <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
  67. <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
  68. </div> -->
  69. <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
  70. <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
  71. </div>
  72. <div style="text-align:center;" >(以下空白)</div>
  73. </div>
  74. <div style="display:flex;">
  75. <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
  76. <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div>
  77. </div>
  78. <div style="display:flex;">
  79. <div style="display:flex;">核对护士:</div>
  80. </div>
  81. <div style="display:flex;">
  82. 打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
  83. </div>
  84. <img src="../../../assets/img/bailinBottom.jpg" style="width:100%" alt="">
  85. <div style="page-break-after:always"></div>
  86. </div>
  87. <!-- <div id='prescriptionPrint'>
  88. <div v-for="(item,index) in advicePrint" :key="index">
  89. <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
  90. <div style="display:flex;justify-content: space-between;font-weight:bold;">
  91. <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
  92. <span>费别</span>
  93. <span>自费</span>
  94. <span>公费</span>
  95. <span>保险</span>
  96. <span>其他</span>
  97. </div>
  98. <div>就诊日期:{{getTime(item.ctime)}}</div>
  99. </div>
  100. <div class="printTitle">血液透析中心</div>
  101. <div class="printTitle">处方、治疗单</div>
  102. <div class="infoTitle">
  103. <div>门诊编号:</div>
  104. <div>电脑号:</div>
  105. </div>
  106. <div class="infoMain">
  107. <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
  108. <div style="margin-bottom: 10px;width:25%">性别:
  109. <span v-if="item.patient.gender == 1">男</span>
  110. <span v-if="item.patient.gender == 2">女</span>
  111. </div>
  112. <div style="margin-bottom: 10px;width:25%">年龄:
  113. <span>{{item.patient.age}}</span>
  114. </div>
  115. <div style="margin-bottom: 10px;width:25%">参保类型:</div>
  116. <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
  117. <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
  118. <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
  119. </div>
  120. <div class="prescriptionBox">
  121. <table style="width:100%;text-align:center;line-height:25px;">
  122. <tr>
  123. <td>序号</td>
  124. <td>项目名称</td>
  125. <td>数量</td>
  126. <td>单位</td>
  127. <td>单价</td>
  128. <td>部位</td>
  129. <td>备注</td>
  130. <td>天数</td>
  131. </tr>
  132. <tr v-for="(it,index) in item.project" :key="index">
  133. <td>{{index+1}}</td>
  134. <td>{{getProjectName(it.project_id)}}</td>
  135. <td>{{it.single_dose}}</td>
  136. <td>{{getUnit(it.unit)}}</td>
  137. <td>{{it.price}}</td>
  138. <td></td>
  139. <td>{{it.remark}}</td>
  140. <td>{{it.day}}</td>
  141. </tr>
  142. </table>
  143. </div>
  144. <div class="infoTitle">
  145. <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
  146. <div>签章:</div>
  147. </div>
  148. <div class="actionBar">
  149. <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
  150. <div>费用:</div>
  151. </div>
  152. <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
  153. <tr>
  154. <td style="width:16%;">治疗时间</td>
  155. <td style="width:16%;"></td>
  156. <td style="width:16%;"></td>
  157. <td style="width:16%;"></td>
  158. <td style="width:16%;"></td>
  159. <td style="width:16%;"></td>
  160. </tr>
  161. <tr>
  162. <td style="width:16%;">医生签字</td>
  163. <td style="width:16%;"></td>
  164. <td style="width:16%;"></td>
  165. <td style="width:16%;"></td>
  166. <td style="width:16%;"></td>
  167. <td style="width:16%;"></td>
  168. </tr>
  169. <tr>
  170. <td style="width:16px;">患者签字</td>
  171. <td style="width:16px;"></td>
  172. <td style="width:16px;"></td>
  173. <td style="width:16px;"></td>
  174. <td style="width:16px;"></td>
  175. <td style="width:16px;"></td>
  176. </tr>
  177. </table>
  178. </div>
  179. </div>
  180. </div> -->
  181. </div>
  182. </template>
  183. <script>
  184. import { jsGetAge, uParseTime } from '@/utils/tools'
  185. import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
  186. import {getInitData} from "@/api/his/his"
  187. export default {
  188. props:{
  189. patient_id:Number,
  190. record_date:String,
  191. prescription_id:Number,
  192. ids:String
  193. },
  194. data(){
  195. return {
  196. doctorList:[],
  197. advicePrint:{},
  198. patient:{},
  199. tableData:[],
  200. prescriptionInfo:[],
  201. projectList:[],
  202. prescriptions:[],
  203. settlement:
  204. [
  205. {value: 1,label: '医保'},
  206. {value: 2,label: '自费'},
  207. {value: 3,label:'公费'},
  208. {value: 4,label:'农保'},
  209. {value: 5,label:'会员'},
  210. {value: 6,label:'职工'},
  211. {value: 7,label:'合同'}
  212. ],
  213. hisPatient:{},
  214. diagnoses:[],
  215. department:[],
  216. faber:{}
  217. }
  218. },
  219. methods:{
  220. printThisPage() {
  221. var ptime = Math.round(new Date().getTime() / 1000);
  222. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  223. const style =
  224. '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}';
  225. printJS({
  226. printable: "prescription-print",
  227. type: "html",
  228. style: style,
  229. scanStyles: false
  230. });
  231. },
  232. getDepart(id){
  233. var name = ""
  234. for(let i=0;i<this.department.length;i++){
  235. if(id == this.department[i].id){
  236. name = this.department[i].name
  237. }
  238. }
  239. return name
  240. },
  241. getAllDoctorList(){
  242. getAllDoctorList().then(response=>{
  243. if(response.data.state == 1){
  244. var doctor = response.data.data.doctor
  245. this.doctorList = doctor
  246. }
  247. })
  248. },
  249. getDoctor(id){
  250. var name = ""
  251. for(let i=0;i<this.doctorList.length;i++){
  252. if(id == this.doctorList[i].admin_user_id){
  253. name = this.doctorList[i].user_name
  254. }
  255. }
  256. return name
  257. },
  258. getTime(value, temp) {
  259. if (value != undefined) {
  260. return uParseTime(value, temp)
  261. }
  262. return ''
  263. },
  264. getPrescriptionPrint(){
  265. var params = {
  266. patient_id:this.patient_id,
  267. record_date:this.record_date,
  268. prescription_id:this.prescription_id,
  269. ids:this.ids,
  270. }
  271. console.log("999999",params)
  272. getPrescriptionPrint(params).then(response=>{
  273. if(response.data.state == 1){
  274. var advicePrint = response.data.data.advicePrint
  275. console.log("adviceprint",advicePrint)
  276. this.advicePrint = advicePrint
  277. this.prescriptions = advicePrint
  278. var projectlist = response.data.data.projectlist
  279. console.log("所有项目列表",projectlist)
  280. this.projectList = projectlist
  281. this.hisPatient = response.data.data.hisPatient
  282. let outputlist1Name = JSON.parse(response.data.data.his.patient_info);
  283. this.faber = outputlist1Name
  284. }
  285. })
  286. },
  287. getProjectName(id){
  288. var project_name = ""
  289. for(let i=0;i<this.projectList.length;i++){
  290. if(id == this.projectList[i].id){
  291. project_name = this.projectList[i].project_name
  292. }
  293. }
  294. return project_name
  295. },
  296. getUnit(id){
  297. var unit=""
  298. for(let i=0;i<this.projectList.length;i++){
  299. if(id == this.projectList[i].id){
  300. unit = this.projectList[i].unit
  301. }
  302. }
  303. return unit
  304. },
  305. getTotalOne(id) {
  306. var total = 0
  307. var addtotal = 0
  308. for (let i = 0; i < this.prescriptions.length; i++) {
  309. if(id == this.prescriptions[i].id){
  310. if (this.prescriptions[i].project != null) {
  311. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  312. total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
  313. }
  314. }
  315. if (this.prescriptions[i].additionalcharge != null) {
  316. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  317. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  318. }
  319. }
  320. addtotal = Math.floor(addtotal * 100) / 100
  321. }
  322. }
  323. for (let i = 0; i < this.prescriptions.length; i++) {
  324. if(id == this.prescriptions[i].id){
  325. if (this.prescriptions[i].advices != null) {
  326. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  327. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  328. }
  329. }
  330. if (this.prescriptions[i].additionalcharge != null) {
  331. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  332. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  333. }
  334. }
  335. addtotal = Math.floor(addtotal * 100) / 100
  336. }
  337. }
  338. return total + addtotal
  339. },
  340. getInitData(){
  341. getInitData().then(response=>{
  342. if(response.data.state == 1){
  343. this.department = response.data.data.department
  344. this.diagnoses = response.data.data.diagnose
  345. console.log("争端",this.diagnoses)
  346. }
  347. })
  348. },
  349. getDiagnosis(id){
  350. var name = ""
  351. for(let i=0;i<this.diagnoses.length;i++){
  352. if(id == this.diagnoses[i].id){
  353. name = this.diagnoses[i].class_name
  354. }
  355. }
  356. return name
  357. },
  358. getName(list) {
  359. console.log('list',list)
  360. let new_list = []
  361. for (let i = 0; i < list.length; i++) {
  362. if (list[i].aac031 == '1') {
  363. new_list.push(list[i])
  364. }
  365. }
  366. switch (new_list[0].bcc334) {
  367. case "A31001":
  368. return "深圳医保1档"
  369. break
  370. case "A31002":
  371. return "深圳医保2档"
  372. break
  373. case "A31003":
  374. return "深圳医保3档"
  375. break
  376. case "A31004":
  377. return "二档(少儿)"
  378. break
  379. case "A31005":
  380. return "学生二档"
  381. break
  382. case "A31006":
  383. return "大学生二档"
  384. break
  385. case "A32001":
  386. return "在职公务员"
  387. break
  388. case "A32002":
  389. return "在职驻深公务员"
  390. break
  391. case "A39301":
  392. return "家属统筹医疗"
  393. break
  394. case "A41001":
  395. return "工伤在职"
  396. break
  397. case "A51001":
  398. return "生育在职"
  399. break
  400. case "A52001":
  401. return "生育医疗一档"
  402. break
  403. case "A52002":
  404. return "生育医疗一档"
  405. break
  406. case "C31001":
  407. return "一档医疗退休"
  408. break
  409. case "C31002":
  410. return "二档医疗退休"
  411. break
  412. }
  413. },
  414. },
  415. created(){
  416. this.getInitData()
  417. this.getAllDoctorList()
  418. this.getPrescriptionPrint()
  419. var xtuser = this.$store.getters.xt_user
  420. this.orgname = xtuser.org.org_name
  421. },
  422. watch:{
  423. patient_id:function(val){
  424. console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
  425. // this.getPrescriptionPrint()
  426. },
  427. ids:function(val){
  428. this.ids = val
  429. console.log('this.idsids',this.ids)
  430. this.getPrescriptionPrint()
  431. }
  432. }
  433. }
  434. </script>
  435. <style lang="scss" scoped>
  436. .prescription-print{
  437. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  438. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  439. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  440. margin-bottom: 20px;
  441. padding:20px 10px;
  442. }
  443. .printTitle{
  444. font-size: 22px;
  445. text-align: center;
  446. font-weight: bold;
  447. margin-bottom: 10px;
  448. }
  449. .infoTitle{
  450. display: flex;
  451. margin-top:10px;
  452. line-height: 24px;
  453. }
  454. .infoTitle div{
  455. width: 200px;
  456. }
  457. .infoMain{
  458. display: flex;
  459. flex-wrap: wrap;
  460. margin-top:10px;
  461. }
  462. .infoMain div{
  463. width: 50%;
  464. line-height: 24px;
  465. }
  466. .prescriptionBox{
  467. padding:0 10px;
  468. min-height:400px;
  469. }
  470. .Rp{
  471. font-size: 22px;
  472. font-weight: bold;
  473. }
  474. .drugsBox{
  475. padding-left: 40px;
  476. margin-bottom: 10px;
  477. }
  478. .drugsBox div{
  479. line-height: 20px;
  480. }
  481. .drugsOne{
  482. line-height: 24px;
  483. }
  484. .drugsOne span{
  485. margin-right: 20px;
  486. }
  487. .doctorBox{
  488. display: flex;
  489. justify-content: space-between;
  490. padding:0 10px;
  491. line-height: 24px;
  492. border-bottom: 2px solid #000;
  493. }
  494. .actionBar{
  495. display: flex;
  496. justify-content: space-between;
  497. line-height: 24px;
  498. padding:0 10px;
  499. }
  500. .actionBar p{
  501. width:150px;
  502. }
  503. .under_line{
  504. display: inline-block;
  505. border-bottom: 1px solid #000;
  506. flex: 1;
  507. }
  508. </style>