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

printOne.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <template>
  2. <div id='prescriptionPrint'>
  3. <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
  4. <div style="display:flex;justify-content: space-between;font-weight:bold;align-items:center;">
  5. <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
  6. <span>费别</span>
  7. <span>自费</span>
  8. <span>公费</span>
  9. <span>保险</span>
  10. <span>其他</span>
  11. </div>
  12. <div>就诊日期:{{getTime(item.ctime,"{y}-{m}-{d}")}}</div>
  13. </div>
  14. <div class="printTitle">{{orgname}}</div>
  15. <div class="printTitle">处方、治疗单</div>
  16. <div class="infoTitle">
  17. <div>门诊编号:</div>
  18. <div>电脑号:</div>
  19. </div>
  20. <div class="infoMain">
  21. <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
  22. <div style="margin-bottom: 10px;width:25%">性别:
  23. <span v-if="item.patient.gender == 1">男</span>
  24. <span v-if="item.patient.gender == 2">女</span>
  25. </div>
  26. <div style="margin-bottom: 10px;width:25%">年龄:
  27. <span>{{item.patient.age}}</span>
  28. </div>
  29. <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}</div>
  30. <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
  31. <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
  32. <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
  33. </div>
  34. <div class="prescriptionBox">
  35. <table style="width:100%;text-align:center;line-height:25px;">
  36. <tr>
  37. <td>序号</td>
  38. <td>项目名称</td>
  39. <td>数量</td>
  40. <td>单位</td>
  41. <td>单价</td>
  42. <td>部位</td>
  43. <td>备注</td>
  44. <td>天数</td>
  45. </tr>
  46. <tr v-for="(it,index) in item.project" :key="index">
  47. <td>{{index+1}}</td>
  48. <td>{{getProjectName(it.project_id)}}</td>
  49. <td>{{it.single_dose}}</td>
  50. <td>{{getUnit(it.unit)}}</td>
  51. <td>{{it.price}}</td>
  52. <td></td>
  53. <td>{{it.remark}}</td>
  54. <td>{{it.day}}</td>
  55. </tr>
  56. <tr v-for="(it,index) in item.advices" :key="index">
  57. <td>{{index+1}}</td>
  58. <td>{{it.advice_name?it.advice_name:''}}</td>
  59. <td>{{it.single_dose?it.single_dose:''}}</td>
  60. <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
  61. <td>{{it.price}}</td>
  62. <td></td>
  63. <td>{{it.remark}}</td>
  64. <td>{{it.day}}</td>
  65. </tr>
  66. </table>
  67. </div>
  68. <div class="infoTitle">
  69. <div>开单医生:{{item.doctor?item.doctor:""}}</div>
  70. <div>签章:</div>
  71. </div>
  72. <div class="actionBar">
  73. <div>执行医生:{{item.doctor?item.doctor:""}}</div>
  74. <div>费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
  75. </div>
  76. <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
  77. <tr>
  78. <td style="width:16%;">治疗时间</td>
  79. <td style="width:16%;"></td>
  80. <td style="width:16%;"></td>
  81. <td style="width:16%;"></td>
  82. <td style="width:16%;"></td>
  83. <td style="width:16%;"></td>
  84. </tr>
  85. <tr>
  86. <td style="width:16%;">医生签字</td>
  87. <td style="width:16%;"></td>
  88. <td style="width:16%;"></td>
  89. <td style="width:16%;"></td>
  90. <td style="width:16%;"></td>
  91. <td style="width:16%;"></td>
  92. </tr>
  93. <tr>
  94. <td style="width:16px;">患者签字</td>
  95. <td style="width:16px;"></td>
  96. <td style="width:16px;"></td>
  97. <td style="width:16px;"></td>
  98. <td style="width:16px;"></td>
  99. <td style="width:16px;"></td>
  100. </tr>
  101. </table>
  102. </div>
  103. <!-- <div id='prescriptionPrint'>
  104. <div v-for="(item,index) in advicePrint" :key="index">
  105. <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
  106. <div style="display:flex;justify-content: space-between;font-weight:bold;">
  107. <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
  108. <span>费别</span>
  109. <span>自费</span>
  110. <span>公费</span>
  111. <span>保险</span>
  112. <span>其他</span>
  113. </div>
  114. <div>就诊日期:{{getTime(item.ctime)}}</div>
  115. </div>
  116. <div class="printTitle">血液透析中心</div>
  117. <div class="printTitle">处方、治疗单</div>
  118. <div class="infoTitle">
  119. <div>门诊编号:</div>
  120. <div>电脑号:</div>
  121. </div>
  122. <div class="infoMain">
  123. <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
  124. <div style="margin-bottom: 10px;width:25%">性别:
  125. <span v-if="item.patient.gender == 1">男</span>
  126. <span v-if="item.patient.gender == 2">女</span>
  127. </div>
  128. <div style="margin-bottom: 10px;width:25%">年龄:
  129. <span>{{item.patient.age}}</span>
  130. </div>
  131. <div style="margin-bottom: 10px;width:25%">参保类型:</div>
  132. <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
  133. <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
  134. <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
  135. </div>
  136. <div class="prescriptionBox">
  137. <table style="width:100%;text-align:center;line-height:25px;">
  138. <tr>
  139. <td>序号</td>
  140. <td>项目名称</td>
  141. <td>数量</td>
  142. <td>单位</td>
  143. <td>单价</td>
  144. <td>部位</td>
  145. <td>备注</td>
  146. <td>天数</td>
  147. </tr>
  148. <tr v-for="(it,index) in item.project" :key="index">
  149. <td>{{index+1}}</td>
  150. <td>{{getProjectName(it.project_id)}}</td>
  151. <td>{{it.single_dose}}</td>
  152. <td>{{getUnit(it.unit)}}</td>
  153. <td>{{it.price}}</td>
  154. <td></td>
  155. <td>{{it.remark}}</td>
  156. <td>{{it.day}}</td>
  157. </tr>
  158. </table>
  159. </div>
  160. <div class="infoTitle">
  161. <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
  162. <div>签章:</div>
  163. </div>
  164. <div class="actionBar">
  165. <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
  166. <div>费用:</div>
  167. </div>
  168. <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
  169. <tr>
  170. <td style="width:16%;">治疗时间</td>
  171. <td style="width:16%;"></td>
  172. <td style="width:16%;"></td>
  173. <td style="width:16%;"></td>
  174. <td style="width:16%;"></td>
  175. <td style="width:16%;"></td>
  176. </tr>
  177. <tr>
  178. <td style="width:16%;">医生签字</td>
  179. <td style="width:16%;"></td>
  180. <td style="width:16%;"></td>
  181. <td style="width:16%;"></td>
  182. <td style="width:16%;"></td>
  183. <td style="width:16%;"></td>
  184. </tr>
  185. <tr>
  186. <td style="width:16px;">患者签字</td>
  187. <td style="width:16px;"></td>
  188. <td style="width:16px;"></td>
  189. <td style="width:16px;"></td>
  190. <td style="width:16px;"></td>
  191. <td style="width:16px;"></td>
  192. </tr>
  193. </table>
  194. </div>
  195. </div>
  196. </div> -->
  197. </div>
  198. </template>
  199. <script>
  200. import { jsGetAge, uParseTime } from '@/utils/tools'
  201. import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
  202. export default {
  203. props:{
  204. patient_id:Number,
  205. record_date:String,
  206. prescription_id:Number,
  207. ids:String
  208. },
  209. data(){
  210. return {
  211. doctorList:[],
  212. advicePrint:{},
  213. patient:{},
  214. tableData:[],
  215. prescriptionInfo:[],
  216. projectList:[],
  217. prescriptions:[],
  218. settlement:
  219. [
  220. {value: 1,label: '医保'},
  221. {value: 2,label: '自费'},
  222. {value: 3,label:'公费'},
  223. {value: 4,label:'农保'},
  224. {value: 5,label:'会员'},
  225. {value: 6,label:'职工'},
  226. {value: 7,label:'合同'}
  227. ],
  228. hisPatient:{}
  229. }
  230. },
  231. methods:{
  232. printThisPage() {
  233. var ptime = Math.round(new Date().getTime() / 1000);
  234. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  235. const style =
  236. '@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;}}';
  237. printJS({
  238. printable: "prescription-print",
  239. type: "html",
  240. style: style,
  241. scanStyles: false
  242. });
  243. },
  244. getAllDoctorList(){
  245. getAllDoctorList().then(response=>{
  246. if(response.data.state == 1){
  247. var doctor = response.data.data.doctor
  248. this.doctorList = doctor
  249. }
  250. })
  251. },
  252. getDoctor(id){
  253. var name = ""
  254. for(let i=0;i<this.doctorList.length;i++){
  255. if(id == this.doctorList[i].admin_user_id){
  256. name = this.doctorList[i].user_name
  257. }
  258. }
  259. return name
  260. },
  261. getTime(value, temp) {
  262. if (value != undefined) {
  263. return uParseTime(value, temp)
  264. }
  265. return ''
  266. },
  267. getPrescriptionPrint(){
  268. var params = {
  269. patient_id:this.patient_id,
  270. record_date:this.record_date,
  271. prescription_id:this.prescription_id,
  272. ids:this.ids,
  273. }
  274. console.log("999999",params)
  275. getPrescriptionPrint(params).then(response=>{
  276. if(response.data.state == 1){
  277. var advicePrint = response.data.data.advicePrint
  278. console.log("adviceprint",advicePrint)
  279. this.advicePrint = advicePrint
  280. this.prescriptions = advicePrint
  281. var projectlist = response.data.data.projectlist
  282. console.log("所有项目列表",projectlist)
  283. this.projectList = projectlist
  284. this.hisPatient = response.data.data.hisPatient
  285. }
  286. })
  287. },
  288. getProjectName(id){
  289. var project_name = ""
  290. for(let i=0;i<this.projectList.length;i++){
  291. if(id == this.projectList[i].id){
  292. project_name = this.projectList[i].project_name
  293. }
  294. }
  295. return project_name
  296. },
  297. getUnit(id){
  298. var unit=""
  299. for(let i=0;i<this.projectList.length;i++){
  300. if(id == this.projectList[i].id){
  301. unit = this.projectList[i].unit
  302. }
  303. }
  304. return unit
  305. },
  306. getTotalOne(id) {
  307. var total = 0
  308. var addtotal = 0
  309. for (let i = 0; i < this.prescriptions.length; i++) {
  310. if(id == this.prescriptions[i].id){
  311. if (this.prescriptions[i].project != null) {
  312. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  313. total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
  314. }
  315. }
  316. if (this.prescriptions[i].additionalcharge != null) {
  317. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  318. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  319. }
  320. }
  321. addtotal = Math.floor(addtotal * 100) / 100
  322. }
  323. }
  324. for (let i = 0; i < this.prescriptions.length; i++) {
  325. if(id == this.prescriptions[i].id){
  326. if (this.prescriptions[i].advices != null) {
  327. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  328. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  329. }
  330. }
  331. if (this.prescriptions[i].additionalcharge != null) {
  332. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  333. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  334. }
  335. }
  336. addtotal = Math.floor(addtotal * 100) / 100
  337. }
  338. }
  339. return total + addtotal
  340. },
  341. },
  342. created(){
  343. this.getAllDoctorList()
  344. this.getPrescriptionPrint()
  345. var xtuser = this.$store.getters.xt_user
  346. this.orgname = xtuser.org.org_name
  347. },
  348. watch:{
  349. patient_id:function(val){
  350. console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
  351. // this.getPrescriptionPrint()
  352. },
  353. ids:function(val){
  354. this.ids = val
  355. console.log('this.idsids',this.ids)
  356. this.getPrescriptionPrint()
  357. }
  358. }
  359. }
  360. </script>
  361. <style lang="scss" scoped>
  362. .prescription-print{
  363. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  364. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  365. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  366. margin-bottom: 20px;
  367. padding:20px 10px;
  368. }
  369. .prescription-print{
  370. font-size: 14px;
  371. }
  372. .printTitle{
  373. font-size: 18px;
  374. text-align: center;
  375. font-weight: bold;
  376. margin-top: 10px;
  377. }
  378. .infoTitle{
  379. display: flex;
  380. border-bottom: 2px solid #000;
  381. margin-top:10px;
  382. line-height: 24px;
  383. padding:0 10px;
  384. }
  385. .infoTitle div{
  386. width: 300px;
  387. }
  388. .infoMain{
  389. display: flex;
  390. flex-wrap: wrap;
  391. border-bottom: 2px solid #000;
  392. padding:0 10px;
  393. }
  394. .infoMain div{
  395. width: 50%;
  396. line-height: 24px;
  397. }
  398. .prescriptionBox{
  399. padding:0 10px;
  400. min-height:600px;
  401. }
  402. .Rp{
  403. font-size: 22px;
  404. font-weight: bold;
  405. }
  406. .drugsBox{
  407. padding-left: 40px;
  408. margin-bottom: 10px;
  409. }
  410. .drugsBox p{
  411. line-height: 30px;
  412. }
  413. .drugsOne{
  414. line-height: 24px;
  415. }
  416. .drugsOne span{
  417. margin-right: 20px;
  418. }
  419. .actionBar{
  420. display: flex;
  421. justify-content: space-between;
  422. line-height: 24px;
  423. padding:0 10px;
  424. }
  425. .actionBar div{
  426. width:150px;
  427. }
  428. </style>