费用退检

This commit is contained in:
wyuu 2026-04-24 17:58:03 +08:00
parent 47277ee5eb
commit 063a48e55b
6 changed files with 523 additions and 40 deletions

View File

@ -0,0 +1,34 @@
import request from '@/utils/request';
// 查询数据列表
export function applyQueryList(query?: Object) {
return request({
url: '/cancelCheck/queryList',
method: 'get',
params: query,
});
}
// 获取明细数据
export function queryXmDetail(query?: Object) {
return request({
url: '/cancelCheck/queryDetail',
method: 'get',
params: query,
});
}
// 退检
export function confirmRefund(query?: Object) {
return request({
url: '/cancelCheck/confirm',
method: 'get',
params: query,
});
}
// 拒绝退费
export function refuseRefund(query?: Object) {
return request({
url: '/cancelCheck/refuse',
method: 'get',
params: query,
});
}

View File

@ -6,7 +6,7 @@
v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
:key="item.value" :index="index" :class="item.elTagClass">{{ item.label + " " }}</span>
<el-tag v-else :disable-transitions="true" :key="item.value + ''" :index="index"
:type="item.elTagType === 'primary' ? 'primary' : item.elTagType" :class="item.elTagClass">{{ item.label + " "
:type="item.elTagType === 'default' ? 'primary' : item.elTagType" :class="item.elTagClass">{{ item.label + " "
}}</el-tag>
</template>
</template>

View File

@ -0,0 +1,354 @@
/**
* @file index.vue 费用退检
* @author: w
* @since: 2026-04-23
*/
<template>
<div class="app-container">
<el-form :model="queryForm" class="query-form" label-width="6rem" inline>
<el-row>
<el-form-item label="病人代号:">
<el-input v-model="queryForm.brdh" />
</el-form-item>
<el-form-item label="病人姓名:">
<el-input v-model="queryForm.brxm" />
</el-form-item>
<el-form-item label="申请号:">
<el-input v-model="queryForm.sqh" />
</el-form-item>
<el-form-item label="科室病区:">
<SelectTable v-model:data="queryForm.ksdh" :tableData="dictData.DP" placeholder="" style="width: 12rem;" />
</el-form-item>
<el-form-item label="病人来源:">
<SelectTable v-model:data="queryForm.brly" :tableData="dictData.PT" placeholder="" @getDataValue=""
width="12rem" />
</el-form-item>
<el-form-item label="批准/联系人:" label-width="100">
<el-input v-model="queryForm.powerman" />
</el-form-item>
<el-form-item label="申请日期:">
<el-date-picker v-model="queryForm.st" type="date" placeholder="开始日期" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" style="width:9rem" /> &nbsp;- &nbsp;
<el-date-picker v-model="queryForm.et" type="date" placeholder="结束日期" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" style="width:9rem" />
</el-form-item>
<el-form-item label-width="10">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button type="warning">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<div style="height: calc(100vh - 280px);" class="mt10">
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@size-change="sizeChange" @page-change="currentChange">
<template #brly="{ row }">
{{ formatDict(row.brly, 'PT') }}
</template>
<template #jjzt="{ row }">
<el-checkbox :model-value="row.jjzt == '1'" true-value="1" false-value="0" />
</template>
<template #zt="{ row }">
<el-tag :type="row.zt.trim() == 9 ? 'danger' : 'primary'">
{{lis_req_type.find((item: any) => item.value == row.zt.trim())?.label || row.zt}}
</el-tag>
</template>
<template #jzbz="{ row }">
<div style="color: #f00;" v-if="row.jzbz == '1'">急</div>
<div style="color: transparent;" v-else>无</div>
</template>
<template #action="{ row }">
<el-button type="primary" size="small" @click.stop="tjHandle(row)" v-if="row.zt">退检</el-button>
</template>
</CustomTable>
</div>
<!-- 退检弹窗 -->
<el-dialog v-model="visible" title="申请单退检" width="50vw" :close-on-click-modal="false" :modal-append-to-body="false"
class="refund-dialog" @close="() => { tjInfo = null; tjData = null; }">
<!-- 顶部操作按钮 -->
<div class="dialog-header-btn mb10">
<el-button type="primary" @click="tjConfirm">确认退费</el-button>
<el-button type="danger" @click="handleReject">拒绝退费</el-button>
</div>
<!-- 退检明细表格 -->
<CustomTable :data="xmList" :columns="xmColumns"
:config="{ border: true, height: '50vh', highlightCurrentRow: true, }" @row-click="rowHandle">
<template #jjzt="{ row }">
<el-checkbox :model-value="row.jjzt == '1'" true-value="1" false-value="0" />
</template>
<template #zt="{ row }">
<el-tag :type="row.zt.trim() == 9 ? 'danger' : 'primary'">
{{lis_req_type.find((item: any) => item.value == row.zt.trim())?.label || row.zt}}
</el-tag>
</template>
</CustomTable>
<!-- 底部合计行 -->
<div class="dialog-footer-total">
<span>合计:{{ totalAmount }}</span>
</div>
</el-dialog>
<el-dialog v-model="userVisible" title="请输入退费人员代号和密码" :width="500" :close-on-click-modal="false" :draggable="true"
@close="cancel">
<el-form ref="formRef" :model="formData" label-width="100px">
<el-form-item label="退费原因:" prop="tfyy" :rules="[{ required: true, message: '请选择', trigger: 'change' }]">
<SelectTable v-model:data="formData.tfyy" dictType="TFYY" placeholder="" @getDataValue="" />
</el-form-item>
<!-- 用户代号 -->
<el-form-item label="用户代号:" prop="yhdh" :rules="[{ required: true, message: '请输入用户代号', trigger: 'change' }]">
<el-input ref="yhdhRef" v-model="formData.yhdh" @change="handleChange" />
</el-form-item>
<!-- 用户姓名 -->
<el-form-item label="用户姓名:">
<el-input v-model="formData.userName" disabled />
</el-form-item>
<!-- 密码输入 -->
<el-form-item label="密码:" prop="mm" :rules="[{ required: true, message: '请输入密码', trigger: 'change' }]">
<el-input v-model="formData.mm" type="password" @keyup.enter="handleConfirm" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="handleConfirm"> 确定 </el-button>
<el-button @click="cancel"> 取消 </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { formatDict, getDictData, dictData } from '@/hooks'
import dayjs from 'dayjs'
import { applyQueryList, queryXmDetail, confirmRefund, refuseRefund } from '@/api/backApply'
import { queryValue } from '@/api/liswork/xtwh/ComOpt'
import { ElMessage } from 'element-plus';
import { listUser } from '@/api/system/user.js'
import { checkYsUser } from '@/api/liswork/work/LisWork'
import { templateRef } from '@vueuse/core';
import { Select } from 'vxe-pc-ui';
// @ts-ignore
const { proxy } = getCurrentInstance();
const { lis_req_type } = proxy.useDict("lis_req_type");
const formData = ref({
yhdh: '',
userName: '',
mm: '',
tfyy: '',
})
const tableRefs = ref()
const totalAmount = ref(0)
const visible = ref(false)
const userVisible = ref(false)
const queryForm = reactive({
st: '', // 开始日期
et: '', // 结束日期
brdh: '',
brxm: '',
sqh: '',
ksdh: '',
brly: '',
powerman: '',
cyr: '',
pageSize: 50,
pageNum: 1,
})
const tableData = ref([])
const columns = ref([
{ prop: 'brly', label: '病人来源', align: 'center', visible: true, slot: 'brly' },
{ prop: 'ksdh', label: '申请科室', align: 'center', visible: true, },
{ prop: 'yblx', label: '标本', align: 'center', visible: true, },
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, },
{ prop: 'brdh', label: '病历号', align: 'center', visible: true, },
{ prop: 'ch', label: '床号', align: 'center', visible: true, },
{ prop: 'sqys', label: '申请医生', align: 'center', visible: true, },
{ prop: 'sqh', label: '申请号', align: 'center', visible: true, },
{ prop: 'jymd', label: '申请项目', align: 'center', visible: true, width: 240 },
{ prop: 'jzbz', label: '急诊', align: 'center', visible: true, slot: 'jzbz', width: 60 },
{ prop: 'jjzt', label: '计价', align: 'center', visible: true, slot: 'jjzt', width: 60 },
{ prop: 'zt', label: '当前状态', align: 'center', visible: true, slot: 'zt' },
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 200 }
])
const tableConfig = ref({
border: true, // 边框
height: '100%', // 高度
highlightCurrentRow: true, // 高亮当前行
actionWidth: 100,
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const xmList = ref([])
const xmColumns = ref([
{ prop: 'xh', label: '序号', align: 'center', visible: true, width: 50 },
{ prop: 'sqxmmc', label: '项目名称', align: 'center', visible: true, width: 200 },
{ prop: 'dj', label: '单价', align: 'center', visible: true, },
{ prop: 'sl', label: '数量', align: 'center', visible: true, },
{ prop: 'jjzt', label: '计价', align: 'center', visible: true, slot: 'jjzt' },
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt' },
{ prop: 'sqxmdh', label: '项目代号', align: 'center', visible: true, width: 150 },
{ prop: 'sqh', label: '申请号', align: 'center', visible: true, width: 150 },
{ prop: 'bz1', label: '备注1', align: 'center', visible: true, },
{ prop: 'bz2', label: '备注2', align: 'center', visible: true, },
])
const tjInfo = ref<any>(null)
const rowHandle = (row: any) => {
tjInfo.value = row
}
const tjConfirm = () => {
if (!tjInfo.value) return ElMessage.warning('请先选择要退检的项目')
queryValue({ yq: 'HISOPT', xxdh: 'sp_rebackfeeyy' }).then((res) => {
if (res.data == '1') {
userVisible.value = true
} else {
subMitRefund()
}
})
}
const formRef = templateRef('formRef')
const handleConfirm = async () => {
if (!formRef.value) return;
// 表单验证
const valid = await formRef.value.validate();
if (valid) {
checkYsUser({ ...formData.value }).then((res: any) => {
if (res.code == 0) {
subMitRefund()
}
})
}
};
const subMitRefund = () => {
confirmRefund({ sqh: tjInfo.value.sqh, tfyy: formData.value.tfyy, userId: formData.value.yhdh }).then((res) => {
if (res.code == 0) {
ElMessage.success('退检成功')
userVisible.value = false
tjHandle(tjData.value)
handleQuery()
}
})
}
// 处理取消按钮点击
const cancel = () => {
formData.value = {
yhdh: '',
userName: '',
mm: '',
tfyy: '',
}
formRef.value?.resetFields();
userVisible.value = false
};
const handleReject = () => {
if (!tjInfo.value) return ElMessage.warning('请先选择要退检的项目')
refuseRefund({ sqh: tjInfo.value.sqh }).then((res) => {
if (res.code == 0) {
ElMessage.success('操作成功')
tjHandle(tjData.value)
}
})
}
const tjData = ref(null)
const tjHandle = (row: any) => {
tjData.value = row
queryXmDetail({ sqh: row.sqh, zt: row.zt }).then((res: any) => {
xmList.value = res.data
totalAmount.value = res.data.reduce((acc: number, cur: any) => {
return acc + cur.dj * cur.sl
}, 0)
})
visible.value = true
}
const userList: any = ref([])
const handleChange = (value: string) => {
formData.value.userName = userList.value.find((item: any) => item.userName == value)?.nickName || value
};
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryForm.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryForm.pageSize = page.pageSize
handleQuery()
}
const getDays = () => {
// queryForm.st = dayjs().subtract(3, 'day').format('YYYY-MM-DD')
queryForm.st = '2025-06-01'
queryForm.et = dayjs().format('YYYY-MM-DD')
}
const handleQuery = () => {
getList()
}
const getList = () => {
applyQueryList(queryForm).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
onMounted(() => {
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
listUser(data).then((res: any) => {
userList.value = res.rows;
});
// 获取字典数据
getDictData('DP', 'PT', 'ST', 'TFYY')
getDays()
handleQuery()
})
</script>
<style scoped lang="scss">
.query-form {
.el-form-item {
margin-bottom: 10px;
}
}
/* 合计行样式 */
.dialog-footer-total {
text-align: center;
margin-top: 10px;
font-weight: 700;
color: #1262c8;
}
</style>

View File

@ -146,13 +146,14 @@ function handleAdd() {
}
reset();
open.value = true;
form.value.zdlb = queryParams.value.zdlb;
title.value = '新增字典';
}
//修改
function handleUpdate(row) {
reset()
form.value = row.zdlb ? row : info.value
form.value = row.zdlb ? JSON.parse(JSON.stringify(row)) : info.value
open.value = true;
}
@ -215,7 +216,7 @@ function handleQueryDetail() {
function submitForm() {
proxy.$refs["dictRef"].validate(valid => {
if (valid) {
if (form.value.zdlb != undefined && form.value.zdlb != '') {
if (title.value === '修改字典') {
updateComDictService(form.value).then(response => {
if (response.code == 0) {
proxy.$modal.msgSuccess("修改成功");

View File

@ -46,7 +46,7 @@
</el-form>
<!--更多查询条件 -->
<el-drawer title="查询条件" v-model="isExpand" direction="rtl" size="28%" :with-header="true" :modal="false">
<el-drawer title="查询条件" v-model="isExpand" direction="rtl" size="28%" :with-header="true">
<el-form :model="queryParams" label-width="120px">
<el-form-item label="批准/联系人:" prop="powerman">
<el-input v-model="queryParams.powerman" placeholder="请输入批准/联系人" />
@ -337,6 +337,10 @@ onMounted(() => {
</script>
<style scoped lang="scss">
:deep(.el-overlay) {
background-color: transparent;
}
.table-container {
height: calc(100% - 150px);
}

View File

@ -8,42 +8,52 @@
<el-button type="primary" @click="search" size="default">查询</el-button>
<el-button type="primary" @click="print" size="default">打印</el-button>
<el-form ref="form" :model="queryParams" inline size="small">
<el-row>
<el-form ref="form" :model="queryParams" inline size="small" class="stats-form">
<el-row :gutter="10" class="stats-form-row">
<el-col :span="16">
<div class="tips">统计条件:</div>
<template v-for="item in Parameter">
<el-form-item :label="item.paramOptiontype == '0' ? '' : item.paramName">
<template v-if="item.paramOptiontype == '7'">
<el-date-picker v-model="item.paramDefvalue" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="handletime" style="width:120px" />
</template>
<div class="form-panel">
<div class="tips">统计条件</div>
<div class="panel-content panel-content-left">
<template v-for="item in Parameter">
<el-form-item :label="item.paramOptiontype == '0' ? '' : item.paramName"
:class="{ 'checkbox-form-item': item.paramOptiontype == '0' }">
<template v-if="item.paramOptiontype == '7'">
<el-date-picker v-model="item.paramDefvalue" type="date" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" @change="handletime" style="width:120px" />
</template>
<template v-if="item.paramOptiontype == '8'">
<el-time-picker v-model="item.paramDefvalue" value-format="HH:mm:ss" format="HH:mm:ss"
style="width:100px" />
</template>
<template v-if="item.paramOptiontype == '8'">
<el-time-picker v-model="item.paramDefvalue" value-format="HH:mm:ss" format="HH:mm:ss"
style="width:100px" />
</template>
<template v-if="item.paramOptiontype == '2'">
<SelectTable v-model:data="item.paramDefvalue" :dictType="item.remark" :optionselect="true"
placeholder="请选择" style="width:150px" size="small" />
</template>
<template v-if="item.paramOptiontype == '2'">
<SelectTable v-model:data="item.paramDefvalue" :dictType="item.remark" :optionselect="true"
placeholder="请选择" style="width:150px" size="small" />
</template>
<template v-if="item.paramOptiontype == '0'">
<el-checkbox v-model="item.paramDefvalue" :label="item.paramName" true-value="1" false-value="0" />
<template v-if="item.paramOptiontype == '0'">
<el-checkbox v-model="item.paramDefvalue" :label="item.paramName" true-value="1" false-value="0" />
</template>
</el-form-item>
</template>
</el-form-item>
</template>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="tips"> 统计项目:</div>
<el-form-item label="">
<el-checkbox-group v-model="queryParams.statItems" @change="handleCheckBoxChange">
<el-checkbox v-for="item in checkBoxs" :key="item.paramCode" :label="item.paramCode">
{{ item.paramName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<div class="form-panel">
<div class="tips">统计项目</div>
<div class="panel-content panel-content-right">
<el-form-item label="" class="stats-items-form-item">
<el-checkbox-group v-model="queryParams.statItems" @change="handleCheckBoxChange"
class="stats-checkbox-group">
<el-checkbox v-for="item in checkBoxs" :key="item.paramCode" :label="item.paramCode">
{{ item.paramName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</div>
</el-col>
</el-row>
</el-form>
@ -80,7 +90,6 @@ const userStore = useUserStore()
const mbStore = useCommonStore();
const route = useRoute();
const queryParams = ref({
// 'cp_samplecnt', 'cp_cnt', 'cp_amt', 'cp_rs',
statItems: []
@ -230,8 +239,66 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.el-form-item {
margin-bottom: 5px;
.app-container {
overflow: auto;
}
.stats-form {
margin-bottom: 6px;
}
.stats-form-row {
align-items: stretch;
}
.form-panel {
height: 100%;
padding: 5px 12px;
background: #f8fbff;
border: 1px solid #d9e8fb;
border-radius: 8px;
box-sizing: border-box;
}
.panel-content {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 4px 12px;
}
.panel-content-left {
min-height: 0;
}
.panel-content-right {
min-height: 0;
}
.stats-form :deep(.el-form-item) {
margin-right: 0;
margin-bottom: 2px;
}
.stats-form :deep(.el-form-item__label) {
padding-right: 8px;
color: #4b5563;
}
.stats-items-form-item {
width: 100%;
}
.stats-checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 4px 10px;
}
.stats-checkbox-group :deep(.el-checkbox) {
min-width: 96px;
margin-right: 0;
}
.title {
@ -248,19 +315,32 @@ onMounted(() => {
}
.print_box {
height: 72vh;
overflow-y: auto;
height: 65vh;
}
.table-container {
margin-top: 10px;
height: calc(100% - 100px);
height: calc(100% - 65px);
}
.tips {
font-size: 16px;
font-size: 15px;
font-weight: 600;
color: #3282F6;
margin-bottom: 5px;
margin-bottom: 6px;
padding-left: 10px;
position: relative;
}
.tips::before {
content: '';
position: absolute;
left: 0;
top: 3px;
width: 4px;
height: 16px;
border-radius: 2px;
background: #3282F6;
}
:deep(.el-table__footer-wrapper tfoot td.el-table__cell) {
@ -317,4 +397,14 @@ onMounted(() => {
:deep(.col--gutter) {
display: none !important;
}
@media (max-width: 1400px) {
.checkbox-form-item {
min-width: 180px;
}
.stats-checkbox-group :deep(.el-checkbox) {
min-width: 84px;
}
}
</style>