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

printOne.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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">血液透析中心处方笺</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>年龄:{{item.patient.age?item.patient.age:""}}岁</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%;">临床诊断:{{item.patient.diagnose}}</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. <div class="drugsOne">{{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>
  26. <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;{{it.day}}天</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
  27. </div>
  28. <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
  29. <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
  30. </div>
  31. <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
  32. <div class="drugsOne">{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
  33. <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
  34. </div>
  35. <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
  36. <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
  37. </div>
  38. </div>
  39. <div class="doctorBox">
  40. <p>医师:{{item.doctor?item.doctor:""}}</p>
  41. <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
  42. </div>
  43. <div class="actionBar">
  44. <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  45. <p>配对:</p>
  46. <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
  47. <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
  48. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
  49. <p>审核:</p>
  50. <p>配对:</p>
  51. <p>核对:</p>
  52. <p>发药:</p>
  53. <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p>
  54. </div>
  55. <div style="page-break-after:always"></div>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <script>
  61. import { jsGetAge, uParseTime } from '@/utils/tools'
  62. import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
  63. import {getInitData} from "@/api/his/his"
  64. export default {
  65. props:{
  66. patient_id:Number,
  67. record_date:String,
  68. prescription_id:Number,
  69. ids:String
  70. },
  71. data(){
  72. return {
  73. doctorList:[],
  74. advicePrint:{},
  75. patient:{},
  76. tableData:[],
  77. prescriptionInfo:[],
  78. hisPatient:{},
  79. department:[],
  80. prescriptions:[],
  81. projectList:[]
  82. }
  83. },
  84. methods:{
  85. getAllDoctorList(){
  86. getAllDoctorList().then(response=>{
  87. if(response.data.state == 1){
  88. var doctor = response.data.data.doctor
  89. this.doctorList = doctor
  90. }
  91. })
  92. },
  93. getDoctor(id){
  94. var name = ""
  95. for(let i=0;i<this.doctorList.length;i++){
  96. if(id == this.doctorList[i].admin_user_id){
  97. name = this.doctorList[i].user_name
  98. }
  99. }
  100. return name
  101. },
  102. getTime(value, temp) {
  103. if (value != undefined) {
  104. return uParseTime(value, temp)
  105. }
  106. return ''
  107. },
  108. getPrescriptionPrint(){
  109. var params = {
  110. // patient_id:this.patient_id,
  111. // record_date:this.record_date,
  112. // prescription_id:this.prescription_id,
  113. patient_id:this.patient_id,
  114. record_date:this.record_date,
  115. prescription_id:this.prescription_id,
  116. ids:this.ids
  117. }
  118. console.log("params",params)
  119. getPrescriptionPrint(params).then(response=>{
  120. if(response.data.state == 1){
  121. var advicePrint = response.data.data.advicePrint
  122. console.log("adviceprint9999",advicePrint)
  123. this.advicePrint = advicePrint
  124. this.prescriptions = advicePrint
  125. var hisPatient = response.data.data.hisPatient
  126. console.log("hisPatient",hisPatient)
  127. this.hisPatient = hisPatient
  128. var projectlist = response.data.data.projectlist
  129. console.log("所有项目列表",projectlist)
  130. this.projectList = projectlist
  131. }
  132. })
  133. },
  134. getHisPatientDetail(){
  135. const params = {
  136. patient_id:this.patient_id
  137. }
  138. getHisPatientDetail(params).then(response=>{
  139. if(response.data.state == 1){
  140. var hisPatient = response.data.data.hisPatient
  141. console.log("挂号病人",hisPatient)
  142. this.hisPatient = hisPatient
  143. }
  144. })
  145. },
  146. getInitData(){
  147. getInitData().then(response=>{
  148. if(response.data.state == 1){
  149. this.department = response.data.data.department
  150. }
  151. })
  152. },
  153. getDepart(id){
  154. var name = ""
  155. for(let i=0;i<this.department.length;i++){
  156. if(id == this.department[i].id){
  157. name = this.department[i].name
  158. }
  159. }
  160. return name
  161. },
  162. getTotalOne(id) {
  163. var total = 0
  164. var addtotal = 0
  165. for (let i = 0; i < this.prescriptions.length; i++) {
  166. if(id == this.prescriptions[i].id){
  167. if (this.prescriptions[i].project != null) {
  168. for (let a = 0; a < this.prescriptions[i].project.length; a++) {
  169. total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
  170. }
  171. }
  172. if (this.prescriptions[i].additionalcharge != null) {
  173. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  174. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  175. }
  176. }
  177. addtotal = Math.floor(addtotal * 100) / 100
  178. }
  179. }
  180. for (let i = 0; i < this.prescriptions.length; i++) {
  181. if(id == this.prescriptions[i].id){
  182. if (this.prescriptions[i].advices != null) {
  183. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  184. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  185. }
  186. }
  187. if (this.prescriptions[i].additionalcharge != null) {
  188. for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
  189. addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
  190. }
  191. }
  192. addtotal = Math.floor(addtotal * 100) / 100
  193. }
  194. }
  195. return total + addtotal
  196. },
  197. getProjectName(id){
  198. var project_name = ""
  199. for(let i=0;i<this.projectList.length;i++){
  200. if(id == this.projectList[i].id){
  201. project_name = this.projectList[i].project_name
  202. }
  203. }
  204. return project_name
  205. },
  206. },
  207. created(){
  208. this.getAllDoctorList()
  209. this.getInitData()
  210. this.getPrescriptionPrint()
  211. this.getHisPatientDetail()
  212. },
  213. watch:{
  214. ids:function(val){
  215. this.ids = val
  216. this.getPrescriptionPrint()
  217. }
  218. }
  219. }
  220. </script>
  221. <style lang="scss" scoped>
  222. .prescription-print{
  223. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  224. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  225. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  226. margin-bottom: 20px;
  227. padding:20px 10px;
  228. }
  229. .printTitle{
  230. font-size: 22px;
  231. text-align: center;
  232. font-weight: bold;
  233. }
  234. .infoTitle{
  235. display: flex;
  236. border-bottom: 2px solid #000;
  237. margin-top:10px;
  238. line-height: 24px;
  239. padding:0 10px;
  240. }
  241. .infoTitle p{
  242. width: 200px;
  243. }
  244. .infoMain{
  245. display: flex;
  246. flex-wrap: wrap;
  247. border-bottom: 2px solid #000;
  248. padding:0 10px;
  249. }
  250. .infoMain div{
  251. width: 50%;
  252. line-height: 24px;
  253. }
  254. .prescriptionBox{
  255. padding:0 10px;
  256. min-height:450px;
  257. }
  258. .Rp{
  259. font-size: 22px;
  260. font-weight: bold;
  261. }
  262. .drugsBox{
  263. padding-left: 40px;
  264. margin-bottom: 10px;
  265. }
  266. .drugsBox div{
  267. line-height: 20px;
  268. }
  269. .drugsOne{
  270. line-height: 24px;
  271. }
  272. .drugsOne span{
  273. margin-right: 20px;
  274. }
  275. .doctorBox{
  276. display: flex;
  277. justify-content: space-between;
  278. padding:0 10px;
  279. line-height: 24px;
  280. border-bottom: 2px solid #000;
  281. }
  282. .actionBar{
  283. display: flex;
  284. justify-content: space-between;
  285. line-height: 24px;
  286. padding:0 10px;
  287. }
  288. .actionBar p{
  289. width:150px;
  290. }
  291. </style>