123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868 |
- <template>
- <div id="prescriptionPrint">
- <div v-for="(item, index) in advicePrint" :key="index">
- <div
- id="prescription-print"
- class="prescription-print"
- style="page-break-after: always;"
- >
- <div
- class="printTitle"
- v-if="
- prescriptions[index].med_type != '1111' &&
- prescriptions[index].med_type != '1112'
- "
- >
- {{ orgname }}处方笺
- </div>
- <!-- v-if="prescriptions[index].med_type == '1112'" -->
- <div class="printTitle" v-else>
- <div style="font-size: 14px;font-weight: normal;text-align: right;"
- v-if="prescriptions[index].med_type == '1112'">(精二)
- </div>
- <span>{{ orgname }}处方笺</span>
- </div>
- <!-- 非精神处方 -->
- <div style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
- v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- NO:
- </div>
- <div style="flex: 1;">
- 开方日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
- </div>
- </div>
- <div style="display: flex;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- 透析号:{{ item.patient.dialysis_no }}
- </div>
- <div style="flex: 1;">
- 费别:居民医保/职工医保/自费
- </div>
- </div>
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
- <p style="width: 200px;">
- 性别:
- <span v-if="item.patient.gender == 1">男</span>
- <span v-if="item.patient.gender == 2">女</span>
- </p>
- <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
- </div>
- <div style="display: flex;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- 临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
- </div>
- <div style="flex: 1;">
- 过敏史:
- </div>
- </div>
- <div style="flex: 2;margin: 10px 0;">住址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
- </div>
- <!-- 精二 -->
- <div style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
- v-if="prescriptions[index].med_type == '1112'">
- <div style="display: flex;">
- <div style="flex: 1;">处方编号:</div>
- <div style="flex: 1;">日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</div>
- </div>
-
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
- <p style="width: 200px;">
- 性别:
- <span v-if="item.patient.gender == 1">男</span>
- <span v-if="item.patient.gender == 2">女</span>
- </p>
- <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">门诊号:{{ hisPatient.number ? hisPatient.number : "" }}</div>
- <div style="flex: 1;">费别:居民医保/职工医保/自费</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">临床诊断:{{ getDiagnosis(item.info.diagnosis) }}</div>
- <div style="flex: 1;">身份证号:</div>
- </div>
- <div style="flex: 2;margin: 10px 0;">住址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
- <div style="display: flex;">
- <div style="flex: 1;">代办人姓名:{{ }}</div>
- <div style="flex: 1;">身份证号(代办人):{{ }}</div>
- </div>
- </div>
-
- <div class="prescriptionBox" style="height: 300px;">
- <div class="Rp">Rp:</div>
- <div
- class="drugsBox"
- v-for="(it, index) in item.advices" :key="index"
- :style="{'page-break-after':index==yi&&item.advices.length>5? 'always':'auto'}"
- >
- <template v-if="index==yi+1&&item.advices.length>5">
- <!-- 非精神处方 -->
- <div style="margin: 20px 0px; border-bottom: 1px solid black;border-top: 1px solid black;"
- v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- NO:
- </div>
- <div style="flex: 1;">
- 开方时间:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
- </div>
- </div>
- <div style="display: flex;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- 透析号:{{ item.patient.dialysis_no }}
- </div>
- <div style="flex: 1;">
- 费别:居民医保/职工医保/自费
- </div>
- </div>
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
- <p style="width: 200px;">
- 性别:
- <span v-if="item.patient.gender == 1">男</span>
- <span v-if="item.patient.gender == 2">女</span>
- </p>
- <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
- </div>
- <div style="display: flex;line-height: 24px;padding: 0 10px;">
- <div style="flex: 1;">
- 临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
- </div>
- <div style="flex: 1;">
- 过敏史:
- </div>
- </div>
- <div style="width: 100%;margin: 10px 0;padding: 0 10px;">地址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
- </div>
- <!-- 精二 -->
- <div style="margin: 20px 0px;border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
- v-if="prescriptions[index].med_type == '1112'">
- <div style="display: flex;">
- <div style="flex: 1;">处方编号:</div>
- <div style="flex: 1;">日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</div>
- </div>
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
- <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
- <p style="width: 200px;">
- 性别:
- <span v-if="item.patient.gender == 1">男</span>
- <span v-if="item.patient.gender == 2">女</span>
- </p>
- <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">门诊号:{{ hisPatient.number ? hisPatient.number : "" }}</div>
- <div style="flex: 1;">费别:居民医保/职工医保/自费</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">临床诊断:{{ getDiagnosis(item.info.diagnosis) }}</div>
- <div style="flex: 1;">身份证号:</div>
- </div>
- <div style="flex: 2;margin: 10px 0;">住址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
- <div style="display: flex;">
- <div style="flex: 1;">代办人姓名:{{ }}</div>
- <div style="flex: 1;">身份证号(代办人):{{ }}</div>
- </div>
- </div>
- </template>
- <div style="position: relative;">
- <div v-if="it.arr !== undefined">
- <div class="drugsOne" :style="{'border-right':it.arr.length>0 ? '1px solid black': 'none','width':'80%'}">
- <span style="font-weight: bold" >
- {{ index + 1 + "."}}
- </span>
- {{ it.advice_name ? it.advice_name : "" }}
- <span v-if="it.drug.min_unit != it.drug.dose_unit">
- {{ it.drug.dose }}{{ it.drug.dose_unit }} * {{ it.drug.min_number }}{{ it.drug.min_unit }}/
- {{it.drug.max_unit}}
- </span>
- <div>
- <template>
- <div>
- <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>
- <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
- <span >
- {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }} * {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
- {{it.arr[0].drug.max_unit}}
- </span>
- </div>
- <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
- 共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
- </div>
- </template>
- </div>
-
- <div style="margin-left: 70px" >
- <template>
- 用法:
- <span>
- {{ it.execution_frequency }} {{
- it.delivery_way
- }} 共{{ it.day}}天</span> <span>{{ it.advice_desc}}</span>
- </template>
- </div>
-
- <div style="margin-left: 70px" v-if="it.remark !=''">
- 备注:<span > {{ it.remark }}</span>
- </div>
- </div>
-
- <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
- × {{ it.prescribing_number}}
- </div>
- <!-- <div> -->
- <div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
- × {{ it.arr[0].prescribing_number}}
- </div>
- <!-- </div> -->
- <template>
- <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" >
- 共{{ it.single_dose }}{{ it.single_dose_unit }}
- </div>
- </template>
- </div>
- <div v-if="it.arr === undefined">
- <div class="drugsOne" >
- <span style="font-weight: bold" >
- {{ index + 1 + "."}}
- </span>
- {{ it.advice_name ? it.advice_name : "" }}
- <span v-if="it.drug.min_unit != it.drug.dose_unit">
- {{ it.drug.dose }}{{ it.drug.dose_unit }} * {{ it.drug.min_number }}{{ it.drug.min_unit }}/
- {{it.drug.max_unit}}
- </span>
- <!-- <div>
- <template>
- <div>
- <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>
- <span >
- {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }} * {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
- {{it.arr[0].drug.max_unit}}
- </span>
- </div>
- <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
- 共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
- </div>
- </template>
- </div> -->
-
- <div style="margin-left: 70px" >
- <template>
- 用法:
- <span style="margin-right: 0;" >{{ it.single_dose }}{{ it.single_dose_unit }}</span>
- <span>
- {{ it.execution_frequency }} {{
- it.delivery_way
- }} 共{{ it.day}}天</span><span>{{ it.advice_desc}} </span>
- </template>
- </div>
-
- <div style="margin-left: 70px" v-if="it.remark !=''">
- 备注:<span > {{ it.remark }}</span>
- </div>
- </div>
-
- <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
- × {{ it.prescribing_number}}
- </div>
- <template>
- <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;">
- 共{{ it.prescribing_number}}{{ it.prescribing_number_unit }}
- </div>
- </template>
- </div>
- </div>
- <template v-if="index==yi&&item.advices.length>5">
- <div style="margin: 20px 0px;"
- v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
- <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
- <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
- <div style="flex: 1;">金额:
- {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
- </div>
- <div style="flex: 1;">收费员:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
- <div style="flex: 1;">调配药师:</div>
- <div style="flex: 1;">核/发药师:</div>
- </div>
- </div>
- <div style="margin: 20px 0px;" v-if="prescriptions[index].med_type == '1112'">
- <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
- <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
- <div style="flex: 1;">金额:
- {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
- </div>
- <div style="flex: 1;">其他:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
- <div style="flex: 1;">调配药师:</div>
- <div style="flex: 1;">核/发药师:</div>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">取药人:</div>
- <div style="flex: 1;">执行人:</div>
- <div style="flex: 1;">弃去量:</div>
- <div style="flex: 1;">证明人:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">收回空安瓿或废贴批号:</div>
- <div style="flex: 1;">发出药品批号:</div>
- </div>
- </div>
- </template>
- </div>
-
- <div
- class="drugsBox"
- v-for="(it, i) in item.additionalcharge"
- :key="i"
- >
- <div class="drugsOne">
- {{ it.item_name ? it.item_name : "" }}: {{ it.price }}元/{{
- it.count
- }}次
- </div>
- </div>
-
- <div
- class="drugsBox"
- v-for="(it, index) in item.project"
- :key="index"
- >
- <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
- }} {{ it.single_dose
- }}{{ it.single_dose_unit }} × {{ it.count }}{{ unit }}
- </div>
- <div style="margin-left: 100px">
- <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
- > <span>{{ it.delivery_way }}</span
- > <span>{{ it.advice_desc }}</span>
- </div>
- </div>
-
- <div
- class="drugsBox"
- v-for="(it, i) in item.additionalcharge"
- :key="i"
- >
- <div class="drugsOne">
- {{ it.project_id ? it.project_id : "" }}: {{
- it.price.toFixed(2)
- }}元/{{ it.count }}次
- </div>
- </div>
- <div style="text-align: center">(以下空白)</div>
- <div style="text-align: center;">/</div>
- <div style="text-align: center;">/</div>
- <div style="text-align: center;">/</div>
- </div>
- <div style="margin-left: 70px">
- 备注信息:<span style="border-bottom: 1px solid black;"></span>
- </div>
- <div v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
- <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
- <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
- <div style="flex: 1;">金额:
- {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
- </div>
- <div style="flex: 1;">收费员:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
- <div style="flex: 1;">调配药师:</div>
- <div style="flex: 1;">核/发药师:</div>
- </div>
- </div>
- <div v-if="prescriptions[index].med_type == '1112'">
- <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
- <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
- <div style="flex: 1;">金额:
- {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
- </div>
- <div style="flex: 1;">其他:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
- <div style="flex: 1;">调配药师:</div>
- <div style="flex: 1;">核/发药师:</div>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">取药人:</div>
- <div style="flex: 1;">执行人:</div>
- <div style="flex: 1;">弃去量:</div>
- <div style="flex: 1;">证明人:</div>
- </div>
- <div style="display: flex;">
- <div style="flex: 1;">收回空安瓿或废贴批号:</div>
- <div style="flex: 1;">发出药品批号:</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { jsGetAge, uParseTime } from "@/utils/tools";
- import {
- getAllDoctorList,
- getPrescriptionPrint,
- getHisPatientDetail,
- } from "@/api/project/project";
- import { getInitData } from "@/api/his/his";
- export default{
- props: {
- patient_id: Number,
- record_date: String,
- prescription_id: Number,
- ids: String,
- },
- data() {
- return {
- doc_name:"",
- doctorList: [],
- advicePrint: {},
- yi:4,
- radio:'',
- arr:[],
- advicess:[],
- page:sessionStorage.getItem('dayin'),
- patient: {},
- tableData: [],
- prescriptionInfo: [],
- hisPatient: {},
- department: [],
- prescriptions: [],
- projectList: [],
- orgname: "",
- diagnoses: [],
- org_id: 0,
- operatorMaps: {},
- operators: [],
- doctorList_1: [],
- adminUser:[],
- };
- },
- methods: {
- // 电子签名
- setAdminUserES(id) {
- console.log('5555555555',this.operatorMaps);
- if (id == 0) {
- return "";
- }
- if (id in this.operatorMaps) {
- return this.operatorMaps[id].url;
- } else {
- return "";
- }
- },
- getAdminUser(id) {
- if (id == 0) {
- return "";
- }
- if (id == undefined) {
- return "";
- }
- for (let i = 0; i < this.adminUser.length; i++) {
- if (this.adminUser[i].admin_user_id == id) {
- return this.adminUser[i].user_name;
- }
- }
- },
- getAge(patient) {
- if(patient.id_card_no == "TWN001836483"){
- return patient.age
- }else{
- var thisLen = patient.id_card_no.length;
- var birth = "";
- if (thisLen == 15) {
- birth = "19" + patient.id_card_no.substr(6, 6);
- } else {
- birth = patient.id_card_no.substr(6, 8);
- }
- var births =
- birth.substr(0, 4) +
- "-" +
- birth.substr(4, 2) +
- "-" +
- birth.substr(6, 2);
- return jsGetAge(births, "-");
-
- }
-
- },
-
- 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, '{y}年{m}月{d}日 {h}:{i}:{s}')
- }
- return "";
- },
- //数据源
- getPrescriptionPrint() {
- var params = {
- patient_id: this.patient_id,
- record_date: this.record_date,
- prescription_id: this.prescription_id,
- ids: this.ids,
- p_type: 2,
- };
- getPrescriptionPrint(params).then((response) => {
- if (response.data.state == 1) {
- var advicePrint = response.data.data.advicePrint;
- console.log("adviceprint9999", advicePrint);
- console.log("response.data.data", response.data.data);
- this.advicePrint = advicePrint;
- this.prescriptions = advicePrint;
- this.adminUser = response.data.data.roles
- this.doctorList_1 = response.data.data.eles;
- for(let i=0;i<this.advicePrint.length;i++){
- const arr = new Array()
- var advicess = new Array()
- var advicess=advicePrint[i].advices
-
- for(let j=0;j<advicess.length;j++){
- for(let x=j+1;x<advicess.length;x++){
- if(advicess[j].groupno == advicess[x].groupno){
- arr.push(advicess.splice(x,1))
- }
- }
- }
-
- for(let x in arr){
- for(let j in this.advicePrint[i].advices){
- if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
- this.advicePrint[i]['advices'][j]['arr'] = arr[x]
- }
- }
- }
- }
-
- // console.log('4444444',this.advicePrint);
- // console.log('55555555',this.arr);
-
- // console.log(this.doctorList_1, "医生列表");
- if (this.doctorList_1.length > 0) {
- var operatorsLen = this.doctorList_1.length;
- for (var index = 0; index < operatorsLen; index++) {
- this.$set(
- this.operatorMaps,
- this.doctorList_1[index].creator,
- this.doctorList_1[index]
- );
- }
- }
-
- // console.log("处方222222", this.prescriptions);
- var hisPatient = response.data.data.hisPatient;
- // console.log("hisPatient", hisPatient);
- this.hisPatient = hisPatient;
- var projectlist = response.data.data.projectlist;
- // console.log("所有项目列表", projectlist);
- this.projectList = projectlist;
- }
- });
- },
- getHisPatientDetail() {
- const params = {
- patient_id: this.patient_id,
- };
- getHisPatientDetail(params).then((response) => {
- if (response.data.state == 1) {
- var hisPatient = response.data.data.hisPatient;
- console.log("挂号病人", hisPatient);
- this.hisPatient = hisPatient;
- }
- });
- },
- getInitData() {
- getInitData().then((response) => {
- if (response.data.state == 1) {
- this.department = response.data.data.department;
- this.diagnoses = response.data.data.diagnose;
- console.log("争端", this.diagnoses);
- }
- });
- },
- getDepart(id) {
- var name = "";
- for (let i = 0; i < this.department.length; i++) {
- if (id == this.department[i].id) {
- name = this.department[i].name;
- }
- }
- return name;
- },
- getTotalOne(id) {
- // console.log('999999999',this.prescriptions);
- var total = 0;
- var addtotal = 0;
- var zimuyao = 0;
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (id == this.prescriptions[i].id) {
- if (this.prescriptions[i].project != null) {
- for (let a = 0; a < this.prescriptions[i].project.length; a++) {
- total =
- total +
- this.prescriptions[i].project[a].price *
- this.prescriptions[i].project[a].count ;
- }
- }
-
- if (this.prescriptions[i].additionalcharge != null) {
- for (
- let a = 0;
- a < this.prescriptions[i].additionalcharge.length;
- a++
- ) {
- addtotal =
- addtotal +
- this.prescriptions[i].additionalcharge[a].price *
- this.prescriptions[i].additionalcharge[a].count ;
- }
- }
- addtotal = Math.floor(addtotal * 100) / 100;
- }
- }
-
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (id == this.prescriptions[i].id) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total =
- total +
- (this.prescriptions[i].advices[a].price *
- this.prescriptions[i].advices[a].prescribing_number) ;
-
- if(this.prescriptions[i].advices[a].arr !=undefined){
- zimuyao = zimuyao +
- this.prescriptions[i].advices[a].arr[0].price *
- this.prescriptions[i].advices[a].arr[0].prescribing_number
- }
- }
- }
- // if(this.prescriptions[i].arr[0] != null){
- // for(let b=0;b<this.prescriptions[i].arr[0].length;b++){
- // zimuyao = zimuyao +
- // this.prescriptions[i].arr[b][0].price *
- // this.prescriptions[i].arr[b][0].prescribing_number
- // }
- // }
- if (this.prescriptions[i].additionalcharge != null) {
- for (
- let a = 0;
- a < this.prescriptions[i].additionalcharge.length;
- a++
- ) {
- addtotal =
- addtotal +
- (this.prescriptions[i].additionalcharge[a].price *
- this.prescriptions[i].additionalcharge[a].count );
- }
- }
- addtotal = Math.floor(addtotal * 100) / 100;
- }
- }
-
- return total + addtotal + zimuyao ;
- },
-
- getProjectName(id) {
- var project_name = "";
- for (let i = 0; i < this.projectList.length; i++) {
- if (id == this.projectList[i].id) {
- project_name = this.projectList[i].project_name;
- }
- }
- return project_name;
- },
-
- getDiagnosis(id) {
- let arr = id.split(",");
- var name = "";
- for (let i = 0; i < this.diagnoses.length; i++) {
- if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
- name += this.diagnoses[i].class_name + " ";
- }
- }
- return name;
- },
- merge(arrA){
- var len=arrA.lenfth
- // for(let j=0;j<this.advicess.length;j++){
- // for(let x=j+1;x<this.advicess.length;x++){
- // if(this.advicess[j].groupno == this.advicess[x].groupno){
- // // this.arr.push(this.advicess.splice(x,1))
- // this.arrs=this.advicess.splice(x,1)
- // }
- // }
- // }
- for(let j=0;j<len;j++){
- for(let x=j+1;x<len;x++){
- if(arrA[j].groupno == arrA[x].groupno){
- this.arr.push(arrA.splice(x,1))
- }
- }
- }
- console.log('777777777',this.arr);
- return this.arr
- }
- },
- created() {
- this.getAllDoctorList();
- this.getInitData();
- this.getPrescriptionPrint();
- this.getHisPatientDetail();
- var xtuser = this.$store.getters.xt_user;
- this.orgname = xtuser.org.org_name;
- this.org_id = xtuser.org.id;
- console.log('jjjjjj',this.orgname);
- // for(let j=0;j<this.advicess.length;j++){
- // console.log('44444444');
- // for(let x=j+1;x<this.advicess.length;x++){
- // if(this.advicess[j].groupno == this.advicess[x].groupno){
- // this.arr.push(this.advicess.splice(x,1))
- // }
- // }
- // }
- // console.log('777777777',this.arr[0].advice_name);
- // return this.arr
-
- },
-
- watch: {
- ids: function (val) {
- this.ids = val;
- this.getPrescriptionPrint();
- },
- },
- };
- </script>
-
-
- <style lang="scss" scoped>
- .prescription-print {
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
- 0 0 60px rgba(0, 0, 0, 0.06) inset;
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
- 0 0 40px rgba(0, 0, 0, 0.06) inset;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
- margin-bottom: 20px;
- padding: 20px 10px;
- }
- .printTitle {
- font-size: 22px;
- text-align: center;
- font-weight: bold;
- }
- .infoTitle {
- display: flex;
- border-top: 2px solid #000;
- margin-top: 10px;
- line-height: 24px;
- padding: 0 10px;
-
- }
- .infoTitle p {
- width: 200px;
- }
- .infoMain {
- display: flex;
- flex-wrap: wrap;
- border-bottom: 2px solid #000;
- padding: 0 10px;
- }
- .infoMain div {
- width: 50%;
- line-height: 24px;
- }
- .prescriptionBox {
- padding: 0 10px;
- max-height: 450px;
- }
-
- .Rp {
- font-size: 22px;
- font-weight: bold;
- }
- .drugsBox {
- padding-left: 40px;
- margin-bottom: 10px;
- position: relative;
- }
- .drugsBox div {
- line-height: 20px;
- }
- .drugsOne {
- line-height: 24px;
- display: inline-block;
- width: 80%;
- }
- .drugsOne span {
- margin-right: 20px;
- }
- .doctorBox {
- display: flex;
- justify-content: space-between;
- padding: 0 10px;
- line-height: 24px;
- border-bottom: 2px solid #000;
- }
- .doctorBoxs{
- width: 100%;
- margin-right: 30px;
- text-align: right;
- padding: 0 10px;
- line-height: 24px;
-
- }
- .doctorBoxtwo {
- display: flex;
- justify-content: space-between;
- padding: 0 10px;
- line-height: 24px;
-
- }
- .actionBar {
- display: flex;
- justify-content: space-between;
- line-height: 24px;
- padding: 0 10px;
- }
- .actionBar p {
- width: 150px;
- }
- </style>
|