123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <template>
- <div class="main-contain">
- <div class="position">
- <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
- <template>
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="printThisPage"
- type="primary"
- >打印</el-button
- >
- </template>
- </div>
- <div class="app-container" style="min-height:0;">
- <el-container class="newContainer">
- <div style="width:270px;margin-right:20px;">
- <div class="cell clearfix" style="margin-bottom:10px;">
- <el-input size="small" v-model.trim="search_input" class="filter-item"/>
- <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
- </div>
- <el-table ref="tab" @current-change="changePatient" highlight-current-row :data="patientTableData"
- height="480" border style="width: 100%">
- <el-table-column prop="date" label="患者">
- <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
- </el-table-column>
- <el-table-column prop="name" label="就诊号">
- <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
- </el-table-column>
- </el-table>
- </div>
-
- <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
- <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
- </div>
- </el-container>
- </div>
- </div>
- </template>
-
- <script>
-
-
- import { parseTime } from "@/utils";
- import { getDialysisRecord } from "@/api/dialysis";
- import { getDataConfig } from "@/utils/data";
- import { jsGetAge, uParseTime } from "@/utils/tools";
-
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import print from "print-js";
- import printOne from "./treatTemplate/printOne"
- import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
- export default {
- name: "dialysisPrintOrder",
- components: {
- BreadCrumb,
- printOne
- },
- data() {
- return {
- record_date:"",
- patientTableData:[],
- advicePrint:[],
- hisPatient:{},
- patient:{},
- search_input:"",
- loading:false,
- patient_id:0,
- prescription_id:0
- };
- },
- 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;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; 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: 1px;}.prescriptionBox{padding:0 10px;height:600px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style,
- scanStyles: false
- });
-
- // if (this.org_template_info.template_id == 1) {
- // printJS({
- // printable: "dialysis-print-box",
- // type: "html",
- // style: style,
- // scanStyles: false
- // });
- // }
- },
- getAllDoctorList(){
- getAllDoctorList().then(response=>{
- if(response.data.state == 1){
- var doctor = response.data.data.doctor
-
- this.doctorList = doctor
- }
- })
- },
- getAllHisPatientList(){
- const params = {
- record_date:this.record_date
- }
- getAllHisPatientList(params).then(response=>{
- if(response.data.state == 1){
- this.patientTableData = response.data.data.list
- this.patientTableDataTwo = response.data.data.list
-
- console.log('222', this.patientTableData)
- let cal_one = 0
- let cal_two = 0
- for (let i = 0; i < response.data.data.list.length; i++) {
- if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
- cal_one = cal_one + 1
- }
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- cal_two = cal_two + 1
- }
- }
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- console.log(this.patientTableData[0])
- this.choosePatient(this.patientTableData[0])
- this.cal_one = cal_one
- this.cal_two = cal_two
- }
- })
- },
-
- changePatient(row){
- console.log("row",row)
- this.patient_id = row.patient_id
- this.record_date = this.record_date
- this.prescription_id = this.prescription_id
- // var params = {
- // patient_id:row.patient_id,
- // record_date:this.record_date,
- // prescription_id:this.prescription_id,
- // }
- // getPrescriptionPrint(params).then(response=>{
- // if(response.data.state == 1){
- // var advicePrint = response.data.data.advicePrint
- // console.log("adviceprint",advicePrint)
- // this.advicePrint = advicePrint
- // // var hisPatient = response.data.data.hisPatient
- // // console.log("hispatient",hisPatient)
- // // this.hisPatient = hisPatient
- // var patient = response.data.data.patient
- // console.log("patient",patient)
- // this.patient = patient
- // var doctorPorject = response.data.data.doctorPorject
- // console.log("doctorporject",doctorPorject)
- // }
- // })
- },
- searchAction(){
-
- }
-
- },
-
- created() {
- this.getAllDoctorList()
- var record_date = this.$route.query.record
- this.record_date = record_date
- console.log("record_date",record_date)
- this.prescription_id = this.$route.query.prescription_id
- this.getAllHisPatientList(record_date)
- },
-
- };
- </script>
-
- <style>
- .dialysis-print-order {
- width: 960px;
- margin: 0 auto;
- }
-
- .dialysis-print-order .order-yy-name {
- margin: auto;
- text-align: center;
- font-size: 20px;
- letter-spacing: 5px;
- }
-
- .dialysis-print-order .order-title {
- margin: auto;
- font-weight: 600;
- text-align: center;
- font-size: 22px;
- padding: 10px;
- }
-
- .dialysis-print-order .table-box {
- width: 100%;
- line-height: 23px;
- font-size: 14px;
- }
-
- .dialysis-print-order .print-table {
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- line-height: 40px;
- font-size: 14px;
- border-color: #000;
- }
-
- .dialysis-print-order .print-table-no {
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- font-size: 14px;
- }
-
- .dialysis-print-order .under-line {
- border-bottom: 1px solid #999;
- width: 95%;
- text-align: center;
- margin-left: 2px;
- }
-
- .dialysis-print-order .title-box {
- text-align: center;
- font-size: 16px;
- }
-
- .dialysis-print-order .radio-lebel-box {
- font-weight: 400;
- cursor: pointer;
- }
-
- .dialysis-print-order .radio-no {
- opacity: 0;
- outline: none;
- position: absolute;
- margin: 0;
- width: 0;
- height: 0;
- z-index: -1;
- }
-
- .dialysis-print-order .radio-inner {
- white-space: nowrap;
- cursor: pointer;
- outline: none;
- display: inline-block;
- line-height: 1;
- position: relative;
- vertical-align: middle;
- }
-
- .dialysis-print-order .radio-fang {
- display: inline-block;
- position: relative;
- border: 1px solid #000;
- box-sizing: border-box;
- width: 14px;
- height: 14px;
- background-color: #fff;
- z-index: 1;
- transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
- background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
- }
-
- .dialysis-print-order .is-checked-radio::after {
- content: "√";
- font-size: 15px;
- }
-
- .dialysis-print-order .print-table-no tr td {
- padding: 8px 5px;
- line-height: 25px;
- }
-
- .dialysis-print-order .print-table tr td {
- padding: 1px 1px;
- /*line-height: 25px;*/
- }
-
- .es-img {
- height: 30px;
- }
-
- .advice-name {
- text-align: left;
- }
-
- .advice-children {
- display: flex;
- }
-
- .title-box-pro {
- border: 0 #fff;
- line-height: 25px;
- height: 25px;
- text-align: left;
- padding-left: 10px !important;
- }
- .title-box-pro-tr {
- border: 0 #fff;
- }
- .text-align-left {
- text-align: left !important;
- padding-left: 10px !important;
- font-size: 14px !important;
- line-height: 25px;
- }
- .print-table-tr-new td {
- line-height: 20px !important;
- }
- .border-top-solid {
- border: solid 1px #000;
- }
- .print-template-two tr {
- line-height: 30px;
- }
-
- .table-box1 {
- border: 1px solid #000;
- width: 100%;
- line-height: 30px;
- font-size: 14px;
- border-collapse: collapse;
- }
- .table-box1 tr {
- border-bottom: 1px solid #000;
- }
- </style>
-
- <style lang="scss">
-
- .newContainer{
- .dialysisPage::-webkit-scrollbar {
- height: 15px;
- }
-
- .el-date-editor{
- .el-input__inner{
- padding-right:0px;
- }
- }
- .el-table td, .el-table th{
- text-align: center;
- }
- }
- .newContainer::-webkit-scrollbar{
- height: 15px !important;
- }
- </style>
|