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

printOne.vue 17KB

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