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

printFour.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <template>
  2. <div id='prescriptionPrint'>
  3. <div v-for="(item,index) in advicePrint" :key="index">
  4. <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
  5. <div class="printTitle">{{orgname}}处方笺</div>
  6. <div class="infoTitle">
  7. <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
  8. <p>性别:
  9. <span v-if="item.patient.gender == 1">男</span>
  10. <span v-if="item.patient.gender == 2">女</span>
  11. </p>
  12. <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
  13. </div>
  14. <div class="infoMain">
  15. <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
  16. <div style="margin-bottom: 10px;">科室:{{item.info?getDepart(item.info.departments):''}}</div>
  17. <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
  18. <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
  19. <div>地址:{{item.patient.home_address}}</div>
  20. <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
  21. </div>
  22. <div class="prescriptionBox">
  23. <div class="Rp">Rp:</div>
  24. <div class="drugsBox" v-for="(it,index) in item.advices" :key="index"
  25. >
  26. <!-- :style="{'page-break-after':index==yi&&item.advices.length>5? 'always':'auto'}" -->
  27. <!-- <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> -->
  28. <div class="drugsOne" >
  29. <span style="font-weight:bold;">{{ index+1 + '.' }}</span>
  30. {{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;
  31. <span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>
  32. &nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>
  33. &nbsp;&nbsp;<span>{{it.advice_desc}}</span>
  34. </div>
  35. <div style="margin-left:100px;">
  36. <span>{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</span>
  37. </div>
  38. </div>
  39. <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
  40. <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
  41. </div>
  42. <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
  43. <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;<span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
  44. <div style="margin-left:100px;"><span>{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</span></div>
  45. </div>
  46. <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
  47. <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
  48. </div>
  49. <div style="text-align:center;" >(以下空白)</div>
  50. </div>
  51. <div class="doctorBox">
  52. <p>
  53. 医师:
  54. <span
  55. style="width: 100px; display: inline-block"
  56. v-if="item.creator == ''"
  57. >
  58. {{ item.doctor ? item.doctor : "" }}
  59. </span>
  60. <!-- <span
  61. style="width: 100px; display: inline-block"
  62. v-else-if="doc_name != ''"
  63. >
  64. {{ doc_name }}
  65. </span> -->
  66. <img
  67. style="height: 30px"
  68. :src="setAdminUserES(item.creator,item.doctor)"
  69. alt=""
  70. srcset=""
  71. v-else
  72. />
  73. </p>
  74. <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
  75. </div>
  76. <div class="actionBar">
  77. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  78. <p>配对:</p>
  79. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  80. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  81. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  82. <p>审核:</p>
  83. <p>配对:</p>
  84. <p>核对:</p>
  85. <p>发药:</p>
  86. <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
  87. <!-- <p>药费:551.2元</p>-->
  88. <!-- <p>药费:466.2元</p>-->
  89. </div>
  90. <div style="page-break-after:always"></div>
  91. </div>
  92. </div>
  93. </div>
  94. </template>
  95. <script>
  96. import { jsGetAge, uParseTime } from '@/utils/tools'
  97. import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
  98. import {getInitData} from "@/api/his/his"
  99. export default {
  100. props:{
  101. patient_id: Number,
  102. record_date: String,
  103. prescription_id: Number,
  104. his_patient_id:Number,
  105. ids: String,
  106. newHisPatient:Object,
  107. },
  108. data(){
  109. return {
  110. doctorList:[],
  111. advicePrint:{},
  112. yi:4,
  113. patient:{},
  114. tableData:[],
  115. prescriptionInfo:[],
  116. hisPatient:{},
  117. department:[],
  118. prescriptions:[],
  119. projectList:[],
  120. orgname:"",
  121. diagnoses:[],
  122. operatorMaps: {},
  123. operators: [],
  124. doctorList_1: [],
  125. }
  126. },
  127. methods:{
  128. // 电子签名
  129. setAdminUserES(id,name) {
  130. if (id == 0) {
  131. return "";
  132. }
  133. if (id in this.operatorMaps) {
  134. return this.operatorMaps[id].url;
  135. } else {
  136. this.doc_name = name;
  137. return "";
  138. }
  139. },
  140. getAge(patient){
  141. var thisLen = patient.id_card_no.length
  142. var birth = ''
  143. if (thisLen == 15) {
  144. birth = '19' + patient.id_card_no.substr(6, 6)
  145. } else {
  146. birth = patient.id_card_no.substr(6, 8)
  147. }
  148. var births =
  149. birth.substr(0, 4) +
  150. '-' +
  151. birth.substr(4, 2) +
  152. '-' +
  153. birth.substr(6, 2)
  154. return jsGetAge(births, '-')
  155. },
  156. getAllDoctorList(){
  157. getAllDoctorList().then(response=>{
  158. if(response.data.state == 1){
  159. var doctor = response.data.data.doctor
  160. this.doctorList = doctor
  161. }
  162. })
  163. },
  164. getDoctor(id){
  165. var name = ""
  166. for(let i=0;i<this.doctorList.length;i++){
  167. if(id == this.doctorList[i].admin_user_id){
  168. name = this.doctorList[i].user_name
  169. }
  170. }
  171. return name
  172. },
  173. getTime(value, temp) {
  174. if (value != undefined) {
  175. return uParseTime(value, temp)
  176. }
  177. return ''
  178. },
  179. getPrescriptionPrint(){
  180. var params = {
  181. // patient_id:this.patient_id,
  182. // record_date:this.record_date,
  183. // prescription_id:this.prescription_id,
  184. patient_id:this.patient_id,
  185. record_date:this.record_date,
  186. prescription_id:this.prescription_id,
  187. ids:this.ids,
  188. p_type:2,
  189. }
  190. console.log("params",params)
  191. getPrescriptionPrint(params).then(response=>{
  192. if(response.data.state == 1){
  193. var advicePrint = response.data.data.advicePrint
  194. console.log("adviceprint9999",advicePrint)
  195. this.advicePrint = advicePrint
  196. this.prescriptions = advicePrint
  197. console.log("处方222222",this.prescriptions)
  198. this.doctorList_1 = response.data.data.eles;
  199. console.log(this.doctorList_1, "医生列表");
  200. if (this.doctorList_1.length > 0) {
  201. var operatorsLen = this.doctorList_1.length;
  202. for (var index = 0; index < operatorsLen; index++) {
  203. this.$set(
  204. this.operatorMaps,
  205. this.doctorList_1[index].creator,
  206. this.doctorList_1[index]
  207. );
  208. }
  209. }
  210. var hisPatient = response.data.data.hisPatient
  211. console.log("hisPatient",hisPatient)
  212. this.hisPatient = hisPatient
  213. var projectlist = response.data.data.projectlist
  214. console.log("所有项目列表",projectlist)
  215. this.projectList = projectlist
  216. }
  217. })
  218. },
  219. getHisPatientDetail(){
  220. const params = {
  221. patient_id:this.patient_id
  222. }
  223. getHisPatientDetail(params).then(response=>{
  224. if(response.data.state == 1){
  225. var hisPatient = response.data.data.hisPatient
  226. console.log("挂号病人",hisPatient)
  227. this.hisPatient = hisPatient
  228. }
  229. })
  230. },
  231. getInitData(){
  232. getInitData().then(response=>{
  233. if(response.data.state == 1){
  234. this.department = response.data.data.department
  235. this.diagnoses = response.data.data.diagnose
  236. console.log("争端",this.diagnoses)
  237. }
  238. })
  239. },
  240. getDepart(id){
  241. var name = ""
  242. for(let i=0;i<this.department.length;i++){
  243. if(id == this.department[i].id){
  244. name = this.department[i].name
  245. }
  246. }
  247. return name
  248. },
  249. getTotalOne(id) {
  250. var total = 0
  251. var addtotal = 0
  252. for (let i = 0; i < this.prescriptions.length; i++) {
  253. if(id == this.prescriptions[i].id){
  254. if (this.prescriptions[i].project != null) {
  255. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  256. total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
  257. }
  258. }
  259. if (this.prescriptions[i].additionalcharge != null) {
  260. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  261. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  262. }
  263. }
  264. addtotal = Math.floor(addtotal * 100) / 100
  265. }
  266. }
  267. for (let i = 0; i < this.prescriptions.length; i++) {
  268. if(id == this.prescriptions[i].id){
  269. if (this.prescriptions[i].advices != null) {
  270. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  271. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  272. }
  273. }
  274. if (this.prescriptions[i].additionalcharge != null) {
  275. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  276. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  277. }
  278. }
  279. addtotal = Math.floor(addtotal * 100) / 100
  280. }
  281. }
  282. return total + addtotal
  283. },
  284. getProjectName(id){
  285. var project_name = ""
  286. for(let i=0;i<this.projectList.length;i++){
  287. if(id == this.projectList[i].id){
  288. project_name = this.projectList[i].project_name
  289. }
  290. }
  291. return project_name
  292. },
  293. getDiagnosis(id){
  294. let arr = id.split(',')
  295. var name = ""
  296. for(let i=0;i<this.diagnoses.length;i++){
  297. if(arr.indexOf(String(this.diagnoses[i].id)) > -1){
  298. name += this.diagnoses[i].class_name + ' '
  299. }
  300. }
  301. return name
  302. }
  303. },
  304. created(){
  305. this.getAllDoctorList()
  306. this.getInitData()
  307. this.getPrescriptionPrint()
  308. this.getHisPatientDetail()
  309. var xtuser = this.$store.getters.xt_user;
  310. this.orgname = xtuser.org.org_name;
  311. },
  312. watch:{
  313. ids:function(val){
  314. this.ids = val
  315. this.getPrescriptionPrint()
  316. }
  317. }
  318. }
  319. </script>
  320. <style lang="scss" scoped>
  321. .prescription-print{
  322. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  323. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  324. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  325. margin-bottom: 20px;
  326. padding:20px 10px;
  327. }
  328. .printTitle{
  329. font-size: 22px;
  330. text-align: center;
  331. font-weight: bold;
  332. }
  333. .infoTitle{
  334. display: flex;
  335. border-bottom: 2px solid #000;
  336. margin-top:10px;
  337. line-height: 24px;
  338. padding:0 10px;
  339. }
  340. .infoTitle p{
  341. width: 200px;
  342. }
  343. .infoMain{
  344. display: flex;
  345. flex-wrap: wrap;
  346. border-bottom: 2px solid #000;
  347. padding:0 10px;
  348. }
  349. .infoMain div{
  350. width: 50%;
  351. line-height: 24px;
  352. }
  353. .prescriptionBox{
  354. padding:0 10px;
  355. min-height:450px;
  356. }
  357. .Rp{
  358. font-size: 22px;
  359. font-weight: bold;
  360. }
  361. .drugsBox{
  362. padding-left: 40px;
  363. margin-bottom: 10px;
  364. }
  365. .drugsBox div{
  366. line-height: 20px;
  367. }
  368. .drugsOne{
  369. line-height: 24px;
  370. }
  371. .drugsOne span{
  372. margin-right: 20px;
  373. }
  374. .doctorBox{
  375. display: flex;
  376. justify-content: space-between;
  377. padding:0 10px;
  378. line-height: 24px;
  379. border-bottom: 2px solid #000;
  380. }
  381. .actionBar{
  382. display: flex;
  383. justify-content: space-between;
  384. line-height: 24px;
  385. padding:0 10px;
  386. }
  387. .actionBar p{
  388. width:150px;
  389. }
  390. </style>