解决合并冲突

This commit is contained in:
2025-12-10 14:20:24 +08:00
parent e1385cb3e6
commit 18f6a845e6
804 changed files with 61881 additions and 13577 deletions

View File

@@ -1,9 +1,8 @@
import request from '@/utils/request';
// 查询费用定价信息列表
export function listDefinition (query) {
return request ({
url: '/dict-dictionary/definition/charge-item-info',
url: '/change/price/list/getPage',
method: 'get',
params: query,
});
@@ -14,21 +13,75 @@ export function initOption (query) {
return request ({
url: '/dict-dictionary/definition/init',
method: 'get',
params: query,
data: query,
});
}
// 获取药品列表
export function getMedicineList (query) {
// 确保 query 对象存在
const params = {
...query
};
// 根据categoryEnum值选择不同的接口
let url = '/change/price/searchKeyWordDataList';
if (query?.categoryEnum === 24) {
// 药品
url = '/change/price/searchKeyWordDataListByMed';
} else if (query?.categoryEnum === 25) {
// 耗材
url = '/change/price/searchKeyWordDataListByDevice';
} else if (query?.categoryEnum === 26) {
// 诊疗
url = '/change/price/searchKeyWordDataListByActivity';
}
return request ({
url: '/doctor-station/advice/advice-base-info',
method: 'get',
params: query,
url: url,
method: 'post',
params: params,
});
}
// 获取药品列表 - 药品专用接口
export function getMedicineListByMed(query) {
return request({
url: '/change/price/searchKeyWordDataListByMed',
method: 'post',
params: query || {},
headers: {
repeatSubmit: false // 禁用重复提交检查
}
});
}
// 获取耗材列表 - 耗材专用接口
export function getMedicineListByDevice(query) {
return request({
url: '/change/price/searchKeyWordDataListByDevice',
method: 'post',
params: query || {},
headers: {
repeatSubmit: false // 禁用重复提交检查
}
});
}
// 获取诊疗列表 - 诊疗专用接口
export function getMedicineListByActivity(query) {
return request({
url: '/change/price/searchKeyWordDataListByActivity',
method: 'post',
params: query || {},
headers: {
repeatSubmit: false // 禁用重复提交检查
}
});
}
// 修改费用定价信息
export function updateDefinition (data) {
return request ({
url: `/dict-dictionary/definition/update-charge-item?id=${data.id}&price=${data.price}`,
url: '/dict-dictionary/definition/update-charge-item?id=${data.id}&price=${data.price}',
method: 'put',
});
}
@@ -48,11 +101,79 @@ export function getDetail (id) {
method: 'get',
});
}
// 供应商查询
export function getSupplierList (query) {
return request ({
url: '/change/price/searchAllSupply',
// 提交价格调整数据
export function commitChangePriceData(data) {
return request({
url: '/change/price/commitChangePriceData',
method: 'post',
data: data // 直接提交数组作为body
});
}
// 提交审核价格调整数据
export function commitExamineChangePriceData(data) {
return request({
url: '/change/price/submitExamineChangePriceData',
method: 'post',
data: data // 直接提交数组作为body
});
}
// 查询所有科室数据
export function searchAllOrgData() {
return request({
url: '/change/price/searchAllOrgData',
method: 'post'
});
}
//根据所选科室数据查询当前科室下所有类型数据
export function searchHealthData(query) {
return request({
url: '/change/price/searchHealthData',
method: 'post',
params: query
});
}
// 验证药品
export function checkMedApprovalExist(itemId) {
return request({
url: '/change/price/checkMedApprovalExist',
method: 'post',
params: { itemId }
});
}
export function checkDeviceApprovalExist(itemId) {
return request({
url: '/change/price/checkDeviceApprovalExist',
method: 'post',
params: { itemId }
});
}
export function checkActivityApprovalExist(itemId) {
return request({
url: '/change/price/checkActivityApprovalExist',
method: 'post',
params: { itemId }
});
}
export function checkHealthApprovalExist(itemId) {
return request({
url: '/change/price/checkHealthApprovalExist',
method: 'post',
params: { itemId }
});
}
// 查询调价控制开关状态接口
export function getInitAdjustPriceSwitchState() {
return request({
url: '/change/price/getAdjustPriceSwitchState',
method: 'get',
params: query,
});
}

View File

@@ -1,16 +1,22 @@
<template>
<div>
<el-table ref="medicineRef" height="400" :data="medicineList" @cell-click="clickRow">
<el-table-column label="项目编码" align="center" prop="adviceDefinitionId" />
<el-table-column label="项目名称" align="center" prop="adviceName" />
<el-table-column label="当前价格" align="center" prop="retailPrice" />
<el-table-column label="规格" align="center" prop="volume" />
<el-table-column label="项目编码" align="center" prop="busNo" />
<el-table-column label="项目名称" align="center" prop="name" />
<el-table-column
v-if="categoryEnum !== 26"
label="当前进货价"
align="center"
prop="originBuyingPrice"
/>
<el-table-column label="当前零售价" align="center" prop="originRetailPrice" />
<el-table-column v-if="categoryEnum !== 26" label="规格" align="center" prop="volume" />
</el-table>
</div>
</template>
<script setup>
import { getMedicineList } from './api';
import { getMedicineListByMed, getMedicineListByDevice, getMedicineListByActivity } from './api';
import { watch } from 'vue';
import { throttle } from 'lodash-es';
@@ -23,51 +29,86 @@ const props = defineProps({
type: String,
default: '',
},
categoryEnum: {
type: Number,
default: 24, // 默认值为0表示药品类别
},
});
// 选择药品
const emit = defineEmits(['selectRow']);
// 查询参数
const queryParams = ref({
searchKey: props.searchKey,
// supplierId: props.supplierId,
categoryEnum: props.categoryEnum, // 使用props传入的categoryCode
});
// 药品列表
const medicineList = ref([]);
// 节流函数
// 是否正在请求中,防止重复请求
const isRequesting = ref(false);
const loadding = ref(false);
// 获取药品列表
const getList = async (query) => {
// 防止重复请求
if (isRequesting.value) {
return;
}
const params = query || queryParams.value;
console.log('queryParams', queryParams.value);
loadding.value = true;
isRequesting.value = true;
let apiPromise;
// 根据categoryEnum值选择不同的API函数
if (params.categoryEnum === 24) {
// 药品
apiPromise = getMedicineListByMed(params);
} else if (params.categoryEnum === 25) {
// 耗材
apiPromise = getMedicineListByDevice(params);
} else if (params.categoryEnum === 26) {
// 诊疗
apiPromise = getMedicineListByActivity(params);
}
try {
const res = await apiPromise;
// 检查响应数据结构API返回的data是直接数组而不是带records属性的对象
medicineList.value = Array.isArray(res.data) ? res.data : res.data.data || [];
} catch (error) {
medicineList.value = [];
} finally {
loadding.value = false;
isRequesting.value = false;
}
};
// 节流函数 - 使用防抖更合适,避免频繁请求
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
500,
{ leading: true, trailing: false }
);
// 获取药品列表
const getList = (query) => {
getMedicineList(query || queryParams.value).then((res) => {
medicineList.value = res.data.records;
});
};
// 点击行
const clickRow = (row) => {
console.log(row, 'row');
emit('selectRow', row);
};
// 监听搜索关键字
// 监听搜索关键字和类别编码
watch(
() => props,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
() => [props.searchKey, props.categoryEnum],
([newSearchKey, newCategoryEnum]) => {
queryParams.value.searchKey = newSearchKey;
queryParams.value.categoryEnum = newCategoryEnum; // 直接使用数字类型
throttledGetList();
},
{ immediate: true, deep: true }
);
// 获取药品列表
getList();
</script>
<style scoped>