123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <template>
- <div id='prescription-print' class="prescription-print">
- <div style="display:flex;justify-content: space-between;font-weight:bold;">
- <p style="width:300px;display:flex;justify-content: space-between;font-weight:bold;">
- <span>费别</span>
- <span>自费</span>
- <span>公费</span>
- <span>保险</span>
- <span>其他</span>
- </p>
- <p>就诊日期:{{this.$route.query.record}}</p>
- </div>
- <div class="printTitle">血液透析中心</div>
- <div class="printTitle">处方、治疗单</div>
- <div class="infoTitle">
- <p>门诊编号:34567876532345678</p>
- <p>电脑号:</p>
- </div>
- <div class="infoMain">
- <p style="margin-bottom: 10px;width:25%">姓名:{{patient.name}}</p>
- <p style="margin-bottom: 10px;width:25%">性别:
- <span v-if="patient.gender == 1">男</span>
- <span v-if="patient.gender == 2">女</span>
- </p>
- <p style="margin-bottom: 10px;width:25%">年龄:
- <span>{{patient.age}}</span>
- </p>
- <p style="margin-bottom: 10px;width:25%">参保类型:</p>
- <p style="margin-bottom: 10px;width:50%;">联系电话:{{patient.phone}}</p>
- <p style="width:50%;">地址:{{patient.unit_address}}</p>
- <p style="width:50%;">诊断:{{patient.diagnose}}</p>
- </div>
- <div class="prescriptionBox">
- <table style="width:100%;text-align:center;line-height:25px;">
- <tr>
- <td>序号</td>
- <td>项目名称</td>
- <td>数量</td>
- <td>单位</td>
- <td>单价</td>
- <td>部位</td>
- <td>备注</td>
- <td>天数</td>
- </tr>
- <tr v-for="(item,index) in this.tableData" :key="index">
- <td>{{index+1}}</td>
- <td>{{item.project_name}}</td>
- <td>{{item.single_dose}}</td>
- <td>{{item.unit}}</td>
- <td>{{item.price}}</td>
- <td></td>
- <td>{{item.remark}}</td>
- <td>{{item.day}}</td>
-
- </tr>
- </table>
- </div>
- <div class="infoTitle">
- <p>开单医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
- <p>签章:</p>
- </div>
- <div class="actionBar">
- <p>执行医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
- <p>费用:</p>
- </div>
- <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
- <tr>
- <td style="width:16%;">治疗时间</td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- </tr>
- <tr>
- <td style="width:16%;">医生签字</td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- <td style="width:16%;"></td>
- </tr>
- <tr>
- <td style="width:16px;">患者签字</td>
- <td style="width:16px;"></td>
- <td style="width:16px;"></td>
- <td style="width:16px;"></td>
- <td style="width:16px;"></td>
- <td style="width:16px;"></td>
- </tr>
- </table>
- </div>
- </template>
- <script>
- import { jsGetAge, uParseTime } from '@/utils/tools'
- import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
- export default {
- props:{
- patient_id:Number,
- record_date:String,
- prescription_id:Number
- },
- data(){
- return {
- doctorList:[],
- advicePrint:{},
- patient:{},
- tableData:[],
- prescriptionInfo:[]
- }
- },
- methods:{
- printThisPage() {
- var ptime = Math.round(new Date().getTime() / 1000);
- this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
-
- const style =
- '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}';
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style,
- scanStyles: false
- });
- },
- getAllDoctorList(){
- getAllDoctorList().then(response=>{
- if(response.data.state == 1){
- var doctor = response.data.data.doctor
-
- this.doctorList = doctor
- }
- })
- },
-
- getDoctor(id){
- var name = ""
- for(let i=0;i<this.doctorList.length;i++){
- if(id == this.doctorList[i].admin_user_id){
- name = this.doctorList[i].user_name
- }
- }
- return name
- },
- getTime(value, temp) {
- if (value != undefined) {
- return uParseTime(value, temp)
- }
- return ''
- },
- getPrescriptionPrint(){
- var params = {
- patient_id:this.patient_id,
- record_date:this.record_date,
- prescription_id:this.prescription_id,
- }
- console.log("params---",params)
- getPrescriptionPrint(params).then(response=>{
- if(response.data.state == 1){
- var advicePrint = response.data.data.advicePrint
- console.log("adviceprint",advicePrint)
- this.advicePrint = advicePrint
- var patient = response.data.data.patient
- console.log("patient",patient)
- this.patient = patient
- var doctorPorject = response.data.data.doctorPorject
-
- var arr = doctorPorject.project
- console.log("我的中谷歌",arr)
- for(let i=0;i<arr.length;i++){
- console.log("arr",arr[i].project_name)
- }
- this.tableData = arr
- console.log("3333",this.tableData)
- var prescriptioninfo = response.data.data.prescriptionInfo
- console.log("prescriptioninfo",prescriptioninfo)
- this.prescriptionInfo = prescriptioninfo
- }
- })
- }
- },
- created(){
- this.getAllDoctorList()
- },
- watch:{
- patient_id:function(val){
- console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
- this.getPrescriptionPrint()
- }
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- .printTitle{
- font-size: 22px;
- text-align: center;
- font-weight: bold;
- }
- .infoTitle{
- display: flex;
- border-bottom: 2px solid #000;
- margin-top:10px;
- line-height: 24px;
- padding:0 10px;
- }
- .infoTitle p{
- width: 300px;
- }
- .infoMain{
- display: flex;
- flex-wrap: wrap;
- border-bottom: 2px solid #000;
- padding:0 10px;
- }
- .infoMain p{
- width: 50%;
- line-height: 24px;
- }
- .prescriptionBox{
- padding:0 10px;
- min-height:600px;
- }
- .Rp{
- font-size: 22px;
- font-weight: bold;
- }
- .drugsBox{
- padding-left: 40px;
- margin-bottom: 10px;
- }
- .drugsBox p{
- line-height: 30px;
- }
- .drugsOne{
- line-height: 24px;
- }
- .drugsOne span{
- margin-right: 20px;
- }
- .actionBar{
- display: flex;
- justify-content: space-between;
- line-height: 24px;
- padding:0 10px;
- }
- .actionBar p{
- width:150px;
- }
- </style>
|