|
|
@@ -0,0 +1,252 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-header height="30px" style="margin-top: 10px">
|
|
|
+ <el-date-picker
|
|
|
+ type="daterange"
|
|
|
+ v-model="dateRange"
|
|
|
+ placeholder="选择日期"
|
|
|
+ size="mini"
|
|
|
+ style="width: 280px"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ ></el-date-picker>
|
|
|
+ 患者ID:<el-input style="width: 120px" size="mini" @keyup.enter="getMzPatientClick" v-model="patientId" @blur="patientId = $event.target.value.trim()" clearable></el-input>
|
|
|
+ <el-select size="mini" v-model="xiangMuZhuangTai" style="width: 90px">
|
|
|
+ <el-option v-for="item in xiangMuZhuangTaiData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
+ <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span :style="{ color: item.color }">{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button size="mini" type="primary" icon="el-icon-search" @click="getMzPatientClick"> 查询</el-button>
|
|
|
+ <el-button size="mini" type="success" icon="el-icon-upload" @click="baoCunClick"> 保存</el-button>
|
|
|
+ <el-tag effect="dark">患者姓名: {{ patient.name }}</el-tag>
|
|
|
+ <el-tag effect="dark" type="warning">性别:{{ cptSex(patient.sex) }} </el-tag>
|
|
|
+ <el-tag effect="dark">出生日期: {{ patient.birthDay }} </el-tag>
|
|
|
+ <el-tag effect="dark" type="warning">诊疗卡: {{ patient.icCardNo }}</el-tag>
|
|
|
+ </el-header>
|
|
|
+ <el-container>
|
|
|
+ <el-main>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-table :height="windowsHeight - 500" :data="shouFeiData" highlight-current-row stripe @cell-click="getFeiYongXinXiClick">
|
|
|
+ <el-table-column label="收费信息">
|
|
|
+ <el-table-column label="缴费日期" prop="chargeDate" width="80"></el-table-column>
|
|
|
+ <el-table-column label="流水号" prop="serialNo"></el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-table :height="windowsHeight - 500" :data="keQueRenData" highlight-current-row stripe>
|
|
|
+ <el-table-column label="本科室">
|
|
|
+ <el-table-column label="待确认标志" prop="confirmFlag">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-switch
|
|
|
+ v-if="xiangMuZhuangTai === 0 && scope.row.confirmFlag === 0"
|
|
|
+ v-model="scope.row.confirmFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-text="确认"
|
|
|
+ inactive-text="不确认"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ <el-switch
|
|
|
+ v-if="xiangMuZhuangTai === 0 && scope.row.confirmFlag !== 0"
|
|
|
+ v-model="scope.row.confirmFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-text="保留"
|
|
|
+ inactive-text="已取消"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="3"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ <el-switch
|
|
|
+ v-else
|
|
|
+ v-model="scope.row.confirmFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-text="保留"
|
|
|
+ inactive-text="取消"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="3"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目编码" prop="chargeCode"></el-table-column>
|
|
|
+ <el-table-column label="项目" prop="chargeName"></el-table-column>
|
|
|
+ <el-table-column label="金额" prop="je"></el-table-column>
|
|
|
+ <el-table-column label="确认时间" prop="confirmTime"></el-table-column>
|
|
|
+ <el-table-column label="确认人" prop="confirmId"></el-table-column>
|
|
|
+ <el-table-column label="执行科室" prop="execDeptName"></el-table-column>
|
|
|
+ <el-table-column label="申请号" prop="reqNo"></el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <br />
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-table :height="windowsHeight - 500" :data="feiYongData" highlight-current-row stripe @cell-click="getMingXiClick">
|
|
|
+ <el-table-column label="缴费明细信息">
|
|
|
+ <el-table-column label="待确认标志" prop="confirmFlag">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-html="confirmFlag(scope.row.confirmFlag)"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目编码" prop="chargeCode"></el-table-column>
|
|
|
+ <el-table-column label="项目" prop="chargeName"></el-table-column>
|
|
|
+ <el-table-column label="金额" prop="je"></el-table-column>
|
|
|
+ <el-table-column label="确认时间" prop="confirmTime"></el-table-column>
|
|
|
+ <el-table-column label="确认人" prop="confirmId"></el-table-column>
|
|
|
+ <el-table-column label="执行科室" prop="execDeptName"></el-table-column>
|
|
|
+ <el-table-column label="申请号" prop="reqNo"></el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-table :data="danGeXingXi" highlight-current-row stripe>
|
|
|
+ <el-table-column label="明细">
|
|
|
+ <el-table-column label="项目编码" prop="chargeCode"></el-table-column>
|
|
|
+ <el-table-column label="项目" prop="chargeName"></el-table-column>
|
|
|
+ <el-table-column label="金额" prop="je"></el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-container>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { shortcuts } from '@/data/shortcuts'
|
|
|
+import { ref } from 'vue'
|
|
|
+import { cptSex } from '@/utils/computed'
|
|
|
+import { getMzPatient, getFeiYongXinXi, getMingXi, menZhenXiangMuQueXiaoHuoQueRen } from '@/api/zhu-yuan-yi-ji/men-zhen-xiang-mu.js'
|
|
|
+import { getDateRangeFormatDate } from '@/utils/date'
|
|
|
+import store from '@/store'
|
|
|
+import jsCookie from 'js-cookie'
|
|
|
+import { getGreatestRole } from '@/utils/permission'
|
|
|
+
|
|
|
+export default {
|
|
|
+ setup() {
|
|
|
+ const windows = store.state.app.windowSize
|
|
|
+ const windowsHeight = windows.h
|
|
|
+ const dateRange = ref(shortcuts[0].value)
|
|
|
+ const patientId = ref('290509-4')
|
|
|
+ const xiangMuZhuangTai = ref(0)
|
|
|
+ const chargeDate = ref('')
|
|
|
+
|
|
|
+ const patient = ref({})
|
|
|
+
|
|
|
+ const shouFeiData = ref([])
|
|
|
+ const feiYongData = ref([])
|
|
|
+ const keQueRenData = ref([])
|
|
|
+ const danGeXingXi = ref([])
|
|
|
+ const role = getGreatestRole()
|
|
|
+
|
|
|
+ const getMzPatientClick = () => {
|
|
|
+ shouFeiData.value = []
|
|
|
+ keQueRenData.value = []
|
|
|
+ feiYongData.value = []
|
|
|
+ danGeXingXi.value = []
|
|
|
+ let dateR = getDateRangeFormatDate(dateRange.value)
|
|
|
+ getMzPatient(patientId.value, xiangMuZhuangTai.value, dateR.stratTime, dateR.endTime, jsCookie.get('dept'))
|
|
|
+ .then((res) => {
|
|
|
+ patient.value = res
|
|
|
+ patient.value.birthDay = patient.value.birthDay.split(' ')[0]
|
|
|
+ console.log(res)
|
|
|
+ shouFeiData.value = res.list
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ patient.value = {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const getFeiYongXinXiClick = (val) => {
|
|
|
+ chargeDate.value = val.chargeDate
|
|
|
+ getFeiYongXinXi(val.serialNo, val.patientId, val.times).then((res) => {
|
|
|
+ keQueRenData.value = []
|
|
|
+ feiYongData.value = res
|
|
|
+ console.log(res)
|
|
|
+ let dept = jsCookie.get('dept')
|
|
|
+ if (xiangMuZhuangTai.value === 0) {
|
|
|
+ for (let i = 0; i < feiYongData.value.length; i++) {
|
|
|
+ if (feiYongData.value[i].execDept === dept && feiYongData.value[i].confirmFlag !== 1) {
|
|
|
+ keQueRenData.value.push(feiYongData.value[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < feiYongData.value.length; i++) {
|
|
|
+ if (feiYongData.value[i].execDept === dept && feiYongData.value[i].confirmFlag === 1) {
|
|
|
+ keQueRenData.value.push(feiYongData.value[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const getMingXiClick = (val) => {
|
|
|
+ getMingXi(val.patientId, val.times, val.reqNo).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ danGeXingXi.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const baoCunClick = () => {
|
|
|
+ let baoCun = {
|
|
|
+ list: keQueRenData.value,
|
|
|
+ xiangMuZhuangTai: xiangMuZhuangTai.value,
|
|
|
+ name: patient.value.name,
|
|
|
+ execDept: jsCookie.get('dept'),
|
|
|
+ chargeDateString: chargeDate.value,
|
|
|
+ }
|
|
|
+ menZhenXiangMuQueXiaoHuoQueRen(baoCun).then((res) => {
|
|
|
+ keQueRenData.value = []
|
|
|
+ })
|
|
|
+ console.log(baoCun)
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ shortcuts,
|
|
|
+ patientId,
|
|
|
+ dateRange,
|
|
|
+ cptSex,
|
|
|
+ patient,
|
|
|
+ getMzPatientClick,
|
|
|
+ xiangMuZhuangTaiData: ref([
|
|
|
+ { code: 0, name: '未确认' },
|
|
|
+ { code: 1, name: '已确认' },
|
|
|
+ ]),
|
|
|
+ xiangMuZhuangTai,
|
|
|
+ windowsHeight,
|
|
|
+ shouFeiData,
|
|
|
+ getFeiYongXinXiClick,
|
|
|
+ feiYongData,
|
|
|
+ keQueRenData,
|
|
|
+ getMingXiClick,
|
|
|
+ danGeXingXi,
|
|
|
+ baoCunClick,
|
|
|
+ confirmFlag,
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
+
|
|
|
+function confirmFlag(val) {
|
|
|
+ switch (val) {
|
|
|
+ case 0:
|
|
|
+ return '<span style="color:#E6A23C">未确认</span>'
|
|
|
+ case 1:
|
|
|
+ return '<span style="color:#67C23A">已确认</span>'
|
|
|
+ case 3:
|
|
|
+ return '<span style="color:#F56C6C">已取消</span>'
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|