版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,43 @@
import request from '@/utils/request'
// 查询费用定价信息列表
export function listDefinition(query) {
return request({
url: '/dict-dictionary/definition/charge-item-info',
method: 'get',
params: query
})
}
// 初始化下拉选
export function initOption(query) {
return request({
url: '/dict-dictionary/definition/init',
method: 'get',
params: query
})
}
// 修改费用定价信息
export function updateDefinition(data) {
return request({
url: `/dict-dictionary/definition/update-charge-item?id=${data.id}&price=${data.price}`,
method: 'put',
})
}
// 修改费用定价信息
export function getOptions() {
return request({
url: '/dict-dictionary/definition/status-enum-option',
method: 'get',
})
}
// 修改费用定价信息
export function getDetail(id) {
return request({
url: '/dict-dictionary/definition/charge-item-info-detail?id=' + id,
method: 'get',
})
}

View File

@@ -0,0 +1,123 @@
<template>
<el-dialog
:title="title"
v-model="localOpen"
width="800px"
append-to-body
@close="cancel"
>
<template #header>
<div class="custom-header">
<span>{{ title }}</span>
</div>
</template>
<div class="scrollable-content">
<el-form ref="definitionRef" :model="fromModel" label-width="140px">
<el-row>
<el-col :span="8">
<el-form-item label-width="100" label="项目名称" prop="chargeName">
<el-input v-model="fromModel.chargeName" disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="100" label="所属科室" prop="orgId_dictText">
<el-input v-model="fromModel.orgId_dictText" disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="100" label="财务类别" prop="typeCode_dictText">
<el-input v-model="fromModel.typeCode_dictText" disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="100" label="医保类别" prop="ybType_dictText">
<el-input v-model="fromModel.ybType_dictText" disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label-width="100"
label="基础价格"
prop="price"
>
<el-input-number
v-model="fromModel.price"
:min="0"
:max="999999.99"
:step="0.01"
:precision="2"
controls-position="right"
:controls="false"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
const emit = defineEmits(["submit", "update:open"]);
const props = defineProps({
title: String,
open: Boolean,
formData: Object,
statusOptions: Object
});
const localOpen = ref(props.open);
const definitionRef = ref(null);
const fromModel = ref(props.formData);
const options = ref([]);
/**
* 提交表单函数
*/
const submitForm = () => {
// 调用表单引用上的validate方法进行表单验证
definitionRef.value.validate((valid) => {
if (valid) {
// 验证成功,触发'submit'事件并传递表单数据
fromModel.value.statusEnum = Number(fromModel.value.statusEnum);
// fromModel.value.statusEnum = "active"
emit("submit", fromModel.value);
} else {
// 验证失败,显示错误消息
ElMessage.warning("请确认后再提交");
return false;
}
});
};
/**
* 取消操作的函数
*/
const cancel = () => {
emit("update:open", false);
};
watch(
() => props.open,
(newVal) => {
localOpen.value = newVal;
fromModel.value = JSON.parse(JSON.stringify(props.formData));;
options.value = props.statusOptions
if (!newVal) {
// 如果对话框关闭,重置表单
definitionRef.value.resetFields();
}
}
);
</script>
<style lang="scss" scoped>
:deep(.el-input-number .el-input__inner){
-webkit-appearance: none;
-moz-appearance: textfield;
text-align: left;
line-height: 1;
}
</style>

View File

