1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099 |
- <template>
- <div class="main-contain outpatientChargesManagement">
- <div class="position">
- <bread-crumb :crumbs='crumbs'></bread-crumb>
- </div>
- <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
- <div class="mainLeft">
- <div class="mainCell" style="justify-content: space-between;">
- <p>未收费:<span style="color: red">{{cal_one}}</span>人</p>
- <p>已收费:<span style="color: red">{{cal_two}}</span>人</p>
- <p>已退费:<span style="color: red">{{cal_three}}</span>人</p>
- </div>
- <div class="mainCell">
- <el-radio-group v-model="radio" @change="changeRadio">
- <el-radio :label=1>未收费</el-radio>
- <el-radio :label=2>已收费</el-radio>
- <el-radio :label=3>已退费</el-radio>
- <el-radio :label=4>全部</el-radio>
- <!--<el-radio :label=1>未收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_one}}</span>人</el-radio>-->
- <!--<el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人</el-radio>-->
- <!--<el-radio :label=3>已退费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人</el-radio>-->
- <!--<el-radio :label=4>全部</el-radio>-->
-
- </el-radio-group>
- </div>
- <div class="mainCell" style="margin-bottom:10px;">
- <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
- <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
- 搜索
- </el-button>
- </div>
- <div>
- <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- highlight-current-row ref="tab"
- @current-change="handleCurrentChange">
- <el-table-column align="center" prop="name" label="姓名" wdith='89'>
- <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="就诊号" width="110">
- <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="mainRight">
-
- <div class="mainCell fixedCell" style="margin-bottom:10px;">
- <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
- <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
- <el-button size="small" @click="open(3)" type="primary">打印</el-button>
- <el-button v-loading="loadingone" size="small"
- @click="open(6)"
- v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
- type="primary">挂号
- </el-button>
- <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
- @click="open(4)"
- type="primary">收费
- </el-button>
- <el-button size="small" @click="open(5)" type="primary"
- v-if="this.info && this.info.prescription_status == 3">退费
- </el-button>
- </div>
-
- <div class="mainCenter">
- <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="日结" name="first">
- <div style="display:flex;height:100%;">
- <div class="centerLeft">
- <div class="tabsBox">
- <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
- <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
- <el-tab-pane
- v-for="(item, index) in prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name"
- >
- </el-tab-pane>
-
- <div class="RP">
- Rp
- <el-date-picker
- v-model="record_date"
- type="date"
- :clearable="false"
- @change="changeDate"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </div>
- <prescription-table ref="prescription_tables"
- :prescription="curPrescriptions"></prescription-table>
-
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
- <span v-if="this.curPrescriptions.order_status == 1">待结算</span>
- <span v-if="this.curPrescriptions.order_status == 2">已结算</span>
- <span v-if="this.curPrescriptions.order_status == 3">已退费</span>
-
- </div>
- </div>
- <div class="centerRight">
- <p class="centerRightTitle">人员信息</p>
- <div style="display:flex;justify-content: space-between;line-height:30px;">
- <span style="font-size:14px;">人员编码:{{patientInfo.dialysis_no}}</span>
- <span style="font-size:14px;">日期:{{record_date}}</span>
- </div>
- <ul class="basicUl">
- <li style="width:50%;">姓名:{{patientInfo.name}}</li>
- <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
- <li style="width:50%;">年龄:{{patientInfo.age }}</li>
- <li style="width:50%;">身高:{{patientInfo.height?patientInfo.height:''}}</li>
- <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
- <li style="width:50%;">电话:{{patientInfo.phone}}</li>
- <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
- <li style="width:100%;">过敏史及其他病史:{{info.sick_history}}</li>
- </ul>
- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
- <div style="display:flex;justify-content: space-between;line-height:30px;">
- <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number}}</span>
- </div>
- <ul class="basicUl">
- <li style="width:50%;">医生:{{ info.doctor }}</li>
- <li style="width:50%;">科室:{{ info.departments }}</li>
- <li style="width:100%;">总费用:{{ getTotal() }}</li>
-
- <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
- <li style="width:100%;">是否有传染病:</li>
- <li style="width:100%;">血压:</li>
- </ul>
- </div>
- </div>
- </el-tab-pane>
- <!--<el-tab-pane label="月结" name="second">-->
- <!--<div style="display:flex;height:100%;">-->
- <!--<div class="centerLeft">-->
- <!--<div class="tabsBox">-->
- <!--<!–<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>–>-->
- <!--<el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable>-->
- <!--<el-tab-pane-->
- <!--v-for="(item, index) in editableTabs"-->
- <!--:key="index"-->
- <!--:label="item.title"-->
- <!--:name="item.name"-->
- <!-->-->
- <!--<div class="RP">-->
- <!--Rp-->
- <!--<el-date-picker-->
- <!--style="width:420px;"-->
- <!--v-model="value1"-->
- <!--type="daterange"-->
- <!--range-separator="至"-->
- <!--start-placeholder="开始日期"-->
- <!--end-placeholder="结束日期">-->
- <!--</el-date-picker>-->
- <!--</div>-->
- <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
- <!--</el-tab-pane>-->
- <!--<!–<el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>–>-->
- <!--</el-tabs>-->
-
- <!--</div>-->
- <!--<div class="costBox">-->
- <!--<span>处方编号:2134348971237883</span>-->
- <!--<span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>-->
- <!--<span>{{ state }}</span>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="centerRight">-->
- <!--<p class="centerRightTitle">人员信息</p>-->
- <!--<div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!--<span style="font-size:14px;">人员编码:</span>-->
- <!--<span style="font-size:14px;">日期:{{start_time}}</span>-->
- <!--</div>-->
- <!--<ul class="basicUl">-->
- <!--<li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
- <!--<li style="width:50%;">性别:{{ patientInfo && patientInfo.gend == 1 ? '男' : "女" }}</li>-->
- <!--<li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
- <!--<li style="width:50%;">身高:</li>-->
- <!--<li style="width:50%;">体重:</li>-->
- <!--<li style="width:50%;">电话:</li>-->
- <!--<li style="width:100%;">地址:</li>-->
- <!--<li style="width:100%;">过敏史:</li>-->
- <!--</ul>-->
- <!--<p class="centerRightTitle">诊断信息</p>-->
- <!--<div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!--<span style="font-size:14px;">门诊编号:676273816287361</span>-->
- <!--</div>-->
- <!--<ul class="basicUl">-->
- <!--<li style="width:50%;">医生:{{ doctor.name }}</li>-->
- <!--<li style="width:50%;">科室:{{ doctor.department }}</li>-->
- <!--<li style="width:100%;">费用:{{ doctor.total }}元</li>-->
- <!--<li style="width:100%;">判断结果:</li>-->
- <!--<li style="width:100%;">是否有传染病:</li>-->
- <!--<li style="width:100%;">血压:</li>-->
- <!--</ul>-->
- <!--</div>-->
- <!--</div>-->
- <!--</el-tab-pane>-->
- </el-tabs>
-
-
- </div>
- </div>
- </div>
- <additionalCharges ref='additionalCharges' @click="addCharges"
- :addtions_charge="addtions_charge"></additionalCharges>
-
- <register-dialog ref='register' v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
- <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="treatVisible">
- <treatPrint :paramsObj='paramsObj'></treatPrint>
- </el-dialog>
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import noCharge from './components/noCharge'
- import charged from './components/charged'
- import medicalInsuranceRefund from './components/medicalInsuranceRefund'
- import prescriptionTable from './components/prescriptionTable'
- import additionalCharges from './components/additionalCharges'
- import {getPatientInformation, getPatientList} from '@/api/project/project'
- import {getPatientInfo, getSchedulePatientList, Refund, register, upload} from '@/api/his/his'
- import RegisterDialog from "./components/registerDialog";
- import treatPrint from './treatPrint'
- import ChargeDialog from "./components/chargeDialog";
-
- const moment = require('moment')
- export default {
- components: {
- ChargeDialog,
- RegisterDialog,
- BreadCrumb,
- noCharge,
- charged,
- medicalInsuranceRefund,
- prescriptionTable,
- additionalCharges,
- treatPrint,
-
- },
- data() {
- return {
- crumbs: [
- {path: false, name: '门诊收费'},
- {path: false, name: '门诊收费管理'}
- ],
- current_index: 0,
- cal_one: '',
- cal_two: '',
- cal_three: '',
- tableHeight: '',
- fullHeight: document.documentElement.clientHeight,
- activeName: 'first',
- info: {},
- curPrescriptions: {},
- prescriptions: [],
- record_date: '',
- tableData: [],
- editableTabsValue: '处方1',
- loadingone: false,
- editableTabs: [{
- title: '处方1',
- name: '1'
- }],
- tabIndex: 1,
- hisPatientInfo: {},
- loadingtwo: false,
- patientTableData: [{
- name: '杨美英',
- mdtrt_id: '1709946'
- }],
- patientInfo: {id: 0},
- doctor: {},
- total: 0,
- state: '未收费',
- radio: 1,
- radioStatus: 1,
- search_input: '',
- start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
- patient_id: 0,
- prescription_id: 0,
- all_table_data: [],
- order: {},
- addtions_charge: [],
- treatVisible: false,
- paramsObj: {}
- }
- },
- created() {
- let tableHeight = document.body.clientHeight - 243
- this.tableHeight = tableHeight
- var nowDate = new Date()
- var nowYear = nowDate.getFullYear()
- var nowMonth = nowDate.getMonth() + 1
- var nowDay = nowDate.getDate()
- this.record_date =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
-
- //获取患者信息
- this.getPatientList()
- },
- methods: {
- chargeConfirm(form){
- form['id'] = this.patientInfo.id
- form['record_time'] = this.record_date
- this.loadingtwo = true
- upload(form).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingtwo = false
- return false
- } else {
- this.state = '已收费'
- this.$message({message: '收费成功', type: 'success'})
- this.loadingtwo = false
- this.cal_one = this.cal_one - 1
- this.cal_two = this.cal_two + 1
- this.patientTableData.splice(this.current_index, 1)
- }
- })
-
- },chargeCancel(){
- this.$refs.charge.hide()
- },
- confirm(forms) {
- forms['id'] = this.patientInfo.id,
- forms['record_time'] = this.record_date,
- this.loadingone = true
- register(forms).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingone = false
- this.$refs.register.hide()
- return false
- } else {
- this.$message({message: '挂号成功', type: 'success'})
- this.$refs.register.hide()
- this.loadingone = false
- var his_info = response.data.data.his_info
- this.hisPatientInfo = his_info
- }
- })
-
-
- }, cancel() {
- this.$refs.register.hide()
-
-
- },
- addCharges() {
- this.$refs.additionalCharges.show()
- },
- changeDate(val) {
- if (this.patientInfo.id == 0) {
- this.$message.error('请先选择患者')
- return
- }
- let params = {
- 'record_date': val,
- 'patient_id': this.patientInfo.id
- }
- getPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientInfo = response.data.data.xt_info
- this.hisPatientInfo = response.data.data.his_info
- this.info = response.data.data.info
- this.addtions_charge = response.data.data.addtions_charge
-
- this.prescriptions = []
- for (let i = 0; i < response.data.data.prescription.length; i++) {
- var prescription = response.data.data.prescription[i]
-
- let tempAdvice = []
- let tempProject = []
-
- for (let b = 0; b < prescription.advices.length; b++) {
- let obj = {
- advice_id: prescription.advices[b].id,
- drug_name: prescription.advices[b].advice_name,
- single_dose: prescription.advices[b].single_dose,
- delivery_way: prescription.advices[b].delivery_way,
- execution_frequency: prescription.advices[b].execution_frequency,
- retail_price: prescription.advices[b].price.toString(),
- remark: prescription.advices[b].remark,
- day: prescription.advices[b].day,
- prescribing_number: prescription.advices[b].prescribing_number.toString(),
- single_dose_unit: prescription.advices[b].single_dose_unit,
- prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
- medical_insurance_number: prescription.advices[b].med_list_codg
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- console.log(prescription.project[b].project.project_name)
- let obj = {
- id: prescription.project[b].id,
- project_id: prescription.project[b].project.id,
- project_name: prescription.project[b].project.project_name,
- statistical_classification: prescription.project[b].project.statistical_classification,
- single_dose: prescription.project[b].single_dose,
- delivery_way: prescription.project[b].delivery_way,
- execution_frequency: prescription.project[b].execution_frequency,
- number_days: prescription.project[b].day,
- total: prescription.project[b].count.toString(),
- price: prescription.project[b].price,
- remark: prescription.project[b].remark,
- medical_code: prescription.project[b].project.medical_code,
- unit: prescription.project[b].unit,
- }
-
- tempProject.push(obj)
- }
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- type: response.data.data.prescription[i].type,
- order_status: response.data.data.prescription[i].order_status
- }
- this.prescriptions.push(obj)
- this.curPrescriptions = this.prescriptions[0]
- this.total = 0
- this.total = this.getTotalOne()
- }
- }
- })
- },
- handleClick() {
-
- },
- searchAction() {
-
- },
- tabclickEvent(val) {
- console.log('val', val.name)
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].name == val.name) {
-
- this.curPrescriptions = {}
- var temp = this.deepClone(this.prescriptions[i])
- this.curPrescriptions = temp
- }
- }
- console.log('9999', this.curPrescriptions)
- this.prescription_id = this.curPrescriptions.id
- this.total = 0
- this.total = this.getTotalOne()
-
- }, deepClone(source) {
- if (!source && typeof source !== 'object') {
- throw new Error('error arguments', 'shallowClone')
- }
- const targetObj = source.constructor === Array ? [] : {}
- Object.keys(source).forEach((keys) => {
- if (source[keys] && typeof source[keys] === 'object') {
- targetObj[keys] = this.deepClone(source[keys])
- } else {
- targetObj[keys] = source[keys]
- }
- })
- return targetObj
- }, getTotalOne() {
- var total = 0
- if (this.curPrescriptions.type == 1) {
- if (this.curPrescriptions.advices != null) {
- for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
- total = total + Math.floor((this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number) * 100) / 100
-
- }
- }
- } else {
- if (this.curPrescriptions.project != null) {
- for (let b = 0; b < this.curPrescriptions.project.length; b++) {
- total = total + Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
-
- }
- }
- }
-
- if (this.curPrescriptions.addition != null) {
- for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
- total = total + Math.floor((this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count) * 100) / 100
- }
- }
- return Math.floor(total * 100) / 100
-
- },
- getTotal() {
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = total + Math.floor((this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number) * 100) / 100
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
- }
- }
- if (this.prescriptions[i].addition != null) {
- for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
- total = total + Math.floor((this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count) * 100) / 100
- }
- }
- }
- return Math.floor(total * 100) / 100
-
- },
- moreState(tab, event) {
- if (tab == 'more') {
- return false
- }
- },
- open(index) {
-
- if (index == 1) {
-
-
- } else if (index == 2) {
-
- this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
-
- } else if (index == 3) {
- let obj = {
- record_date: this.record_date,
- patient_id: this.patient_id,
- prescription_id: this.prescription_id
- }
- this.paramsObj = obj
- this.treatVisible = true
- // this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
- } else if (index == 4) {
-
- if (this.hisPatientInfo.id == 0) {
- this.$message({message: '该患者尚未挂号,请先挂号', type: 'error'})
- return
- }
-
- this.$refs.charge.show(this.getTotal())
-
-
-
- } else if (index == 5) {
-
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- let params = {
- 'order_id': this.order.id,
- 'number': this.order.number,
- }
- Refund(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingtwo = false
- return false
- } else {
- this.$message({message: '退费成功', type: 'success'})
- this.loadingtwo = false
-
- }
- })
-
- }).catch(() => {
-
- })
-
-
- } else if (index == 6) {
-
- if (this.patientInfo.id == 0) {
- this.$message.error('请先选择要挂号的病人')
- return
- }
-
- this.$refs.register.show(this.patientInfo)
-
-
- }
- },
-
- choosePatient() {
- console.log(id)
- this.radioStatus = id
- this.getPatientList()
- },
- changeRadio(id) {
- // console.log(id)
- // this.radioStatus = id
- // this.getPatientList()
- let temp_id = id
-
- let params = {
- 'record_date': this.record_date
- }
- getSchedulePatientList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientTableData = []
- this.all_table_data = []
- let one_count = 0
- let two_count = 0
- let three_count = 0
- for (let i = 0; i < response.data.data.list.length; i++) {
- console.log('99999999', response.data.data.list)
-
- if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- one_count = one_count + 1
- this.patientTableData.push(response.data.data.list[i])
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 3) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
-
- two_count = two_count + 1
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 4) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- three_count = three_count + 1
- }
- }
-
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- this.all_table_data.push(response.data.data.list[i])
- }
- }
-
- this.cal_one = one_count
- this.cal_two = two_count
- this.cal_three = three_count
-
- switch (temp_id) {
-
- case 1:
- this.patientTableData = []
-
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
- }
- break
- case 2:
- this.patientTableData = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].info.prescription_status == 3) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
-
- }
- break
- case 3:
- this.patientTableData = []
-
- for (let i = 0; i < this.all_table_data.length; i++) {
-
- if (this.all_table_data[i].info.prescription_status == 4) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
- }
- break
- case 4:
- this.patientTableData = []
- this.patientTableData = this.all_table_data
- break
-
- }
-
- this.current_index = 0
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].patients.id, "")
-
-
- }
- })
-
-
- },
-
- //患者列表
- getPatientList() {
- let params = {
- 'record_date': this.record_date
- }
- getSchedulePatientList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientTableData = []
- this.all_table_data = []
- let one_count = 0
- let two_count = 0
- let three_count = 0
- for (let i = 0; i < response.data.data.list.length; i++) {
- // console.log('99999999', response.data.data.list)
-
- if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- one_count = one_count + 1
- this.patientTableData.push(response.data.data.list[i])
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 3) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
-
- two_count = two_count + 1
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 4) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- three_count = three_count + 1
- }
- }
-
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- this.all_table_data.push(response.data.data.list[i])
- }
- }
-
- this.cal_one = one_count
- this.cal_two = two_count
- this.cal_three = three_count
-
- this.current_index = 0
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].patients.id, "")
-
- }
- })
- },
-
- unique(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
- },
- handleCurrentChange(val) {
- console.log('val', val)
- this.getPatientInformation(val.patients.id, val.info.batch_number)
- this.patient_id = val.patients.id
-
- for (let i = 0; i < this.patientTableData.length; i++) {
- if (this.patientTableData[i].patients.id == val.patients.id) {
- this.current_index = i
- }
-
- }
-
- },
-
- //获取患者的基本信息
- getPatientInformation(id, batch_number) {
- let params = {
- 'record_date': this.record_date,
- 'patient_id': id,
- 'number': batch_number,
- }
- getPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientInfo = response.data.data.xt_info
- this.hisPatientInfo = response.data.data.his_info
- this.info = response.data.data.info
- this.order = response.data.data.order
- this.addtions_charge = response.data.data.addtions_charge
-
- this.prescriptions = []
- console.log("9991323242r5253535", response.data.data.prescription)
- this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
- console.log("222222", this.prescription_id)
- for (let i = 0; i < response.data.data.prescription.length; i++) {
- var prescription = response.data.data.prescription[i]
-
- let tempAdvice = []
- let tempProject = []
- let tempAddition = []
-
- for (let b = 0; b < prescription.advices.length; b++) {
- let obj = {
- advice_id: prescription.advices[b].id,
- drug_name: prescription.advices[b].advice_name,
- single_dose: prescription.advices[b].single_dose,
- delivery_way: prescription.advices[b].delivery_way,
- execution_frequency: prescription.advices[b].execution_frequency,
- retail_price: prescription.advices[b].price.toString(),
- remark: prescription.advices[b].remark,
- day: prescription.advices[b].day,
- prescribing_number: prescription.advices[b].prescribing_number.toString(),
- single_dose_unit: prescription.advices[b].single_dose_unit,
- prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
- medical_insurance_number: prescription.advices[b].med_list_codg
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- console.log(prescription.project[b].project.project_name)
- let obj = {
- id: prescription.project[b].id,
- project_id: prescription.project[b].project.id,
- project_name: prescription.project[b].project.project_name,
- statistical_classification: prescription.project[b].project.statistical_classification,
- single_dose: prescription.project[b].single_dose,
- delivery_way: prescription.project[b].delivery_way,
- execution_frequency: prescription.project[b].execution_frequency,
- number_days: prescription.project[b].day,
- total: prescription.project[b].count.toString(),
- price: prescription.project[b].price,
- remark: prescription.project[b].remark,
- medical_code: prescription.project[b].project.medical_code
- }
- tempProject.push(obj)
- }
-
- for (let b = 0; b < prescription.addition.length; b++) {
- let obj = {
- id: prescription.addition[b].id,
- item_name: prescription.addition[b].item_name,
- price: prescription.addition[b].price,
- count: prescription.addition[b].count,
- item_id: prescription.addition[b].item_id,
- }
- tempAddition.push(obj)
- }
-
-
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- addition: tempAddition,
- order_status: response.data.data.prescription[i].order_status,
- type: response.data.data.prescription[i].type
- }
- this.prescriptions.push(obj)
- this.curPrescriptions = this.prescriptions[0]
- this.total = 0
- this.total = this.getTotalOne()
- console.log(this.total)
-
- }
- }
- })
- }
- },
- mounted() {
- const that = this
- window.onresize = () => {
- return (() => {
- window.fullHeight = document.documentElement.clientHeight
- that.fullHeight = window.fullHeight
- })()
- }
- },
- watch: {
- fullHeight(val) {
- if (!this.timer) {
- this.fullHeight = val
- let tableHeight = val - 243
- this.tableHeight = tableHeight
- this.timer = true
- let that = this
- setTimeout(function () {
- that.timer = false
- }, 400)
- }
- }
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .app-container {
- height: 100%;
- }
-
- .outpatientChargesManagement {
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .mainLeft {
- width: 200px;
- height: 100%;
- display: flex;
- flex-direction: column;
- margin-top: 20px;
-
- .el-radio {
- margin-right: 5px;
- }
-
- }
- .mainCell {
- height: 36px;
- display: flex;
- align-items: center;
- }
-
- .fixedCell {
- position: fixed;
- z-index: 99;
- right: 42px;
- background: #fff;
- display: flex;
- justify-content: space-between;
- }
-
- .mainRight {
- margin-left: 10px;
- flex: 1;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
-
- .cellSpan {
- min-width: 80px;
- display: inline-block;
- margin-right: 10px;
- }
-
- }
- .tabsBox {
- position: relative;
- height: 90%;
- overflow-y: auto;
- margin-bottom: 60px;
-
- .el-tabs__item {
- padding: 0 10px;
- }
-
- }
- .addTab {
- position: absolute;
- right: 6px;
- top: 3px;
- z-index: 20;
- }
-
- .mainCenter {
- display: flex;
- flex: 1;
- height:100%;
- }
-
- .costBox {
- width: 100%;
- height: 60px;
- background: #fff;
- position: absolute;
- bottom: 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .centerLeft {
- flex: 1;
- display: flex;
- flex-direction: column;
- position: relative;
- }
-
- .preTabs {
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .el-tab-pane {
- height: auto !important;
- }
-
- }
-
- .settlementTabs {
- flex: 1;
-
- .el-tab-pane {
- height: 100%;
- }
-
- .el-tabs__content {
- height: 100%;
- }
-
- }
- .centerRight {
- width: 300px;
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
- }
-
- .RP {
- color: #409EFF;
- font-size: 20px;
- margin-bottom: 5px;
- }
-
- .centerRightTitle {
- color: #409EFF;
- }
-
- .basicUl {
- border-top: 1px solid #e5e5e5;
- border-left: 1px solid #e5e5e5;
- display: flex;
- flex-wrap: wrap;
-
- li {
- border-bottom: 1px solid #e5e5e5;
- border-right: 1px solid #e5e5e5;
- width: 100%;
- height: 38px;
- line-height: 38px;
- text-indent: 5px;
- font-size: 14px;
- }
-
- }
- }
- </style>
-
- <style lang="scss">
- #tab-more {
-
- .el-icon-close {
- display: none;
- }
-
- }
- .settlementTabs {
-
- .el-tabs__content {
- height: 90%;
- }
-
- }
- .preTabs {
-
- .el-tabs__content {
- flex: 1;
- overflow-y: auto;
- padding: 5px 0 5px 5px;
- }
-
- }
- </style>
-
|