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

prinSeven.vue 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  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 >
  25. <div style="display: flex;border-top: 2px solid #000;margin-top: 10px;line-height: 24px;padding: 0 10px;">
  26. <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
  27. <p style="width: 200px;">
  28. 性别:
  29. <span v-if="item.patient.gender == 1">男</span>
  30. <span v-if="item.patient.gender == 2">女</span>
  31. </p>
  32. <p style="width: 200px;">年龄:{{ 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. 费别:居民医保/职工医保/自费
  44. </div>
  45. <div style="margin-bottom: 10px" v-if="org_id != 10188">
  46. <!-- 电话:{{ item.patient.phone }} -->
  47. 开方日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
  48. </div>
  49. <div style="margin-bottom: 10px" v-else>
  50. 日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
  51. </div>
  52. <div style="width: 100%;">地址:{{ item.patient.home_address }}</div>
  53. <div style=" width: 50%">
  54. 临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
  55. </div>
  56. </div>
  57. </div>
  58. <div class="prescriptionBox" style="min-height: 400px;">
  59. <div class="Rp">Rp:</div>
  60. <div
  61. class="drugsBox"
  62. v-for="(it, index) in item.advices" :key="index"
  63. :style="{'page-break-after':index==yi&&item.advices.length>5? 'always':'auto'}"
  64. >
  65. <!-- class="drugsBox" item.advices.length>=5 ? 'danzhang' : 'drugsBox' :style="{'page-break-after':index==yi&&item.advices.length>3? 'always':'auto'}"-->
  66. <!-- <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> -->
  67. <template v-if="index==yi+1&&item.advices.length>5">
  68. <div style="margin: 20px 0px;">
  69. <div class="infoTitle">
  70. <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
  71. <p>
  72. 性别:
  73. <span v-if="item.patient.gender == 1">男</span>
  74. <span v-if="item.patient.gender == 2">女</span>
  75. </p>
  76. <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
  77. </div>
  78. <div class="infoMain">
  79. <div style="margin-bottom: 10px">
  80. 门诊号:{{ hisPatient.number ? hisPatient.number : "" }}
  81. </div>
  82. <div style="margin-bottom: 10px">
  83. 科室:{{ item.info ? getDepart(item.info.departments) : "" }}
  84. </div>
  85. <div style="margin-bottom: 10px">
  86. <!-- 医保卡号:{{ item.hisPatient.number ? item.hisPatient.number : "" }} -->
  87. 费别:居民医保/职工医保/自费
  88. </div>
  89. <div style="margin-bottom: 10px" v-if="org_id != 10188">
  90. <!-- 电话:{{ item.patient.phone }} -->
  91. 开方日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
  92. </div>
  93. <div style="margin-bottom: 10px" v-else>
  94. 日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
  95. </div>
  96. <div style="width: 100%">地址:{{ item.patient.home_address }}</div>
  97. <div style="width: 100%">
  98. 临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
  99. </div>
  100. </div>
  101. </div>
  102. </template>
  103. <div style="position: relative;">
  104. <div class="drugsOne" :style="{'border-right':item.arr.length>0 && item.arr[0][0].groupno==it.groupno ? '1px solid black': 'none','width':'80%'}">
  105. <span style="font-weight: bold" >
  106. {{ index + 1 + "." }}
  107. </span>
  108. {{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;
  109. <span v-if="it.drug.min_unit != it.drug.dose_unit">
  110. {{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* {{ it.drug.min_number }}{{ it.drug.min_unit }}/
  111. {{it.drug.max_unit}}
  112. </span>&nbsp;
  113. <div>
  114. <template v-if="item.arr.length>0 && item.arr[0][0].groupno==it.groupno">
  115. <div >
  116. <!-- -->
  117. <span style="margin-left: 38px;">{{item.arr[0][0].advice_name ? item.arr[0][0].advice_name : ""}}</span>&nbsp;&nbsp;
  118. <span v-if="item.arr[0][0].drug.min_unit != item.arr[0][0].drug.dose_unit">
  119. {{ item.arr[0][0].drug.dose }}{{ item.arr[0][0].drug.dose_unit }}&nbsp;* {{ item.arr[0][0].drug.min_number }}{{ item.arr[0][0].drug.min_unit }}/
  120. {{item.arr[0][0].drug.max_unit}}
  121. </span>&nbsp;
  122. </div>
  123. <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 10px;" >
  124. &nbsp;共{{ item.arr[0][0].single_dose }}{{ item.arr[0][0].single_dose_unit }}
  125. </div>
  126. </template>
  127. </div>
  128. <div style="margin-left: 70px">
  129. 用法:
  130. <span v-if="(item.arr.length>0 && item.arr[0][0].groupno!=it.groupno)||arr.length<0">{{ it.single_dose }}{{ it.single_dose_unit }}</span
  131. >&nbsp;&nbsp;<span
  132. >{{ it.execution_frequency }}&nbsp;{{
  133. it.delivery_way
  134. }}&nbsp;</span>&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
  135. </div>
  136. <!-- v-if="arr.length>0 && arr[0][0].groupno==it.groupno" 'border-right':arr.length>0 && arr[0][0].groupno==it.groupno ? '1px solid black' :'none',-->
  137. </div>
  138. <div style="display: inline-block;position: absolute;left:80%;bottom:0px;margin-left: 10px;" v-if="item.arr.length>0 && item.arr[0][0].groupno==it.groupno">
  139. ×&nbsp;{{ it.prescribing_number}}
  140. </div>
  141. <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 10px;" v-if="item.arr.length>0 && item.arr[0][0].groupno==it.groupno">
  142. <!-- &nbsp;共{{ it.prescribing_number}}{{ it.prescribing_number_unit }} -->
  143. &nbsp;共{{ it.single_dose }}{{ it.single_dose_unit }}
  144. </div>
  145. </div>
  146. <template v-if="index==yi&&item.advices.length>5">
  147. <div style="margin: 20px 0px;">
  148. <div style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
  149. <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
  150. </div>
  151. <div class="actionBar" >
  152. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  153. <p>配对:</p>
  154. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  155. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  156. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  157. <p>审核:</p>
  158. <p>配对:</p>
  159. <p>核对:</p>
  160. <p>发药:</p>
  161. <p>
  162. 金额:{{
  163. getTotalOne(item.id).toFixed(2)
  164. ? getTotalOne(item.id).toFixed(2)
  165. : 0
  166. }}元
  167. </p>
  168. </div>
  169. <div class="actionBar" style="margin-bottom: 10px;">
  170. <p style="width:300px;">大额处方患者意见:
  171. <el-radio v-model="radio" label="1">同意</el-radio>
  172. <el-radio v-model="radio" label="2">不同意</el-radio>
  173. </p>
  174. <p>收费员:</p>
  175. </div>
  176. <div style="padding: 0px 10px;">
  177. <p >患者签名:</p>
  178. </div>
  179. </div>
  180. </template>
  181. </div>
  182. <div
  183. class="drugsBox"
  184. v-for="(it, i) in item.additionalcharge"
  185. :key="i"
  186. >
  187. <div class="drugsOne">
  188. {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
  189. it.count
  190. }}次
  191. </div>
  192. </div>
  193. <div
  194. class="drugsBox"
  195. v-for="(it, index) in item.project"
  196. :key="index"
  197. >
  198. <div class="drugsOne">
  199. <span style="font-weight: bold">{{ index + 1 + "." }}</span
  200. >{{
  201. it.type == 2
  202. ? getProjectName(it.project_id)
  203. ? getProjectName(it.project_id)
  204. : ""
  205. : it.good_info.good_name
  206. }}&nbsp;&nbsp;{{ it.single_dose
  207. }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
  208. </div>
  209. <div style="margin-left: 100px">
  210. <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
  211. >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
  212. >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
  213. </div>
  214. </div>
  215. <div
  216. class="drugsBox"
  217. v-for="(it, i) in item.additionalcharge"
  218. :key="i"
  219. >
  220. <div class="drugsOne">
  221. {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
  222. it.price.toFixed(2)
  223. }}元/{{ it.count }}次
  224. </div>
  225. </div>
  226. <div style="text-align: center">(以下空白)</div>
  227. </div>
  228. <!-- <div class="doctorBox" v-if="org_id != 10188 && org_id != 0">
  229. <p v-if="org_id == 10217 || org_id == 0">
  230. 医师:
  231. <span
  232. style="width: 100px; display: inline-block"
  233. v-if="item.creator == ''"
  234. >
  235. {{ item.doctor }}
  236. </span>
  237. <span
  238. style="width: 100px; display: inline-block"
  239. v-else-if="doc_name != ''"
  240. >
  241. {{ doc_name }}
  242. </span>
  243. <img
  244. style="height: 50px;"
  245. :src="setAdminUserES(item.creator,item.doctor)"
  246. alt=""
  247. srcset=""
  248. />
  249. </p>
  250. <p v-else>
  251. 医师: {{ item.doctor ? item.doctor : "" }}
  252. </p>
  253. <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
  254. </div> -->
  255. <div style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
  256. <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
  257. </div>
  258. <!-- <div style="display: flex;justify-content: space-around;border-bottom: 2px solid #000;">
  259. <p style="width:300px;">大额处方患者意见:
  260. <el-radio v-model="radio" label="1">同意</el-radio>
  261. <el-radio v-model="radio" label="2">不同意</el-radio>
  262. </p>
  263. <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
  264. </div> -->
  265. <div class="actionBar" >
  266. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  267. <p>配对:</p>
  268. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  269. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  270. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  271. <p>审核:</p>
  272. <p>配对:</p>
  273. <p>核对:</p>
  274. <p>发药:</p>
  275. <p>
  276. 金额:{{
  277. getTotalOne(item.id).toFixed(2)
  278. ? getTotalOne(item.id).toFixed(2)
  279. : 0
  280. }}元
  281. </p>
  282. </div>
  283. <div class="actionBar">
  284. <p style="width:300px;">大额处方患者意见:
  285. <el-radio v-model="radio" label="1">同意</el-radio>
  286. <el-radio v-model="radio" label="2">不同意</el-radio>
  287. </p>
  288. <p>收费员:</p>
  289. </div>
  290. <div>
  291. <p >患者签名:</p>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </template>
  297. <script>
  298. import { jsGetAge, uParseTime } from "@/utils/tools";
  299. import {
  300. getAllDoctorList,
  301. getPrescriptionPrint,
  302. getHisPatientDetail,
  303. } from "@/api/project/project";
  304. import { getInitData } from "@/api/his/his";
  305. export default{
  306. props: {
  307. patient_id: Number,
  308. record_date: String,
  309. prescription_id: Number,
  310. ids: String,
  311. },
  312. data() {
  313. return {
  314. doc_name:"",
  315. doctorList: [],
  316. advicePrint: {},
  317. yi:4,
  318. radio:'',
  319. arr:[],
  320. advicess:[],
  321. page:sessionStorage.getItem('dayin'),
  322. patient: {},
  323. tableData: [],
  324. prescriptionInfo: [],
  325. hisPatient: {},
  326. department: [],
  327. prescriptions: [],
  328. projectList: [],
  329. orgname: "",
  330. diagnoses: [],
  331. org_id: 0,
  332. operatorMaps: {},
  333. operators: [],
  334. doctorList_1: [],
  335. };
  336. },
  337. methods: {
  338. // 电子签名
  339. setAdminUserES(id,name) {
  340. console.log(id)
  341. console.log(name)
  342. console.log(this.operatorMaps)
  343. if (id == 0) {
  344. return "";
  345. }
  346. if (id in this.operatorMaps) {
  347. return this.operatorMaps[id].url;
  348. } else {
  349. this.doc_name = name
  350. return "";
  351. }
  352. },
  353. getAge(patient) {
  354. if(patient.id_card_no == "TWN001836483"){
  355. return patient.age
  356. }else{
  357. var thisLen = patient.id_card_no.length;
  358. var birth = "";
  359. if (thisLen == 15) {
  360. birth = "19" + patient.id_card_no.substr(6, 6);
  361. } else {
  362. birth = patient.id_card_no.substr(6, 8);
  363. }
  364. var births =
  365. birth.substr(0, 4) +
  366. "-" +
  367. birth.substr(4, 2) +
  368. "-" +
  369. birth.substr(6, 2);
  370. return jsGetAge(births, "-");
  371. }
  372. },
  373. getAllDoctorList() {
  374. getAllDoctorList().then((response) => {
  375. if (response.data.state == 1) {
  376. var doctor = response.data.data.doctor;
  377. this.doctorList = doctor;
  378. }
  379. });
  380. },
  381. getDoctor(id) {
  382. var name = "";
  383. for (let i = 0; i < this.doctorList.length; i++) {
  384. if (id == this.doctorList[i].admin_user_id) {
  385. name = this.doctorList[i].user_name;
  386. }
  387. }
  388. return name;
  389. },
  390. getTime(value, temp) {
  391. if (value != undefined) {
  392. return uParseTime(value, temp);
  393. }
  394. return "";
  395. },
  396. getPrescriptionPrint() {
  397. var params = {
  398. // patient_id:this.patient_id,
  399. // record_date:this.record_date,
  400. // prescription_id:this.prescription_id,
  401. patient_id: this.patient_id,
  402. record_date: this.record_date,
  403. prescription_id: this.prescription_id,
  404. ids: this.ids,
  405. p_type: 2,
  406. };
  407. console.log("params", params);
  408. getPrescriptionPrint(params).then((response) => {
  409. if (response.data.state == 1) {
  410. var advicePrint = response.data.data.advicePrint;
  411. console.log("adviceprint9999", advicePrint);
  412. this.advicePrint = advicePrint;
  413. this.prescriptions = advicePrint;
  414. this.doctorList_1 = response.data.data.eles;
  415. for(let i=0;i<this.advicePrint.length;i++){
  416. var arr = new Array()
  417. var advicess = new Array()
  418. var advicess=advicePrint[i].advices
  419. for(let j=0;j<advicess.length;j++){
  420. for(let x=j+1;x<advicess.length;x++){
  421. if(advicess[j].groupno == advicess[x].groupno){
  422. arr.push(advicess.splice(x,1))
  423. }
  424. }
  425. }
  426. this.advicePrint[i]["arr"] = arr
  427. // for(let y=0;y<this.advicePrint[i].arr.length;y++){
  428. // console.log('6666666',this.advicePrint[i].arr[y]);
  429. // }
  430. }
  431. console.log('4444444',this.advicePrint);
  432. // console.log('55555555',this.arr);
  433. console.log(this.doctorList_1, "医生列表");
  434. if (this.doctorList_1.length > 0) {
  435. var operatorsLen = this.doctorList_1.length;
  436. for (var index = 0; index < operatorsLen; index++) {
  437. this.$set(
  438. this.operatorMaps,
  439. this.doctorList_1[index].creator,
  440. this.doctorList_1[index]
  441. );
  442. }
  443. }
  444. console.log("处方222222", this.prescriptions);
  445. var hisPatient = response.data.data.hisPatient;
  446. console.log("hisPatient", hisPatient);
  447. this.hisPatient = hisPatient;
  448. var projectlist = response.data.data.projectlist;
  449. console.log("所有项目列表", projectlist);
  450. this.projectList = projectlist;
  451. }
  452. });
  453. },
  454. getHisPatientDetail() {
  455. const params = {
  456. patient_id: this.patient_id,
  457. };
  458. getHisPatientDetail(params).then((response) => {
  459. if (response.data.state == 1) {
  460. var hisPatient = response.data.data.hisPatient;
  461. console.log("挂号病人", hisPatient);
  462. this.hisPatient = hisPatient;
  463. }
  464. });
  465. },
  466. getInitData() {
  467. getInitData().then((response) => {
  468. if (response.data.state == 1) {
  469. this.department = response.data.data.department;
  470. this.diagnoses = response.data.data.diagnose;
  471. console.log("争端", this.diagnoses);
  472. }
  473. });
  474. },
  475. getDepart(id) {
  476. var name = "";
  477. for (let i = 0; i < this.department.length; i++) {
  478. if (id == this.department[i].id) {
  479. name = this.department[i].name;
  480. }
  481. }
  482. return name;
  483. },
  484. getTotalOne(id) {
  485. var total = 0;
  486. var addtotal = 0;
  487. for (let i = 0; i < this.prescriptions.length; i++) {
  488. if (id == this.prescriptions[i].id) {
  489. if (this.prescriptions[i].project != null) {
  490. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  491. total =
  492. total +
  493. this.prescriptions[i].project[a].price *
  494. this.prescriptions[i].project[a].count;
  495. }
  496. }
  497. if (this.prescriptions[i].additionalcharge != null) {
  498. for (
  499. let a = 0;
  500. a < this.prescriptions[i].additionalcharge.length;
  501. a++
  502. ) {
  503. addtotal =
  504. addtotal +
  505. this.prescriptions[i].additionalcharge[a].price *
  506. this.prescriptions[i].additionalcharge[a].count;
  507. }
  508. }
  509. addtotal = Math.floor(addtotal * 100) / 100;
  510. }
  511. }
  512. for (let i = 0; i < this.prescriptions.length; i++) {
  513. if (id == this.prescriptions[i].id) {
  514. if (this.prescriptions[i].advices != null) {
  515. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  516. total =
  517. total +
  518. this.prescriptions[i].advices[a].price *
  519. this.prescriptions[i].advices[a].prescribing_number;
  520. }
  521. }
  522. if (this.prescriptions[i].additionalcharge != null) {
  523. for (
  524. let a = 0;
  525. a < this.prescriptions[i].additionalcharge.length;
  526. a++
  527. ) {
  528. addtotal =
  529. addtotal +
  530. this.prescriptions[i].additionalcharge[a].price *
  531. this.prescriptions[i].additionalcharge[a].count;
  532. }
  533. }
  534. addtotal = Math.floor(addtotal * 100) / 100;
  535. }
  536. }
  537. return total + addtotal;
  538. },
  539. getProjectName(id) {
  540. var project_name = "";
  541. for (let i = 0; i < this.projectList.length; i++) {
  542. if (id == this.projectList[i].id) {
  543. project_name = this.projectList[i].project_name;
  544. }
  545. }
  546. return project_name;
  547. },
  548. getDiagnosis(id) {
  549. let arr = id.split(",");
  550. var name = "";
  551. for (let i = 0; i < this.diagnoses.length; i++) {
  552. if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
  553. name += this.diagnoses[i].class_name + " ";
  554. }
  555. }
  556. return name;
  557. },
  558. merge(arrA){
  559. var len=arrA.lenfth
  560. // for(let j=0;j<this.advicess.length;j++){
  561. // for(let x=j+1;x<this.advicess.length;x++){
  562. // if(this.advicess[j].groupno == this.advicess[x].groupno){
  563. // // this.arr.push(this.advicess.splice(x,1))
  564. // this.arrs=this.advicess.splice(x,1)
  565. // }
  566. // }
  567. // }
  568. for(let j=0;j<len;j++){
  569. for(let x=j+1;x<len;x++){
  570. if(arrA[j].groupno == arrA[x].groupno){
  571. this.arr.push(arrA.splice(x,1))
  572. }
  573. }
  574. }
  575. console.log('777777777',this.arr);
  576. return this.arr
  577. }
  578. },
  579. created() {
  580. this.getAllDoctorList();
  581. this.getInitData();
  582. this.getPrescriptionPrint();
  583. this.getHisPatientDetail();
  584. var xtuser = this.$store.getters.xt_user;
  585. this.orgname = xtuser.org.org_name;
  586. this.org_id = xtuser.org.id;
  587. // for(let j=0;j<this.advicess.length;j++){
  588. // console.log('44444444');
  589. // for(let x=j+1;x<this.advicess.length;x++){
  590. // if(this.advicess[j].groupno == this.advicess[x].groupno){
  591. // this.arr.push(this.advicess.splice(x,1))
  592. // }
  593. // }
  594. // }
  595. // console.log('777777777',this.arr[0].advice_name);
  596. // return this.arr
  597. },
  598. watch: {
  599. ids: function (val) {
  600. this.ids = val;
  601. this.getPrescriptionPrint();
  602. },
  603. },
  604. };
  605. </script>
  606. <style lang="scss" scoped>
  607. .prescription-print {
  608. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  609. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  610. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  611. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  612. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  613. margin-bottom: 20px;
  614. padding: 20px 10px;
  615. }
  616. .printTitle {
  617. font-size: 22px;
  618. text-align: center;
  619. font-weight: bold;
  620. }
  621. .infoTitle {
  622. display: flex;
  623. border-top: 2px solid #000;
  624. margin-top: 10px;
  625. line-height: 24px;
  626. padding: 0 10px;
  627. }
  628. .infoTitle p {
  629. width: 200px;
  630. }
  631. .infoMain {
  632. display: flex;
  633. flex-wrap: wrap;
  634. border-bottom: 2px solid #000;
  635. padding: 0 10px;
  636. }
  637. .infoMain div {
  638. width: 50%;
  639. line-height: 24px;
  640. }
  641. .prescriptionBox {
  642. padding: 0 10px;
  643. min-height: 450px;
  644. }
  645. .Rp {
  646. font-size: 22px;
  647. font-weight: bold;
  648. }
  649. .drugsBox {
  650. padding-left: 40px;
  651. margin-bottom: 10px;
  652. position: relative;
  653. }
  654. .drugsBox div {
  655. line-height: 20px;
  656. }
  657. .drugsOne {
  658. line-height: 24px;
  659. display: inline-block;
  660. width: 80%;
  661. }
  662. .drugsOne span {
  663. margin-right: 20px;
  664. }
  665. .doctorBox {
  666. display: flex;
  667. justify-content: space-between;
  668. padding: 0 10px;
  669. line-height: 24px;
  670. border-bottom: 2px solid #000;
  671. }
  672. .doctorBoxs{
  673. width: 100%;
  674. margin-right: 30px;
  675. text-align: right;
  676. padding: 0 10px;
  677. line-height: 24px;
  678. }
  679. .doctorBoxtwo {
  680. display: flex;
  681. justify-content: space-between;
  682. padding: 0 10px;
  683. line-height: 24px;
  684. }
  685. .actionBar {
  686. display: flex;
  687. justify-content: space-between;
  688. line-height: 24px;
  689. padding: 0 10px;
  690. }
  691. .actionBar p {
  692. width: 150px;
  693. }
  694. </style>