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

printOne.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. <template>
  2. <div>
  3. <div id="prescription-print3" class="prescription-print">
  4. <img
  5. style="width: 100%; height: 80px"
  6. v-if="org_id == 10138"
  7. src="https://kuyi.shengws.com/bailin/bltotle.jpg"
  8. alt=""
  9. />
  10. <img
  11. style="width: 100%; height: 80px"
  12. v-if="org_id == 10278 || org_id == 0"
  13. src="https://kuyi.shengws.com/beierlog.png"
  14. alt=""
  15. />
  16. <div class="printTitle">检验申请单</div>
  17. <div style="border: 1px solid #000;margin-bottom: 10px;">
  18. <div
  19. style="
  20. display: flex;
  21. justify-content: space-between;
  22. border-bottom: 1px solid #000;
  23. line-height: 40px;
  24. padding: 0 10px;
  25. "
  26. >
  27. <div>是否急诊:否</div>
  28. <div>
  29. 结算方式:{{
  30. faber && faber.transBody
  31. ? getName(faber.transBody.outputlist1)
  32. : ""
  33. }}
  34. </div>
  35. <div>金额:{{ total }}</div>
  36. </div>
  37. <div
  38. style="
  39. display: flex;
  40. justify-content: space-between;
  41. border-bottom: 1px solid #000;
  42. line-height: 40px;
  43. padding: 0 10px;
  44. "
  45. >
  46. <div>
  47. 姓名:{{
  48. advicePrint[0].patient.name
  49. ? advicePrint[0].patient.name.indexOf("(") > -1
  50. ? advicePrint[0].patient.name.substring(
  51. 0,
  52. advicePrint[0].patient.name.indexOf("(")
  53. )
  54. : advicePrint[0].patient.name
  55. : ""
  56. }}
  57. </div>
  58. <div>
  59. 性别:
  60. <span v-if="advicePrint[0].patient.gender == 1">男</span>
  61. <span v-if="advicePrint[0].patient.gender == 2">女</span>
  62. </div>
  63. <!-- <div>-->
  64. <!-- 年龄:{{-->
  65. <!-- advicePrint[0].patient.age ? advicePrint[0].patient.age : ""-->
  66. <!-- }}岁-->
  67. <!-- </div>-->
  68. <div>年龄:{{getAge(advicePrint[0].patient)?getAge(advicePrint[0].patient):""}}岁</div>
  69. </div>
  70. <div style="margin-bottom: 20px; padding: 10px 10px 0" v-if="org_id!=10278 && org_id!=10138 && org_id!=0">
  71. 病史摘要:{{
  72. history.history_of_present_illness
  73. ? history.history_of_present_illness
  74. : ""
  75. }}
  76. </div>
  77. <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
  78. <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
  79. <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
  80. <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
  81. <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
  82. </div> -->
  83. <div style="margin-bottom: 20px; padding: 0 10px">
  84. 临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}
  85. </div>
  86. <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
  87. <div>检验项目:</div>
  88. <div>
  89. <div v-for="item in projectPrint" style="margin-bottom: 10px">
  90. {{ item.team.project_team }}
  91. </div>
  92. <div v-for="item in singleProjectPrint" style="margin-bottom: 10px">
  93. {{ item.project.project_name }}
  94. </div>
  95. </div>
  96. </div>
  97. <div
  98. style="
  99. display: flex;
  100. justify-content: space-between;
  101. border-top: 1px solid #000;
  102. line-height: 40px;
  103. padding: 0 10px;
  104. "
  105. >
  106. <div>开单医生:{{ doctor ? doctor : "" }}</div>
  107. <div>
  108. 开单日期:
  109. {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
  110. </div>
  111. <div>
  112. 医生签字:
  113. <img
  114. v-if="setAdminUserES(advicePrint[0].creator)"
  115. style="height: 30px"
  116. :src="setAdminUserES(advicePrint[0].creator)"
  117. alt=""
  118. srcset=""
  119. />
  120. <span
  121. style="width: 100px; display: inline-block"
  122. v-else-if="advicePrint[0].doctor != ''"
  123. >
  124. {{ advicePrint[0].doctor ? advicePrint[0].doctor : "" }}
  125. </span>
  126. <span v-else>
  127. </span>
  128. </div>
  129. </div>
  130. </div>
  131. <img
  132. style="width: 100%"
  133. v-if="org_id == 10138 "
  134. src="https://kuyi.shengws.com/bailin/blend.jpg"
  135. alt=""
  136. />
  137. <img
  138. style="width: 100%"
  139. v-if="org_id == 10278 || org_id == 0"
  140. src="https://kuyi.shengws.com/bailinbeier.png"
  141. alt=""
  142. />
  143. </div>
  144. </div>
  145. </template>
  146. <script>
  147. import { jsGetAge, uParseTime } from "@/utils/tools";
  148. import {
  149. getAllDoctorList,
  150. getPrescriptionPrint,
  151. getHisPatientDetail,
  152. getPatientCaseHistory,
  153. } from "@/api/project/project";
  154. import { getInitData } from "@/api/his/his";
  155. export default {
  156. props: {
  157. patient_id: Number,
  158. record_date: String,
  159. prescription_id: Number,
  160. ids: String,
  161. },
  162. data() {
  163. return {
  164. doctorList_1: [],
  165. doctorList: [],
  166. advicePrint: {},
  167. patient: {},
  168. tableData: [],
  169. prescriptionInfo: [],
  170. hisPatient: {},
  171. department: [],
  172. prescriptions: [],
  173. projectList: [],
  174. doc_name: "",
  175. orgname: "",
  176. diagnoses: [],
  177. pageArr: [],
  178. faber: {},
  179. total: 0,
  180. projectPrint: [],
  181. time: "",
  182. doctor: "",
  183. org_id: "",
  184. singleProjectPrint: [],
  185. operatorMaps: {},
  186. };
  187. },
  188. methods: {
  189. getAge(patient){
  190. // 将时间戳转换为 Date 对象
  191. const birthday = new Date(patient.birthday* 1000);
  192. // 获取当前日期
  193. const now = new Date();
  194. // 计算年龄差
  195. const ageDiffMs = now - birthday;
  196. const ageDate = new Date(ageDiffMs); // 不需要减掉 1970 年的时间戳
  197. // 提取年份
  198. const age = ageDate.getUTCFullYear() - 1970;
  199. return age
  200. },
  201. getPatientCaseHistory() {
  202. const params = {
  203. patient_id: this.patient_id,
  204. };
  205. getPatientCaseHistory(params).then((response) => {
  206. if (response.data.state == 1) {
  207. var history = response.data.data.history;
  208. // console.log("中国history222222", history);
  209. this.history = history;
  210. }
  211. });
  212. },
  213. getAllDoctorList() {
  214. getAllDoctorList().then((response) => {
  215. if (response.data.state == 1) {
  216. var doctor = response.data.data.doctor;
  217. this.doctorList = doctor;
  218. }
  219. });
  220. },
  221. getDoctor(id) {
  222. var name = "";
  223. for (let i = 0; i < this.doctorList.length; i++) {
  224. if (id == this.doctorList[i].admin_user_id) {
  225. name = this.doctorList[i].user_name;
  226. }
  227. }
  228. return name;
  229. },
  230. getTime(value, temp) {
  231. if (value != undefined) {
  232. return uParseTime(value, temp);
  233. }
  234. return "";
  235. },
  236. getPrescriptionPrint() {
  237. var params = {
  238. // patient_id:this.patient_id,
  239. // record_date:this.record_date,
  240. // prescription_id:this.prescription_id,
  241. patient_id: this.patient_id,
  242. record_date: this.record_date,
  243. prescription_id: this.prescription_id,
  244. ids: this.ids,
  245. p_type: 2,
  246. };
  247. // console.log("params", params);
  248. getPrescriptionPrint(params).then((response) => {
  249. if (response.data.state == 1) {
  250. var advicePrint = response.data.data.advicePrint;
  251. // console.log("adviceprint9999", advicePrint);
  252. this.advicePrint = advicePrint;
  253. this.prescriptions = advicePrint;
  254. // console.log("处方222222", this.prescriptions);
  255. var hisPatient = response.data.data.hisPatient;
  256. // console.log("hisPatient", hisPatient);
  257. this.hisPatient = hisPatient;
  258. let projectPrint = [];
  259. let total = 0;
  260. this.advicePrint.map((item) => {
  261. // console.log("imte233232323232323223", item.project);
  262. if (item.project.length > 0) {
  263. item.project.map((it) => {
  264. if (it.type == 2) {
  265. if (it.project.cost_classify == 3) {
  266. projectPrint.push(it);
  267. total += it.project.price * parseInt(it.count);
  268. }
  269. }
  270. });
  271. }
  272. });
  273. this.doctorList_1 = response.data.data.eles;
  274. // console.log(this.doctorList_1, "医生列表");
  275. if (this.doctorList_1.length > 0) {
  276. var operatorsLen = this.doctorList_1.length;
  277. for (var index = 0; index < operatorsLen; index++) {
  278. this.$set(
  279. this.operatorMaps,
  280. this.doctorList_1[index].creator,
  281. this.doctorList_1[index]
  282. );
  283. }
  284. }
  285. let data = [];
  286. let data2 = [];
  287. projectPrint.map((item) => {
  288. if (item.team.id != 0) {
  289. let status = data.some((it) => it.team.id == item.team.id);
  290. if (!status) {
  291. data.push(item);
  292. }
  293. }
  294. if (item.team.id == 0) {
  295. data2.push(item);
  296. }
  297. });
  298. this.projectPrint = data;
  299. console.log("列表", this.projectPrint);
  300. this.total = total.toFixed(2);
  301. this.pre_time = this.advicePrint[0].pre_time;
  302. this.doctor = this.advicePrint[0].doctor;
  303. this.singleProjectPrint = data2;
  304. console.log("列表333", this.singleProjectPrint);
  305. var projectlist = response.data.data.projectlist;
  306. var projectlist = response.data.data.projectlist;
  307. // console.log("所有项目列表", projectlist);
  308. this.projectList = projectlist;
  309. this.getPage();
  310. let outputlist1Name = response.data.data.his.patient_info
  311. ? JSON.parse(response.data.data.his.patient_info)
  312. : {};
  313. this.faber = outputlist1Name;
  314. }
  315. });
  316. },
  317. // 电子签名
  318. setAdminUserES(id) {
  319. // console.log(id, "id");
  320. if (id == 0) {
  321. return "";
  322. }
  323. if (id in this.operatorMaps) {
  324. // console.log(this.operatorMaps, "this.operatorMaps");
  325. return this.operatorMaps[id].url;
  326. } else {
  327. // console.log("po");
  328. return "";
  329. }
  330. },
  331. getHisPatientDetail() {
  332. const params = {
  333. patient_id: this.patient_id,
  334. };
  335. getHisPatientDetail(params).then((response) => {
  336. if (response.data.state == 1) {
  337. var hisPatient = response.data.data.hisPatient;
  338. // console.log("挂号病人", hisPatient);
  339. this.hisPatient = hisPatient;
  340. }
  341. });
  342. },
  343. getInitData() {
  344. getInitData().then((response) => {
  345. if (response.data.state == 1) {
  346. this.department = response.data.data.department;
  347. this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
  348. // console.log("争端", this.diagnoses);
  349. }
  350. });
  351. },
  352. getDepart(id) {
  353. var name = "";
  354. for (let i = 0; i < this.department.length; i++) {
  355. if (id == this.department[i].id) {
  356. name = this.department[i].name;
  357. }
  358. }
  359. return name;
  360. },
  361. getTotalOne(id) {
  362. var total = 0;
  363. var addtotal = 0;
  364. for (let i = 0; i < this.prescriptions.length; i++) {
  365. if (id == this.prescriptions[i].id) {
  366. if (this.prescriptions[i].project != null) {
  367. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  368. total =
  369. total +
  370. this.prescriptions[i].project[a].price *
  371. this.prescriptions[i].project[a].count;
  372. }
  373. }
  374. if (this.prescriptions[i].additionalcharge != null) {
  375. for (
  376. let a = 0;
  377. a < this.prescriptions[i].additionalcharge.length;
  378. a++
  379. ) {
  380. addtotal =
  381. addtotal +
  382. this.prescriptions[i].additionalcharge[a].price *
  383. this.prescriptions[i].additionalcharge[a].count;
  384. }
  385. }
  386. addtotal = Math.floor(addtotal * 100) / 100;
  387. }
  388. }
  389. for (let i = 0; i < this.prescriptions.length; i++) {
  390. if (id == this.prescriptions[i].id) {
  391. if (this.prescriptions[i].advices != null) {
  392. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  393. total =
  394. total +
  395. this.prescriptions[i].advices[a].price *
  396. this.prescriptions[i].advices[a].prescribing_number;
  397. }
  398. }
  399. if (this.prescriptions[i].additionalcharge != null) {
  400. for (
  401. let a = 0;
  402. a < this.prescriptions[i].additionalcharge.length;
  403. a++
  404. ) {
  405. addtotal =
  406. addtotal +
  407. this.prescriptions[i].additionalcharge[a].price *
  408. this.prescriptions[i].additionalcharge[a].count;
  409. }
  410. }
  411. addtotal = Math.floor(addtotal * 100) / 100;
  412. }
  413. }
  414. return total + addtotal;
  415. },
  416. getProjectName(id) {
  417. var project_name = "";
  418. for (let i = 0; i < this.projectList.length; i++) {
  419. if (id == this.projectList[i].id) {
  420. project_name = this.projectList[i].project_name;
  421. }
  422. }
  423. return project_name;
  424. },
  425. getDiagnosis(ids) {
  426. let newIds = ids.split(",").sort(function (a, b) {
  427. return a - b;
  428. });
  429. var name = "";
  430. let nameArr = [];
  431. for (let i = 0; i < this.diagnoses.length; i++) {
  432. // if(id == this.diagnoses[i].id){
  433. // name = this.diagnoses[i].class_name
  434. // }
  435. if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
  436. // name += diagnoses[i].class_name + ' '
  437. nameArr.push(this.diagnoses[i].class_name);
  438. }
  439. }
  440. let newNameArr = [];
  441. nameArr.map((item, index) => {
  442. if (item == "尿毒症") {
  443. newNameArr.push(item);
  444. nameArr.splice(index, 1, "");
  445. }
  446. });
  447. newNameArr.push(...nameArr);
  448. return newNameArr.join(" ");
  449. },
  450. compare(property) {
  451. return function (a, b) {
  452. var value1 = a[property];
  453. var value2 = b[property];
  454. return value1 - value2; //升序排序
  455. };
  456. },
  457. getPage() {
  458. this.page = 1;
  459. this.pageArr = [];
  460. this.advicePrint.map((item) => {
  461. let arr = [];
  462. item.pageArr = [];
  463. if (item.advices.length <= 5) {
  464. this.page = 1;
  465. arr.push(item.advices.length);
  466. item.pageArr.push(arr);
  467. } else if (item.advices.length > 5) {
  468. this.page = parseInt(item.advices.length / 5);
  469. let num = item.advices.length % 5;
  470. for (var i = 0; i < this.page; i++) {
  471. item.pageArr.push([5]);
  472. }
  473. if (num != 0) {
  474. item.pageArr.push([num]);
  475. }
  476. }
  477. });
  478. // console.log('this.pageArr',this.pageArr)
  479. },
  480. getName(list) {
  481. console.log("list", list);
  482. let new_list = [];
  483. for (let i = 0; i < list.length; i++) {
  484. if (list[i].aac031 == "1") {
  485. new_list.push(list[i]);
  486. }
  487. }
  488. switch (new_list[0].bcc334) {
  489. case "A31001":
  490. return "深圳医保1档";
  491. break;
  492. case "A31002":
  493. return "深圳医保2档";
  494. break;
  495. case "A31003":
  496. return "深圳医保3档";
  497. break;
  498. case "A31004":
  499. return "二档(少儿)";
  500. break;
  501. case "A31005":
  502. return "学生二档";
  503. break;
  504. case "A31006":
  505. return "大学生二档";
  506. break;
  507. case "A32001":
  508. return "在职公务员";
  509. break;
  510. case "A32002":
  511. return "在职驻深公务员";
  512. break;
  513. case "A39301":
  514. return "家属统筹医疗";
  515. break;
  516. case "A41001":
  517. return "工伤在职";
  518. break;
  519. case "A51001":
  520. return "生育在职";
  521. break;
  522. case "A52001":
  523. return "生育医疗一档";
  524. break;
  525. case "A52002":
  526. return "生育医疗一档";
  527. break;
  528. case "C31001":
  529. return "一档医疗退休";
  530. break;
  531. case "C31002":
  532. return "二档医疗退休";
  533. break;
  534. }
  535. },
  536. },
  537. created() {
  538. this.getAllDoctorList();
  539. this.getInitData();
  540. this.getPrescriptionPrint();
  541. this.getHisPatientDetail();
  542. this.getPatientCaseHistory();
  543. var xtuser = this.$store.getters.xt_user;
  544. this.orgname = xtuser.org.org_name;
  545. this.org_id = this.$store.getters.xt_user.org_id;
  546. },
  547. watch: {
  548. ids: function (val) {
  549. this.ids = val;
  550. this.getPrescriptionPrint();
  551. },
  552. },
  553. };
  554. </script>
  555. <style lang="scss" scoped>
  556. .prescription-print {
  557. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  558. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  559. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  560. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  561. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  562. margin-bottom: 20px;
  563. padding: 20px 10px;
  564. }
  565. .printTitle {
  566. font-size: 22px;
  567. text-align: center;
  568. font-weight: bold;
  569. margin-bottom: 10px;
  570. }
  571. .infoTitle {
  572. display: flex;
  573. margin-top: 10px;
  574. line-height: 24px;
  575. }
  576. .infoTitle div {
  577. width: 200px;
  578. }
  579. .infoMain {
  580. display: flex;
  581. flex-wrap: wrap;
  582. margin-top: 10px;
  583. }
  584. .infoMain div {
  585. width: 50%;
  586. line-height: 24px;
  587. }
  588. .prescriptionBox {
  589. padding: 0 10px;
  590. min-height: 400px;
  591. }
  592. .Rp {
  593. font-size: 22px;
  594. font-weight: bold;
  595. }
  596. .drugsBox {
  597. padding-left: 40px;
  598. margin-bottom: 10px;
  599. }
  600. .drugsBox div {
  601. line-height: 20px;
  602. }
  603. .drugsOne {
  604. line-height: 24px;
  605. }
  606. .drugsOne span {
  607. margin-right: 20px;
  608. }
  609. .doctorBox {
  610. display: flex;
  611. justify-content: space-between;
  612. padding: 0 10px;
  613. line-height: 24px;
  614. border-bottom: 2px solid #000;
  615. }
  616. .actionBar {
  617. display: flex;
  618. justify-content: space-between;
  619. line-height: 24px;
  620. padding: 0 10px;
  621. }
  622. .actionBar p {
  623. width: 150px;
  624. }
  625. .under_line {
  626. display: inline-block;
  627. border-bottom: 1px solid #000;
  628. flex: 1;
  629. }
  630. </style>