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

printOne.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <template>
  2. <div id="prescriptionPrint">
  3. <div v-for="(item, index) in advicePrint" :key="index">
  4. <div
  5. id="prescription-print"
  6. class="prescription-print"
  7. style="page-break-after: always"
  8. >
  9. <div class="printTitle" v-if="prescriptions[index].med_type == '1111'">
  10. {{ orgname }}第一类精神处方笺
  11. </div>
  12. <div class="printTitle" v-if="prescriptions[index].med_type == '1112'">
  13. {{ orgname }}第二类精神处方笺
  14. </div>
  15. <div
  16. class="printTitle"
  17. v-if="
  18. prescriptions[index].med_type != '1111' &&
  19. prescriptions[index].med_type != '1112'
  20. "
  21. >
  22. {{ orgname }}处方笺
  23. </div>
  24. <!--<div class="printTitle">{{orgname}}处方笺</div>-->
  25. <div class="infoTitle">
  26. <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
  27. <p>
  28. 性别:
  29. <span v-if="item.patient.gender == 1">男</span>
  30. <span v-if="item.patient.gender == 2">女</span>
  31. </p>
  32. <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
  33. </div>
  34. <div class="infoMain">
  35. <div style="margin-bottom: 10px">
  36. 门诊号:{{ hisPatient.number ? hisPatient.number : "" }}
  37. </div>
  38. <div style="margin-bottom: 10px">
  39. 科室:{{ item.info ? getDepart(item.info.departments) : "" }}
  40. </div>
  41. <div style="margin-bottom: 10px">
  42. 医保卡号:{{ item.hisPatient.number ? item.hisPatient.number : "" }}
  43. </div>
  44. <div style="margin-bottom: 10px" v-if="org_id != 10188">
  45. 电话:{{ item.patient.phone }}
  46. </div>
  47. <div style="margin-bottom: 10px" v-else>
  48. 日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
  49. </div>
  50. <div>地址:{{ item.patient.home_address }}</div>
  51. <div style="display: flex; width: 50%">
  52. 临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
  53. </div>
  54. </div>
  55. <div class="prescriptionBox">
  56. <div class="Rp">Rp:</div>
  57. <div
  58. class="drugsBox"
  59. v-for="(it, index) in item.advices"
  60. :key="index"
  61. >
  62. <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
  63. <div class="drugsOne">
  64. <span style="font-weight: bold">{{ index + 1 + "." }}</span
  65. >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
  66. v-if="it.drug.min_unit != it.drug.dose_unit"
  67. >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
  68. >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
  69. it.drug.max_unit
  70. }}&nbsp;×&nbsp; {{ it.prescribing_number
  71. }}{{ it.prescribing_number_unit }}
  72. </div>
  73. <div style="margin-left: 100px">
  74. <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
  75. >&nbsp;&nbsp;<span
  76. >{{ it.execution_frequency }}&nbsp;{{
  77. it.delivery_way
  78. }}&nbsp;</span
  79. >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
  80. </div>
  81. </div>
  82. <div
  83. class="drugsBox"
  84. v-for="(it, i) in item.additionalcharge"
  85. :key="i"
  86. >
  87. <div class="drugsOne">
  88. {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
  89. it.count
  90. }}次
  91. </div>
  92. </div>
  93. <div
  94. class="drugsBox"
  95. v-for="(it, index) in item.project"
  96. :key="index"
  97. >
  98. <div class="drugsOne">
  99. <span style="font-weight: bold">{{ index + 1 + "." }}</span
  100. >{{
  101. it.type == 2
  102. ? getProjectName(it.project_id)
  103. ? getProjectName(it.project_id)
  104. : ""
  105. : it.good_info.good_name
  106. }}&nbsp;&nbsp;{{ it.single_dose
  107. }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
  108. </div>
  109. <div style="margin-left: 100px">
  110. <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
  111. >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
  112. >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
  113. </div>
  114. </div>
  115. <div
  116. class="drugsBox"
  117. v-for="(it, i) in item.additionalcharge"
  118. :key="i"
  119. >
  120. <div class="drugsOne">
  121. {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
  122. it.price.toFixed(2)
  123. }}元/{{ it.count }}次
  124. </div>
  125. </div>
  126. <div style="text-align: center">(以下空白)</div>
  127. </div>
  128. <div class="doctorBox" v-if="org_id != 10188">
  129. <p>
  130. 医师:
  131. <!-- {{ item.doctor ? item.doctor : "" }} -->
  132. <span
  133. style="width: 100px; display: inline-block"
  134. v-if="item.creator == ''"
  135. >
  136. {{ item.doctor }}
  137. </span>
  138. <span
  139. style="width: 100px; display: inline-block"
  140. v-else-if="doc_name != ''"
  141. >
  142. {{ doc_name }}
  143. </span>
  144. <img
  145. style="height: 30px"
  146. :src="setAdminUserES(item.creator,item.doctor)"
  147. alt=""
  148. srcset=""
  149. v-else
  150. />
  151. </p>
  152. <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
  153. </div>
  154. <div class="doctorBox" v-else>
  155. <p>药师:</p>
  156. <p>医师:{{ item.doctor ? item.doctor : "" }}</p>
  157. </div>
  158. <div class="actionBar" v-if="org_id != 10188">
  159. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  160. <p>配对:</p>
  161. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  162. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  163. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  164. <p>审核:</p>
  165. <p>配对:</p>
  166. <p>核对:</p>
  167. <p>发药:</p>
  168. <p>
  169. 药费:{{
  170. getTotalOne(item.id).toFixed(2)
  171. ? getTotalOne(item.id).toFixed(2)
  172. : 0
  173. }}元
  174. </p>
  175. <!-- <p>药费:466.2元</p>-->
  176. </div>
  177. <div class="actionBar" v-else>
  178. <p style="visibility: hidden">审核:</p>
  179. <p style="visibility: hidden">配对:</p>
  180. <p style="visibility: hidden">核对:</p>
  181. <p style="visibility: hidden">发药:</p>
  182. <p>
  183. 药费:{{
  184. getTotalOne(item.id).toFixed(2)
  185. ? getTotalOne(item.id).toFixed(2)
  186. : 0
  187. }}元
  188. </p>
  189. <!-- <p>药费:551.2元</p>-->
  190. <!-- <p>药费:466.2元</p>-->
  191. </div>
  192. <div style="page-break-after: always"></div>
  193. </div>
  194. </div>
  195. </div>
  196. </template>
  197. <script>
  198. import { jsGetAge, uParseTime } from "@/utils/tools";
  199. import {
  200. getAllDoctorList,
  201. getPrescriptionPrint,
  202. getHisPatientDetail,
  203. } from "@/api/project/project";
  204. import { getInitData } from "@/api/his/his";
  205. export default {
  206. props: {
  207. patient_id: Number,
  208. record_date: String,
  209. prescription_id: Number,
  210. ids: String,
  211. },
  212. data() {
  213. return {
  214. doc_name:"",
  215. doctorList: [],
  216. advicePrint: {},
  217. patient: {},
  218. tableData: [],
  219. prescriptionInfo: [],
  220. hisPatient: {},
  221. department: [],
  222. prescriptions: [],
  223. projectList: [],
  224. orgname: "",
  225. diagnoses: [],
  226. org_id: 0,
  227. operatorMaps: {},
  228. operators: [],
  229. doctorList_1: [],
  230. };
  231. },
  232. methods: {
  233. // 电子签名
  234. setAdminUserES(id,name) {
  235. if (id == 0) {
  236. return "";
  237. }
  238. if (id in this.operatorMaps) {
  239. return this.operatorMaps[id].url;
  240. } else {
  241. this.doc_name = name
  242. return "";
  243. }
  244. },
  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. getAllDoctorList() {
  262. getAllDoctorList().then((response) => {
  263. if (response.data.state == 1) {
  264. var doctor = response.data.data.doctor;
  265. this.doctorList = doctor;
  266. }
  267. });
  268. },
  269. getDoctor(id) {
  270. var name = "";
  271. for (let i = 0; i < this.doctorList.length; i++) {
  272. if (id == this.doctorList[i].admin_user_id) {
  273. name = this.doctorList[i].user_name;
  274. }
  275. }
  276. return name;
  277. },
  278. getTime(value, temp) {
  279. if (value != undefined) {
  280. return uParseTime(value, temp);
  281. }
  282. return "";
  283. },
  284. getPrescriptionPrint() {
  285. var params = {
  286. // patient_id:this.patient_id,
  287. // record_date:this.record_date,
  288. // prescription_id:this.prescription_id,
  289. patient_id: this.patient_id,
  290. record_date: this.record_date,
  291. prescription_id: this.prescription_id,
  292. ids: this.ids,
  293. p_type: 2,
  294. };
  295. console.log("params", params);
  296. getPrescriptionPrint(params).then((response) => {
  297. if (response.data.state == 1) {
  298. var advicePrint = response.data.data.advicePrint;
  299. console.log("adviceprint9999", advicePrint);
  300. this.advicePrint = advicePrint;
  301. this.prescriptions = advicePrint;
  302. this.doctorList_1 = response.data.data.eles;
  303. console.log(this.doctorList_1, "医生列表");
  304. if (this.doctorList_1.length > 0) {
  305. var operatorsLen = this.doctorList_1.length;
  306. for (var index = 0; index < operatorsLen; index++) {
  307. this.$set(
  308. this.operatorMaps,
  309. this.doctorList_1[index].creator,
  310. this.doctorList_1[index]
  311. );
  312. }
  313. }
  314. console.log("处方222222", this.prescriptions);
  315. var hisPatient = response.data.data.hisPatient;
  316. console.log("hisPatient", hisPatient);
  317. this.hisPatient = hisPatient;
  318. var projectlist = response.data.data.projectlist;
  319. console.log("所有项目列表", projectlist);
  320. this.projectList = projectlist;
  321. }
  322. });
  323. },
  324. getHisPatientDetail() {
  325. const params = {
  326. patient_id: this.patient_id,
  327. };
  328. getHisPatientDetail(params).then((response) => {
  329. if (response.data.state == 1) {
  330. var hisPatient = response.data.data.hisPatient;
  331. console.log("挂号病人", hisPatient);
  332. this.hisPatient = hisPatient;
  333. }
  334. });
  335. },
  336. getInitData() {
  337. getInitData().then((response) => {
  338. if (response.data.state == 1) {
  339. this.department = response.data.data.department;
  340. this.diagnoses = response.data.data.diagnose;
  341. console.log("争端", this.diagnoses);
  342. }
  343. });
  344. },
  345. getDepart(id) {
  346. var name = "";
  347. for (let i = 0; i < this.department.length; i++) {
  348. if (id == this.department[i].id) {
  349. name = this.department[i].name;
  350. }
  351. }
  352. return name;
  353. },
  354. getTotalOne(id) {
  355. var total = 0;
  356. var addtotal = 0;
  357. for (let i = 0; i < this.prescriptions.length; i++) {
  358. if (id == this.prescriptions[i].id) {
  359. if (this.prescriptions[i].project != null) {
  360. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  361. total =
  362. total +
  363. this.prescriptions[i].project[a].price *
  364. this.prescriptions[i].project[a].count;
  365. }
  366. }
  367. if (this.prescriptions[i].additionalcharge != null) {
  368. for (
  369. let a = 0;
  370. a < this.prescriptions[i].additionalcharge.length;
  371. a++
  372. ) {
  373. addtotal =
  374. addtotal +
  375. this.prescriptions[i].additionalcharge[a].price *
  376. this.prescriptions[i].additionalcharge[a].count;
  377. }
  378. }
  379. addtotal = Math.floor(addtotal * 100) / 100;
  380. }
  381. }
  382. for (let i = 0; i < this.prescriptions.length; i++) {
  383. if (id == this.prescriptions[i].id) {
  384. if (this.prescriptions[i].advices != null) {
  385. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  386. total =
  387. total +
  388. this.prescriptions[i].advices[a].price *
  389. this.prescriptions[i].advices[a].prescribing_number;
  390. }
  391. }
  392. if (this.prescriptions[i].additionalcharge != null) {
  393. for (
  394. let a = 0;
  395. a < this.prescriptions[i].additionalcharge.length;
  396. a++
  397. ) {
  398. addtotal =
  399. addtotal +
  400. this.prescriptions[i].additionalcharge[a].price *
  401. this.prescriptions[i].additionalcharge[a].count;
  402. }
  403. }
  404. addtotal = Math.floor(addtotal * 100) / 100;
  405. }
  406. }
  407. return total + addtotal;
  408. },
  409. getProjectName(id) {
  410. var project_name = "";
  411. for (let i = 0; i < this.projectList.length; i++) {
  412. if (id == this.projectList[i].id) {
  413. project_name = this.projectList[i].project_name;
  414. }
  415. }
  416. return project_name;
  417. },
  418. getDiagnosis(id) {
  419. let arr = id.split(",");
  420. var name = "";
  421. for (let i = 0; i < this.diagnoses.length; i++) {
  422. if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
  423. name += this.diagnoses[i].class_name + " ";
  424. }
  425. }
  426. return name;
  427. },
  428. },
  429. created() {
  430. this.getAllDoctorList();
  431. this.getInitData();
  432. this.getPrescriptionPrint();
  433. this.getHisPatientDetail();
  434. var xtuser = this.$store.getters.xt_user;
  435. this.orgname = xtuser.org.org_name;
  436. this.org_id = xtuser.org.id;
  437. },
  438. watch: {
  439. ids: function (val) {
  440. this.ids = val;
  441. this.getPrescriptionPrint();
  442. },
  443. },
  444. };
  445. </script>
  446. <style lang="scss" scoped>
  447. .prescription-print {
  448. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  449. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  450. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  451. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  452. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  453. margin-bottom: 20px;
  454. padding: 20px 10px;
  455. }
  456. .printTitle {
  457. font-size: 22px;
  458. text-align: center;
  459. font-weight: bold;
  460. }
  461. .infoTitle {
  462. display: flex;
  463. border-bottom: 2px solid #000;
  464. margin-top: 10px;
  465. line-height: 24px;
  466. padding: 0 10px;
  467. }
  468. .infoTitle p {
  469. width: 200px;
  470. }
  471. .infoMain {
  472. display: flex;
  473. flex-wrap: wrap;
  474. border-bottom: 2px solid #000;
  475. padding: 0 10px;
  476. }
  477. .infoMain div {
  478. width: 50%;
  479. line-height: 24px;
  480. }
  481. .prescriptionBox {
  482. padding: 0 10px;
  483. min-height: 450px;
  484. }
  485. .Rp {
  486. font-size: 22px;
  487. font-weight: bold;
  488. }
  489. .drugsBox {
  490. padding-left: 40px;
  491. margin-bottom: 10px;
  492. }
  493. .drugsBox div {
  494. line-height: 20px;
  495. }
  496. .drugsOne {
  497. line-height: 24px;
  498. }
  499. .drugsOne span {
  500. margin-right: 20px;
  501. }
  502. .doctorBox {
  503. display: flex;
  504. justify-content: space-between;
  505. padding: 0 10px;
  506. line-height: 24px;
  507. border-bottom: 2px solid #000;
  508. }
  509. .actionBar {
  510. display: flex;
  511. justify-content: space-between;
  512. line-height: 24px;
  513. padding: 0 10px;
  514. }
  515. .actionBar p {
  516. width: 150px;
  517. }
  518. </style>