12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913 |
- <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&&this.activeName=='first'">
- <el-button
- size="small"
- v-loading="isloading"
- :disabled="isdisabled"
- @click="open(1,0)"
- type="primary">上传明细
- </el-button>
- </div>
- <div v-if="this.radio == 2">
- <el-button
- size="small"
- @click="open(2,0)"
- 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="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="border-card"
- @tab-click="tabclickEvent">
- <el-tab-pane
- v-for="(item, index) in prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name"
- >
- <el-button type="primary" v-loading="isloading"
- :disabled="isdisabled" @click="open(1,item.id)">上传处方费用</el-button>
-
-
- </el-tab-pane>
-
- <charge-month-prescription-table v-if="this.radio == 1"
- :prescription="curPrescriptions"></charge-month-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>
- <label>
- 疾病类型:
- </label>
- <el-select filterable v-model="sick_type" placeholder="请选择疾病类型">
- <el-option
- v-for="(item,index) in sick"
- :key="index"
- :label="item.class_name"
- :value="item.id">
- </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 { getInitData } from '@/api/his/his'
-
- 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 {
- isloading: false,
- isdisabled: false,
- 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: {},
- prescription_info: {},
- 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.getInitData()
- this.getPatientList()
- },
- methods: {
- getInitData() {
- getInitData().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.sick = response.data.data.sick
- }
- })
-
- },
- 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,id) {
- 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) {
- this.isloading = true
- this.isdisabled = true
- var that = this
- if (this.hisPatientInfo.id == 0) {
- this.$message.error('请选择需要记账的患者')
- return
- }
- if (this.sick_type == 0 || this.sick_type == '') {
- 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,
- sick_type: this.sick_type,
- settle_type: this.activeName,
- p_id:id,
- }
- if (this.activeName == "first"){
- obj['settle_accounts_type'] = 2
- }else{
- obj['settle_accounts_type'] = 1
- }
- obj['start_time'] = this.other_start_time
- obj['end_time'] = this.other_end_time
- 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.isloading = false
- that.isdisabled = false
-
- return false
- } else {
- that.isloading = false
- that.isdisabled = false
- if (response.data.data.failed_code == -10) {
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.isloading = false
- that.isdisabled = false
- 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].his_patient.id)
-
- }
- }
- } else {
- this.$refs.tab.setCurrentRow(this.upload_list[0])
- this.getPatientInformation(this.upload_list[0].his_patient.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['project'] = project_month_prescriptions.project[a].project
-
- 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['good_info'] = project_month_prescriptions.project[a].good_info
-
- 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.prescription_info = response.data.data.prescription_info
- this.sick_type = this.prescription_info.sick_type
- if (this.sick_type == 0) {
- this.sick_type = ''
- }
- console.log(this.sick_type)
- 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.prescription_info = response.data.data.prescription_info
- this.sick_type = this.prescription_info.sick_type
- if (this.sick_type == 0) {
- this.sick_type = ''
- }
- console.log(this.sick_type)
- 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['project'] = prescription.project[b].project
-
- 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
- obj['good_info'] = prescription.project[b].good_info
-
- }
-
- 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>
-
|