123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608 |
- <template>
- <div>
- <template>
- <el-button
- style="position:fixed;right:25px;z-index:999"
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="printThisPage"
- type="primary"
- >打印</el-button
- >
- </template>
-
- <div class='dialysisPage' style="padding-top:40px;">
- <!--<printOne :info="info"></printOne>-->
-
- <print-one v-if="org_id != 10138" :info="info"></print-one>
- <print-two v-else :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts"></print-two>
- </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 { getPrivateExpenses } from '@/api/his/his'
-
-
- import axios from 'axios'
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import printOne from './newTreatTemplate/printOne'
- import printTwo from './newTreatTemplate/printTwo'
-
- export default {
- name: "newStatementPrintTwo",
- components: {
- BreadCrumb,
- printOne,
- printTwo
- },
- props:{
- paramsObj:Object
- },
- data() {
- return {
- crumbs: [
- { path: false, name: '门诊医生站' },
- { path: false, name: '打印' }
- ],
- record_date:"",
- patientTableData:[],
- advicePrint:[],
- hisPatient:{},
- patient:{},
- search_input:"",
- loading:false,
- patient_id:0,
- prescription_id:0,
- ids:'',
- info:null,
- org_id:'',
- balanceAccounts:{},
- num: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: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}';
- // printJS({
- // printable: "prescription-print",
- // type: "html",
- // style: style,
- // scanStyles: false
- // });
-
- if(this.org_id == 10138){
- setTimeout(() => {
- const style =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 49%;}}}';
- const style2 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 52%;}}}';
- const style3 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 55%;}}}';
- const style4 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 58%;}}}';
- const style5 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 61%;}}}';
- const style6 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 66%;}}}';
- const style7 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 71%;}}}';
- const style8 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 75%;}}}';
- const style9 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 80%;}}}';
- const style10 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 90%;}}}';
- const style11 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
- const style12 =
- '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
- if(this.num >= 13){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style,
- scanStyles: false
- });
- }else if(this.num == 12){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style2,
- scanStyles: false
- });
- }else if(this.num == 11){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style3,
- scanStyles: false
- });
- }else if(this.num == 10){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style4,
- scanStyles: false
- });
- }else if(this.num == 9){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style5,
- scanStyles: false
- });
- }else if(this.num == 8){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style6,
- scanStyles: false
- });
- }else if(this.num == 7){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style7,
- scanStyles: false
- });
- }else if(this.num == 6){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style8,
- scanStyles: false
- });
- }else if(this.num == 5){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style9,
- scanStyles: false
- });
- }else if(this.num == 4){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style10,
- scanStyles: false
- });
- }else if(this.num == 3){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style11,
- scanStyles: false
- });
- }else if(this.num <= 2){
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style12,
- scanStyles: false
- });
- }
-
-
- },500)
- }else{
- const style =
- '@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{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
- // });
- // }
- },
-
- searchAction(){
-
- },
- getInfo(obj) {
- if (obj.balance_accounts_type == 2){
- let params = {
- his_patient_id: obj.his_patient_id,
- id: obj.order_id,
-
- }
- getPrivateExpenses(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
-
- return false
- } else {
-
- this.balanceAccounts = response.data.data
- let arr = []
- let obj = {
- type:1,
- details: [],
- total: 0
- }
- let obj2 = {
- type:2,
- details: [],
- total: 0
- }
- let obj3 = {
- type:3,
- details: [],
- total: 0
- }
- let num = 0
- this.balanceAccounts.order_info.map(item => {
-
- if(item.advice_id > 0){
- obj.details.push(item)
- obj.total += (item.pric * item.advice.prescribing_number)
- num++
- }else{
- if(item.project.type == 2){
- obj2.details.push(item)
- obj2.total += (item.pric * item.project.count)
- num++
- }else{
- obj3.details.push(item)
- obj3.total += (item.pric * item.project.count)
- num++
- }
- }
- })
- this.balanceAccounts.new_detail_list = []
- this.balanceAccounts.new_detail_list.push(obj)
- this.balanceAccounts.new_detail_list.push(obj2)
- this.balanceAccounts.new_detail_list.push(obj3)
- console.log(111,this.balanceAccounts)
- this.num = num
- console.log('this.num',this.num)
- }
- })
-
-
- }else {
-
- if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
- var that = this;
- axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
- params: obj
- })
- .then(function(response) {
- if (response.data.state == 0) {
- // this.$message.error(response.data.msg);
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
-
- console.log("~~~~");
- that.info = response.data.data.result;
- console.log(that.info);
-
- that.info['patient_info'] = response.data.data.patient_info
- that.info['dialysis_no'] = response.data.data.dialysis_no
- that.info['org_code'] = response.data.data.org_code;
- that.info['patient_name'] = response.data.data.patient_name;
- that.info['doctor_code'] = response.data.data.doctor_code;
- that.info['doctor_name'] = response.data.data.doctor_name;
- if (response.data.data.health_card_no_two.length == 0) {
- that.info['health_card_no'] = response.data.data.health_card_no
- } else {
- that.info['health_card_no'] = response.data.data.health_card_no_two
- }
-
- that.info['order_number'] = response.data.data.order_number;
-
- that.info['department'] = response.data.data.department;
- that.info['yiliao_leibie'] = response.data.data.yiliao_leibie;
-
- that.info['before_money'] = response.data.data.before_money;
- that.info['after_money'] = response.data.data.after_money;
-
- that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
- console.log("~~~~" + that.info);
-
- var name_arr = [];
- var spec_arr = [];
- var count_arr = [];
- var price_arr = [];
- var total_arr = [];
- for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
- name_arr.push(that.info.transBody.outputlist1[i].ake006);
- spec_arr.push(that.info.transBody.outputlist1[i].aka074);
- count_arr.push(that.info.transBody.outputlist1[i].akc226);
- price_arr.push(that.info.transBody.outputlist1[i].akc225);
- total_arr.push(that.info.transBody.outputlist1[i].akc264)
- }
-
- console.log("~~~" + that.info);
-
- that.info['name_arr'] = name_arr;
- that.info['spec_arr'] = spec_arr;
- that.info['count_arr'] = count_arr;
- that.info['price_arr'] = price_arr;
- that.info['total_arr'] = total_arr;
- that.info['record_date'] = obj.record_time;
-
- console.log("~~" + that.info)
-
- let type_arr = []
- for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
- type_arr.push(that.info.transBody.outputlist1[i].aka111)
- }
-
- let typeArr = that.unique(type_arr)
-
- that.info['new_detail_list'] = []
-
- for (let i = 0; i < typeArr.length; i++) {
- let obj = {
- aka111: typeArr[i],
- details: [],
- total: 0
- }
-
- for (let b = 0; b < that.info.transBody.outputlist1.length; b++) {
- if (typeArr[i] == that.info.transBody.outputlist1[b].aka111) {
- obj.details.push(that.info.transBody.outputlist1[b])
- obj.total += that.info.transBody.outputlist1[b].akc264
- }
- }
- that.info.new_detail_list.push(obj)
- }
-
- }
- }
- })
- .catch(function(error) {
-
- });
- }
- }
- }, unique(array) {
-
- // res用来存储结果
- var res = []
- for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
- for (var j = 0, resLen = res.length; j < resLen; j++) {
- if (array[i] === res[j] ) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },
-
- },
-
- created() {
- this.org_id = this.$store.getters.xt_user.org_id
-
- this.getInfo(this.paramsObj)
- },
- watch:{
- paramsObj:{//深度监听,可监听到对象、数组的变化
- handler(val, oldVal){
- this.paramsObj = val;
- this.getInfo(this.paramsObj)
-
- },
- deep:true
- }
- }
-
- };
- </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>
|