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

printOne.vue 13KB

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