@@ -0,0 +1,773 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="药品定价" name="1">
<el-row :gutter="16">
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="财务类别"
prop="chargeItem"
>
<el-select
v-model="queryParams.typeCode"
placeholder="请选择财务类别"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in fin_type_code"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="状态"
prop="chargeItem"
>
<el-select
v-model="queryParams.statusEnum"
placeholder="请选择状态"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in options"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="名称"
prop="searchKey"
>
<el-input
v-model="queryParams.searchKey"
placeholder="名称/编码/拼音"
clearable
@keyup.enter="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
<!-- </el-col> -->
</el-row>
<el-table
v-loading="loading"
:data="definitionList"
tooltip-effect="dark"
:show-overflow-tooltip="true"
>
<el-table-column
type="selection"
width="40"
align="center"
fixed="left"
/>
<el-table-column
label="项目名称"
width="200"
prop="chargeName"
align="center"
>
<template #default="scope">
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
</template>
</el-table-column>
<el-table-column
label="所属科室"
width="200"
prop="orgId_dictText"
align="center"
>
<template #default="scope">
{{ scope.row.orgId_dictText ? scope.row.orgId_dictText : "-" }}
</template>
</el-table-column>
<el-table-column
label="财务类别"
width="200"
prop=" typeCode_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.typeCode_dictText
? scope.row.typeCode_dictText
: "-"
}}
</template>
</el-table-column>
<el-table-column
label="医保类别"
width="200"
prop="ybType_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.ybType_dictText ? scope.row.ybType_dictText : "-"
}}
</template>
</el-table-column>
<el-table-column
label="基础价格"
width="200"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
label="费用明细个数"
width="200"
prop="detailCount"
align="center"
>
<template #default="scope">
<div v-if="scope.row.detailCount != 0">
<el-button
link
type="primary"
@click="handleDetails(scope.row)"
>{{ thousandNumber(scope.row.detailCount) }}</el-button
>
</div>
<div v-else>
{{ scope.row.detailCount == 0 ? "0" : "-" }}
</div>
</template>
</el-table-column>
<el-table-column
label="状态"
width="200"
prop="statusEnum_enumText"
align="center"
>
<template #default="scope">
{{
scope.row.statusEnum_enumText
? scope.row.statusEnum_enumText
: "-"
}}
</template>
</el-table-column>
<el-table-column
min-width="290"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="器具定价" name="2">
<el-row :gutter="16">
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="财务类别"
prop="chargeItem"
>
<el-select
v-model="queryParams.typeCode"
placeholder="请选择财务类别"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in fin_type_code"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="状态"
prop="chargeItem"
>
<el-select
v-model="queryParams.statusEnum"
placeholder="请选择状态"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in options"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="名称"
prop="searchKey"
>
<el-input
v-model="queryParams.searchKey"
placeholder="名称/编码/拼音"
clearable
@keyup.enter="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
<!-- </el-col> -->
</el-row>
<el-table
v-loading="loading"
:data="definitionList"
tooltip-effect="dark"
:show-overflow-tooltip="true"
>
<el-table-column
type="selection"
width="40"
align="center"
fixed="left"
/>
<el-table-column
label="项目名称"
width="200"
prop="chargeName"
align="center"
>
<template #default="scope">
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
</template>
</el-table-column>
<el-table-column
label="所属科室"
width="200"
prop="orgId_dictText"
align="center"
>
<template #default="scope">
{{ scope.row.orgId_dictText ? scope.row.orgId_dictText : "-" }}
</template>
</el-table-column>
<el-table-column
label="财务类别"
width="200"
prop=" typeCode_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.typeCode_dictText
? scope.row.typeCode_dictText
: "-"
}}
</template>
</el-table-column>
<el-table-column
label="医保类别"
width="200"
prop="ybType_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.ybType_dictText ? scope.row.ybType_dictText : "-"
}}
</template>
</el-table-column>
<el-table-column
label="基础价格"
width="200"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
label="费用明细个数"
width="200"
prop="detailCount"
align="center"
>
<template #default="scope">
<div v-if="scope.row.detailCount != 0">
<el-button
link
type="primary"
@click="handleDetails(scope.row)"
>{{ thousandNumber(scope.row.detailCount) }}</el-button
>
</div>
<div v-else>
{{ scope.row.detailCount == 0 ? "0" : "-" }}
</div>
</template>
</el-table-column>
<el-table-column
label="状态"
width="200"
prop="statusEnum_enumText"
align="center"
>
<template #default="scope">
{{
scope.row.statusEnum_enumText
? scope.row.statusEnum_enumText
: "-"
}}
</template>
</el-table-column>
<el-table-column
min-width="290"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="活动定价" name="3">
<el-row :gutter="16">
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="财务类别"
prop="chargeItem"
>
<el-select
v-model="queryParams.typeCode"
placeholder="请选择财务类别"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in fin_type_code"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="状态"
prop="chargeItem"
>
<el-select
v-model="queryParams.statusEnum"
placeholder="请选择状态"
clearable
:disabled="editShow"
@change="handleQuery"
>
<el-option
v-for="dict in options"
:key="dict.value" :label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="4" style="width: 20%"> -->
<el-form-item
label-width="100"
label="名称"
prop="searchKey"
>
<el-input
v-model="queryParams.searchKey"
placeholder="名称/编码/拼音"
clearable
@keyup.enter="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
<!-- </el-col> -->
</el-row>
<el-table
v-loading="loading"
:data="definitionList"
tooltip-effect="dark"
:show-overflow-tooltip="true"
>
<el-table-column
type="selection"
width="40"
align="center"
fixed="left"
/>
<el-table-column
label="项目名称"
width="200"
prop="chargeName"
align="center"
>
<template #default="scope">
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
</template>
</el-table-column>
<el-table-column
label="所属科室"
width="200"
prop="orgId_dictText"
align="center"
>
<template #default="scope">
{{ scope.row.orgId_dictText ? scope.row.orgId_dictText : "-" }}
</template>
</el-table-column>
<el-table-column
label="财务类别"
width="200"
prop=" typeCode_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.typeCode_dictText
? scope.row.typeCode_dictText
: "-"
}}
</template>
</el-table-column>
<el-table-column
label="医保类别"
width="200"
prop="ybType_dictText"
align="center"
>
<template #default="scope">
{{
scope.row.ybType_dictText ? scope.row.ybType_dictText : "-"
}}
</template>
</el-table-column>
<el-table-column
label="基础价格"
width="200"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
label="费用明细个数"
width="200"
prop="detailCount"
align="center"
>
<template #default="scope">
<div v-if="scope.row.detailCount != 0">
<el-button
link
type="primary"
@click="handleDetails(scope.row)"
>{{ thousandNumber(scope.row.detailCount) }}</el-button
>
</div>
<div v-else>
{{ scope.row.detailCount == 0 ? "0" : "-" }}
</div>
</template>
</el-table-column>
<el-table-column
label="状态"
width="200"
prop="statusEnum_enumText"
align="center"
>
<template #default="scope">
{{
scope.row.statusEnum_enumText
? scope.row.statusEnum_enumText
: "-"
}}
</template>
</el-table-column>
<el-table-column
min-width="290"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</el-form>
<el-dialog
:title="title"
v-model="openDetails"
width="600px"
append-to-body
>
<el-table
v-loading="detailLoading"
:data="definitionDetailList"
tooltip-effect="dark"
:show-overflow-tooltip="true"
>
<el-table-column
label="条件"
prop="conditionCode_enumText"
align="center"
>
<template #default="scope">
{{
scope.row.conditionCode_enumText
? scope.row.conditionCode_enumText
: "-"
}}
</template>
</el-table-column>
<el-table-column label="价格" width="200" prop="amount" align="center">
<template #default="scope">
{{ scope.row.amount ? scope.row.amount : "-" }}
</template>
</el-table-column>
</el-table>
</el-dialog>
<edit
:title="title"
:open="open"
:formData="form"
@submit="submitForm"
@update:open="handleOpenChange"
@update:form="handleFormChange"
/>
</div>
</template>
<script setup>
import {
listDefinition,
initOption,
updateDefinition,
getDetail,
} from "./components/definition";
import Edit from "./components/edit.vue";
import moment from "moment";
import { thousandNumber } from "@/utils/his.js";
const activeName = ref("1");
const showSearch = ref("true");
const loading = ref(true);
const detailLoading = ref(true);
const definitionList = ref([]);
const definitionDetailList = ref([]);
const total = ref(0);
const { proxy } = getCurrentInstance();
const options = ref([]);
const title = ref("");
const open = ref(false);
const openDetails = ref(false);
const { fin_type_code } = proxy.useDict("fin_type_code");
const data = reactive({
form: {},
queryParams: {
search: "",
definitionType: "",
chargeItem: "",
searchKey: "",
pageNo: 1,
pageSize: 10,
},
});
const { queryParams, form } = toRefs(data);
const handleClick = (tab, event) => {
console.log(tab, event);
activeName.value = tab.props.name;
queryParams.value.pageNo = 1;
handleInit();
getList();
};
/** 查询委托单信息列表 */
function getList() {
loading.value = true;
queryParams.value.chargeItemContext = activeName.value;
listDefinition(queryParams.value).then((response) => {
definitionList.value = response.data.records;
total.value = response.data.total;
loading.value = false;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
getList();
}
// 表单重置
function reset() {
form.value = {
id: null,
itemNo: null,
chargeName: null,
totalVolume: null,
unitCode: null,
partPercent: null,
conditionYbCode: null,
price: null,
amount: null,
partMinUnitCode: null,
partConditionPrice: null,
partPrice: null,
description: null,
statusEnum: null,
itemId: null,
};
proxy.resetForm("einfoRef");
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
form.value = row;
open.value = true;
title.value = "修改项目定价";
}
/** 搜索按钮操作 */
function handleInit() {
queryParams.value.definitionType = activeName.value;
initOption(queryParams.value).then((response) => {
options.value = response.data.publicationStatusOptions;
});
}
const handleOpenChange = (value) => {
open.value = value;
};
function handleDetails(row) {
getDetail(row.id).then((res) => {
if (res.code == 200) {
definitionDetailList.value = res.data;
openDetails.value = true;
detailLoading.value = false;
title.value = "明细详情";
}
});
}
const handleFormChange = (newForm) => {
0;
form.value = { ...newForm };
};
/** 提交按钮 */
function submitForm(form) {
updateDefinition(form).then((response) => {
proxy.$modal.msgSuccess("操作成功");
open.value = false;
getList();
});
}
handleInit();
getList();
</script>
<style lang="scss" scoped>
:deep(.demo-tabs > .el-tabs__content) {
color: #6b778c;
font-size: 32px;
font-weight: 600;
}
:deep(.el-input__wrapper) {
height: 32px;
}
:deep(.el-input__inner) {
height: 30px;
}
:deep(.el-tabs__content) {
height: 80vh;
}
.el-select{
width: 150px!important;
}
</style>