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

printTwo.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  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. data2.push(item);
  289. });
  290. this.projectPrint = data;
  291. console.log("列表", this.projectPrint);
  292. this.total = total.toFixed(2);
  293. this.pre_time = this.advicePrint[0].pre_time;
  294. this.doctor = this.advicePrint[0].doctor;
  295. this.singleProjectPrint = data2;
  296. var projectlist = response.data.data.projectlist;
  297. var projectlist = response.data.data.projectlist;
  298. // console.log("所有项目列表", projectlist);
  299. this.projectList = projectlist;
  300. this.getPage();
  301. let outputlist1Name = response.data.data.his.patient_info
  302. ? JSON.parse(response.data.data.his.patient_info)
  303. : {};
  304. this.faber = outputlist1Name;
  305. }
  306. });
  307. },
  308. // 电子签名
  309. setAdminUserES(id) {
  310. // console.log(id, "id");
  311. if (id == 0) {
  312. return "";
  313. }
  314. if (id in this.operatorMaps) {
  315. // console.log(this.operatorMaps, "this.operatorMaps");
  316. return this.operatorMaps[id].url;
  317. } else {
  318. // console.log("po");
  319. return "";
  320. }
  321. },
  322. getHisPatientDetail() {
  323. const params = {
  324. patient_id: this.patient_id,
  325. };
  326. getHisPatientDetail(params).then((response) => {
  327. if (response.data.state == 1) {
  328. var hisPatient = response.data.data.hisPatient;
  329. // console.log("挂号病人", hisPatient);
  330. this.hisPatient = hisPatient;
  331. }
  332. });
  333. },
  334. getInitData() {
  335. getInitData().then((response) => {
  336. if (response.data.state == 1) {
  337. this.department = response.data.data.department;
  338. this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
  339. // console.log("争端", this.diagnoses);
  340. }
  341. });
  342. },
  343. getDepart(id) {
  344. var name = "";
  345. for (let i = 0; i < this.department.length; i++) {
  346. if (id == this.department[i].id) {
  347. name = this.department[i].name;
  348. }
  349. }
  350. return name;
  351. },
  352. getTotalOne(id) {
  353. var total = 0;
  354. var addtotal = 0;
  355. for (let i = 0; i < this.prescriptions.length; i++) {
  356. if (id == this.prescriptions[i].id) {
  357. if (this.prescriptions[i].project != null) {
  358. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  359. total =
  360. total +
  361. this.prescriptions[i].project[a].price *
  362. this.prescriptions[i].project[a].count;
  363. }
  364. }
  365. if (this.prescriptions[i].additionalcharge != null) {
  366. for (
  367. let a = 0;
  368. a < this.prescriptions[i].additionalcharge.length;
  369. a++
  370. ) {
  371. addtotal =
  372. addtotal +
  373. this.prescriptions[i].additionalcharge[a].price *
  374. this.prescriptions[i].additionalcharge[a].count;
  375. }
  376. }
  377. addtotal = Math.floor(addtotal * 100) / 100;
  378. }
  379. }
  380. for (let i = 0; i < this.prescriptions.length; i++) {
  381. if (id == this.prescriptions[i].id) {
  382. if (this.prescriptions[i].advices != null) {
  383. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  384. total =
  385. total +
  386. this.prescriptions[i].advices[a].price *
  387. this.prescriptions[i].advices[a].prescribing_number;
  388. }
  389. }
  390. if (this.prescriptions[i].additionalcharge != null) {
  391. for (
  392. let a = 0;
  393. a < this.prescriptions[i].additionalcharge.length;
  394. a++
  395. ) {
  396. addtotal =
  397. addtotal +
  398. this.prescriptions[i].additionalcharge[a].price *
  399. this.prescriptions[i].additionalcharge[a].count;
  400. }
  401. }
  402. addtotal = Math.floor(addtotal * 100) / 100;
  403. }
  404. }
  405. return total + addtotal;
  406. },
  407. getProjectName(id) {
  408. var project_name = "";
  409. for (let i = 0; i < this.projectList.length; i++) {
  410. if (id == this.projectList[i].id) {
  411. project_name = this.projectList[i].project_name;
  412. }
  413. }
  414. return project_name;
  415. },
  416. getDiagnosis(ids) {
  417. let newIds = ids.split(",").sort(function (a, b) {
  418. return a - b;
  419. });
  420. var name = "";
  421. let nameArr = [];
  422. for (let i = 0; i < this.diagnoses.length; i++) {
  423. // if(id == this.diagnoses[i].id){
  424. // name = this.diagnoses[i].class_name
  425. // }
  426. if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
  427. // name += diagnoses[i].class_name + ' '
  428. nameArr.push(this.diagnoses[i].class_name);
  429. }
  430. }
  431. let newNameArr = [];
  432. nameArr.map((item, index) => {
  433. if (item == "尿毒症") {
  434. newNameArr.push(item);
  435. nameArr.splice(index, 1, "");
  436. }
  437. });
  438. newNameArr.push(...nameArr);
  439. return newNameArr.join(" ");
  440. },
  441. compare(property) {
  442. return function (a, b) {
  443. var value1 = a[property];
  444. var value2 = b[property];
  445. return value1 - value2; //升序排序
  446. };
  447. },
  448. getPage() {
  449. this.page = 1;
  450. this.pageArr = [];
  451. this.advicePrint.map((item) => {
  452. let arr = [];
  453. item.pageArr = [];
  454. if (item.advices.length <= 5) {
  455. this.page = 1;
  456. arr.push(item.advices.length);
  457. item.pageArr.push(arr);
  458. } else if (item.advices.length > 5) {
  459. this.page = parseInt(item.advices.length / 5);
  460. let num = item.advices.length % 5;
  461. for (var i = 0; i < this.page; i++) {
  462. item.pageArr.push([5]);
  463. }
  464. if (num != 0) {
  465. item.pageArr.push([num]);
  466. }
  467. }
  468. });
  469. // console.log('this.pageArr',this.pageArr)
  470. },
  471. getName(list) {
  472. console.log("list", list);
  473. let new_list = [];
  474. for (let i = 0; i < list.length; i++) {
  475. if (list[i].aac031 == "1") {
  476. new_list.push(list[i]);
  477. }
  478. }
  479. switch (new_list[0].bcc334) {
  480. case "A31001":
  481. return "深圳医保1档";
  482. break;
  483. case "A31002":
  484. return "深圳医保2档";
  485. break;
  486. case "A31003":
  487. return "深圳医保3档";
  488. break;
  489. case "A31004":
  490. return "二档(少儿)";
  491. break;
  492. case "A31005":
  493. return "学生二档";
  494. break;
  495. case "A31006":
  496. return "大学生二档";
  497. break;
  498. case "A32001":
  499. return "在职公务员";
  500. break;
  501. case "A32002":
  502. return "在职驻深公务员";
  503. break;
  504. case "A39301":
  505. return "家属统筹医疗";
  506. break;
  507. case "A41001":
  508. return "工伤在职";
  509. break;
  510. case "A51001":
  511. return "生育在职";
  512. break;
  513. case "A52001":
  514. return "生育医疗一档";
  515. break;
  516. case "A52002":
  517. return "生育医疗一档";
  518. break;
  519. case "C31001":
  520. return "一档医疗退休";
  521. break;
  522. case "C31002":
  523. return "二档医疗退休";
  524. break;
  525. }
  526. },
  527. },
  528. created() {
  529. this.getAllDoctorList();
  530. this.getInitData();
  531. this.getPrescriptionPrint();
  532. this.getHisPatientDetail();
  533. this.getPatientCaseHistory();
  534. var xtuser = this.$store.getters.xt_user;
  535. this.orgname = xtuser.org.org_name;
  536. this.org_id = this.$store.getters.xt_user.org_id;
  537. },
  538. watch: {
  539. ids: function (val) {
  540. this.ids = val;
  541. this.getPrescriptionPrint();
  542. },
  543. },
  544. };
  545. </script>
  546. <style lang="scss" scoped>
  547. .prescription-print {
  548. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  549. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  550. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  551. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  552. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  553. margin-bottom: 20px;
  554. padding: 20px 10px;
  555. }
  556. .printTitle {
  557. font-size: 22px;
  558. text-align: center;
  559. font-weight: bold;
  560. margin-bottom: 10px;
  561. }
  562. .infoTitle {
  563. display: flex;
  564. margin-top: 10px;
  565. line-height: 24px;
  566. }
  567. .infoTitle div {
  568. width: 200px;
  569. }
  570. .infoMain {
  571. display: flex;
  572. flex-wrap: wrap;
  573. margin-top: 10px;
  574. }
  575. .infoMain div {
  576. width: 50%;
  577. line-height: 24px;
  578. }
  579. .prescriptionBox {
  580. padding: 0 10px;
  581. min-height: 400px;
  582. }
  583. .Rp {
  584. font-size: 22px;
  585. font-weight: bold;
  586. }
  587. .drugsBox {
  588. padding-left: 40px;
  589. margin-bottom: 10px;
  590. }
  591. .drugsBox div {
  592. line-height: 20px;
  593. }
  594. .drugsOne {
  595. line-height: 24px;
  596. }
  597. .drugsOne span {
  598. margin-right: 20px;
  599. }
  600. .doctorBox {
  601. display: flex;
  602. justify-content: space-between;
  603. padding: 0 10px;
  604. line-height: 24px;
  605. border-bottom: 2px solid #000;
  606. }
  607. .actionBar {
  608. display: flex;
  609. justify-content: space-between;
  610. line-height: 24px;
  611. padding: 0 10px;
  612. }
  613. .actionBar p {
  614. width: 150px;
  615. }
  616. .under_line {
  617. display: inline-block;
  618. border-bottom: 1px solid #000;
  619. flex: 1;
  620. }
  621. </style>