1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837 |
- <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">
-
- <el-date-picker
- v-model="record_date"
- prefix-icon="el-icon-date"
- @change="changeTimeTwo"
- :editable="false"
- style="width: 100%;"
- type="date"
- placeholder="选择开始时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
-
-
- <div class="mainCell">
- <el-radio-group v-model="radio" @change="changeRadio">
- <el-radio :label=1>未上传<span
- style="color: red;margin-bottom:10px;display: inline-block;">{{ un_upload_num }}</span>人
- </el-radio>
- <el-radio :label=2>已上传<span
- style="color: red;margin-bottom:10px;display: inline-block;">{{ upload_num }}</span>人
- </el-radio>
-
- </el-radio-group>
- </div>
- <div class="mainCell" style="margin-bottom:10px;" v-if="this.radio == 1">
- <el-input size="small" 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 class="mainCell" style="margin-bottom:10px;" v-if="this.radio == 2">
- <el-input size="small" v-model.trim="search_input_two"
- class="filter-item"/>
- <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
- @click="searchActiontwo">
- 搜索
- </el-button>
- </div>
- <div>
- <el-table v-if="this.radio == 1" :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.$index + 1 }}.{{ scope.row.name }}</template>
- </el-table-column>
- </el-table>
-
-
- <el-table v-if="this.radio == 2" :data="upload_list" :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="handleCurrentChangetwo">
- <el-table-column align="center" prop="name" label="姓名" wdith='89'>
- <template slot-scope="scope">{{ scope.$index + 1 }}.{{ scope.row.his_patient.name }}</template>
- </el-table-column>
- </el-table>
-
-
- </div>
- </div>
-
- <div class="mainRight">
-
- <div class="mainCell fixedCell" style="margin-bottom:10px;">
-
- <div v-if="this.radio == 1">
- <el-button
- size="small"
- @click="open(1)"
- type="primary">上传明细
- </el-button>
- </div>
-
- <div v-if="this.radio == 2">
- <el-button
- size="small"
- @click="open(2)"
- type="primary">撤销明细
- </el-button>
- </div>
-
- </div>
-
- <div class="mainCenter" v-loading="loading">
- <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>-->
-
- <!-- <charge-prescription-table ref="prescription_tables"-->
- <!-- :manufacturers="manufacturers"-->
- <!-- :prescription="curPrescriptions"></charge-prescription-table>-->
- <!-- </el-tabs>-->
-
- <!-- </div>-->
- <!-- <div class="costBox">-->
- <!-- <span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>-->
- <!-- <span v-if="this.radio == 2&&this.hisPatientInfo.balance_accounts_type != 2">处方总价:<span style="color:red;">{{-->
- <!-- all_total + '元' + ' = 全自费总金额:' + fulamt_ownpay_amt + '元+' + '超限价总金额:' + overlmt_amt + '元+' + '先行自付金额:' + preselfpay_amt + '元+' + '符合正常范围总金额:' + inscp_scp_amt + '元'-->
- <!-- }}</span></span>-->
- <!-- <span v-if="this.radio == 2&&this.hisPatientInfo.balance_accounts_type == 2">处方总价:<span style="color:red;">{{-->
- <!-- all_total + '元' + ' = 全自费总金额:' + all_total + '元+' + '超限价总金额:' + overlmt_amt + '元+' + '先行自付金额:' + preselfpay_amt + '元+' + '符合正常范围总金额:' + inscp_scp_amt + '元'-->
- <!-- }}</span></span>-->
- <!-- <span v-if="this.radio == 1">处方总价:<span style="color:red;">{{ all_total }}元</span></span>-->
-
- <!-- </div>-->
- <!-- </div>-->
-
- <!-- </div>-->
- <!-- </el-tab-pane>-->
- <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="tabclickEventTwo">
-
- <el-tab-pane
- v-for="(item, index) in month_prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name">
- </el-tab-pane>
-
- <div class="RP">
- Rp
- <div v-if="radio == 2">
- <span>处方日期:{{ getTimes(zuobiao_info.start_time) }}~{{ getTimes(zuobiao_info.end_time) }}</span>
- </div>
- <div v-if="radio == 2">
- <span>医嘱单id:{{ zuobiao_info.cbm01 }}</span>
- </div>
- <el-date-picker
- v-if="radio == 1"
- v-model="other_start_time"
- prefix-icon="el-icon-date"
- @change="changeTime"
- :editable="false"
- style="width: 150px;"
- type="date"
- placeholder="选择开始时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span v-if="radio == 1" class>-</span>
- <el-date-picker
- v-if="radio == 1"
- v-model="other_end_time"
- prefix-icon="el-icon-date"
- @change="changeEndTime"
- :editable="false"
- style="width: 150px;"
- type="date"
- placeholder="选择结束时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-select v-model="month_is_upload" @change="changeMonthData"
- placeholder="请选择" v-if="radio == 1">
- <el-option
- v-for="item in upload_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
-
- <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
- <!--<month-prescription-table ref="prescription_tables"-->
- <!--:activeType="activeType" :prescription="curMonthPrescriptions"></month-prescription-table>-->
- <charge-month-prescription-table v-if="this.radio == 1"
- :prescription="curMonthPrescriptions"></charge-month-prescription-table>
-
- <settle-prescription-table v-if="this.radio == 2"
- :prescription="curMonthPrescriptions"></settle-prescription-table>
-
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ month_total }}元</span></span>
- <span>处方总价:<span style="color:red;">{{ all_month_total }}元</span></span>
-
-
- </div>
- </div>
-
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- </div>
-
- </div>
-
- </template>
-
-
- <script>
- import axios from 'axios'
- import { getUploadZuoBiaoPatientInfo, getZuoBiaoPatientInfo, getZuoBiaoPatientList } from '@/api/his/his_zuobiao'
- import { uParseTime } from '@/utils/tools'
-
- import MonthPrescriptionTable from './componenttwo/ChargePrescriptionTable'
- import ChargeMonthPrescriptionTable from './componenttwo/chargeMonthPrescriptionTable'
- import { getZuoBiaoPatientMonthInfo } from '../../api/his/his_zuobiao'
- import SettlePrescriptionTable from '../hospitalStation/components/settlePrescriptionTable.vue'
-
- const moment = require('moment')
- export default {
- components: {
- SettlePrescriptionTable,
- ChargeMonthPrescriptionTable,
- MonthPrescriptionTable
- },
- data() {
- return {
- register: [
- { value: 11, label: '普通门诊' },
- // { value: 12, label: '门诊挂号' },
- // { value: 13, label: '急诊' },
- { value: 14, label: '门诊慢性病' }
- // { value: 15, label: '门诊统筹' },
- // { value: 16, label: '门诊慢性病' },
- // { value: 21, label: '普通住院' }
-
- ],
- upload_options: [
- // { value: 0, label: '全部' },
- { value: 2, label: '已上传' },
- { value: 1, label: '未上传' }
-
- ],
- loading: false,
- dise_loading: false,
- month_is_upload: 1,
- sick_history: '',
- p_type: '',
- sick_type: '',
- diagnosis: '',
- isShowUpload: 1,
- isShowWithdrawUpload: 1,
- schedule_type: 0,
- month_p_type: '',
- month_sick_type: '',
- month_diagnosis: '',
- key: '',
- other_start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
- other_end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- curMonthPrescriptions: null,
- curSettlePrescriptions: null,
- zuobiao_info: {},
-
- month_total: 0,
- crumbs: [
- { path: false, name: '门诊工作站' },
- { path: false, name: '门诊收费管理' }
- ],
- current_index: 0,
- un_upload_num: '',
- upload_num: '',
- tableHeight: '',
- fullHeight: document.documentElement.clientHeight,
- activeName: 'first',
- info: {},
- curPrescriptions: {},
- prescriptions: [],
- month_prescriptions: [],
- settle_prescriptions: [],
-
- settle_total: 0,
- all_total: 0,
- all_month_total: 0,
- record_date: '',
- tableData: [],
- editableTabsValue: '处方1',
-
- editSettletableTabsValue: '处方1',
-
- loadingone: false,
- editableTabs: [{
- title: '处方1',
- name: '1'
- }],
- tabIndex: 1,
- hisPatientInfo: {},
- loadingtwo: false,
- upload_list: [],
- patientTableData: [{}],
- patientInfo: { id: 0 },
- doctor: {},
- total: 0,
- state: '未收费',
- radio: 1,
- radioStatus: 1,
- search_input: '',
- search_input_two: '',
- start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
- patient_id: 0,
- prescription_id: 0,
- all_table_data: [],
- all_upload_list: [],
- manufacturers: [],
- hisPatientDatas: [],
- order: {},
- addtions_charge: [],
- treatVisible: false,
- orderObj: {},
- paramsObj: {},
- newOrderObj: {},
- statementVisible: false,
- newStatementVisible: false,
- chargePatientTableData: [],
- sick: [],
- diagnoses: [],
-
- department: [],
- invoiceVisible: false,
- invoiceParams: {},
- fulamt_ownpay_amt: '',
- overlmt_amt: '',
- preselfpay_amt: '',
- inscp_scp_amt: ''
- }
- },
- 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.getInitData()
- //获取患者信息
- this.getPatientList()
- },
- methods: {
- changeScheduleType() {
-
- this.getPatientList()
-
- },
- getMonthData() {
- this.loading = true
-
- let params = {
- 'id': this.hisPatientInfo.id,
- 'start_time': this.other_start_time,
- 'end_time': this.other_end_time,
- 'is_upload': this.month_is_upload
- }
- getZuoBiaoPatientMonthInfo(params).then(response => {
- if (response.data.state == 0) {
- this.loading = false
- this.$message.error(response.data.msg)
- return false
- } else {
- this.month_prescriptions = []
- this.curMonthPrescriptions = {}
- this.loading = false
- this.hisPatientInfo = response.data.data.patient
- this.setMonthPrescription(response.data.data.month_prescriptions)
- this.month_total = this.getMonthTotalOne()
- this.all_month_total = this.getTotalTwo()
- }
- })
-
- },
- changeMonthData() {
- this.getMonthData()
-
- },
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
- changeTimeTwo() {
- this.getPatientList()
- },
-
- changeTime(val) {
- this.getPatientInformation(this.hisPatientInfo.id)
- }, changeEndTime(val) {
- this.getPatientInformation(this.hisPatientInfo.id)
-
- },
-
- handleClick() {
- // this.getPatientList()
- if (this.activeName == 'first') {
- // this.patientTableData = this.all_table_data
- this.getDayPatientList()
-
- } else if (this.activeName == 'second') {
- this.getMonthPatientList()
- // this.getPatientList()
-
- // if (this.patientTableData.length > 0) {
- // this.$refs.tab.setCurrentRow(this.patientTableData[0])
- // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
- // }
-
- } else {
-
- console.log(this.settle_prescriptions)
- }
-
- },
- searchAction() {
-
- if (this.search_input.length == 0) {
- switch (this.radio) {
- case 1:
- this.patientTableData = this.all_table_data
-
- break
- case 2:
-
- this.patientTableData = this.all_table_data
-
- break
- }
-
- } else {
- switch (this.radio) {
- case 1:
- let arr3 = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].name.indexOf(this.search_input) != -1) {
- arr3 = arr3.concat(this.all_table_data[i])
- }
- }
- this.patientTableData = arr3
- break
- case 2:
- let arr2 = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].name.indexOf(this.search_input) != -1) {
- arr2 = arr2.concat(this.all_table_data[i])
- }
- }
- this.patientTableData = arr2
-
- break
-
- }
- }
-
- },
- searchActiontwo() {
- if (this.search_input_two.length == 0) {
- this.upload_list = this.all_upload_list
-
- } else {
- let arr2 = []
- for (let i = 0; i < this.all_upload_list.length; i++) {
- if (this.all_upload_list[i].his_patient.name.indexOf(this.search_input_two) != -1) {
- arr2 = arr2.concat(this.all_upload_list[i])
- }
- }
- this.upload_list = arr2
- }
- },
-
- tabclickEventTwo(val) {
- for (let i = 0; i < this.month_prescriptions.length; i++) {
- if (this.month_prescriptions[i].name == val.name) {
-
- this.curMonthPrescriptions = {}
- var temp = this.deepClone(this.month_prescriptions[i])
- this.curMonthPrescriptions = temp
- }
- }
- this.prescription_id = this.month_prescriptions.id
- this.month_total = 0
- this.month_total = this.getMonthTotalOne()
-
- },
- tabclickEventThree(val) {
- for (let i = 0; i < this.settle_prescriptions.length; i++) {
- if (this.settle_prescriptions[i].name == val.name) {
-
- this.curSettlePrescriptions = {}
- var temp = this.deepClone(this.settle_prescriptions[i])
- this.curSettlePrescriptions = temp
- }
- }
- this.prescription_id = this.settle_prescriptions.id
- this.settle_total = 0
- this.settle_total = this.getSettleTotalOne()
-
- },
- 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 = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
-
- }
- }
- } else {
- if (this.curPrescriptions.project != null) {
- for (let b = 0; b < this.curPrescriptions.project.length; b++) {
- total = parseFloat(total) + parseFloat(this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
-
- }
- }
- }
- return total.toFixed(2)
- },
- getMonthTotalOne() {
- var total = 0
- if (this.curMonthPrescriptions.type == 1) {
- if (this.curMonthPrescriptions.advices != null) {
- for (let a = 0; a < this.curMonthPrescriptions.advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price * this.curMonthPrescriptions.advices[a].prescribing_number)
-
- }
- }
- } else {
- if (this.curMonthPrescriptions.project != null) {
- for (let b = 0; b < this.curMonthPrescriptions.project.length; b++) {
- total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price * this.curMonthPrescriptions.project[b].total)
-
- }
- }
- }
-
- return total.toFixed(2)
-
- },
- 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 = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- getTotalTwo() {
- var total = 0
- for (let i = 0; i < this.month_prescriptions.length; i++) {
- if (this.month_prescriptions[i].advices != null) {
- for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.month_prescriptions[i].advices[a].retail_price * this.month_prescriptions[i].advices[a].prescribing_number)
- }
- }
- if (this.month_prescriptions[i].project != null) {
- for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
-
- total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price * this.month_prescriptions[i].project[a].total)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- moreState(tab, event) {
- if (tab == 'more') {
- return false
- }
- }, formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]))
- },
- open(index) {
- if (index == 2) {
- var that = this
- let obj3 = {
- id: this.zuobiao_info.id,
- admin_user_id: this.$store.getters.xt_user.user.id
- }
- axios.get('http://127.0.0.1:9532' + '/nmg/coordinate/settleAccount/cancel', {
- params: obj3
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.radio = 1
- that.getPatientList()
-
- that.$message({ message: '撤销成功', type: 'success', duration: 5000 })
- }
-
- }
- })
- .catch(function(error) {
-
- })
- } else if (index == 1) {
- if (this.hisPatientInfo.id == 0) {
- this.$message.error("请选择需要记账的患者")
- return
- }
-
- let obj = {
- patient_id: this.hisPatientInfo.id,
- diagnosis_time: this.record_date,
- record_date: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- org_id: this.$store.getters.xt_user.org_id
- }
- obj['start_time'] = this.other_start_time
- obj['end_time'] = this.other_end_time
- obj['settle_accounts_type'] = 2
- axios.get("http://127.0.0.1:9532" + '/nmg/coordinate/settleAccount', {
- params: obj
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.radio = 2
- that.$message({ message: '上传成功', type: 'success', duration: 5000 })
- that.getPatientList()
- }
- }
- })
- .catch(function(error) {
- })
- }
- }, changePatientInfo() {
- let params = {
- 'record_date': this.record_date,
- 'sch_type': this.schedule_type
- }
- getHisHospitalDetailList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.list == null) {
- response.data.data.list = []
- }
- if (response.data.data.list_two == null) {
- response.data.data.list_two = []
- }
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.month_prescriptions = []
- this.prescriptions = []
-
- this.patientTableData = []
- this.upload_num = response.data.data.upload_num
- this.un_upload_num = response.data.data.un_upload_num
- switch (this.radio) {
- case 1:
- this.all_table_data = response.data.data.list
- this.patientTableData = response.data.data.list
-
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].id)
-
- break
- case 2:
- this.all_table_data = response.data.data.list_two
- this.patientTableData = response.data.data.list_two
- this.upload_list = response.data.data.upload_list
- this.all_upload_list = response.data.data.upload_list
- this.$refs.tab.setCurrentRow(this.upload_list[0])
- console.log(this.upload_list[0].id)
- this.getPatientInformationtwo(this.upload_list[0].id)
- break
-
- }
- }
- })
-
- },
- changeRadio(id) {
- // this.hisPatientInfo = null
- this.getPatientList()
- },
- formatDecimal(num, decimal) {
- num = num.toString()
- let index = num.indexOf('.')
- if (index !== -1) {
- num = num.substring(0, decimal + index + 1)
- } else {
- num = num.substring(0)
- }
- return parseFloat(num).toFixed(decimal)
- },
- //患者列表
- getPatientList() {
- let params = {
- 'record_date': this.record_date,
- 'sch_type': this.schedule_type
- }
- getZuoBiaoPatientList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.list == null) {
- response.data.data.list = []
- }
- if (response.data.data.list_two == null) {
- response.data.data.list_two = []
- }
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.month_prescriptions = []
- this.prescriptions = []
-
- this.patientTableData = []
- this.upload_num = response.data.data.upload_num
- this.un_upload_num = response.data.data.un_upload_num
- switch (this.radio) {
- case 1:
- this.all_table_data = response.data.data.list
- this.patientTableData = response.data.data.list
- if (this.hisPatientInfo&&this.hisPatientInfo.id > 0){
- for(let i = 0; i < this.patientTableData.length;i++){
- if(this.hisPatientInfo.id == this.patientTableData[i].id){
- this.$refs.tab.setCurrentRow(this.patientTableData[i])
- }
- }
- }else{
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].id)
- }
- break
- case 2:
- this.all_table_data = response.data.data.list_two
- this.patientTableData = response.data.data.list_two
- this.upload_list = response.data.data.upload_list
- this.all_upload_list = response.data.data.upload_list
- if (this.hisPatientInfo && this.hisPatientInfo.id > 0){
- for(let i = 0; i < this.upload_list.length;i++){
- if(this.hisPatientInfo.id == this.upload_list[i].his_patient.id){
- this.$refs.tab.setCurrentRow(this.upload_list[i])
- this.getPatientInformation(this.upload_list[0].id)
-
- }
- }
- }else{
- this.$refs.tab.setCurrentRow(this.upload_list[0])
- this.getPatientInformation(this.upload_list[0].id)
- }
- break
- }
- }
- })
- },
- setMonthPrescription(month_prescriptions) {
- this.month_prescriptions = []
-
- let drug_month_prescriptions = {
- advices: []
- }
- let drug_ids = []
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- let addition_month_prescriptions = {
- addition: []
-
- }
- let additions_ids = []
-
- for (let i = 0; i < month_prescriptions.length; i++) {
- if (month_prescriptions[i].type == 1) { //药品
- for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
- let obj = {
- id: month_prescriptions[i].advices[a].drug_id,
- price: month_prescriptions[i].advices[a].price
-
- }
- drug_ids.push(obj)
- // drug_ids.push(month_prescriptions[i].advices[a].drug_id)
-
- drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
- }
-
- } else if (month_prescriptions[i].type == 2) { //项目
- for (let a = 0; a < month_prescriptions[i].project.length; a++) {
- let obj = {
- id: month_prescriptions[i].project[a].project_id,
- price: month_prescriptions[i].project[a].price
-
- }
- project_ids.push(obj)
- project_month_prescriptions.project.push(month_prescriptions[i].project[a])
- }
- }
-
- }
-
- drug_ids = this.unique_two(drug_ids)
- project_ids = this.unique_two(project_ids)
- additions_ids = this.unique_two(additions_ids)
-
- let drugs = []
- let projects = []
- let additions = []
-
- for (let i = 0; i < drug_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
- if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
-
- obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
- obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
- obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
- obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
- obj['day'] = drug_month_prescriptions.advices[a].day
- // obj['prescribing_number'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
- obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
- obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
- obj['id'] = drug_month_prescriptions.advices[a].drug_id
- // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
- obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
- count = count + drug_month_prescriptions.advices[a].prescribing_number
-
- }
- }
- obj['prescribing_number'] = count
- drugs.push(obj)
- }
-
- for (let i = 0; i < project_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < project_month_prescriptions.project.length; a++) {
- if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
-
- if (project_month_prescriptions.project[a].type == 2) {
- obj['statistical_classification'] = ''
- obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
- obj['project_name'] = project_month_prescriptions.project[a].project.project_name
- obj['type'] = 2
-
- } else if (project_month_prescriptions.project[a].type == 3) {
- obj['statistical_classification'] = ''
- obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
- obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
- obj['type'] = 3
-
- }
-
- // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
- // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
- obj['single_dose'] = project_month_prescriptions.project[a].single_dose
- obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
- obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
- obj['number_days'] = project_month_prescriptions.project[a].day
- // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
- obj['unit'] = project_month_prescriptions.project[a].unit
- obj['project_id'] = project_month_prescriptions.project[a].project_id
- count = count + parseFloat(project_month_prescriptions.project[a].count)
- // price = price + project_month_prescriptions.project[a].price
- obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
-
- }
- }
- obj['total'] = count
- projects.push(obj)
- }
-
- let p1 = {
- name: '处方' + 1,
- advices: drugs,
- project: [],
- type: 1,
- addition: additions
- }
- let p2 = {
- name: '处方' + 2,
- type: 2,
- project: projects,
- advices: [],
- addition: []
- }
-
- this.month_prescriptions.push(p1)
- this.month_prescriptions.push(p2)
-
- this.curMonthPrescriptions = this.month_prescriptions[0]
-
- },
-
- unique_two(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].id === res[j].id && array[i].price === res[j].price) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },
-
- 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) {
- this.getPatientInformation(val.id)
- },
- handleCurrentChangetwo(val) {
- this.getPatientInformationtwo(val.id)
- },
- //获取患者的基本信息
- getPatientInformationtwo(id) {
- console.log(id)
- let params = {
- 'id': id
- }
- this.loading = true
- getUploadZuoBiaoPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.loading = false
- this.$message.error(response.data.msg)
- return false
- } else {
- this.prescriptions = []
- this.month_prescriptions = []
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.zuobiao_info = {}
- this.loading = false
- this.hisPatientInfo = response.data.data.patient
- this.zuobiao_info = response.data.data.zuobiao_info
- this.setMonthPrescription(response.data.data.month_prescriptions)
- 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 spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
-
- 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,
-
- spec: spec,
- code: prescription.advices[b].drug.medical_insurance_number,
- det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
- name_id: prescription.advices[b].drug.manufacturer,
- fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
- execution_state: prescription.advices[b].execution_state
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- 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,
- type: prescription.project[b].type,
- det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
- fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.project[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt,
- execution_state: prescription.project[b].execution_state
-
- }
-
- if (prescription.project[b].type == 2) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].project.medical_code
- obj['project_name'] = prescription.project[b].project.project_name
- obj['spec'] = ''
- obj['name_id'] = 0
-
- } else if (prescription.project[b].type == 3) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
- obj['project_name'] = prescription.project[b].good_info.good_name
- obj['spec'] = prescription.project[b].good_info.specification_name
- obj['name_id'] = prescription.project[b].good_info.manufacturer
-
- }
-
- tempProject.push(obj)
- }
-
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- addition: tempAddition,
- order_status: prescription.order_status,
- type: prescription.type
- }
- this.prescriptions.push(obj)
-
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].order_status != 4) {
- this.isShowUpload = 2
- }
-
- }
-
- }
- if (this.prescriptions.length > 0) {
- this.curPrescriptions = this.prescriptions[0]
- } else {
- this.curPrescriptions = {}
- }
- if (this.month_prescriptions.length > 0) {
- this.curMonthPrescriptions = this.month_prescriptions[0]
- } else {
- this.curMonthPrescriptions = {}
- }
- this.total = 0
- this.total = this.getTotalOne()
- this.month_total = this.getMonthTotalOne()
- this.all_total = this.getTotal()
- this.all_month_total = this.getTotalTwo()
- this.fulamt_ownpay_amt = this.getFulamtOwnpayAmtTotal()
- this.overlmt_amt = this.getOverlmtAmtTotal()
- this.preselfpay_amt = this.getPreselfpayAmtTotal()
- this.inscp_scp_amt = this.getInscpScpAmtTotal()
-
- }
- })
- },
- getPatientInformation(id) {
- let params = {
- 'id': id,
- 'record_date': this.record_date,
- 'start_time': this.other_start_time,
- 'end_time': this.other_end_time,
- 'is_upload': this.radio
- }
- this.loading = true
- getZuoBiaoPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.loading = false
- this.$message.error(response.data.msg)
- return false
- } else {
-
- this.prescriptions = []
- this.month_prescriptions = []
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.loading = false
- this.hisPatientInfo = response.data.data.patient
- this.setMonthPrescription(response.data.data.month_prescriptions)
- 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 spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
-
- 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,
-
- spec: spec,
- code: prescription.advices[b].drug.medical_insurance_number,
- det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
- name_id: prescription.advices[b].drug.manufacturer,
- fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
- execution_state: prescription.advices[b].execution_state
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- 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,
- type: prescription.project[b].type,
- det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
- fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.project[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt,
- execution_state: prescription.project[b].execution_state
-
- }
-
- if (prescription.project[b].type == 2) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].project.medical_code
- obj['project_name'] = prescription.project[b].project.project_name
- obj['spec'] = ''
- obj['name_id'] = 0
-
- } else if (prescription.project[b].type == 3) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
- obj['project_name'] = prescription.project[b].good_info.good_name
- obj['spec'] = prescription.project[b].good_info.specification_name
- obj['name_id'] = prescription.project[b].good_info.manufacturer
-
- }
-
- tempProject.push(obj)
- }
-
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- addition: tempAddition,
- order_status: prescription.order_status,
- type: prescription.type
- }
- this.prescriptions.push(obj)
-
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].order_status != 4) {
- this.isShowUpload = 2
- }
-
- }
-
- }
- if (this.prescriptions.length > 0) {
- this.curPrescriptions = this.prescriptions[0]
- } else {
- this.curPrescriptions = {}
- }
- if (this.month_prescriptions.length > 0) {
- this.curMonthPrescriptions = this.month_prescriptions[0]
- } else {
- this.curMonthPrescriptions = {}
- }
- this.total = 0
- this.total = this.getTotalOne()
- this.month_total = this.getMonthTotalOne()
- this.all_total = this.getTotal()
- this.all_month_total = this.getTotalTwo()
- this.fulamt_ownpay_amt = this.getFulamtOwnpayAmtTotal()
- this.overlmt_amt = this.getOverlmtAmtTotal()
- this.preselfpay_amt = this.getPreselfpayAmtTotal()
- this.inscp_scp_amt = this.getInscpScpAmtTotal()
-
- }
- })
- }, getFulamtOwnpayAmtTotal() {
- 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 = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].fulamt_ownpay_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].fulamt_ownpay_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- }, getOverlmtAmtTotal() {
- 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 = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].overlmt_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].overlmt_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- }, getPreselfpayAmtTotal() {
- 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 = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].preselfpay_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].preselfpay_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- }, getInscpScpAmtTotal() {
- 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 = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].inscp_scp_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].inscp_scp_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- sz_open(index) {
- switch (index) {
- case 1:
- this.$refs.register9504.show()
- break
- case 2:
- var that = this
- if (this.activeName == 'first') {
- this.settle_accounts_type = 1
-
- } else {
- this.settle_accounts_type = 2
- this.start_time = this.other_start_time
- this.end_time = this.other_end_time
- this.settle_accounts_type = 2
-
- }
- let params = {
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
- 'settle_accounts_type': this.settle_accounts_type,
- 'admin_user_id': this.$store.getters.xt_user.user.id
- }
- axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
- params: params,
- headers: {
- 'Permission': 5
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$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 {
- that.changeRadioAndPatient(1)
- that.$message({ message: '预结算成功', type: 'success' })
- }
-
- }
- })
- .catch(function(error) {
- })
- break
- case 3:
- if (this.activeName == 'first') {
- this.$refs.charge.show(this.getTotal())
- } else {
- this.$refs.charge.show(this.getTotalTwo())
- }
- break
- case 4:
- break
- case 5:
- var that = this
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$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 {
- that.changeRadioAndPatient(1)
- that.$message({ message: '退费成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- }).catch(() => {
- })
- break
- case 6:
- var that = this
- axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- // that.$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 {
- that.$message({ message: '查询成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- break
- case 7:
- var that = this
- axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
-
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$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 {
-
- that.$message({ message: '明细撤销成功', type: 'success' })
-
- }
- }
- })
- .catch(function(error) {
- })
-
- break
- case 10:
- this.newStatementVisible = true
- let obj = {
- record_time: this.record_date,
- patient_id: this.patient_id,
- prescription_id: this.prescription_id,
- order_id: this.order.id,
- admin_user_id: this.$store.getters.xt_user.user.id
-
- }
- this.newOrderObj = obj
- // this.$refs.print.getInfo(this.order.id)
- break
- case 11:
- var that = this
- this.$confirm('是否退号', '退号', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.hisPatientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$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 {
- that.changeRadioAndPatient(1)
- that.$message({ message: '退号成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- }).catch(() => {
- })
- break
-
- }
-
- }
- },
- 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;
- padding-top: 20px;
-
- .el-radio {
- margin-right: 5px;
- }
-
- }
- .mainCell {
- height: 36px;
- display: flex;
- align-items: center;
- padding-top: 10px;
- }
-
- .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%;
- min-height: 38px;
- /* line-height: 38px;
- text-indent: 5px; */
- font-size: 14px;
- display: flex;
- align-items: center;
- padding: 5px;
- box-sizing: border-box;
- }
-
- }
- }
- </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;
- }
-
- }
- .centerDialog {
-
- .el-dialog__body {
- max-height: calc(100vh - 100px) !important;
- padding: 0 20px;
- }
-
- }
- </style>
-
|