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

printOne.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  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 && org_id != 0">
  129. <p v-if="org_id == 10217 || org_id == 0">
  130. 医师:
  131. <span
  132. style="width: 100px; display: inline-block"
  133. v-if="item.creator == ''"
  134. >
  135. {{ item.doctor }}
  136. </span>
  137. <span
  138. style="width: 100px; display: inline-block"
  139. v-else-if="doc_name != ''"
  140. >
  141. {{ doc_name }}
  142. </span>
  143. <img
  144. style="height: 50px;"
  145. :src="setAdminUserES(item.creator,item.doctor)"
  146. alt=""
  147. srcset=""
  148. />
  149. </p>
  150. <p v-else>
  151. 医师: {{ item.doctor ? item.doctor : "" }}
  152. </p>
  153. <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
  154. </div>
  155. <div class="doctorBoxtwo" v-if="org_id == 10188 || org_id == 0">
  156. <p >审核、调配:</p>
  157. <p style="margin-right: 43px">药师:</p>
  158. </div>
  159. <div class="doctorBox" v-if="org_id == 10188 || org_id == 0">
  160. <p >核对、发药:</p>
  161. <p>医师:{{ item.doctor ? item.doctor : "" }}</p>
  162. </div>
  163. <div class="actionBar" v-if="org_id != 10188 && org_id != 0">
  164. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  165. <p>配对:</p>
  166. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  167. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  168. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  169. <p>审核:</p>
  170. <p>配对:</p>
  171. <p>核对:</p>
  172. <p>发药:</p>
  173. <p >
  174. 药费:{{
  175. getTotalOne(item.id).toFixed(2)
  176. ? getTotalOne(item.id).toFixed(2)
  177. : 0
  178. }}元
  179. </p>
  180. <!-- <p>药费:466.2元</p>-->
  181. </div>
  182. <div class="actionBar" v-else>
  183. <p >
  184. 药费:{{
  185. getTotalOne(item.id).toFixed(2)
  186. ? getTotalOne(item.id).toFixed(2)
  187. : 0
  188. }}元
  189. </p>
  190. <!-- <p>药费:551.2元</p>-->
  191. <!-- <p>药费:466.2元</p>-->
  192. </div>
  193. <div style="page-break-after: always"></div>
  194. </div>
  195. </div>
  196. </div>
  197. </template>
  198. <script>
  199. import { jsGetAge, uParseTime } from "@/utils/tools";
  200. import {
  201. getAllDoctorList,
  202. getPrescriptionPrint,
  203. getHisPatientDetail,
  204. } from "@/api/project/project";
  205. import { getInitData } from "@/api/his/his";
  206. export default {
  207. props: {
  208. patient_id: Number,
  209. record_date: String,
  210. prescription_id: Number,
  211. ids: String,
  212. },
  213. data() {
  214. return {
  215. doc_name:"",
  216. doctorList: [],
  217. advicePrint: {},
  218. patient: {},
  219. tableData: [],
  220. prescriptionInfo: [],
  221. hisPatient: {},
  222. department: [],
  223. prescriptions: [],
  224. projectList: [],
  225. orgname: "",
  226. diagnoses: [],
  227. org_id: 0,
  228. operatorMaps: {},
  229. operators: [],
  230. doctorList_1: [],
  231. };
  232. },
  233. methods: {
  234. // 电子签名
  235. setAdminUserES(id,name) {
  236. console.log(id)
  237. console.log(name)
  238. console.log(this.operatorMaps)
  239. if (id == 0) {
  240. return "";
  241. }
  242. if (id in this.operatorMaps) {
  243. return this.operatorMaps[id].url;
  244. } else {
  245. this.doc_name = name
  246. return "";
  247. }
  248. },
  249. getAge(patient) {
  250. var thisLen = patient.id_card_no.length;
  251. var birth = "";
  252. if (thisLen == 15) {
  253. birth = "19" + patient.id_card_no.substr(6, 6);
  254. } else {
  255. birth = patient.id_card_no.substr(6, 8);
  256. }
  257. var births =
  258. birth.substr(0, 4) +
  259. "-" +
  260. birth.substr(4, 2) +
  261. "-" +
  262. birth.substr(6, 2);
  263. return jsGetAge(births, "-");
  264. },
  265. getAllDoctorList() {
  266. getAllDoctorList().then((response) => {
  267. if (response.data.state == 1) {
  268. var doctor = response.data.data.doctor;
  269. this.doctorList = doctor;
  270. }
  271. });
  272. },
  273. getDoctor(id) {
  274. var name = "";
  275. for (let i = 0; i < this.doctorList.length; i++) {
  276. if (id == this.doctorList[i].admin_user_id) {
  277. name = this.doctorList[i].user_name;
  278. }
  279. }
  280. return name;
  281. },
  282. getTime(value, temp) {
  283. if (value != undefined) {
  284. return uParseTime(value, temp);
  285. }
  286. return "";
  287. },
  288. getPrescriptionPrint() {
  289. var params = {
  290. // patient_id:this.patient_id,
  291. // record_date:this.record_date,
  292. // prescription_id:this.prescription_id,
  293. patient_id: this.patient_id,
  294. record_date: this.record_date,
  295. prescription_id: this.prescription_id,
  296. ids: this.ids,
  297. p_type: 2,
  298. };
  299. console.log("params", params);
  300. getPrescriptionPrint(params).then((response) => {
  301. if (response.data.state == 1) {
  302. var advicePrint = response.data.data.advicePrint;
  303. console.log("adviceprint9999", advicePrint);
  304. this.advicePrint = advicePrint;
  305. this.prescriptions = advicePrint;
  306. this.doctorList_1 = response.data.data.eles;
  307. console.log(this.doctorList_1, "医生列表");
  308. if (this.doctorList_1.length > 0) {
  309. var operatorsLen = this.doctorList_1.length;
  310. for (var index = 0; index < operatorsLen; index++) {
  311. this.$set(
  312. this.operatorMaps,
  313. this.doctorList_1[index].creator,
  314. this.doctorList_1[index]
  315. );
  316. }
  317. }
  318. console.log("处方222222", this.prescriptions);
  319. var hisPatient = response.data.data.hisPatient;
  320. console.log("hisPatient", hisPatient);
  321. this.hisPatient = hisPatient;
  322. var projectlist = response.data.data.projectlist;
  323. console.log("所有项目列表", projectlist);
  324. this.projectList = projectlist;
  325. }
  326. });
  327. },
  328. getHisPatientDetail() {
  329. const params = {
  330. patient_id: this.patient_id,
  331. };
  332. getHisPatientDetail(params).then((response) => {
  333. if (response.data.state == 1) {
  334. var hisPatient = response.data.data.hisPatient;
  335. console.log("挂号病人", hisPatient);
  336. this.hisPatient = hisPatient;
  337. }
  338. });
  339. },
  340. getInitData() {
  341. getInitData().then((response) => {
  342. if (response.data.state == 1) {
  343. this.department = response.data.data.department;
  344. this.diagnoses = response.data.data.diagnose;
  345. console.log("争端", this.diagnoses);
  346. }
  347. });
  348. },
  349. getDepart(id) {
  350. var name = "";
  351. for (let i = 0; i < this.department.length; i++) {
  352. if (id == this.department[i].id) {
  353. name = this.department[i].name;
  354. }
  355. }
  356. return name;
  357. },
  358. getTotalOne(id) {
  359. var total = 0;
  360. var addtotal = 0;
  361. for (let i = 0; i < this.prescriptions.length; i++) {
  362. if (id == this.prescriptions[i].id) {
  363. if (this.prescriptions[i].project != null) {
  364. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  365. total =
  366. total +
  367. this.prescriptions[i].project[a].price *
  368. this.prescriptions[i].project[a].count;
  369. }
  370. }
  371. if (this.prescriptions[i].additionalcharge != null) {
  372. for (
  373. let a = 0;
  374. a < this.prescriptions[i].additionalcharge.length;
  375. a++
  376. ) {
  377. addtotal =
  378. addtotal +
  379. this.prescriptions[i].additionalcharge[a].price *
  380. this.prescriptions[i].additionalcharge[a].count;
  381. }
  382. }
  383. addtotal = Math.floor(addtotal * 100) / 100;
  384. }
  385. }
  386. for (let i = 0; i < this.prescriptions.length; i++) {
  387. if (id == this.prescriptions[i].id) {
  388. if (this.prescriptions[i].advices != null) {
  389. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  390. total =
  391. total +
  392. this.prescriptions[i].advices[a].price *
  393. this.prescriptions[i].advices[a].prescribing_number;
  394. }
  395. }
  396. if (this.prescriptions[i].additionalcharge != null) {
  397. for (
  398. let a = 0;
  399. a < this.prescriptions[i].additionalcharge.length;
  400. a++
  401. ) {
  402. addtotal =
  403. addtotal +
  404. this.prescriptions[i].additionalcharge[a].price *
  405. this.prescriptions[i].additionalcharge[a].count;
  406. }
  407. }
  408. addtotal = Math.floor(addtotal * 100) / 100;
  409. }
  410. }
  411. return total + addtotal;
  412. },
  413. getProjectName(id) {
  414. var project_name = "";
  415. for (let i = 0; i < this.projectList.length; i++) {
  416. if (id == this.projectList[i].id) {
  417. project_name = this.projectList[i].project_name;
  418. }
  419. }
  420. return project_name;
  421. },
  422. getDiagnosis(id) {
  423. let arr = id.split(",");
  424. var name = "";
  425. for (let i = 0; i < this.diagnoses.length; i++) {
  426. if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
  427. name += this.diagnoses[i].class_name + " ";
  428. }
  429. }
  430. return name;
  431. },
  432. },
  433. created() {
  434. this.getAllDoctorList();
  435. this.getInitData();
  436. this.getPrescriptionPrint();
  437. this.getHisPatientDetail();
  438. var xtuser = this.$store.getters.xt_user;
  439. this.orgname = xtuser.org.org_name;
  440. this.org_id = xtuser.org.id;
  441. },
  442. watch: {
  443. ids: function (val) {
  444. this.ids = val;
  445. this.getPrescriptionPrint();
  446. },
  447. },
  448. };
  449. </script>
  450. <style lang="scss" scoped>
  451. .prescription-print {
  452. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  453. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  454. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  455. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  456. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  457. margin-bottom: 20px;
  458. padding: 20px 10px;
  459. }
  460. .printTitle {
  461. font-size: 22px;
  462. text-align: center;
  463. font-weight: bold;
  464. }
  465. .infoTitle {
  466. display: flex;
  467. border-bottom: 2px solid #000;
  468. margin-top: 10px;
  469. line-height: 24px;
  470. padding: 0 10px;
  471. }
  472. .infoTitle p {
  473. width: 200px;
  474. }
  475. .infoMain {
  476. display: flex;
  477. flex-wrap: wrap;
  478. border-bottom: 2px solid #000;
  479. padding: 0 10px;
  480. }
  481. .infoMain div {
  482. width: 50%;
  483. line-height: 24px;
  484. }
  485. .prescriptionBox {
  486. padding: 0 10px;
  487. min-height: 450px;
  488. }
  489. .Rp {
  490. font-size: 22px;
  491. font-weight: bold;
  492. }
  493. .drugsBox {
  494. padding-left: 40px;
  495. margin-bottom: 10px;
  496. }
  497. .drugsBox div {
  498. line-height: 20px;
  499. }
  500. .drugsOne {
  501. line-height: 24px;
  502. }
  503. .drugsOne span {
  504. margin-right: 20px;
  505. }
  506. .doctorBox {
  507. display: flex;
  508. justify-content: space-between;
  509. padding: 0 10px;
  510. line-height: 24px;
  511. border-bottom: 2px solid #000;
  512. }
  513. .doctorBoxtwo {
  514. display: flex;
  515. justify-content: space-between;
  516. padding: 0 10px;
  517. line-height: 24px;
  518. }
  519. .actionBar {
  520. display: flex;
  521. justify-content: space-between;
  522. line-height: 24px;
  523. padding: 0 10px;
  524. }
  525. .actionBar p {
  526. width: 150px;
  527. }
  528. </style>