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

printOne.vue 18KB

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