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

printOne.vue 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div>
  3. <div id='prescription-print3' class="prescription-print">
  4. <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
  5. <div class="printTitle">检验申请单</div>
  6. <div style="border:1px solid #000;">
  7. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
  8. <div>是否急诊:否</div>
  9. <div>结算方式:{{ faber && faber.transBody ? getName(faber.transBody.outputlist1) : '' }}</div>
  10. <div>金额:{{ total }}</div>
  11. </div>
  12. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
  13. <div>姓名:{{advicePrint[0].patient.name? advicePrint[0].patient.name.indexOf("(") > -1 ? advicePrint[0].patient.name.substring(0,advicePrint[0].patient.name.indexOf("(")) : advicePrint[0].patient.name:""}}</div>
  14. <div>性别:
  15. <span v-if="advicePrint[0].patient.gender == 1">男</span>
  16. <span v-if="advicePrint[0].patient.gender == 2">女</span>
  17. </div>
  18. <div>年龄:{{advicePrint[0].patient.age?advicePrint[0].patient.age:""}}岁</div>
  19. </div>
  20. <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div>
  21. <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
  22. <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
  23. <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
  24. <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
  25. <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
  26. </div> -->
  27. <div style="margin-bottom:20px;padding:0 10px;">临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}</div>
  28. <div style="display:flex;margin-bottom:20px;padding:0 10px;">
  29. <div>检验项目:</div>
  30. <div>
  31. <div v-for="item in projectPrint" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
  32. <div v-for="item in singleProjectPrint" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
  33. </div>
  34. </div>
  35. <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
  36. <div>开单医生:{{ doctor ? doctor : '' }}</div>
  37. <div>开单日期:
  38. {{getTime(pre_time) ? getTime(pre_time).split(' ')[0] : ''}}
  39. </div>
  40. <div>医生签字:{{ doctor ? doctor : '' }}</div>
  41. </div>
  42. </div>
  43. <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import { jsGetAge, uParseTime } from '@/utils/tools'
  49. import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail,getPatientCaseHistory} from "@/api/project/project"
  50. import {getInitData} from "@/api/his/his"
  51. export default {
  52. props:{
  53. patient_id:Number,
  54. record_date:String,
  55. prescription_id:Number,
  56. ids:String
  57. },
  58. data(){
  59. return {
  60. doctorList:[],
  61. advicePrint:{},
  62. patient:{},
  63. tableData:[],
  64. prescriptionInfo:[],
  65. hisPatient:{},
  66. department:[],
  67. prescriptions:[],
  68. projectList:[],
  69. orgname:"",
  70. diagnoses:[],
  71. pageArr:[],
  72. faber:{},
  73. total:0,
  74. projectPrint:[],
  75. time:'',
  76. doctor:'',
  77. org_id:'',
  78. singleProjectPrint:[]
  79. }
  80. },
  81. methods:{
  82. getPatientCaseHistory(){
  83. const params = {
  84. patient_id:this.patient_id
  85. }
  86. getPatientCaseHistory(params).then(response=>{
  87. if(response.data.state == 1){
  88. var history = response.data.data.history
  89. console.log("中国history222222",history)
  90. this.history = history
  91. }
  92. })
  93. },
  94. getAllDoctorList(){
  95. getAllDoctorList().then(response=>{
  96. if(response.data.state == 1){
  97. var doctor = response.data.data.doctor
  98. this.doctorList = doctor
  99. }
  100. })
  101. },
  102. getDoctor(id){
  103. var name = ""
  104. for(let i=0;i<this.doctorList.length;i++){
  105. if(id == this.doctorList[i].admin_user_id){
  106. name = this.doctorList[i].user_name
  107. }
  108. }
  109. return name
  110. },
  111. getTime(value, temp) {
  112. if (value != undefined) {
  113. return uParseTime(value, temp)
  114. }
  115. return ''
  116. },
  117. getPrescriptionPrint(){
  118. var params = {
  119. // patient_id:this.patient_id,
  120. // record_date:this.record_date,
  121. // prescription_id:this.prescription_id,
  122. patient_id:this.patient_id,
  123. record_date:this.record_date,
  124. prescription_id:this.prescription_id,
  125. ids:this.ids
  126. }
  127. console.log("params",params)
  128. getPrescriptionPrint(params).then(response=>{
  129. if(response.data.state == 1){
  130. var advicePrint = response.data.data.advicePrint
  131. console.log("adviceprint9999",advicePrint)
  132. this.advicePrint = advicePrint
  133. this.prescriptions = advicePrint
  134. console.log("处方222222",this.prescriptions)
  135. var hisPatient = response.data.data.hisPatient
  136. console.log("hisPatient",hisPatient)
  137. this.hisPatient = hisPatient
  138. let projectPrint = []
  139. let total = 0
  140. this.advicePrint.map(item => {
  141. if(item.project.length > 0){
  142. item.project.map(it => {
  143. if(it.type == 2){
  144. if(it.project.cost_classify == 3){
  145. projectPrint.push(it)
  146. total += it.project.price
  147. }
  148. }
  149. })
  150. }
  151. })
  152. let data = []
  153. let data2 = []
  154. projectPrint.map(item => {
  155. if(item.team.id != 0){
  156. let status = data.some(it => (it.team.id == item.team.id))
  157. if(!status){
  158. data.push(item)
  159. }
  160. }
  161. if(item.team.id == 0){
  162. data2.push(item)
  163. }
  164. })
  165. this.total = total
  166. this.pre_time = this.advicePrint[0].pre_time
  167. this.doctor = this.advicePrint[0].doctor
  168. this.projectPrint = data
  169. this.singleProjectPrint = data2
  170. console.log('99999999999999999',projectPrint)
  171. var projectlist = response.data.data.projectlist
  172. var projectlist = response.data.data.projectlist
  173. console.log("所有项目列表",projectlist)
  174. this.projectList = projectlist
  175. this.getPage()
  176. let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
  177. this.faber = outputlist1Name
  178. }
  179. })
  180. },
  181. getHisPatientDetail(){
  182. const params = {
  183. patient_id:this.patient_id
  184. }
  185. getHisPatientDetail(params).then(response=>{
  186. if(response.data.state == 1){
  187. var hisPatient = response.data.data.hisPatient
  188. console.log("挂号病人",hisPatient)
  189. this.hisPatient = hisPatient
  190. }
  191. })
  192. },
  193. getInitData(){
  194. getInitData().then(response=>{
  195. if(response.data.state == 1){
  196. this.department = response.data.data.department
  197. this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
  198. console.log("争端",this.diagnoses)
  199. }
  200. })
  201. },
  202. getDepart(id){
  203. var name = ""
  204. for(let i=0;i<this.department.length;i++){
  205. if(id == this.department[i].id){
  206. name = this.department[i].name
  207. }
  208. }
  209. return name
  210. },
  211. getTotalOne(id) {
  212. var total = 0
  213. var addtotal = 0
  214. for (let i = 0; i < this.prescriptions.length; i++) {
  215. if(id == this.prescriptions[i].id){
  216. if (this.prescriptions[i].project != null) {
  217. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  218. total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
  219. }
  220. }
  221. if (this.prescriptions[i].additionalcharge != null) {
  222. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  223. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  224. }
  225. }
  226. addtotal = Math.floor(addtotal * 100) / 100
  227. }
  228. }
  229. for (let i = 0; i < this.prescriptions.length; i++) {
  230. if(id == this.prescriptions[i].id){
  231. if (this.prescriptions[i].advices != null) {
  232. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  233. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  234. }
  235. }
  236. if (this.prescriptions[i].additionalcharge != null) {
  237. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  238. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  239. }
  240. }
  241. addtotal = Math.floor(addtotal * 100) / 100
  242. }
  243. }
  244. return total + addtotal
  245. },
  246. getProjectName(id){
  247. var project_name = ""
  248. for(let i=0;i<this.projectList.length;i++){
  249. if(id == this.projectList[i].id){
  250. project_name = this.projectList[i].project_name
  251. }
  252. }
  253. return project_name
  254. },
  255. getDiagnosis(ids){
  256. let newIds = ids.split(',').sort(function(a,b){
  257. return a-b;
  258. })
  259. var name = ""
  260. let nameArr = []
  261. for(let i=0;i<this.diagnoses.length;i++){
  262. // if(id == this.diagnoses[i].id){
  263. // name = this.diagnoses[i].class_name
  264. // }
  265. if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
  266. // name += diagnoses[i].class_name + ' '
  267. nameArr.push(this.diagnoses[i].class_name)
  268. }
  269. }
  270. let newNameArr = []
  271. nameArr.map((item,index) => {
  272. if(item == '尿毒症'){
  273. newNameArr.push(item)
  274. nameArr.splice(index,1,'')
  275. }
  276. })
  277. newNameArr.push(...nameArr)
  278. return newNameArr.join(' ')
  279. },
  280. compare(property) {
  281. return function(a,b){
  282. var value1 = a[property];
  283. var value2 = b[property];
  284. return value1 - value2;//升序排序
  285. }
  286. },
  287. getPage(){
  288. this.page = 1
  289. this.pageArr = []
  290. this.advicePrint.map(item => {
  291. let arr = []
  292. item.pageArr = []
  293. if(item.advices.length <= 5){
  294. this.page = 1
  295. arr.push(item.advices.length)
  296. item.pageArr.push(arr)
  297. }else if(item.advices.length > 5){
  298. this.page = parseInt(item.advices.length / 5)
  299. let num = item.advices.length % 5
  300. for (var i=0;i<this.page;i++){
  301. item.pageArr.push([5])
  302. }
  303. if(num != 0){
  304. item.pageArr.push([num])
  305. }
  306. }
  307. })
  308. // console.log('this.pageArr',this.pageArr)
  309. },
  310. getName(list) {
  311. console.log('list',list)
  312. let new_list = []
  313. for (let i = 0; i < list.length; i++) {
  314. if (list[i].aac031 == '1') {
  315. new_list.push(list[i])
  316. }
  317. }
  318. switch (new_list[0].bcc334) {
  319. case "A31001":
  320. return "深圳医保1档"
  321. break
  322. case "A31002":
  323. return "深圳医保2档"
  324. break
  325. case "A31003":
  326. return "深圳医保3档"
  327. break
  328. case "A31004":
  329. return "二档(少儿)"
  330. break
  331. case "A31005":
  332. return "学生二档"
  333. break
  334. case "A31006":
  335. return "大学生二档"
  336. break
  337. case "A32001":
  338. return "在职公务员"
  339. break
  340. case "A32002":
  341. return "在职驻深公务员"
  342. break
  343. case "A39301":
  344. return "家属统筹医疗"
  345. break
  346. case "A41001":
  347. return "工伤在职"
  348. break
  349. case "A51001":
  350. return "生育在职"
  351. break
  352. case "A52001":
  353. return "生育医疗一档"
  354. break
  355. case "A52002":
  356. return "生育医疗一档"
  357. break
  358. case "C31001":
  359. return "一档医疗退休"
  360. break
  361. case "C31002":
  362. return "二档医疗退休"
  363. break
  364. }
  365. },
  366. },
  367. created(){
  368. this.getAllDoctorList()
  369. this.getInitData()
  370. this.getPrescriptionPrint()
  371. this.getHisPatientDetail()
  372. this.getPatientCaseHistory()
  373. var xtuser = this.$store.getters.xt_user;
  374. this.orgname = xtuser.org.org_name;
  375. this.org_id = this.$store.getters.xt_user.org_id
  376. },
  377. watch:{
  378. ids:function(val){
  379. this.ids = val
  380. this.getPrescriptionPrint()
  381. }
  382. }
  383. }
  384. </script>
  385. <style lang="scss" scoped>
  386. .prescription-print{
  387. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  388. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  389. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  390. margin-bottom: 20px;
  391. padding:20px 10px;
  392. }
  393. .printTitle{
  394. font-size: 22px;
  395. text-align: center;
  396. font-weight: bold;
  397. margin-bottom: 10px;
  398. }
  399. .infoTitle{
  400. display: flex;
  401. margin-top:10px;
  402. line-height: 24px;
  403. }
  404. .infoTitle div{
  405. width: 200px;
  406. }
  407. .infoMain{
  408. display: flex;
  409. flex-wrap: wrap;
  410. margin-top:10px;
  411. }
  412. .infoMain div{
  413. width: 50%;
  414. line-height: 24px;
  415. }
  416. .prescriptionBox{
  417. padding:0 10px;
  418. min-height:400px;
  419. }
  420. .Rp{
  421. font-size: 22px;
  422. font-weight: bold;
  423. }
  424. .drugsBox{
  425. padding-left: 40px;
  426. margin-bottom: 10px;
  427. }
  428. .drugsBox div{
  429. line-height: 20px;
  430. }
  431. .drugsOne{
  432. line-height: 24px;
  433. }
  434. .drugsOne span{
  435. margin-right: 20px;
  436. }
  437. .doctorBox{
  438. display: flex;
  439. justify-content: space-between;
  440. padding:0 10px;
  441. line-height: 24px;
  442. border-bottom: 2px solid #000;
  443. }
  444. .actionBar{
  445. display: flex;
  446. justify-content: space-between;
  447. line-height: 24px;
  448. padding:0 10px;
  449. }
  450. .actionBar p{
  451. width:150px;
  452. }
  453. .under_line{
  454. display: inline-block;
  455. border-bottom: 1px solid #000;
  456. flex: 1;
  457. }
  458. </style>